[PATCH v4 3/4] lib: sbi: sw check exception delegation
Atish Kumar Patra
atishp at rivosinc.com
Mon Sep 9 16:26:41 PDT 2024
On Fri, Aug 23, 2024 at 11:47 AM Deepak Gupta <debug at rivosinc.com> wrote:
>
> zicfiss and zicfilp introduces new exception (cause=18). Delegate this
> exception to S mode because cfi violations in U / S will be reported
> via this exception.
>
> Signed-off-by: Deepak Gupta <debug at rivosinc.com>
> Reviewed-by: Samuel Holland <samuel.holland at sifive.com>
> ---
> lib/sbi/sbi_hart.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
> index 0636021..1f6c4c8 100644
> --- a/lib/sbi/sbi_hart.c
> +++ b/lib/sbi/sbi_hart.c
> @@ -207,7 +207,8 @@ static int delegate_traps(struct sbi_scratch *scratch)
> if (sbi_platform_has_mfaults_delegation(plat))
> exceptions |= (1U << CAUSE_FETCH_PAGE_FAULT) |
> (1U << CAUSE_LOAD_PAGE_FAULT) |
> - (1U << CAUSE_STORE_PAGE_FAULT);
> + (1U << CAUSE_STORE_PAGE_FAULT)|
> + (1U << CAUSE_SW_CHECK_EXCP);
>
> /*
> * If hypervisor extension available then we only handle hypervisor
> --
> 2.44.0
>
Reviewed-by: Atish Patra <atishp at rivosinc.com>
More information about the opensbi
mailing list