TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_nspm_ipc.c File Reference
#include <stdbool.h>
#include "tfm_spm_hal.h"
#include "psa/error.h"
#include "tfm_nspm.h"
#include "utilities.h"
#include "ext/tz_context.h"
Include dependency graph for tfm_nspm_ipc.c:

Go to the source code of this file.

Macros

#define DEFAULT_NS_CLIENT_ID   ((int32_t)-1)
 

Functions

int32_t tfm_nspm_get_current_client_id (void)
 Get the client ID of the current NS client. More...
 
__tfm_nspm_secure_gateway_attributes__
uint32_t 
TZ_InitContextSystem_S (void)
 
__tfm_nspm_secure_gateway_attributes__
TZ_MemoryId_t 
TZ_AllocModuleContext_S (TZ_ModuleId_t module)
 
__tfm_nspm_secure_gateway_attributes__
uint32_t 
TZ_FreeModuleContext_S (TZ_MemoryId_t id)
 
__tfm_nspm_secure_gateway_attributes__
uint32_t 
TZ_LoadContext_S (TZ_MemoryId_t id)
 
__tfm_nspm_secure_gateway_attributes__
uint32_t 
TZ_StoreContext_S (TZ_MemoryId_t id)
 
void tfm_nspm_thread_entry (void)
 
void configure_ns_code (void)
 

Macro Definition Documentation

#define DEFAULT_NS_CLIENT_ID   ((int32_t)-1)

Definition at line 15 of file tfm_nspm_ipc.c.

Function Documentation

void configure_ns_code ( void  )

Definition at line 109 of file tfm_nspm_ipc.c.

int32_t tfm_nspm_get_current_client_id ( void  )

Get the client ID of the current NS client.

Returns
The client id of the current NS client. 0 (invalid client id) is returned in case of error.

Definition at line 17 of file tfm_nspm_ipc.c.

void tfm_nspm_thread_entry ( void  )

IRQ count per partition Declarations of partition init functions

Definition at line 84 of file tfm_nspm_ipc.c.

Here is the call graph for this function:

Allocate context memory for calling secure software modules in TrustZone

Parameters
[in]moduleidentifies software modules called from non-secure mode
Returns
value != 0 id TrustZone memory slot identifier
value 0 no memory available or internal error

Definition at line 39 of file tfm_nspm_ipc.c.

__tfm_nspm_secure_gateway_attributes__ uint32_t TZ_FreeModuleContext_S ( TZ_MemoryId_t  id)

Free context memory that was previously allocated with TZ_AllocModuleContext_S

Parameters
[in]idTrustZone memory slot identifier
Returns
execution status (1: success, 0: error)

Definition at line 51 of file tfm_nspm_ipc.c.

__tfm_nspm_secure_gateway_attributes__ uint32_t TZ_InitContextSystem_S ( void  )

Initialize secure context memory system

Returns
execution status (1: success, 0: error)

Definition at line 28 of file tfm_nspm_ipc.c.

__tfm_nspm_secure_gateway_attributes__ uint32_t TZ_LoadContext_S ( TZ_MemoryId_t  id)

Load secure context (called on RTOS thread context switch)

Parameters
[in]idTrustZone memory slot identifier
Returns
execution status (1: success, 0: error)

Definition at line 62 of file tfm_nspm_ipc.c.

__tfm_nspm_secure_gateway_attributes__ uint32_t TZ_StoreContext_S ( TZ_MemoryId_t  id)

Store secure context (called on RTOS thread context switch)

Parameters
[in]idTrustZone memory slot identifier
Returns
execution status (1: success, 0: error)

Definition at line 73 of file tfm_nspm_ipc.c.