]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: Align the trap handler to 64 bytes
authorSamuel Holland <samuel@sholland.org>
Tue, 31 Oct 2023 05:35:41 +0000 (00:35 -0500)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 2 Nov 2023 07:15:46 +0000 (15:15 +0800)
This is required on CPUs which always operate in CLIC mode, such as the
T-HEAD E906 and E907. Per the CLIC specification: "In this mode, the
trap vector base address held in mtvec is constrained to be aligned on a
64-byte or larger power-of-two boundary."

Reported-by: Madushan Nishantha <jlmadushan@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/cpu/mtrap.S

index 6eb3ed1d5a8838c1d58aedfa317cefb324f9cabc..5cad7b41ff76ec14bda87e640e60532fbff29fce 100644 (file)
@@ -26,7 +26,7 @@
        .text
 
        /* trap entry */
-       .align 2
+       .align 6
        .global trap_entry
 trap_entry:
        addi sp, sp, -32 * REGBYTES