Skip to content

Commit

Permalink
riscv,entry: fix misaligned base for excp_vect_table
Browse files Browse the repository at this point in the history
In RV64, the size of each entry in excp_vect_table is 8 bytes. If the
base of the table is not 8-byte aligned, loading an entry in the table
will raise a misaligned exception. Although such exception will be
handled by opensbi/bbl, this still causes performance degradation.

Signed-off-by: Zihao Yu <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
  • Loading branch information
sashimi-yzh authored and palmer-dabbelt committed Apr 2, 2021
1 parent 285a76b commit ac8d0b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/riscv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ ENDPROC(__switch_to)
#endif

.section ".rodata"
.align LGREG
/* Exception vector table */
ENTRY(excp_vect_table)
RISCV_PTR do_trap_insn_misaligned
Expand Down

0 comments on commit ac8d0b9

Please sign in to comment.