aboutsummaryrefslogtreecommitdiff
path: root/lib/utils/mailbox
AgeCommit message (Collapse)AuthorFilesLines
2025-06-24lib: rpmi: Make RPMI drivers as non-experimentalRahul Pathak1-1/+0
As RPMI v1.0 specification is frozen, disable the experimental tag for such RPMI drivers. Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250618053854.2577299-2-rpathak@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
2025-06-24lib: utils: Add Implementation ID and Version as RPMI MPXY attributesRahul Pathak1-0/+6
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 <rpathak@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250618053854.2577299-1-rpathak@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
2025-05-20lib: utils/mailbox: Parse A2P doorbell value from DTAnup Patel1-4/+10
The A2P doorbell value written to the 32-bit A2P doorbell value must be discoverd from device tree instead of always using the default value 1. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20250512083827.804151-4-apatel@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
2025-05-20lib: utils/mailbox: Parse P2A doorbell system MSI index from DTAnup Patel1-4/+12
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 <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20250512083827.804151-3-apatel@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
2025-05-20lib: utils/mailbox: Update DT register name of A2P doorbellAnup Patel1-2/+2
The latest device tree bindings define A2P doorbell register name as "a2p-doorbell" so update rpmi_shmem_transport_init() accordingly. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20250512083827.804151-2-apatel@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
2025-04-15lib: sbi: Remove unnecessary SBI_INIT_LIST_HEADXiang W1-2/+0
No need to initialise the nodes to be added to the linked list Signed-off-by: Xiang W <wxjstz@126.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250319123944.505756-1-wxjstz@126.com Signed-off-by: Anup Patel <anup@brainfault.org>
2025-02-13include: sbi_utils: Update RPMI service group IDs and BASE service groupAnup Patel1-4/+0
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 <apatel@ventanamicro.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
2025-02-13lib: utils: Implement get_attribute() for the RPMI shared memory mailboxAnup Patel1-0/+35
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 <apatel@ventanamicro.com>
2024-12-21lib: utils: Mark RPMI drivers as experimentalSamuel Holland1-0/+1
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 <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2024-12-06lib/utils: Add RPMI messaging protocol and shared memory transport supportRahul Pathak4-0/+883
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 <rpathak@ventanamicro.com> Co-developed-by: Subrahmanya Lingappa <slingappa@ventanamicro.com> Signed-off-by: Subrahmanya Lingappa <slingappa@ventanamicro.com> Co-developed-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Anup Patel <apatel@ventanamicro.com>
2024-12-06lib: utils/mailbox: Add simple FDT based mailbox frameworkAnup Patel4-0/+110
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 <apatel@ventanamicro.com>
2024-12-06lib: utils/mailbox: Add generic mailbox libraryAnup Patel3-0/+157
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 <apatel@ventanamicro.com>