[coreboot-gerrit] New patch to review for coreboot: arch/riscv: Delegate exceptions to supervisor mode if appropriate
Jonathan Neuschäfer (j.neuschaefer@gmx.net)
gerrit at coreboot.org
Fri Aug 12 00:57:46 CEST 2016
Jonathan Neuschäfer (j.neuschaefer at gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16160
-gerrit
commit 12778510949222752f83386a9cb685a781ba3b16
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date: Thu Aug 11 22:49:14 2016 +0200
arch/riscv: Delegate exceptions to supervisor mode if appropriate
Change-Id: I1c8127412af0f9acc5b5520dc324ac145e59a4bd
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
src/arch/riscv/virtual_memory.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c
index bbbba7a..caffffb 100644
--- a/src/arch/riscv/virtual_memory.c
+++ b/src/arch/riscv/virtual_memory.c
@@ -139,4 +139,14 @@ void mstatus_init(void)
clear_csr(mip, MIP_MSIP);
set_csr(mie, MIP_MSIP);
+
+ /* Configure which exception causes are delegated to supervisor mode */
+ set_csr(medeleg, (1 << CAUSE_MISALIGNED_FETCH)
+ | (1 << CAUSE_FAULT_FETCH)
+ | (1 << CAUSE_ILLEGAL_INSTRUCTION)
+ | (1 << CAUSE_BREAKPOINT)
+ | (1 << CAUSE_FAULT_LOAD)
+ | (1 << CAUSE_FAULT_STORE)
+ | (1 << CAUSE_USER_ECALL)
+ );
}
More information about the coreboot-gerrit
mailing list