TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
spm_psa_client_call.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "psa/client.h"
Include dependency graph for spm_psa_client_call.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint32_t tfm_spm_client_psa_framework_version (void)
 handler for psa_framework_version. More...
 
uint32_t tfm_spm_client_psa_version (uint32_t sid, bool ns_caller)
 handler for psa_version. More...
 
psa_status_t tfm_spm_client_psa_connect (uint32_t sid, uint32_t version, bool ns_caller)
 handler for psa_connect. More...
 
psa_status_t tfm_spm_client_psa_call (psa_handle_t handle, int32_t type, const psa_invec *inptr, size_t in_num, psa_outvec *outptr, size_t out_num, bool ns_caller, uint32_t privileged)
 handler for psa_call. More...
 
void tfm_spm_client_psa_close (psa_handle_t handle, bool ns_caller)
 handler for psa_close. More...
 

Function Documentation

psa_status_t tfm_spm_client_psa_call ( psa_handle_t  handle,
int32_t  type,
const psa_invec inptr,
size_t  in_num,
psa_outvec outptr,
size_t  out_num,
bool  ns_caller,
uint32_t  privileged 
)

handler for psa_call.

Parameters
[in]handleService handle to the established connection, psa_handle_t
[in]typeThe request type. Must be zero( PSA_IPC_CALL) or positive.
[in]inptrArray of input psa_invec structures. psa_invec
[in]in_numNumber of input psa_invec structures. psa_invec
[in]outptrArray of output psa_outvec structures. psa_outvec
[in]out_numNumber of outut psa_outvec structures. psa_outvec
[in]ns_callerIf 'true', call from non-secure client. Otherwise from secure client.
[in]privilegedPrivileged mode or unprivileged mode: TFM_PARTITION_UNPRIVILEGED_MODE TFM_PARTITION_PRIVILEGED_MODE
Return values
PSA_SUCCESSSuccess.
Does not returnThe call is invalid, one or more of the following are true:
  • An invalid handle was passed.
  • The connection is already handling a request.
  • An invalid memory reference was provided.
  • in_num + out_num > PSA_MAX_IOVEC.
  • The message is unrecognized by the RoT Service or incorrectly formatted.

Definition at line 113 of file spm_psa_client_call.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void tfm_spm_client_psa_close ( psa_handle_t  handle,
bool  ns_caller 
)

handler for psa_close.

Parameters
[in]handleService handle to the connection to be closed, psa_handle_t
[in]ns_callerIf 'true', call from non-secure client. Otherwise from secure client.
Return values
voidSuccess.
Does not returnThe 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 252 of file spm_psa_client_call.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t tfm_spm_client_psa_connect ( uint32_t  sid,
uint32_t  version,
bool  ns_caller 
)

handler for psa_connect.

Parameters
[in]sidRoT Service identity.
[in]versionThe version of the RoT Service.
[in]ns_callerIf 'true', call from non-secure client. Otherwise from secure client.
Return values
PSA_SUCCESSSuccess.
PSA_ERROR_CONNECTION_REFUSEDThe SPM or RoT Service has refused the connection.
PSA_ERROR_CONNECTION_BUSYThe SPM or RoT Service cannot make the connection at the moment.
Does not returnThe RoT Service ID and version are not supported, or the caller is not permitted to access the service.

Definition at line 47 of file spm_psa_client_call.c.

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t tfm_spm_client_psa_framework_version ( void  )

handler for psa_framework_version.

Returns
version The version of the PSA Framework implementation that is providing the runtime services.

Definition at line 18 of file spm_psa_client_call.c.

Here is the caller graph for this function:

uint32_t tfm_spm_client_psa_version ( uint32_t  sid,
bool  ns_caller 
)

handler for psa_version.

Parameters
[in]sidRoT Service identity.
[in]ns_callerIf 'true', call from non-secure client. Otherwise from secure client.
Return values
PSA_VERSION_NONEThe 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 23 of file spm_psa_client_call.c.

Here is the call graph for this function:

Here is the caller graph for this function: