TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
its_flash.c File Reference
#include "its_flash.h"
#include "flash_fs/its_flash_fs.h"
#include "tfm_hal_its.h"
#include "tfm_hal_ps.h"
Include dependency graph for its_flash.c:

Go to the source code of this file.

Macros

#define ITS_MAX_BLOCK_DATA_COPY   256
 

Functions

const struct its_flash_info_tits_flash_get_info (enum its_flash_id_t id)
 Gets the flash info structure for the provided flash device. More...
 
psa_status_t its_flash_block_to_block_move (const struct its_flash_info_t *info, uint32_t dst_block, size_t dst_offset, uint32_t src_block, size_t src_offset, size_t size)
 Moves data from source block ID to destination block ID. More...
 

Variables

struct its_flash_info_t its_flash_info_internal
 
struct its_flash_info_t its_flash_info_external
 

Macro Definition Documentation

#define ITS_MAX_BLOCK_DATA_COPY   256

Definition at line 16 of file its_flash.c.

Function Documentation

psa_status_t its_flash_block_to_block_move ( const struct its_flash_info_t info,
uint32_t  dst_block,
size_t  dst_offset,
uint32_t  src_block,
size_t  src_offset,
size_t  size 
)

Moves data from source block ID to destination block ID.

Parameters
[in]infoFlash device information
[in]dst_blockDestination block ID
[in]dst_offsetDestination offset position from the init of the destination block
[in]src_blockSource block ID
[in]src_offsetSource offset position from the init of the source block
[in]sizeNumber of bytes to moves
Note
This function assumes all input values are valid. That is, the address range, based on blockid, offset and size, is a valid range in flash. It also assumes that the destination block is already erased and ready to be written.
Returns
Returns PSA_SUCCESS if the function is executed correctly. Otherwise, it returns PSA_ERROR_STORAGE_FAILURE.

Definition at line 56 of file its_flash.c.

Here is the caller graph for this function:

const struct its_flash_info_t* its_flash_get_info ( enum its_flash_id_t  id)

Gets the flash info structure for the provided flash device.

Parameters
[in]idIdentifier of the flash device.
Returns
Pointer to the flash info struct.

Definition at line 27 of file its_flash.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct its_flash_info_t its_flash_info_external

Definition at line 99 of file its_flash_info_external.c.

struct its_flash_info_t its_flash_info_internal

Definition at line 98 of file its_flash_info_internal.c.