summaryrefslogtreecommitdiff
path: root/lib/utils/mpxy
AgeCommit message (Collapse)Author
2026-07-22lib: utils/mpxy: bind channel access to owning domainHEADmasterOza Pawandeep
The MPXY framework currently stores registered channels in a global list and exposes them to all callers. However, the intended model is that each channel is assigned to a single supervisor domain at boot and remains owned by that domain for its lifetime. Introduce fixed owner-domain tracking in struct sbi_mpxy_channel and make channel lookup and enumeration domain-aware. A channel is now visible only when accessed from its owning domain. Also require the owner to be set before channel registration. This allows MPXY to support systems where the same hart may be reused by multiple domains while keeping channel ownership and visibility fixed to the domain that owns the service. Signed-off-by: Oza Pawandeep <[email protected]> Reviewed-by: Rahul Pathak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2026-07-01lib: utils/mpxy: Add RPMI MPXY driver for logging service groupSubrahmanya Lingappa
Add RPMI MPXY proxy driver for LOGGING service group so that S-mode can leverage LOGGING service group implemented by the platform microcontroller. Reviewed-by: Rahul Pathak <[email protected]> Signed-off-by: Subrahmanya Lingappa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2026-05-11lib: utils: Fix LLVM compile error in MPXY client driver for RPMI MMAnup Patel
The following compile error is seen with LLVM compiler: CC platform/generic/lib/utils/mpxy/fdt_mpxy_rpmi_mm.o lib/utils/mpxy/fdt_mpxy_rpmi_mm.c:17:6: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] 17 | [0] { | ^ | = lib/utils/mpxy/fdt_mpxy_rpmi_mm.c:24:6: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] 24 | [1] { | ^ | = 2 errors generated. Add missing "=" in mm_srvcdata[] array initialization to address the above issue. Fixes: 0b041e58c078 ("lib: utils: Add MPXY client driver for RPMI MM service group") Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Ranbir Singh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2026-04-06lib: utils: Add MPXY client driver for RPMI MM service groupRanbir Singh
Add necessary infra for implementing RPMI Management Mode service group on platform microcontroller. Co-authored-by: Sunil V L <[email protected]> Signed-off-by: Ranbir Singh <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-12-08lib: utils: Use SBI_DOMAIN_MMIO to check MMIO device permissionsSamuel Holland
Drivers or platforms may create memory regions with the MMIO flag set that contain S-mode-accessible MMIO devices. This is strictly correct and should be allowed, along with the existing default case of S-mode-accessible MMIO devices appearing in non-MMIO memory regions. When passed SBI_DOMAIN_MMIO, sbi_domain_check_addr() will perform the correct set of permission checks. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Yu-Chien Peter Lin <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-11-04lib: utils: Add MPXY RPMI mailbox driver for performanceJoshua Yeong
Add MPXY RPMI mailbox driver for performance. Signed-off-by: Joshua Yeong <[email protected]> Reviewed-by: Rahul Pathak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-11-04lib: utils: Add MPXY RPMI mailbox driver for device powerJoshua Yeong
Add MPXY RPMI mailbox driver for device power. Signed-off-by: Joshua Yeong <[email protected]> Reviewed-by: Rahul Pathak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-11-04lib: utils: Add MPXY RPMI mailbox driver for voltageJoshua Yeong
Add voltage service group for RPMI/MPXY support Signed-off-by: Joshua Yeong <[email protected]> Reviewed-by: Rahul Pathak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-06-24lib: rpmi: Make RPMI drivers as non-experimentalRahul Pathak
As RPMI v1.0 specification is frozen, disable the experimental tag for such RPMI drivers. Signed-off-by: Rahul Pathak <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-06-24lib: utils: Add Implementation ID and Version as RPMI MPXY attributesRahul Pathak
The latest frozen RPMI spec has added Implementation ID and Implementation Version as message protocol specific mpxy attributes. Add support for these. Signed-off-by: Rahul Pathak <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-05-20lib: utils: Fix fdt_mpxy_init() not returning error codeAlvin Chang
It seems that current implementation doesn't fail on fdt_mpxy_init(), because platforms might not have any MPXY devices. In fact, if there are no MPXY devices, fdt_driver_init_all() will return SBI_OK. More importantly, if there is any MPXY device which fails the initialization, OpenSBI must check the error code and stop the booting. Thus, this commit adds the return value for fdt_mpxy_init(). Signed-off-by: Alvin Chang <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-05-20lib: utils/mpxy: Remove p2a_db_index from RPMI system MSI attributesAnup Patel
The discovery of P2A doorbell system MSI index is now through RPMI shared memory DT node so remove p2a_db_index from RPMI system MSI attributes and access it as a mailbox channel attribute. Signed-off-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-02-13lib: utils: Add MPXY RPMI mailbox driver for System MSI service groupAnup Patel
The supervisor software can directly receive most of the system MSIs except P2A doorbell and MSIs preferred to be handled in M-mode. Add MPXY RPMI mailbox client driver for the System MSI service group. Signed-off-by: Anup Patel <[email protected]>
2025-02-13lib: utils: Populate MPXY channel attributes from RPMI channel attributesAnup Patel
Use the RPMI mailbox channel attributes to populate MPXY channel attributes instead of hard coding them. Signed-off-by: Anup Patel <[email protected]>
2025-02-13lib: utils: Improve variable declarations in MPXY RPMI mailbox clientAnup Patel
The local variable declarations should be at the start of function and preferrably organized like a inverted pyramid. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[email protected]>
2025-02-13lib: utils: Drop notifications from MPXY RPMI mailbox clientAnup Patel
Currently, the common MPXY RPMI mailbox client does not support notifications so no need for dummy notifications support. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[email protected]>
2025-02-13lib: utils: Introduce optional MPXY RPMI service group operationsAnup Patel
Some of the RPMI service groups may need additional context and special handling when transferring messages via underlying mailbox channel so introduce optional MPXY RPMI service group operations for this purpose. Signed-off-by: Anup Patel <[email protected]>
2025-02-13lib: utils: Constantify mpxy_rpmi_mbox_data in mpxy_rpmi_mboxAnup Patel
The mpxy_rpmi_mbox_data is provided by RPMI service group specific MPXY driver to the common MPXY RPMI mailbox client implementation so let's constantify mpxy_rpmi_mbox_data in mpxy_rpmi_mbox so that it is not accidently modified. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[email protected]>
2025-02-13lib: utils: Split the FDT MPXY RPMI mailbox client into two partsAnup Patel
Instead of having one common FDT MPXY RPMI mailbox client drivers for various RPMI service groups, split this driver into two parts: 1) Common MPXY RPMI mailbox client library 2) MPXY driver for RPMI clock service group The above split enables having a separate MPXY driver for each RPMI clock service group and #1 (above) will allow code sharing between various MPXY RPMI drivers. Signed-off-by: Anup Patel <[email protected]>
2024-12-21lib: utils: Mark RPMI drivers as experimentalSamuel Holland
These drivers were merged on an experimental basis without the RPMI specification being frozen. As a result, they may not be compatible with the frozen version of the RPMI protocol. Additionally, their devicetree bindings have not been reviewed and are subject to change. Warn the user that these drivers make no compatibility guarantees, and that their behavior and devicetree bindings may change incompatibly in future versions of OpenSBI. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-12-06lib: utils/mpxy: Add RPMI client driver for MPXYRahul Pathak
Add a generic RPMI mailbox client driver which provides a MPXY channel. Initially, this driver only supports RPMI clock service group but can be extended to support multiple RPMI service groups. Signed-off-by: Rahul Pathak <[email protected]> Co-developed-by: Anup Patel <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib: utils: Add simple FDT based MPXY driver frameworkAnup Patel
The generic platform can have multiple MPXY drivers so add a simple FDT based MPXY driver framework. Signed-off-by: Anup Patel <[email protected]>