Skip to content

Commit

Permalink
riscv: fix misalgned trap vector base address
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jaypiper authored and palmer-dabbelt committed Oct 27, 2021
1 parent 3ef6ca4 commit 64a1959
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/riscv/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ setup_trap_vector:
csrw CSR_SCRATCH, zero
ret

.align 2
.Lsecondary_park:
/* We lack SMP support or have too many harts, so park this hart */
wfi
Expand Down

0 comments on commit 64a1959

Please sign in to comment.