mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: Fix delegate_traps() for Linux boot
commit d403c70fb1
breaks Linux
booting because of fewer exceptions delegated to S-mode. This
patch fixes Linux booting by having all required exceptions
delegated to S-mode.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
@@ -95,7 +95,10 @@ static int delegate_traps(u32 hartid)
|
|||||||
/* Send M-mode interrupts and most exceptions to S-mode */
|
/* Send M-mode interrupts and most exceptions to S-mode */
|
||||||
interrupts = MIP_SSIP | MIP_STIP | MIP_SEIP;
|
interrupts = MIP_SSIP | MIP_STIP | MIP_SEIP;
|
||||||
exceptions = (1U << CAUSE_MISALIGNED_FETCH) |
|
exceptions = (1U << CAUSE_MISALIGNED_FETCH) |
|
||||||
|
(1U << CAUSE_FETCH_PAGE_FAULT) |
|
||||||
(1U << CAUSE_BREAKPOINT) |
|
(1U << CAUSE_BREAKPOINT) |
|
||||||
|
(1U << CAUSE_LOAD_PAGE_FAULT) |
|
||||||
|
(1U << CAUSE_STORE_PAGE_FAULT) |
|
||||||
(1U << CAUSE_USER_ECALL);
|
(1U << CAUSE_USER_ECALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user