Skip to content

Commit

Permalink
core: ffa: make S-EL1 notifications virtualization-aware
Browse files Browse the repository at this point in the history
Add new defines for the ABI functions FFA_NOTIFICATION_GET and
FFA_NOTIFICATION_INFO_GET to support a more complete implementation of
the ABI.

The bookkeeping of the notification state is moved into a guest specific
struct notif_vm_bitmap.

Asynchronous notification is enabled per guest. Each guest defines its
own notification ID to request bottom half processing.

The FFA_NOTIFICATION_INFO_GET handler is updated to be able to report
multiple guest IDs.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
jenswi-linaro authored and jforissier committed Jul 2, 2024
1 parent d237e61 commit f6dcf23
Show file tree
Hide file tree
Showing 2 changed files with 350 additions and 106 deletions.
14 changes: 14 additions & 0 deletions core/arch/arm/include/ffa.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define FFA_DENIED -6
#define FFA_RETRY -7
#define FFA_ABORTED -8
#define FFA_NO_DATA -9

/* FFA_VERSION helpers */
#define FFA_VERSION_MAJOR U(1)
Expand Down Expand Up @@ -95,6 +96,19 @@
#define FFA_FEATURES_FUNC_ID_MASK BIT32(31)
#define FFA_FEATURES_FEATURE_ID_MASK GENMASK_32(7, 0)

/* Flags used in calls to FFA_NOTIFICATION_GET interface */
#define FFA_NOTIF_FLAG_BITMAP_SP BIT(0)
#define FFA_NOTIF_FLAG_BITMAP_VM BIT(1)
#define FFA_NOTIF_FLAG_BITMAP_SPM BIT(2)
#define FFA_NOTIF_FLAG_BITMAP_HYP BIT(3)

/* Flags used in calls to FFA_NOTIFICATION_INFO_GET interface */
#define FFA_NOTIF_INFO_GET_MORE_FLAG BIT(0)
#define FFA_NOTIF_INFO_GET_ID_LIST_SHIFT 12
#define FFA_NOTIF_INFO_GET_ID_COUNT_SHIFT 7
#define FFA_NOTIF_INFO_GET_ID_COUNT_MASK 0x1F

/* Feature IDs used with FFA_FEATURES */
#define FFA_FEATURE_NOTIF_PEND_INTR U(0x1)
#define FFA_FEATURE_SCHEDULE_RECV_INTR U(0x2)
#define FFA_FEATURE_MANAGED_EXIT_INTR U(0x3)
Expand Down
Loading

0 comments on commit f6dcf23

Please sign in to comment.