Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending FF-A definitions #10686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
#define ARM_FFA_SET_MEM_ATTR_CODE_PERM_X 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message typo: APL1 should be ALP1.

I was going to say something about merging updates based on an alpha-maturity specification, but ... Arm has published it on developer.arm.com and the revision history suggests this is normal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message is updated to include this change and additional reference to the FF-A memory protocol.

#define ARM_FFA_SET_MEM_ATTR_CODE_PERM_XN 1

#define ARM_FFA_MEM_PERM_RESERVED_MASK 0xFFFFFFF8

#define ARM_FFA_SET_MEM_ATTR_MAKE_PERM_REQUEST(dataperm, codeperm) \
((((codeperm) & ARM_FFA_SET_MEM_ATTR_CODE_PERM_MASK) << \
ARM_FFA_SET_MEM_ATTR_CODE_PERM_SHIFT) | \
Expand Down Expand Up @@ -224,4 +226,39 @@
#define IS_FID_FFA_ERROR(fid) \
(fid == ARM_FID_FFA_ERROR)

/*
* macro used in FFA_NOTIFICATION_GET/SET
* See FF-A spec sections for FFA_NOTIFICATION_GET and
* FFA_NOTIFICATION_SET
*/
#define ARM_FFA_NOTIFICATION_FLAG_PER_VCPU (0x1 << 0)

/** Flag to delay Schedule Receiver Interrupt. */
#define ARM_FFA_NOTIFICATION_FLAG_DELAY_SRI (0x1 << 1)

#define ARM_FFA_NOTIFICATION_FLAGS_VCPU_ID(id) ((id & 0xFFFF) << 16)

#define ARM_FFA_NOTIFICATION_FLAG_BITMAP_SP (0x1 << 0)
#define ARM_FFA_NOTIFICATION_FLAG_BITMAP_VM (0x1 << 1)
#define ARM_FFA_NOTIFICATION_FLAG_BITMAP_SPM (0x1 << 2)
#define ARM_FFA_NOTIFICATION_FLAG_BITMAP_HYP (0x1 << 3)

/*
* macro used in FFA_FEATURES function.
* See FF-A spec sections for FFA_FEATURES, Table of
* Feature IDs and properties table.
*/

/** Query interrupt ID of Notification Pending Interrupt. */
#define ARM_FFA_FEATURE_NPI 0x1U

/** Query interrupt ID of Schedule Receiver Interrupt. */
#define ARM_FFA_FEATURE_SRI 0x2U

/** Query interrupt ID of the Managed Exit Interrupt. */
#define ARM_FFA_FEATURE_MEI 0x3U

/** Query notifications features. */
#define ARM_FFA_FEATURE_NOTIFICATIONS 0x4U

#endif // ARM_FFA_SVC_H_
Loading