TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_protected_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_PROTECTED_STORAGE_H__
9 #define __TFM_PROTECTED_STORAGE_H__
10 
11 #include <stdint.h>
12 
13 #include "psa/protected_storage.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
33 
66 psa_status_t tfm_ps_set(int32_t client_id,
68  uint32_t data_length,
69  psa_storage_create_flags_t create_flags);
103 psa_status_t tfm_ps_get(int32_t client_id,
104  psa_storage_uid_t uid,
105  uint32_t data_offset,
106  uint32_t data_size,
107  size_t *p_data_length);
137 psa_status_t tfm_ps_get_info(int32_t client_id, psa_storage_uid_t uid,
138  struct psa_storage_info_t *p_info);
139 
165 psa_status_t tfm_ps_remove(int32_t client_id, psa_storage_uid_t uid);
166 
174 uint32_t tfm_ps_get_support(void);
175 
176 #ifdef __cplusplus
177 }
178 #endif
179 
180 #endif /* __TFM_PROTECTED_STORAGE_H__ */
psa_status_t tfm_ps_set(int32_t client_id, psa_storage_uid_t uid, uint32_t data_length, psa_storage_create_flags_t create_flags)
Creates a new or modifies an existing asset.
psa_status_t tfm_ps_get(int32_t client_id, psa_storage_uid_t uid, uint32_t data_offset, uint32_t data_size, size_t *p_data_length)
Gets the asset data for the provided uid.
psa_status_t tfm_ps_init(void)
Initializes the protected storage system.
psa_status_t tfm_ps_remove(int32_t client_id, psa_storage_uid_t uid)
Removes the provided uid and its associated data from storage.
psa_status_t tfm_ps_get_info(int32_t client_id, psa_storage_uid_t uid, struct psa_storage_info_t *p_info)
Gets the metadata for the provided uid.
uint64_t psa_storage_uid_t
uint32_t tfm_ps_get_support(void)
Gets a bitmask with flags set for all of the optional features supported by the implementation.
uint32_t psa_storage_create_flags_t
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43