#include <stdint.h>
#include "psa/client.h"
Go to the source code of this file.
|
enum | tfm_status_e {
TFM_SUCCESS = 0,
TFM_PARTITION_BUSY,
TFM_ERROR_SECURE_DOMAIN_LOCKED,
TFM_ERROR_INVALID_PARAMETER,
TFM_ERROR_PARTITION_NON_REENTRANT,
TFM_ERROR_NS_THREAD_MODE_CALL,
TFM_ERROR_NOT_INITIALIZED,
TFM_ERROR_NO_ACTIVE_PARTITION,
TFM_ERROR_INVALID_EXC_MODE,
TFM_SECURE_LOCK_FAILED,
TFM_SECURE_UNLOCK_FAILED,
TFM_ERROR_GENERIC = 0x1F
} |
|
#define TFM_CLIENT_ID_IS_NS |
( |
|
client_id | ) |
((client_id)<0) |
Checks if the provided client ID is a non-secure client ID.
- Parameters
-
[in] | client_id | Client ID to check. |
- Return values
-
1 | Client ID is non-secure. |
0 | Client ID is secure. |
Definition at line 38 of file tfm_api.h.
#define TFM_CLIENT_ID_IS_S |
( |
|
client_id | ) |
((client_id)>0) |
Checks if the provided client ID is a secure client ID.
- Parameters
-
[in] | client_id | Client ID to check. |
- Return values
-
1 | Client ID is secure. |
0 | Client ID is non-secure. |
Definition at line 28 of file tfm_api.h.
#define TFM_INVALID_CLIENT_ID 0 |
Enumerator |
---|
TFM_SUCCESS |
|
TFM_PARTITION_BUSY |
|
TFM_ERROR_SECURE_DOMAIN_LOCKED |
|
TFM_ERROR_INVALID_PARAMETER |
|
TFM_ERROR_PARTITION_NON_REENTRANT |
|
TFM_ERROR_NS_THREAD_MODE_CALL |
|
TFM_ERROR_NOT_INITIALIZED |
|
TFM_ERROR_NO_ACTIVE_PARTITION |
|
TFM_ERROR_INVALID_EXC_MODE |
|
TFM_SECURE_LOCK_FAILED |
|
TFM_SECURE_UNLOCK_FAILED |
|
TFM_ERROR_GENERIC |
|
Definition at line 45 of file tfm_api.h.
Call a secure function referenced by a connection handle.
- Parameters
-
[in] | handle | Handle to connection. |
[in] | ctrl_param | Parameter structure, includes request type, in_num and out_num. |
[in] | in_vec | Array of input psa_invec structures. |
[in,out] | out_vec | Array of output psa_outvec structures. |
- Returns
- Returns psa_status_t status code.
Definition at line 52 of file tfm_psa_api_veneers.c.
Close connection to secure function referenced by a connection handle.
- Parameters
-
[in] | handle | Handle to connection |
- Returns
- void
Definition at line 63 of file tfm_psa_api_veneers.c.
psa_handle_t tfm_psa_connect_veneer |
( |
uint32_t |
sid, |
|
|
uint32_t |
version |
|
) |
| |
Connect to secure function.
- Parameters
-
[in] | sid | ID of secure service. |
[in] | version | Version of SF requested by client. |
- Returns
- Returns handle to connection.
Definition at line 44 of file tfm_psa_api_veneers.c.
uint32_t tfm_psa_framework_version_veneer |
( |
void |
| ) |
|
Retrieve the version of the PSA Framework API that is implemented.
- Returns
- The version of the PSA Framework.
Definition at line 28 of file tfm_psa_api_veneers.c.
uint32_t tfm_psa_version_veneer |
( |
uint32_t |
sid | ) |
|
Return version of secure function provided by secure binary.
- Parameters
-
[in] | sid | ID of secure service. |
- Returns
- Version number of secure function.
Definition at line 36 of file tfm_psa_api_veneers.c.
enum tfm_status_e tfm_register_client_id |
( |
int32_t |
ns_client_id | ) |
|
Assign client ID to the current TZ context.
- Parameters
-
[in] | ns_client_id | The client ID to be assigned to the current context. |
- Return values
-
TFM_SUCCESS | The client ID assigned successfully. |
error | code The client ID assignment failed, an error code returned according to tfm_status_e. |
- Note
- This function have to be called from handler mode.