TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
its_flash_fs_dblock.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __ITS_FLASH_FS_DBLOCK_H__
9 #define __ITS_FLASH_FS_DBLOCK_H__
10 
11 #include <stddef.h>
12 #include <stdint.h>
13 
14 #include "psa/error.h"
15 #include "its_flash_fs_mblock.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
36  struct its_flash_fs_ctx_t *fs_ctx,
37  uint32_t lblock,
38  size_t free_size,
39  size_t src_offset,
40  size_t dst_offset,
41  size_t size);
42 
55  struct its_flash_fs_ctx_t *fs_ctx,
56  const struct its_file_meta_t *file_meta,
57  size_t offset,
58  size_t size,
59  uint8_t *buf);
60 
77  struct its_flash_fs_ctx_t *fs_ctx,
78  const struct its_block_meta_t *block_meta,
79  const struct its_file_meta_t *file_meta,
80  size_t offset,
81  size_t size,
82  const uint8_t *data);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif /* __ITS_FLASH_FS_DBLOCK_H__ */
psa_status_t its_flash_fs_dblock_read_file(struct its_flash_fs_ctx_t *fs_ctx, const struct its_file_meta_t *file_meta, size_t offset, size_t size, uint8_t *buf)
Reads the file content.
Structure to store information about each physical flash memory block.
Standard error codes for the SPM and RoT Services.
Structure to store file metadata.
psa_status_t its_flash_fs_dblock_compact_block(struct its_flash_fs_ctx_t *fs_ctx, uint32_t lblock, size_t free_size, size_t src_offset, size_t dst_offset, size_t size)
Compacts block data for the given logical block.
psa_status_t its_flash_fs_dblock_write_file(struct its_flash_fs_ctx_t *fs_ctx, const struct its_block_meta_t *block_meta, const struct its_file_meta_t *file_meta, size_t offset, size_t size, const uint8_t *data)
Writes scratch data block content with requested data and the rest of the data from the given logical...
Structure to store the ITS flash file system context.
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43