[PATCH 3/3] lib: sbi_ecall: Add Kconfig option for each extension

Anup Patel anup at brainfault.org
Sat Oct 22 22:45:27 PDT 2022


On Thu, Oct 13, 2022 at 7:56 PM Andrew Jones <ajones at ventanamicro.com> wrote:
>
> On Tue, Oct 11, 2022 at 12:34:45AM +0800, Vivian Wang wrote:
> > For each SBI extension, we:
> >
> > - Add a Kconfig option for it
> > - Add the extension to sbi_ecall_exts only if the extension is enabled
> > - Add the corresponding sbi_ecall_* object file only if the extension is
> >   enabled
> >
> > Special cases are as follows:
> >
> > - The legacy extensions are lumped together as one 'big' extension, as
> >   has always been the case in OpenSBI code.
> > - The platform-defined vendor extensions are regarded as one extension.
> > - The Base extension cannot be disabled.
> > - sbi_ecall_replace implements multiple extensions, so it's not easy to
> >   avoid linking it in. Enable it always, and use #ifdef to
> >   disable/enable individual extensions.
>
> It's tempting to use this as an opportunity to break sbi_ecall_replace up
> into different files, but I'm not sure it's worth it.

I agree with you.

@Vivan/Drew, can one of you break-up sbi_ecall_replace.c so that
we can avoid the #ifdef in sources ?

Regards,
Anup

>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list