44#include "trustzone/tz-api.h"
48#define LOG_MODULE "TZNormalWorld"
49#define LOG_LEVEL LOG_LEVEL_INFO
51static volatile bool is_poll_requested;
53PROCESS(tz_normal_process,
"TZ normal process");
58 is_poll_requested =
true;
66 struct tz_api tz_api = {0};
68 tz_api.request_poll = request_poll;
70 LOG_INFO(
"Initialize TrustZone API: %s\n",
71 result ?
"SUCCESS" :
"FAILURE");
80 if(is_poll_requested) {
81 is_poll_requested =
false;
82 LOG_DBG(
"> Poll secure world\n");
86 LOG_DBG(
"< Poll secure world %s!\n",
87 is_poll_requested ?
"waiting" :
"done");
101 process_num_events_t r;
void watchdog_periodic(void)
Writes the WDT clear sequence.
void platform_idle()
The platform's idle/sleep function.
void platform_main_loop(void)
The platform's main loop, if provided.
process_num_events_t process_run(void)
Run the system once - call poll handlers and process one event.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define PROCESS_WAIT_EVENT_UNTIL(c)
Wait for an event to be posted to the process, with an extra condition.
#define PROCESS_END()
Define the end of a process.
void process_start(struct process *p, process_data_t data)
Start a process.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
void process_poll(struct process *p)
Request a process to be polled.
CC_TRUSTZONE_SECURE_CALL bool tz_api_init(struct tz_api *apip)
Initialize the TrustZone API.
CC_TRUSTZONE_SECURE_CALL bool tz_api_poll(void)
Poll the secure world and process all events in the queue.
Header file for the logging system.