Re: [RFC PATCH v3 4/5] platform/generic: Initialise MPT at boot
Rahul Pathak <[email protected]>
| Newsgroups | org.infradead.lists.opensbi |
|---|---|
| Message-ID | <CAFR3w36cqnMM0WeNVeobaxQn0G0YjBJUuVmYjmRYbbdyo9J1fA@mail.gmail.com> |
On Wed, Aug 12, 2026 at 5:14 PM Anup Patel <[email protected]> wrote: > > On Thu, Aug 6, 2026 at 12:09 AM Rahul Pathak > <[email protected]> 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 <[email protected]> > > 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 -- opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi