Re: [PATCH 4/5] lib: sbi: Extend hart protection abstraction to allow ID configuration
Anup Patel <[email protected]>
| Newsgroups | org.infradead.lists.opensbi |
|---|---|
| Message-ID | <CAAhSdy10o7rzx5VCM6m9ShgNVeoqrwgsA4G0gjaHn1eJ-DDWzA@mail.gmail.com> |
On Wed, Aug 5, 2026 at 3:08 PM Yu-Chien Peter Lin <[email protected]> wrote: > > Hi Anup, > > On Mon, Jul 20, 2026 at 04:19:10PM +0530, Anup Patel wrote: > > On Mon, Jul 20, 2026 at 3:40 PM Yu-Chien Peter Lin <[email protected]> wrote: > > > > > > Hi Anup and Raymond, > > > > > > On Fri, Jul 17, 2026 at 01:14:12PM +0530, Anup Patel wrote: > > > > There are various ID configuration ISA extensions such as RISC-V Worlds, > > > > Supervisor domain ID, QoS ID, etc which need to be re-configured upon > > > > domain context switch on a hart. Extend hart protection abstraction to > > > > support both memory protection and ID configuration ISA extensions. > > > > > > I will rework my "[RFC,00/12] Add RISC-V Worlds ISA support to OpenSBI" > > > series based on this series. > > > > Thanks Peter! > > > > The RISC-V world DT property parsing can be done at the > > time of parsing domains from FDT (like already done in this > > series). The hart platform abstraction will be only for configuring > > the RISC-V world CSRs. > > > > May be you can add sbi_hart_worlds.c (just like sbi_hart_pmp.c) ? > > > > For RISC-V world checkers, we can have separate FDT based driver > > under lib/utils which will register sbi_domain_data instance upon probe > > of each RISC-V world checker instance. The domain_setup() and > > domain_cleanup() callbacks of the RISC-V worlds checker driver will > > program the RISC-V world checker MMIO registers. > > I expect the wgChecker driver will be implemented as a global FDT > driver, not bound to domain state. A checker slot table contains > all WIDs' permissions simultaneously and remains unchanged during > runtime (might be locked). So I think we should not add wgChecker > domain_setup/domain_cleanup callbacks. > I agree with your suggestion. The wgChecker is quite simple and does not need any in-memory data structures to be allocated (like IO-MPT) so a normal FDT driver probed via platform final init should be fine. Regards, Anup -- opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi