]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Include/IndustryStandard/ArmFfaSvc.h
ArmPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPkg / Include / IndustryStandard / ArmFfaSvc.h
1 /** @file
2 Header file for FF-A ABI's that will be used for
3 communication between S-EL0 and the Secure Partition
4 Manager(SPM)
5
6 Copyright (c) 2020, ARM Limited. All rights reserved.
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 @par Revision Reference:
11 - FF-A Version 1.0
12
13
14 **/
15
16 #ifndef ARM_FFA_SVC_H_
17 #define ARM_FFA_SVC_H_
18
19 #define ARM_SVC_ID_FFA_VERSION_AARCH32 0x84000063
20 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH32 0x8400006F
21 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH32 0x84000070
22 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64 0xC400006F
23 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64 0xC4000070
24
25 /* Generic IDs when using AArch32 or AArch64 execution state */
26 #ifdef MDE_CPU_AARCH64
27 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64
28 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64
29 #endif
30 #ifdef MDE_CPU_ARM
31 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH32
32 #define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH32
33 #endif
34
35 #define SPM_MAJOR_VERSION_FFA 1
36 #define SPM_MINOR_VERSION_FFA 0
37
38 #define ARM_FFA_SPM_RET_SUCCESS 0
39 #define ARM_FFA_SPM_RET_NOT_SUPPORTED -1
40 #define ARM_FFA_SPM_RET_INVALID_PARAMETERS -2
41 #define ARM_FFA_SPM_RET_NO_MEMORY -3
42 #define ARM_FFA_SPM_RET_BUSY -4
43 #define ARM_FFA_SPM_RET_INTERRUPTED -5
44 #define ARM_FFA_SPM_RET_DENIED -6
45 #define ARM_FFA_SPM_RET_RETRY -7
46 #define ARM_FFA_SPM_RET_ABORTED -8
47
48 // For now, the destination id to be used in the FF-A calls
49 // is being hard-coded. Subsequently, support will be added
50 // to get the endpoint id's dynamically
51 // This is the endpoint id used by the optee os's implementation
52 // of the spmc.
53 // https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/stmm_sp.c#L66
54 #define ARM_FFA_DESTINATION_ENDPOINT_ID 3
55
56 #endif // ARM_FFA_SVC_H_