[RFC PATCH v3 4/5] platform/generic: Initialise MPT at boot
Rahul Pathak
rahul.pathak at oss.qualcomm.com
Sat Aug 22 05:21:04 PDT 2026
On Wed, Aug 12, 2026 at 5:14 PM Anup Patel <anup.patel at oss.qualcomm.com> wrote:
>
> On Thu, Aug 6, 2026 at 12:09 AM Rahul Pathak
> <rahul.pathak at oss.qualcomm.com> wrote:
> >
> > Integrates MPT initialisation into the generic platform boot flow.
> >
> > mpt_early_init() probes for SMMPT during cold-boot early init and
> > initialises the structures required to build MPT tables.
> >
> > mpt_final_init() creates the root supervisor domain which is mapping all
> > physical memory with the firmware region explcitly denied to S-mode and
> > adds support for an MPT domain for each additional registered SBI domain.
> >
> > The heap budget is extended to reserve space for MPT tables.
> >
> > With this patch MPT tables are built at boot.
> >
> > Signed-off-by: Rahul Pathak <rahul.pathak at oss.qualcomm.com>
>
> Initializing MPT from the generic platform is not the right way.
>
> My suggestion is the following:
> 1) Call sbi_mpt_init() from sbi_hart_init() only when cold_boot == true
> right after sbi_hart_pmp_init() is called.
> 2) Instead of mpt_final_init(), the sbi_mpt_init() will register sbi_domain_data
> with distinct setup() and cleanup() callbacks which are called for each
> domain.
>
Agree, will update in the next version
More information about the opensbi
mailing list