TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ps_object_table.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_TABLE_H__
9 #define __PS_OBJECT_TABLE_H__
10 
11 #include <stdint.h>
12 
13 #include "psa/protected_storage.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
25  uint32_t fid;
26 #ifdef PS_ENCRYPTION
27  uint8_t *tag;
28 #else
29  uint32_t version;
30 #endif
31 };
32 
39 
49 psa_status_t ps_object_table_init(uint8_t *obj_data);
50 
64  int32_t client_id);
65 
79 psa_status_t ps_object_table_get_free_fid(uint32_t fid_num, uint32_t *p_fid);
80 
96  int32_t client_id,
97  const struct ps_obj_table_info_t *obj_tbl_info);
98 
112  int32_t client_id,
113  struct ps_obj_table_info_t *obj_tbl_info);
114 
124  int32_t client_id);
125 
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* __PS_OBJECT_TABLE_H__ */
psa_status_t ps_object_table_set_obj_tbl_info(psa_storage_uid_t uid, int32_t client_id, const struct ps_obj_table_info_t *obj_tbl_info)
Sets object table information in the object table and stores it persistently, for the provided UID an...
psa_status_t ps_object_table_obj_exist(psa_storage_uid_t uid, int32_t client_id)
Checks if there is an entry in the table for the provided UID and client ID pair. ...
psa_status_t ps_object_table_delete_object(psa_storage_uid_t uid, int32_t client_id)
Deletes the table entry for the provided UID and client ID pair.
psa_status_t ps_object_table_delete_old_table(void)
Deletes old object table from the persistent area.
psa_status_t ps_object_table_get_obj_tbl_info(psa_storage_uid_t uid, int32_t client_id, struct ps_obj_table_info_t *obj_tbl_info)
Gets object table information from the object table for the provided UID and client ID pair...
psa_status_t ps_object_table_init(uint8_t *obj_data)
Initializes object table.
uint64_t psa_storage_uid_t
psa_status_t ps_object_table_create(void)
Creates object table.
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43
Object table information structure.
psa_status_t ps_object_table_get_free_fid(uint32_t fid_num, uint32_t *p_fid)
Gets a not in use file ID.