Skip to content

Commit 4756177

Browse files
committed
firmware: arm_ffa: Implement the FFA_NOTIFICATION_SET interface
The framework provides an interface to the sender to specify the notification to signal to the receiver. A sender signals a notification by requesting its partition manager to set the corresponding bit in the notifications bitmap of the receiver invoking FFA_NOTIFICATION_SET. Implement the FFA_NOTIFICATION_SET to enable the caller(sender) to send the notifications for any other partitions in the system. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent fe2ddb6 commit 4756177

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/firmware/arm_ffa/driver.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,26 @@ static int ffa_notification_bind_common(u16 dst_id, u64 bitmap,
616616
return 0;
617617
}
618618

619+
static
620+
int ffa_notification_set(u16 src_id, u16 dst_id, u32 flags, u64 bitmap)
621+
{
622+
ffa_value_t ret;
623+
u32 src_dst_ids = PACK_TARGET_INFO(dst_id, src_id);
624+
625+
invoke_ffa_fn((ffa_value_t) {
626+
.a0 = FFA_NOTIFICATION_SET, .a1 = src_dst_ids, .a2 = flags,
627+
.a3 = NOTIFICATION_BITMAP_LOW(bitmap),
628+
.a4 = NOTIFICATION_BITMAP_HIGH(bitmap),
629+
}, &ret);
630+
631+
if (ret.a0 == FFA_ERROR)
632+
return ffa_to_linux_errno((int)ret.a2);
633+
else if (ret.a0 != FFA_SUCCESS)
634+
return -EINVAL;
635+
636+
return 0;
637+
}
638+
619639
static int ffa_run(struct ffa_device *dev, u16 vcpu)
620640
{
621641
ffa_value_t ret;

0 commit comments

Comments
 (0)