#include <stdint.h>
#include "common/spm_psa_client_call.h"
#include "psa/lifecycle.h"
#include "spm_func.h"
#include "tfm_core_utils.h"
#include "tfm_hal_platform.h"
#include "tfm_internal_defines.h"
#include "tfm_rpc.h"
#include "tfm_spm_hal.h"
Go to the source code of this file.
uint32_t tfm_spm_get_lifecycle_state |
( |
void |
| ) |
|
psa_status_t tfm_spm_psa_call |
( |
uint32_t * |
args, |
|
|
bool |
ns_caller, |
|
|
uint32_t |
lr |
|
) |
| |
SVC handler for psa_call.
- Parameters
-
[in] | args | Include all input arguments: handle, in_vec, in_len, out_vec, out_len. |
[in] | ns_caller | If 'true', call from non-secure client. Or from secure client. |
[in] | lr | EXC_RETURN value of the SVC. |
- Return values
-
>=0 | RoT Service-specific status value. |
<0 | RoT Service-specific error code. |
PSA_ERROR_PROGRAMMER_ERROR | The connection has been terminated by the RoT Service. The call is a PROGRAMMER ERROR if one or more of the following are true:
- An invalid handle was passed.
- The connection is already handling a request.
- type < 0.
- An invalid memory reference was provided.
- in_len + out_len > PSA_MAX_IOVEC.
- The message is unrecognized by the RoT Service or incorrectly formatted.
|
Definition at line 60 of file psa_client_service_apis.c.
void tfm_spm_psa_clear |
( |
void |
| ) |
|
SVC handler for psa_clear.
- Return values
-
void | Success. |
Does not return | The Secure Partition's doorbell signal is not currently asserted. |
Definition at line 565 of file psa_client_service_apis.c.
void tfm_spm_psa_close |
( |
uint32_t * |
args, |
|
|
bool |
ns_caller |
|
) |
| |
SVC handler for psa_close.
- Parameters
-
[in] | args | Include all input arguments: handle. |
[in] | ns_caller | If 'true', call from non-secure client. Or from secure client. |
- Return values
-
void | Success. |
Does not return | The call is invalid, one or more of the following are true:
- An invalid handle was provided that is not the null handle.
- The connection is handling a request.
|
Definition at line 108 of file psa_client_service_apis.c.
psa_status_t tfm_spm_psa_connect |
( |
uint32_t * |
args, |
|
|
bool |
ns_caller |
|
) |
| |
SVC handler for psa_connect.
- Parameters
-
[in] | args | Include all input arguments: sid, version. |
[in] | ns_caller | If 'true', call from non-secure client. Or from secure client. |
- Return values
-
PSA_SUCCESS | Success. |
PSA_ERROR_CONNECTION_REFUSED | The SPM or RoT Service has refused the connection. |
PSA_ERROR_CONNECTION_BUSY | The SPM or RoT Service cannot make the connection at the moment. |
Does not return | The RoT Service ID and version are not supported, or the caller is not permitted to access the service. |
Definition at line 48 of file psa_client_service_apis.c.
void tfm_spm_psa_eoi |
( |
uint32_t * |
args | ) |
|
uint32_t tfm_spm_psa_framework_version |
( |
void |
| ) |
|
SVC handler for psa_get.
- Parameters
-
[in] | args | Include all input arguments: signal, msg. |
- Return values
-
PSA_SUCCESS | Success, *msg will contain the delivered message. |
PSA_ERROR_DOES_NOT_EXIST | Message could not be delivered. |
Does not return | The call is invalid because one or more of the following are true:
- signal has more than a single bit set.
- signal does not correspond to an RoT Service.
- The RoT Service signal is not currently asserted.
- The msg pointer provided is not a valid memory reference.
|
Definition at line 170 of file psa_client_service_apis.c.
void tfm_spm_psa_notify |
( |
uint32_t * |
args | ) |
|
SVC handler for psa_notify.
- Parameters
-
[in] | args | Include all input arguments: partition_id. |
- Return values
-
void | Success. |
Does not return | partition_id does not correspond to a Secure Partition. |
Definition at line 555 of file psa_client_service_apis.c.
void tfm_spm_psa_panic |
( |
void |
| ) |
|
Terminate execution within the calling Secure Partition and will not return.
- Return values
-
Definition at line 622 of file psa_client_service_apis.c.
size_t tfm_spm_psa_read |
( |
uint32_t * |
args | ) |
|
SVC handler for psa_read.
- Parameters
-
[in] | args | Include all input arguments: msg_handle, invec_idx, buffer, num_bytes. |
- Return values
-
>0 | Number of bytes copied. |
0 | There was no remaining data in this input vector. |
Does not return | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- msg_handle does not refer to a request message.
- invec_idx is equal to or greater than PSA_MAX_IOVEC.
- the memory reference for buffer is invalid or not writable.
|
Definition at line 264 of file psa_client_service_apis.c.
void tfm_spm_psa_reply |
( |
uint32_t * |
args | ) |
|
SVC handler for psa_reply.
- Parameters
-
[in] | args | Include all input arguments: msg_handle, status. |
- Return values
-
void | Success. |
Does not return | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- An invalid status code is specified for the type of message.
|
Definition at line 455 of file psa_client_service_apis.c.
void tfm_spm_psa_set_rhandle |
( |
uint32_t * |
args | ) |
|
SVC handler for psa_set_rhandle.
- Parameters
-
[in] | args | Include all input arguments: msg_handle, rhandle. |
- Return values
-
void | Success, rhandle will be provided with all subsequent messages delivered on this connection. |
Does not return | msg_handle is invalid. |
Definition at line 240 of file psa_client_service_apis.c.
size_t tfm_spm_psa_skip |
( |
uint32_t * |
args | ) |
|
SVC handler for psa_skip.
- Parameters
-
[in] | args | Include all input arguments: msg_handle, invec_idx, num_bytes. |
- Return values
-
>0 | Number of bytes skipped. |
0 | There was no remaining data in this input vector. |
Does not return | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- msg_handle does not refer to a request message.
- invec_idx is equal to or greater than PSA_MAX_IOVEC.
|
Definition at line 333 of file psa_client_service_apis.c.
uint32_t tfm_spm_psa_version |
( |
uint32_t * |
args, |
|
|
bool |
ns_caller |
|
) |
| |
SVC handler for psa_version.
- Parameters
-
[in] | args | Include all input arguments: sid. |
[in] | ns_caller | If 'true', call from non-secure client. Or from secure client. |
- Return values
-
PSA_VERSION_NONE | The RoT Service is not implemented, or the caller is not permitted to access the service. |
> | 0 The version of the implemented RoT Service. |
Definition at line 38 of file psa_client_service_apis.c.
void tfm_spm_psa_write |
( |
uint32_t * |
args | ) |
|
SVC handler for psa_write.
- Parameters
-
[in] | args | Include all input arguments: msg_handle, outvec_idx, buffer, num_bytes. |
- Return values
-
void | Success |
Does not return | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- msg_handle does not refer to a request message.
- outvec_idx is equal to or greater than PSA_MAX_IOVEC.
- The memory reference for buffer is invalid.
- The call attempts to write data past the end of the client output vector.
|
Definition at line 388 of file psa_client_service_apis.c.