summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Include
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2021-02-19 12:06:04 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-02-23 15:40:37 +0000
commit0e43e02b9bd84ac68d140db68e700ba7398973b6 (patch)
treea7bc0f7049831d937f7b589cfe166e18fa7f086f /ArmPkg/Include
parent67f3f8b661d6ebdef571e70633ed6f6aee42a468 (diff)
downloadedk2-0e43e02b9bd84ac68d140db68e700ba7398973b6.tar.gz
edk2-0e43e02b9bd84ac68d140db68e700ba7398973b6.tar.bz2
edk2-0e43e02b9bd84ac68d140db68e700ba7398973b6.zip
ArmPkg: Allow FF-A calls to get memory region's attributes
Allow getting memory region's permissions using either of the Firmware Framework(FF-A) ABI transport or through the earlier used SVC calls. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Co-developed-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r--ArmPkg/Include/IndustryStandard/ArmFfaSvc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
index bdf6ce4676..65b8343ade 100644
--- a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
@@ -23,4 +23,22 @@
#define SPM_MAJOR_VERSION_FFA 1
#define SPM_MINOR_VERSION_FFA 0
+#define ARM_FFA_SPM_RET_SUCCESS 0
+#define ARM_FFA_SPM_RET_NOT_SUPPORTED -1
+#define ARM_FFA_SPM_RET_INVALID_PARAMETERS -2
+#define ARM_FFA_SPM_RET_NO_MEMORY -3
+#define ARM_FFA_SPM_RET_BUSY -4
+#define ARM_FFA_SPM_RET_INTERRUPTED -5
+#define ARM_FFA_SPM_RET_DENIED -6
+#define ARM_FFA_SPM_RET_RETRY -7
+#define ARM_FFA_SPM_RET_ABORTED -8
+
+// For now, the destination id to be used in the FF-A calls
+// is being hard-coded. Subsequently, support will be added
+// to get the endpoint id's dynamically
+// This is the endpoint id used by the optee os's implementation
+// of the spmc.
+// https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/stmm_sp.c#L66
+#define ARM_FFA_DESTINATION_ENDPOINT_ID 3
+
#endif // ARM_FFA_SVC_H_