TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 /* This file describes the PSA Protected Storage API */
9 
10 #ifndef PSA_PROTECTED_STORAGE_H
11 #define PSA_PROTECTED_STORAGE_H
12 
13 #include <stddef.h>
14 #include <stdint.h>
15 
16 #include "psa/error.h"
17 #include "psa/storage_common.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
28 #define PSA_PS_API_VERSION_MAJOR 1
29 #define PSA_PS_API_VERSION_MINOR 0
30 
31 // This version of the header file is associated with 1.0 final release
32 
69  size_t data_length,
70  const void *p_data,
71  psa_storage_create_flags_t create_flags);
72 
117  size_t data_offset,
118  size_t data_size,
119  void *p_data,
120  size_t *p_data_length);
121 
149  struct psa_storage_info_t *p_info);
150 
176 
211  size_t capacity,
212  psa_storage_create_flags_t create_flags);
213 
263  size_t data_offset,
264  size_t data_length,
265  const void *p_data);
266 
276 uint32_t psa_ps_get_support(void);
277 
278 #ifdef __cplusplus
279 }
280 #endif
281 
282 #endif /* PSA_PROTECTED_STORAGE_H */
psa_status_t psa_ps_create(psa_storage_uid_t uid, size_t capacity, psa_storage_create_flags_t create_flags)
Reserves storage for the specified uid.
psa_status_t psa_ps_get(psa_storage_uid_t uid, size_t data_offset, size_t data_size, void *p_data, size_t *p_data_length)
Retrieve data associated with a provided uid.
psa_status_t psa_ps_set(psa_storage_uid_t uid, size_t data_length, const void *p_data, psa_storage_create_flags_t create_flags)
Create a new, or modify an existing, uid/value pair.
Standard error codes for the SPM and RoT Services.
psa_status_t psa_ps_get_info(psa_storage_uid_t uid, struct psa_storage_info_t *p_info)
Retrieve the metadata about the provided uid.
psa_status_t psa_ps_set_extended(psa_storage_uid_t uid, size_t data_offset, size_t data_length, const void *p_data)
Sets partial data into an asset.
psa_status_t psa_ps_remove(psa_storage_uid_t uid)
Remove the provided uid and its associated data from the storage.
uint32_t psa_ps_get_support(void)
Lists optional features.
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