diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-04-15 11:53:31 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-09-30 15:29:37 +0530 |
commit | bbeb8e619d1cc528d2d56531512d6ea406f9738b (patch) | |
tree | 564a440550380b8fe3f5320ccf9c49739a158ae2 /include/sbi/sbi_trap.h | |
parent | 1a5614e971cf44e08342c2b1639fa3be544b0202 (diff) |
lib: Extend sbi_trap_redirect() for hypervisor extension
When hypervisor extension is available, we can get traps from VS/VU
modes. We should be able to force redirect some of these traps to
HS-mode. In other words, we should be able forward traps from VS/VU
mode to HS-mode using sbi_trap_redirect() hence this patch.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/sbi/sbi_trap.h')
-rw-r--r-- | include/sbi/sbi_trap.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sbi/sbi_trap.h b/include/sbi/sbi_trap.h index 19b95a7..bc26ad1 100644 --- a/include/sbi/sbi_trap.h +++ b/include/sbi/sbi_trap.h @@ -80,8 +80,10 @@ #define SBI_TRAP_REGS_mepc 32 /** Index of mstatus member in sbi_trap_regs */ #define SBI_TRAP_REGS_mstatus 33 +/** Index of mstatusH member in sbi_trap_regs */ +#define SBI_TRAP_REGS_mstatusH 34 /** Last member index in sbi_trap_regs */ -#define SBI_TRAP_REGS_last 34 +#define SBI_TRAP_REGS_last 35 /* clang-format on */ @@ -164,6 +166,8 @@ struct sbi_trap_regs { unsigned long mepc; /** mstatus register state */ unsigned long mstatus; + /** mstatusH register state (only for 32-bit) */ + unsigned long mstatusH; } __packed; struct sbi_scratch; |