forked from Mirrors/opensbi
lib: sbi: add Ssdbltrp ISA extension support
Add Ssdbltrp trap handler support for S-mode double trap handling. If the trap is received while in VS-mode, then the trap is redirected to S-mode. If caught while in HS-mode, then an error is returned to the top trap handler which will panic. Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
This commit is contained in:

committed by
Anup Patel

parent
80656bdb1d
commit
9c78593269
@@ -350,6 +350,10 @@ struct sbi_trap_context *sbi_trap_handler(struct sbi_trap_context *tcntx)
|
||||
rc = sbi_store_access_handler(tcntx);
|
||||
msg = "store fault handler failed";
|
||||
break;
|
||||
case CAUSE_DOUBLE_TRAP:
|
||||
rc = sbi_double_trap_handler(tcntx);
|
||||
msg = "double trap handler failed";
|
||||
break;
|
||||
default:
|
||||
/* If the trap came from S or U mode, redirect it there */
|
||||
msg = "trap redirect failed";
|
||||
|
Reference in New Issue
Block a user