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

Go to the source code of this file.

Functions

psa_status_t ps_system_prepare (void)
 Prepares the protected storage system for usage, populating internal structures. It identifies and validates the system metadata. More...
 
psa_status_t ps_object_create (psa_storage_uid_t uid, int32_t client_id, psa_storage_create_flags_t create_flags, uint32_t size)
 Creates a new object with the provided UID and client ID. More...
 
psa_status_t ps_object_read (psa_storage_uid_t uid, int32_t client_id, uint32_t offset, uint32_t size, size_t *p_data_length)
 Gets the data of the object with the provided UID and client ID. More...
 
psa_status_t ps_object_write (psa_storage_uid_t uid, int32_t client_id, uint32_t offset, uint32_t size)
 Writes data into the object with the provided UID and client ID. More...
 
psa_status_t ps_object_delete (psa_storage_uid_t uid, int32_t client_id)
 Deletes the object with the provided UID and client ID. More...
 
psa_status_t ps_object_get_info (psa_storage_uid_t uid, int32_t client_id, struct psa_storage_info_t *info)
 Gets the asset information for the object with the provided UID and client ID. More...
 
psa_status_t ps_system_wipe_all (void)
 Wipes the protected storage system and all object data. More...
 

Function Documentation

psa_status_t ps_object_create ( psa_storage_uid_t  uid,
int32_t  client_id,
psa_storage_create_flags_t  create_flags,
uint32_t  size 
)

Creates a new object with the provided UID and client ID.

Parameters
[in]uidUnique identifier for the data
[in]client_idIdentifier of the asset's owner (client)
[in]create_flagsFlags indicating the properties of the data
[in]sizeSize of the contents of data in bytes
Returns
Returns error code specified in psa_status_t

Definition at line 222 of file ps_object_system.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t ps_object_delete ( psa_storage_uid_t  uid,
int32_t  client_id 
)

Deletes the object with the provided UID and client ID.

Parameters
[in]uidUnique identifier for the data
[in]client_idIdentifier of the asset's owner (client)
Returns
Returns error code specified in psa_status_t

Definition at line 476 of file ps_object_system.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t ps_object_get_info ( psa_storage_uid_t  uid,
int32_t  client_id,
struct psa_storage_info_t info 
)

Gets the asset information for the object with the provided UID and client ID.

Parameters
[in]uidUnique identifier for the data
[in]client_idIdentifier of the asset's owner (client)
[out]infoPointer to the psa_storage_info_t struct that will be populated with the metadata
Returns
Returns error code specified in psa_status_t

Definition at line 442 of file ps_object_system.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t ps_object_read ( psa_storage_uid_t  uid,
int32_t  client_id,
uint32_t  offset,
uint32_t  size,
size_t *  p_data_length 
)

Gets the data of the object with the provided UID and client ID.

Parameters
[in]uidUnique identifier for the data
[in]client_idIdentifier of the asset's owner (client)
[in]offsetOffset in the object at which to begin the read
[in]sizeSize of the contents of data in bytes
[out]p_data_lengthOn success, this will contain size of the data written to asset
Returns
Returns error code specified in psa_status_t

Definition at line 175 of file ps_object_system.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t ps_object_write ( psa_storage_uid_t  uid,
int32_t  client_id,
uint32_t  offset,
uint32_t  size 
)

Writes data into the object with the provided UID and client ID.

Parameters
[in]uidUnique identifier for the data
[in]client_idIdentifier of the asset's owner (client)
[in]offsetOffset in the object at which to begin the write
[in]sizeSize of the contents of data in bytes
Returns
Returns error code specified in psa_status_t

Definition at line 337 of file ps_object_system.c.

Here is the call graph for this function:

psa_status_t ps_system_prepare ( void  )

Prepares the protected storage system for usage, populating internal structures. It identifies and validates the system metadata.

Returns
Returns error code specified in psa_status_t

Definition at line 157 of file ps_object_system.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t ps_system_wipe_all ( void  )

Wipes the protected storage system and all object data.

Returns
Returns error code specified in psa_status_t

Definition at line 522 of file ps_object_system.c.

Here is the call graph for this function:

Here is the caller graph for this function: