Mistake on this page?
Report an issue in GitHub or email us
tfm_svcalls.h
1 /*
2  * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 #ifndef __TFM_SVCALLS_H__
8 #define __TFM_SVCALLS_H__
9 
10 /* Svcall for PSA Client APIs */
11 
12 /**
13  * \brief SVC handler for \ref psa_framework_version.
14  *
15  * \return version The version of the PSA Framework implementation
16  * that is providing the runtime services to the
17  * caller.
18  */
19 uint32_t tfm_svcall_psa_framework_version(void);
20 
21 /**
22  * \brief SVC handler for \ref psa_version.
23  *
24  * \param[in] args Include all input arguments: sid.
25  * \param[in] ns_caller If 'non-zero', call from non-secure client.
26  * Or from secure client.
27  *
28  * \retval PSA_VERSION_NONE The RoT Service is not implemented, or the
29  * caller is not permitted to access the service.
30  * \retval > 0 The minor version of the implemented RoT
31  * Service.
32  */
33 uint32_t tfm_svcall_psa_version(uint32_t *args, int32_t ns_caller);
34 
35 /**
36  * \brief SVC handler for \ref psa_connect.
37  *
38  * \param[in] args Include all input arguments:
39  * sid, minor_version.
40  * \param[in] ns_caller If 'non-zero', call from non-secure client.
41  * Or from secure client.
42  *
43  * \retval > 0 A handle for the connection.
44  * \retval PSA_CONNECTION_REFUSED The SPM or RoT Service has refused the
45  * connection.
46  * \retval PSA_CONNECTION_BUSY The SPM or RoT Service cannot make the
47  * connection at the moment.
48  * \retval "Does not return" The RoT Service ID and version are not
49  * supported, or the caller is not permitted to
50  * access the service.
51  */
52 psa_handle_t tfm_svcall_psa_connect(uint32_t *args, int32_t ns_caller);
53 
54 /**
55  * \brief SVC handler for \ref psa_call.
56  *
57  * \param[in] args Include all input arguments:
58  * handle, in_vec, in_len, out_vec, out_len.
59  * \param[in] ns_caller If 'non-zero', call from non-secure client.
60  * Or from secure client.
61  * \param[in] lr EXC_RETURN value of the SVC.
62  *
63  * \retval >=0 RoT Service-specific status value.
64  * \retval <0 RoT Service-specific error code.
65  * \retval PSA_DROP_CONNECTION The connection has been dropped by the RoT
66  * Service. This indicates that either this or
67  * a previous message was invalid.
68  * \retval "Does not return" The call is invalid, one or more of the
69  * following are true:
70  * \arg An invalid handle was passed.
71  * \arg The connection is already handling a request.
72  * \arg An invalid memory reference was provided.
73  * \arg in_len + out_len > PSA_MAX_IOVEC.
74  * \arg The message is unrecognized by the RoT
75  * Service or incorrectly formatted.
76  */
77 psa_status_t tfm_svcall_psa_call(uint32_t *args, int32_t ns_caller,
78  uint32_t lr);
79 
80 /**
81  * \brief SVC handler for \ref psa_close.
82  *
83  * \param[in] args Include all input arguments: handle.
84  * \param[in] ns_caller If 'non-zero', call from non-secure client.
85  * Or from secure client.
86  *
87  * \retval void Success.
88  * \retval "Does not return" The call is invalid, one or more of the
89  * following are true:
90  * \arg An invalid handle was provided that is not
91  * the null handle.
92  * \arg The connection is handling a request.
93  */
94 void tfm_svcall_psa_close(uint32_t *args, int32_t ns_caller);
95 
96 /**
97  * \brief SVC handler for IPC functions
98  *
99  * \param[in] svc_num SVC number
100  * \param[in] ctx Argument context
101  * \param[in] lr EXC_RETURN value of the SVC.
102  *
103  * \returns Return values from those who has,
104  * or PSA_SUCCESS.
105  */
106 int32_t SVC_Handler_IPC(tfm_svc_number_t svc_num, uint32_t *ctx, uint32_t lr);
107 
108 #endif
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.