11 #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
13 #define API_DISPATCH(sfn_name) \
14 tfm_##sfn_name##_veneer( \
15 in_vec, ARRAY_SIZE(in_vec), \
16 out_vec, ARRAY_SIZE(out_vec))
18 #define API_DISPATCH_NO_INVEC(sfn_name) \
19 tfm_##sfn_name##_veneer( \
21 out_vec, ARRAY_SIZE(out_vec))
23 #define API_DISPATCH_NO_OUTVEC(sfn_name) \
24 tfm_##sfn_name##_veneer( \
25 in_vec, ARRAY_SIZE(in_vec), \
28 __attribute__((section(
"SFN")))
30 const uint32_t buffer_size,
32 const uint32_t token_size,
34 uint32_t *record_size)
38 {.
base = &record_index, .len =
sizeof(uint32_t)},
39 {.base = token, .len = token_size},
42 {.
base = buffer, .len = buffer_size},
47 *record_size = out_vec[0].
len;
52 __attribute__((section(
"SFN")))
57 {.
base = num_records, .len =
sizeof(uint32_t)},
58 {.base = size, .len =
sizeof(uint32_t)},
66 __attribute__((section(
"SFN")))
72 {.
base = &record_index, .len =
sizeof(uint32_t)},
75 {.
base = size, .len =
sizeof(uint32_t)},
83 __attribute__((section(
"SFN")))
86 const uint32_t token_size)
90 {.
base = &record_index, .len =
sizeof(uint32_t)},
91 {.base = token, .len = token_size},
99 __attribute__((section(
"SFN")))
#define API_DISPATCH_NO_OUTVEC(sfn_name)
psa_status_t audit_core_delete_record(psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len)
#define API_DISPATCH_NO_INVEC(sfn_name)
psa_status_t audit_core_add_record(psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len)
#define API_DISPATCH(sfn_name)
psa_status_t psa_audit_retrieve_record(const uint32_t record_index, const uint32_t buffer_size, const uint8_t *token, const uint32_t token_size, uint8_t *buffer, uint32_t *record_size)
Retrieves a record at the specified index.
This structure contains the record that is added to the audit log by the requesting secure service...
psa_status_t psa_audit_delete_record(const uint32_t record_index, const uint8_t *token, const uint32_t token_size)
Deletes a record at the specified index.
psa_status_t psa_audit_add_record(const struct psa_audit_record *record)
Adds a record.
psa_status_t psa_audit_get_record_info(const uint32_t record_index, uint32_t *size)
Returns the size of the record at the specified index.
psa_status_t audit_core_get_info(psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len)
psa_status_t audit_core_retrieve_record(psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len)
int32_t psa_status_t
Function return status.
psa_status_t psa_audit_get_info(uint32_t *num_records, uint32_t *size)
Returns the total number and size of the records stored.
psa_status_t audit_core_get_record_info(psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len)