TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_platform_secure_api.c File Reference
#include "tfm_platform_api.h"
#include "tfm_veneers.h"
Include dependency graph for tfm_platform_secure_api.c:

Go to the source code of this file.

Functions

enum tfm_platform_err_t tfm_platform_system_reset (void)
 Resets the system. More...
 
enum tfm_platform_err_t tfm_platform_ioctl (tfm_platform_ioctl_req_t request, psa_invec *input, psa_outvec *output)
 Performs a platform-specific service. More...
 
enum tfm_platform_err_t tfm_platform_nv_counter_increment (uint32_t counter_id)
 Increments the given non-volatile (NV) counter by one. More...
 
enum tfm_platform_err_t tfm_platform_nv_counter_read (uint32_t counter_id, uint32_t size, uint8_t *val)
 Reads the given non-volatile (NV) counter. More...
 

Function Documentation

enum tfm_platform_err_t tfm_platform_ioctl ( tfm_platform_ioctl_req_t  request,
psa_invec input,
psa_outvec output 
)

Performs a platform-specific service.

Parameters
[in]requestRequest identifier (valid values vary based on the platform)
[in]inputInput buffer to the requested service (or NULL)
[in,out]outputOutput buffer to the requested service (or NULL)
Returns
Returns values as specified by the tfm_platform_err_t

Definition at line 44 of file tfm_platform_secure_api.c.

Here is the call graph for this function:

Here is the caller graph for this function:

enum tfm_platform_err_t tfm_platform_nv_counter_increment ( uint32_t  counter_id)

Increments the given non-volatile (NV) counter by one.

Parameters
[in]counter_idNV counter ID.
Returns
TFM_PLATFORM_ERR_SUCCESS if the value is read correctly. Otherwise, it returns TFM_PLATFORM_ERR_SYSTEM_ERROR.

Definition at line 95 of file tfm_platform_secure_api.c.

Here is the call graph for this function:

Here is the caller graph for this function:

enum tfm_platform_err_t tfm_platform_nv_counter_read ( uint32_t  counter_id,
uint32_t  size,
uint8_t *  val 
)

Reads the given non-volatile (NV) counter.

Parameters
[in]counter_idNV counter ID.
[in]sizeSize of the buffer to store NV counter value in bytes.
[out]valPointer to store the current NV counter value.
Returns
TFM_PLATFORM_ERR_SUCCESS if the value is read correctly. Otherwise, it returns TFM_PLATFORM_ERR_SYSTEM_ERROR.

Definition at line 132 of file tfm_platform_secure_api.c.

Here is the call graph for this function:

Here is the caller graph for this function:

enum tfm_platform_err_t tfm_platform_system_reset ( void  )

Resets the system.

Returns
Returns values as specified by the tfm_platform_err_t

Definition at line 15 of file tfm_platform_secure_api.c.

Here is the call graph for this function: