TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_internal_trusted_storage.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_INTERNAL_TRUSTED_STORAGE_H__
9 #define __TFM_INTERNAL_TRUSTED_STORAGE_H__
10 
11 #include <stddef.h>
12 #include <stdint.h>
13 
14 #include "psa/error.h"
15 #include "psa/storage_common.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
35 
69 psa_status_t tfm_its_set(int32_t client_id,
71  size_t data_length,
72  psa_storage_create_flags_t create_flags);
73 
109 psa_status_t tfm_its_get(int32_t client_id,
110  psa_storage_uid_t uid,
111  size_t data_offset,
112  size_t data_size,
113  size_t *p_data_length);
114 
139 psa_status_t tfm_its_get_info(int32_t client_id, psa_storage_uid_t uid,
140  struct psa_storage_info_t *p_info);
141 
164 psa_status_t tfm_its_remove(int32_t client_id, psa_storage_uid_t uid);
165 
166 #ifdef __cplusplus
167 }
168 #endif
169 
170 #endif /* __TFM_INTERNAL_TRUSTED_STORAGE_H__ */
psa_status_t tfm_its_get_info(int32_t client_id, psa_storage_uid_t uid, struct psa_storage_info_t *p_info)
Retrieve the metadata about the provided uid.
psa_status_t tfm_its_init(void)
Initializes the internal trusted storage system.
Standard error codes for the SPM and RoT Services.
psa_status_t tfm_its_remove(int32_t client_id, psa_storage_uid_t uid)
Remove the provided uid and its associated data from the storage.
psa_status_t tfm_its_set(int32_t client_id, psa_storage_uid_t uid, size_t data_length, psa_storage_create_flags_t create_flags)
Create a new, or modify an existing, uid/value pair.
uint64_t psa_storage_uid_t
uint32_t psa_storage_create_flags_t
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43
psa_status_t tfm_its_get(int32_t client_id, psa_storage_uid_t uid, size_t data_offset, size_t data_size, size_t *p_data_length)
Retrieve data associated with a provided UID.