[PATCH 1/3] lib: sbi: Don't handle VS-mode ecall in sbi_trap_handler()

Anup Patel Anup.Patel at wdc.com
Wed Sep 9 01:03:50 EDT 2020



> -----Original Message-----
> From: Atish Patra <atishp at atishpatra.org>
> Sent: 08 September 2020 11:18
> To: Anup Patel <Anup.Patel at wdc.com>
> Cc: Atish Patra <Atish.Patra at wdc.com>; Alistair Francis
> <Alistair.Francis at wdc.com>; Anup Patel <anup at brainfault.org>; OpenSBI
> <opensbi at lists.infradead.org>
> Subject: Re: [PATCH 1/3] lib: sbi: Don't handle VS-mode ecall in
> sbi_trap_handler()
> 
> On Fri, Sep 4, 2020 at 5:14 AM Anup Patel <anup.patel at wdc.com> wrote:
> >
> > The VS-mode ecall is supposed to be handled by HS-mode so
> > sbi_trap_handler() should fallback to default case for VS-mode ecall
> > trap.
> >
> > Signed-off-by: Anup Patel <anup.patel at wdc.com>
> > ---
> >  lib/sbi/sbi_trap.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/lib/sbi/sbi_trap.c b/lib/sbi/sbi_trap.c index
> > c2bd061..8fe6753 100644
> > --- a/lib/sbi/sbi_trap.c
> > +++ b/lib/sbi/sbi_trap.c
> > @@ -251,7 +251,6 @@ void sbi_trap_handler(struct sbi_trap_regs *regs)
> >                 rc  = sbi_misaligned_store_handler(mtval, mtval2, mtinst, regs);
> >                 msg = "misaligned store handler failed";
> >                 break;
> > -       case CAUSE_SUPERVISOR_ECALL:
> >         case CAUSE_HYPERVISOR_ECALL:
> >                 rc  = sbi_ecall_handler(regs);
> >                 msg = "ecall handler failed";
> > --
> > 2.25.1
> >
> >
> > --
> > opensbi mailing list
> > opensbi at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/opensbi
> 
> 
> Reviewed-by: Atish Patra <atish.patra at wdc.com>

Applied this patch to the riscv/opensbi repo

Regards,
Anup


More information about the opensbi mailing list