![]() |
TF-M Reference Manual
1.2.0
TrustedFirmware-M
|
#include <stdint.h>
#include <string.h>
#include <stddef.h>
#include "audit_core.h"
#include "psa_audit_defs.h"
#include "tfm_secure_api.h"
Go to the source code of this file.
Data Structures | |
struct | log_vars |
Contains the state variables associated to the current state of the audit log. More... | |
Macros | |
#define | AUDIT_UART_REDIRECTION (0U) |
If set to 1 by the build system, UART redirection is enabled. Keep it disabled by default. More... | |
#define | MEMBER_SIZE(type, member) sizeof(((type *)0)->member) |
Standard macro to get size of elements in a struct. More... | |
#define | LOG_FIXED_FIELD_SIZE |
Size of the mandatory header fields that are before the info received from the client partition, i.e. [TIMESTAMP][IV_COUNTER][PARTITION_ID][SIZE]. More... | |
#define | LOG_SIZE (1024) |
Size of the allocated space for the log, in bytes. More... | |
Functions | |
__STATIC_INLINE struct log_hdr * | GET_LOG_POINTER (const uint32_t idx) |
Static inline function to get the log buffer ptr from index. More... | |
__STATIC_INLINE uint32_t * | GET_SIZE_FIELD_POINTER (const uint32_t idx) |
Static inline function to get the pointer to the SIZE field. More... | |
__STATIC_INLINE uint32_t | COMPUTE_LOG_ENTRY_SIZE (const uint32_t size) |
Static inline function to compute the full log entry size starting from the value of the size field. More... | |
__STATIC_INLINE uint32_t | GET_NEXT_LOG_INDEX (const uint32_t idx) |
Static inline function to get the index to the base of the log buffer for the next item with respect to the current item. More... | |
psa_status_t | audit_core_init (void) |
Initializes the Audit logging service during the TFM boot up process. More... | |
psa_status_t | audit_core_delete_record (psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len) |
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_get_record_info (psa_invec in_vec[], size_t in_len, psa_outvec out_vec[], size_t out_len) |
psa_status_t | audit_core_add_record (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) |
#define AUDIT_UART_REDIRECTION (0U) |
If set to 1 by the build system, UART redirection is enabled. Keep it disabled by default.
Definition at line 22 of file audit_core.c.
#define LOG_FIXED_FIELD_SIZE |
Size of the mandatory header fields that are before the info received from the client partition, i.e. [TIMESTAMP][IV_COUNTER][PARTITION_ID][SIZE].
Definition at line 76 of file audit_core.c.
#define LOG_SIZE (1024) |
Size of the allocated space for the log, in bytes.
Definition at line 87 of file audit_core.c.
#define MEMBER_SIZE | ( | type, | |
member | |||
) | sizeof(((type *)0)->member) |
Standard macro to get size of elements in a struct.
Definition at line 67 of file audit_core.c.
__STATIC_INLINE uint32_t COMPUTE_LOG_ENTRY_SIZE | ( | const uint32_t | size | ) |
Static inline function to compute the full log entry size starting from the value of the size field.
[in] | size | Size of the log line from which derive the size of the whole log item |
Definition at line 181 of file audit_core.c.
__STATIC_INLINE struct log_hdr* GET_LOG_POINTER | ( | const uint32_t | idx | ) |
Static inline function to get the log buffer ptr from index.
[in] | idx | Byte index to be converted to pointer in the log buffer |
Definition at line 152 of file audit_core.c.
__STATIC_INLINE uint32_t GET_NEXT_LOG_INDEX | ( | const uint32_t | idx | ) |
Static inline function to get the index to the base of the log buffer for the next item with respect to the current item.
[in] | idx | Byte index of the current item in the log |
Definition at line 195 of file audit_core.c.
__STATIC_INLINE uint32_t* GET_SIZE_FIELD_POINTER | ( | const uint32_t | idx | ) |
Static inline function to get the pointer to the SIZE field.
[in] | idx | Byte index to which retrieve the corresponding size pointer |
Definition at line 165 of file audit_core.c.