summaryrefslogtreecommitdiff
path: root/include/sbi_utils/mailbox
AgeCommit message (Collapse)Author
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-06-10include: mailbox: Update RPMI notification structs and add performance eventsDavid E. Garcia Porras
Add rpmi_event_notification_state enum with disable, enable, and return current state IDs. Also, add req_state field to rpmi_enable_notification_req and current_state field to rpmi_enable_notification_resp for RPMI specification compliance. Add notification event ID enum and data structures for RPMI Performance service group events: power change, limit change, and level change. Signed-off-by: David E. Garcia Porras <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2026-06-07include: mailbox: rpmi_msgprot: Add RPMI performance domain flag definesDavid E. Garcia Porras
Add bit-field defines for the RPMI performance domain attributes flags and fast-channel attributes flags as specified in the RPMI specification. These are needed by platform implementations that provide RPMI performance services (e.g. DVFS controllers). Also add the missing db_write_value field to rpmi_perf_get_fast_chn_attr_resp to match the RPMI spec layout. Signed-off-by: David E. Garcia Porras <[email protected]> Reviewed-by: Anup Patel <[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-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: 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/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-05-20lib: utils/mailbox: Parse P2A doorbell system MSI index from DTAnup Patel
The P2A doorbell system MSI index is expected to be discovered from device tree instead of RPMI system MSI service group attribute. This is based on ARC feedback before RPMI spec was frozen. Let's parse P2A doorbell system MSI index from device tree and also expose it as rpmi channel attribute to RPMI client drivers. 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-13include: sbi_utils: Update RPMI service group IDs and BASE service groupAnup Patel
The service group ID assignment and some of the BASE services have changes in the latest RPMI specification so let's update the RPMI implementation accordingly. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[email protected]>
2025-02-13lib: utils: Implement get_attribute() for the RPMI shared memory mailboxAnup Patel
To allow clients query service group version of a RPMI mailbox channel, implement get_attribute() callback for the RPMI shared memory mailbox controller. Signed-off-by: Anup Patel <[email protected]>
2025-02-13include: sbi_utils: Include mailbox.h in rpmi_mailbox.h headerAnup Patel
The rpmi_mailbox.h uses structures defined in mailbox.h so let's include mailbox.h in rpmi_mailbox.h header. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[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/cppc: Add RPMI CPPC driverSubrahmanya Lingappa
Add RPMI based driver for CPPC register read, write and probe. Signed-off-by: Subrahmanya Lingappa <[email protected]> Co-developed-by: Rahul Pathak <[email protected]> Signed-off-by: Rahul Pathak <[email protected]> Co-developed-by: Sunil V L <[email protected]> Signed-off-by: Sunil V L <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib: utils/hsm: Add RPMI HSM driverSubrahmanya Lingappa
The RPMI HSM service group provides set of routine to query and control power states of a Hart. Add RPMI based Hart State Management (HSM) driver. Signed-off-by: Subrahmanya Lingappa <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib: utils/suspend: Add RPMI system suspend driverSubrahmanya Lingappa
Add RPMI based system suspend driver. To test this, execute the follwoing in Linux: $ echo mem > /sys/power/state To wake up, execute the following command on qemu monitor terminal: (qemu) system_wakeup Signed-off-by: Subrahmanya Lingappa <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib/utils: reset: Add RPMI System Reset driverRahul Pathak
Add RPMI based driver for system reset and enable it in the generic platform defconfig Signed-off-by: Rahul Pathak <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib/utils: Add RPMI messaging protocol and shared memory transport supportRahul Pathak
The RISC-V Platform Management Interface (RPMI) defines a messaging protocol and shared memory based transport for bi-directional communication with an on-chip or external microcontroller. To support RPMI in OpenSBI, add: 1) The RPMI messaging protocol defines and helper macros 2) A FDT mailbox driver for the RPMI shared memory transport Signed-off-by: Rahul Pathak <[email protected]> Co-developed-by: Subrahmanya Lingappa <[email protected]> Signed-off-by: Subrahmanya Lingappa <[email protected]> Co-developed-by: Anup Patel <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib: utils/mailbox: Add simple FDT based mailbox frameworkAnup Patel
Add a simple FDT based mailbox framework which is built on top of the generic mailbox library. The phandle of FDT mailbox DT node is treated as the unique mailbox controller ID which is required by the generic mailbox library. The FDT based mailbox drivers will be probed on-demand from fdt_mailbox_request_chan() called by the mailbox client drivers. Signed-off-by: Anup Patel <[email protected]>
2024-12-06lib: utils/mailbox: Add generic mailbox libraryAnup Patel
Add generic mailbox library which is independent of hardware description format. The OpenSBI platform support or mailbox drivers can register mailbox controller instances which can be discovered and used by different mailbox client drivers. Each mailbox controller instance has a unique ID which can be used by mailbox client drivers for find the mailbox controller instance. The mailbox client drivers will typically request a mailbox channel from the mailbox controller and use it to do data transfer with the remote end of mailbox channel. Signed-off-by: Anup Patel <[email protected]>