TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ps_object_defs.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 __PS_OBJECT_DEFS_H__
9 #define __PS_OBJECT_DEFS_H__
10 
11 #include <stdint.h>
12 
13 #include "flash_layout.h"
14 #include "psa/protected_storage.h"
15 
16 #ifdef PS_ENCRYPTION
18 #endif
19 
26  uint32_t current_size;
27  uint32_t max_size;
29 };
30 
37 #ifdef PS_ENCRYPTION
38  union ps_crypto_t crypto;
39 #else
40  uint32_t version;
41  uint32_t fid;
42 #endif
44 };
45 
46 
47 #define PS_MAX_OBJECT_DATA_SIZE PS_MAX_ASSET_SIZE
48 
55 struct ps_object_t {
58 };
59 
60 
61 #define PS_OBJECT_HEADER_SIZE sizeof(struct ps_obj_header_t)
62 #define PS_MAX_OBJECT_SIZE sizeof(struct ps_object_t)
63 
71 #define PS_MAX_NUM_OBJECTS (PS_NUM_ASSETS + 3)
72 
73 #endif /* __PS_OBJECT_DEFS_H__ */
struct ps_object_info_t info
uint8_t data[PS_MAX_ASSET_SIZE]
#define PS_MAX_OBJECT_DATA_SIZE
Metadata attached as a header to object data before storage.
Object information.
struct ps_obj_header_t header
psa_storage_create_flags_t create_flags
uint32_t psa_storage_create_flags_t
The object to be written to the file system below. Made up of the object header and the object data...
uint32_t current_size