TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ps_object_system.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __PS_OBJECT_SYSTEM_H__
9 #define __PS_OBJECT_SYSTEM_H__
10 
11 #include <stdint.h>
12 
13 #include "psa/protected_storage.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
27 
38 psa_status_t ps_object_create(psa_storage_uid_t uid, int32_t client_id,
39  psa_storage_create_flags_t create_flags,
40  uint32_t size);
41 
54 psa_status_t ps_object_read(psa_storage_uid_t uid, int32_t client_id,
55  uint32_t offset, uint32_t size,
56  size_t *p_data_length);
57 
68 psa_status_t ps_object_write(psa_storage_uid_t uid, int32_t client_id,
69  uint32_t offset, uint32_t size);
70 
79 psa_status_t ps_object_delete(psa_storage_uid_t uid, int32_t client_id);
80 
93  struct psa_storage_info_t *info);
94 
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* __PS_OBJECT_SYSTEM_H__ */
psa_status_t ps_object_delete(psa_storage_uid_t uid, int32_t client_id)
Deletes the object with the provided UID and client ID.
psa_status_t ps_system_wipe_all(void)
Wipes the protected storage system and all object data.
psa_status_t ps_object_write(psa_storage_uid_t uid, int32_t client_id, uint32_t offset, uint32_t size)
Writes data into the object with the provided UID and client ID.
psa_status_t ps_system_prepare(void)
Prepares the protected storage system for usage, populating internal structures. It identifies and va...
psa_status_t ps_object_get_info(psa_storage_uid_t uid, int32_t client_id, struct psa_storage_info_t *info)
Gets the asset information for the object with the provided UID and client ID.
psa_status_t ps_object_read(psa_storage_uid_t uid, int32_t client_id, uint32_t offset, uint32_t size, size_t *p_data_length)
Gets the data of the object with the provided UID and client ID.
uint64_t psa_storage_uid_t
psa_status_t ps_object_create(psa_storage_uid_t uid, int32_t client_id, psa_storage_create_flags_t create_flags, uint32_t size)
Creates a new object with the provided UID and client ID.
uint32_t psa_storage_create_flags_t
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43