diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-05-23 13:30:58 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-05-24 08:22:47 +0530 |
commit | a6395acd6cb2c35871481d3e4f0beaf449f8c0fd (patch) | |
tree | 4361c3454a814e49cea8f53d0a6cf3885e7f280b /include/sbi/sbi_error.h | |
parent | bb915780ac76b146f3de47f105a95359e02f158c (diff) |
lib: Handle page/access fault caused by unpriv load/store
The unpriv load/store instruction from M-mode can cause page/access
fault to M-mode if S-mode page table did not have mappings OR it did
not have PMP access permission.
To tackle this, we redirect trap back to S-mode if unpriv load/store
instruction traps in M-mode.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_error.h')
-rw-r--r-- | include/sbi/sbi_error.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sbi/sbi_error.h b/include/sbi/sbi_error.h index db3d6dd..3ad78db 100644 --- a/include/sbi/sbi_error.h +++ b/include/sbi/sbi_error.h @@ -25,6 +25,7 @@ #define SBI_EILL -10 #define SBI_ENOSPC -11 #define SBI_ENOMEM -12 +#define SBI_ETRAP -13 /* clang-format on */ |