[coreboot-gerrit] Change in coreboot[master]: arch/riscv: Align trap_entry to 4 bytes, as required
Jonathan Neuschäfer (Code Review)
gerrit at coreboot.org
Mon Jan 8 19:03:33 CET 2018
Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/23173
Change subject: arch/riscv: Align trap_entry to 4 bytes, as required
......................................................................
arch/riscv: Align trap_entry to 4 bytes, as required
The RISC-V Privileged Architecture spec 1.10 requires that the address part of
mtvec is four-byte aligned. The lower two bits encode a "mode" flag and should
be zero for now.
Add the necessary alignment directive before trap_entry.
Change-Id: I83ea23e2c8f984775985ae7d61f80ad75286baaa
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
M src/arch/riscv/trap_util.S
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/23173/1
diff --git a/src/arch/riscv/trap_util.S b/src/arch/riscv/trap_util.S
index 72a9ae1..8aba48b 100644
--- a/src/arch/riscv/trap_util.S
+++ b/src/arch/riscv/trap_util.S
@@ -109,6 +109,7 @@
.text
.global trap_entry
+ .align 2 # four byte alignment, as required by mtvec
trap_entry:
csrw mscratch, sp
--
To view, visit https://review.coreboot.org/23173
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83ea23e2c8f984775985ae7d61f80ad75286baaa
Gerrit-Change-Number: 23173
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180108/df33530d/attachment.html>
More information about the coreboot-gerrit
mailing list