1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
4  */
5 
6 #ifndef LIBSP_INCLUDE_FFA_INTERNAL_API_H_
7 #define LIBSP_INCLUDE_FFA_INTERNAL_API_H_
8 
9 /**
10  * @file  ffa_internal_api.h
11  * @brief The file contains the definition of the bottom layer of the SEL-0 FF-A
12  *        implementation which SVC caller function.
13  */
14 
15 #include <stdint.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #ifdef ARM32
22 struct ffa_params {
23 	uint32_t a0;	/**< Function ID */
24 	uint32_t a1;	/**< Parameter */
25 	uint32_t a2;	/**< Parameter */
26 	uint32_t a3;	/**< Parameter */
27 	uint32_t a4;	/**< Parameter */
28 	uint32_t a5;	/**< Parameter */
29 	uint32_t a6;	/**< Parameter */
30 	uint32_t a7;	/**< Parameter */
31 };
32 #endif /* ARM32 */
33 
34 #ifdef ARM64
35 struct ffa_params {
36 	uint64_t a0;	/**< Function ID */
37 	uint64_t a1;	/**< Parameter */
38 	uint64_t a2;	/**< Parameter */
39 	uint64_t a3;	/**< Parameter */
40 	uint64_t a4;	/**< Parameter */
41 	uint64_t a5;	/**< Parameter */
42 	uint64_t a6;	/**< Parameter */
43 	uint64_t a7;	/**< Parameter */
44 };
45 #endif /* ARM64 */
46 
47 /**
48  * @brief      SVC conduit caller function
49  * @param[in]  a0, a1, a2, a3, a4, a5, a6, a7 Register values of the request
50  * @param[out] result                         Register values of the response
51  */
52 #ifdef ARM64
53 void ffa_svc(uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t a4,
54 	     uint64_t a5, uint64_t a6, uint64_t a7, struct ffa_params *result);
55 #endif /* ARM64 */
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* LIBSP_INCLUDE_FFA_INTERNAL_API_H_ */
62