[PATCH 2/3] firmware: Fix code for accessing hart_count and stack_size to be more flexible

Anup Patel anup at brainfault.org
Sat Mar 26 20:29:49 PDT 2022


On Mon, Mar 21, 2022 at 6:18 PM Anup Patel <anup at brainfault.org> wrote:
>
> On Tue, Mar 15, 2022 at 9:52 PM Xiang W <wxjstz at 126.com> wrote:
> >
> > lwu exists under the current rv64 and should also exist under the rv128
> > in the future, so I modified the conditions of conditional compilation
> > so that it can adapt to the future situation
> >
> > Signed-off-by: Xiang W <wxjstz at 126.com>
>
> The PATCH subject is too long (almost 80 characters). If possible
> simplify this.
>
> Otherwise, it looks good to me.
>
> Reviewed-by: Anup Patel <anup at brainfault.org>

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

>
> Regards,
> Anup
>
> > ---
> >  firmware/fw_base.S | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/firmware/fw_base.S b/firmware/fw_base.S
> > index ab3e1b3..07be4c4 100644
> > --- a/firmware/fw_base.S
> > +++ b/firmware/fw_base.S
> > @@ -259,7 +259,7 @@ _bss_zero:
> >          * s8 -> HART Stack Size
> >          */
> >         lla     a4, platform
> > -#if __riscv_xlen == 64
> > +#if __riscv_xlen > 32
> >         lwu     s7, SBI_PLATFORM_HART_COUNT_OFFSET(a4)
> >         lwu     s8, SBI_PLATFORM_HART_STACK_SIZE_OFFSET(a4)
> >  #else
> > --
> > 2.30.2
> >



More information about the opensbi mailing list