mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-07-27 00:11:30 +01:00
lib: utils/mpxy: bind channel access to owning domain
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 <pawandeep.oza@oss.qualcomm.com> Reviewed-by: Rahul Pathak <rahul.pathak@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260721215758.695736-1-pawandeep.oza@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
committed by
Anup Patel
parent
7a90f41fb9
commit
c0f87f10d1
@@ -299,6 +299,8 @@ int mpxy_rpmi_mbox_init(const void *fdt, int nodeoff, const struct fdt_match *ma
|
||||
/* Setup MPXY mbox client */
|
||||
/* Channel ID*/
|
||||
rmb->channel.channel_id = channel_id;
|
||||
/* Set the owner domain */
|
||||
rmb->channel.owner_domain = &root;
|
||||
/* Callback for read RPMI attributes */
|
||||
rmb->channel.read_attributes = mpxy_mbox_read_attributes;
|
||||
/* Callback for write RPMI attributes */
|
||||
|
||||
Reference in New Issue
Block a user