Skip to content

Commit 64a1959

Browse files
jaypiperpalmer-dabbelt
authored andcommitted
riscv: fix misalgned trap vector base address
The trap vector marked by label .Lsecondary_park must align on a 4-byte boundary, as the {m,s}tvec is defined to require 4-byte alignment. Signed-off-by: Chen Lu <[email protected]> Reviewed-by: Anup Patel <[email protected]> Fixes: e011995 ("RISC-V: Move relocate and few other functions out of __init") Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 3ef6ca4 commit 64a1959

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kernel/head.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ setup_trap_vector:
193193
csrw CSR_SCRATCH, zero
194194
ret
195195

196+
.align 2
196197
.Lsecondary_park:
197198
/* We lack SMP support or have too many harts, so park this hart */
198199
wfi

0 commit comments

Comments
 (0)