[PATCH] firmware: Remove redundant add instruction from trap restore path

Anup Patel Anup.Patel at wdc.com
Thu Apr 1 13:48:35 BST 2021



> -----Original Message-----
> From: Jessica Clarke <jrtc27 at jrtc27.com>
> Sent: 01 April 2021 17:47
> 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 at lists.infradead.org
> Subject: Re: [PATCH] firmware: Remove redundant add instruction from trap
> restore path
> 
> On 1 Apr 2021, at 12:19, Anup Patel <anup.patel at wdc.com> wrote:
> >
> > The "add sp, a0, zero" instruction in the trap restore path is
> > redundant and can be avoided if TRAP_RESTORE_xyz() assembly macros
> use
> > a0 as the base register instead of sp.
> 
> Are interrupts disabled at this point?

Yes, interrupts are disabled.

Currently, we are not enabling interrupts while running in M-mode.
We only get interrupts in M-mode when we are in lower privilege modes.

Regards,
Anup




More information about the opensbi mailing list