[RFC PATCH v2 3/5] platform/generic: Initialise MPT at boot
Rahul Pathak
rahul at summations.net
Tue Jul 28 19:37:43 PDT 2026
On Tue, Jul 28, 2026 at 11:30 PM Pawandeep Oza
<pawandeep.oza at oss.qualcomm.com> wrote:
>
> On Mon, Jul 27, 2026 at 6:56 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>
> > ---
> > platform/generic/platform.c | 101 ++++++++++++++++++++++++++++++++++++
> > 1 file changed, 101 insertions(+)
> >
> >
> > int generic_final_init(bool cold_boot)
> > {
> > + int rc;
> > void *fdt = fdt_get_address_rw();
> >
> > if (!cold_boot)
> > return 0;
> >
> > + rc = mpt_final_init(cold_boot);
> > + if (rc)
> > + return rc;
> > +
> Oza: do you think - if there is a need to move this call after all
> the fixup calls ?
The only dependency is whether sbi domain memregions
have finalized, which already happens before
sbi_platform_final_init. So call to mpt_final_init before or after the *fixups
wont change anything IMO.
> > fdt_cpu_fixup(fdt);
> > fdt_fixups(fdt);
> > fdt_domain_fixup(fdt);
> > --
> > 2.
More information about the opensbi
mailing list