mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-27 06:50:37 +00:00
firmware: arm_ffa: Add support for passing UUID in FFA_MSG_SEND2
FF-A v1.2 introduces UUID field in partition message header used in FFA_MSG_SEND2 to enable partitions/endpoints exposing multiple UUIDs. Add the support for passing UUID in FFA_MSG_SEND2. Tested-by: Viresh Kumar <viresh.kumar@linaro.org> Message-Id: <20250217-ffa_updates-v3-10-bd1d9de615e7@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
parent
84968e32d3
commit
910cc1acc9
@ -484,9 +484,9 @@ static int ffa_msg_send_direct_req(u16 src_id, u16 dst_id, bool mode_32bit,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ffa_msg_send2(u16 src_id, u16 dst_id, void *buf, size_t sz)
|
||||
static int ffa_msg_send2(struct ffa_device *dev, u16 src_id, void *buf, size_t sz)
|
||||
{
|
||||
u32 src_dst_ids = PACK_TARGET_INFO(src_id, dst_id);
|
||||
u32 src_dst_ids = PACK_TARGET_INFO(src_id, dev->vm_id);
|
||||
struct ffa_indirect_msg_hdr *msg;
|
||||
ffa_value_t ret;
|
||||
int retval = 0;
|
||||
@ -502,6 +502,7 @@ static int ffa_msg_send2(u16 src_id, u16 dst_id, void *buf, size_t sz)
|
||||
msg->offset = sizeof(*msg);
|
||||
msg->send_recv_id = src_dst_ids;
|
||||
msg->size = sz;
|
||||
uuid_copy(&msg->uuid, &dev->uuid);
|
||||
memcpy((u8 *)msg + msg->offset, buf, sz);
|
||||
|
||||
/* flags = 0, sender VMID = 0 works for both physical/virtual NS */
|
||||
@ -1054,7 +1055,7 @@ static int ffa_sync_send_receive(struct ffa_device *dev,
|
||||
|
||||
static int ffa_indirect_msg_send(struct ffa_device *dev, void *buf, size_t sz)
|
||||
{
|
||||
return ffa_msg_send2(drv_info->vm_id, dev->vm_id, buf, sz);
|
||||
return ffa_msg_send2(dev, drv_info->vm_id, buf, sz);
|
||||
}
|
||||
|
||||
static int ffa_sync_send_receive2(struct ffa_device *dev,
|
||||
|
@ -282,6 +282,7 @@ struct ffa_indirect_msg_hdr {
|
||||
u32 offset;
|
||||
u32 send_recv_id;
|
||||
u32 size;
|
||||
uuid_t uuid;
|
||||
};
|
||||
|
||||
/* For use with FFA_MSG_SEND_DIRECT_{REQ,RESP}2 which pass data via registers */
|
||||
|
Loading…
Reference in New Issue
Block a user