14 #define IOVEC_LEN(x) (sizeof(x)/sizeof(x[0]))
16 __attribute__((section(
"SFN")))
28 { .
base = &uid, .len =
sizeof(uid) },
29 { .base = p_data, .len = data_length },
30 { .base = &create_flags, .len =
sizeof(create_flags) }
45 status = tfm_tfm_ps_set_req_veneer(in_vec,
IOVEC_LEN(in_vec),
60 __attribute__((section(
"SFN")))
65 size_t *p_data_length)
73 { .
base = &uid, .len =
sizeof(uid) },
74 { .base = &data_offset, .len =
sizeof(data_offset) }
78 { .
base = p_data, .len = data_size }
81 if (p_data_length == NULL) {
96 status = tfm_tfm_ps_get_req_veneer(in_vec,
IOVEC_LEN(in_vec),
109 *p_data_length = out_vec[0].
len;
114 __attribute__((section(
"SFN")))
124 { .
base = &uid, .len =
sizeof(uid) }
128 { .
base = p_info, .len =
sizeof(*p_info) }
143 status = tfm_tfm_ps_get_info_req_veneer(in_vec,
IOVEC_LEN(in_vec),
153 __attribute__((section(
"SFN")))
162 { .
base = &uid, .len =
sizeof(uid) }
177 status = tfm_tfm_ps_remove_req_veneer(in_vec,
IOVEC_LEN(in_vec),
188 __attribute__((section(
"SFN")))
199 __attribute__((section(
"SFN")))
201 size_t data_length, const
void *p_data)
211 __attribute__((section(
"SFN")))
217 uint32_t support_flags = 0;
223 { .
base = &support_flags, .len =
sizeof(support_flags) }
232 return support_flags;
239 (void)tfm_tfm_ps_get_support_req_veneer(NULL, 0,
243 return support_flags;
#define TFM_PS_GET_INFO_VERSION
#define TFM_PS_REMOVE_SID
psa_status_t psa_ps_create(psa_storage_uid_t uid, size_t size, psa_storage_create_flags_t create_flags)
Reserves storage for the specified uid.
#define TFM_PS_REMOVE_VERSION
#define TFM_PS_GET_VERSION
void psa_close(psa_handle_t handle)
Close a connection to an RoT Service.
#define TFM_PS_GET_SUPPORT_SID
uint32_t psa_ps_get_support(void)
Lists optional features.
psa_status_t psa_ps_remove(psa_storage_uid_t uid)
Remove the provided uid and its associated data from the storage.
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.
#define PSA_ERROR_GENERIC_ERROR
#define PSA_ERROR_INVALID_ARGUMENT
psa_handle_t psa_connect(uint32_t sid, uint32_t version)
Connect to an RoT Service by its SID.
#define PSA_HANDLE_IS_VALID(handle)
#define TFM_PS_SET_VERSION
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.
#define PSA_ERROR_NOT_SUPPORTED
#define TFM_PS_GET_SUPPORT_VERSION
#define TFM_PS_GET_INFO_SID
uint64_t psa_storage_uid_t
uint32_t psa_storage_create_flags_t
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.
int32_t psa_status_t
Function return status.
psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec, size_t in_len, psa_outvec *out_vec, size_t out_len)
Call an RoT Service on an established connection.
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.