Mistake on this page?
Report an issue in GitHub or email us
TARGET_TFM/TARGET_TFM_V1_0/include/psa/storage_common.h
1 /*
2  * Copyright (c) 2019, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 /* This file includes common definitions for PSA storage
9 */
10 
11 #ifndef PSA_STORAGE_COMMON_H
12 #define PSA_STORAGE_COMMON_H
13 
14 #include <stddef.h>
15 #include <stdint.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 typedef uint32_t psa_storage_create_flags_t;
22 
23 typedef uint64_t psa_storage_uid_t;
24 
25 /* Flags */
26 
27 #define PSA_STORAGE_FLAG_NONE 0u
28 #define PSA_STORAGE_FLAG_WRITE_ONCE (1u << 0)
29 #define PSA_STORAGE_FLAG_NO_CONFIDENTIALITY (1u << 1)
30 #define PSA_STORAGE_FLAG_NO_REPLAY_PROTECTION (1u << 2)
31 
32 /* A container for metadata associated with a specific uid */
33 
34 struct psa_storage_info_t {
35  size_t capacity;
36  size_t size;
37  psa_storage_create_flags_t flags;
38 };
39 
40 #define PSA_STORAGE_SUPPORT_SET_EXTENDED (1u << 0)
41 
42 #define PSA_ERROR_INVALID_SIGNATURE ((psa_status_t)-149)
43 #define PSA_ERROR_DATA_CORRUPT ((psa_status_t)-152)
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif // PSA_STORAGE_COMMON_H
uint64_t psa_storage_uid_t
A type for UIDs used for identifying data.
size_t size
The size of the data associated with a uid.
size_t capacity
The allocated capacity of the storage associated with a UID.
A container for metadata associated with a specific uid.
psa_storage_create_flags_t flags
The flags set when the uid was created.
uint32_t psa_storage_create_flags_t
Flags used when creating a data entry.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.