TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
its_flash_info_internal.c File Reference
#include "its_flash.h"
#include "Driver_Flash.h"
#include "flash_layout.h"
#include "its_utils.h"
#include "its_flash_nor.h"
Include dependency graph for its_flash_info_internal.c:

Go to the source code of this file.

Macros

#define FLASH_INFO_INIT   its_flash_nor_init
 
#define FLASH_INFO_READ   its_flash_nor_read
 
#define FLASH_INFO_WRITE   its_flash_nor_write
 
#define FLASH_INFO_FLUSH   its_flash_nor_flush
 
#define FLASH_INFO_ERASE   its_flash_nor_erase
 
#define ITS_FLASH_ALIGNMENT   ITS_FLASH_PROGRAM_UNIT
 
#define FLASH_INFO_BLOCK_SIZE   (ITS_SECTOR_SIZE * ITS_SECTORS_PER_BLOCK)
 
#define FLASH_INFO_MAX_FILE_SIZE
 
#define FLASH_INFO_MAX_NUM_FILES   (ITS_NUM_ASSETS + 1)
 
#define FLASH_INFO_ERASE_VAL   0xFFU
 
#define FLASH_INFO_DEV   &ITS_FLASH_DEV_NAME
 

Variables

ARM_DRIVER_FLASH ITS_FLASH_DEV_NAME
 
struct its_flash_info_t its_flash_info_internal
 

Macro Definition Documentation

#define FLASH_INFO_BLOCK_SIZE   (ITS_SECTOR_SIZE * ITS_SECTORS_PER_BLOCK)

Definition at line 76 of file its_flash_info_internal.c.

#define FLASH_INFO_DEV   &ITS_FLASH_DEV_NAME

Definition at line 95 of file its_flash_info_internal.c.

#define FLASH_INFO_ERASE   its_flash_nor_erase

Definition at line 56 of file its_flash_info_internal.c.

#define FLASH_INFO_ERASE_VAL   0xFFU

Definition at line 86 of file its_flash_info_internal.c.

#define FLASH_INFO_FLUSH   its_flash_nor_flush

Definition at line 55 of file its_flash_info_internal.c.

#define FLASH_INFO_INIT   its_flash_nor_init

Definition at line 52 of file its_flash_info_internal.c.

#define FLASH_INFO_MAX_FILE_SIZE
Value:
ITS_UTILS_ALIGN(ITS_MAX_ASSET_SIZE, \
#define ITS_FLASH_ALIGNMENT
#define ITS_UTILS_ALIGN(x, a)
Aligns a value up to the provided alignment.
Definition: its_utils.h:56

Definition at line 79 of file its_flash_info_internal.c.

#define FLASH_INFO_MAX_NUM_FILES   (ITS_NUM_ASSETS + 1)

Definition at line 83 of file its_flash_info_internal.c.

#define FLASH_INFO_READ   its_flash_nor_read

Definition at line 53 of file its_flash_info_internal.c.

#define FLASH_INFO_WRITE   its_flash_nor_write

Definition at line 54 of file its_flash_info_internal.c.

#define ITS_FLASH_ALIGNMENT   ITS_FLASH_PROGRAM_UNIT

Definition at line 59 of file its_flash_info_internal.c.

Variable Documentation

ARM_DRIVER_FLASH ITS_FLASH_DEV_NAME
struct its_flash_info_t its_flash_info_internal
Initial value:
= {
.flash_dev = (void *) &ITS_FLASH_DEV_NAME ,
.fs_info = {0, 0},
.sector_size = ITS_SECTOR_SIZE,
.block_size = (ITS_SECTOR_SIZE * ITS_SECTORS_PER_BLOCK) ,
.num_blocks = 0,
.program_unit = ITS_FLASH_PROGRAM_UNIT ,
.max_file_size = ITS_UTILS_ALIGN(ITS_MAX_ASSET_SIZE, ITS_FLASH_PROGRAM_UNIT ) ,
.max_num_files = (ITS_NUM_ASSETS + 1) ,
.erase_val = 0xFFU ,
}
ARM_DRIVER_FLASH ITS_FLASH_DEV_NAME
psa_status_t its_flash_nor_erase(const struct its_flash_info_t *info, uint32_t block_id)
Erases block ID data.
Definition: its_flash_nor.c:79
psa_status_t its_flash_nor_write(const struct its_flash_info_t *info, uint32_t block_id, const uint8_t *buff, size_t offset, size_t size)
Writes block data to the position specified by block ID and offset.
Definition: its_flash_nor.c:55
psa_status_t its_flash_nor_flush(const struct its_flash_info_t *info)
Flushes modifications to a block to flash.
Definition: its_flash_nor.c:70
psa_status_t its_flash_nor_read(const struct its_flash_info_t *info, uint32_t block_id, uint8_t *buff, size_t offset, size_t size)
Reads block data from the position specified by block ID and offset.
Definition: its_flash_nor.c:40
psa_status_t its_flash_nor_init(const struct its_flash_info_t *info)
Initialize the Flash Interface.
Definition: its_flash_nor.c:28
#define ITS_UTILS_ALIGN(x, a)
Aligns a value up to the provided alignment.
Definition: its_utils.h:56

Definition at line 98 of file its_flash_info_internal.c.