Contiki-NG
|
Functions | |
bool | tz_api_init (struct tz_api *apip) |
Initialize the TrustZone API. | |
bool | tz_api_poll (void) |
Poll the secure world and process all events in the queue. | |
void | tz_api_println (const char *text) |
Print the specified message via the secure world. | |
bool | tz_api_request_poll_from_ns (void) |
Request poll from normal world. | |
This subsystem implements TrustZone support for Arm Cortex-M processors. The archtiecture is based on dual Contiki-NG firmwares: the secure world contains an instance of Contiki-NG with reduced functionality, and the normal world contains an instance with regular functionality. When programming an IoT device, the hex files with the two firmwares are merged into a single hex file, which is flashed to the device.
Both worlds can access core system functionality such as processes, timers, and library functions. The normal world is expected to contain applications and networking functionality. By contrast, the secure world will contain secret information and functionality for monitoring the normal world. Hardware peripherals can be configured to be accessible in either of the worlds.
Currently, the only supported Contiki-NG platform is the nRF5340 development kit, which is equipped with two different Arm Cortex-M33 processors.
bool tz_api_init | ( | struct tz_api * | apip | ) |
Initialize the TrustZone API.
apip | A pointer to a tz_api structure. |
false | Error (apip pointed to invalid memory, or the API has been initialized already.) |
true | Success. |
Definition at line 59 of file tz-api.c.
References process_alloc_event(), process_post(), and tz_api_poll().
bool tz_api_poll | ( | void | ) |
Poll the secure world and process all events in the queue.
true | If the secure world has more events to process. |
false | If the secure world has no more events to process. |
Definition at line 90 of file tz-api.c.
References clock_time(), process_nevents(), process_run(), and watchdog_periodic().
Referenced by tz_api_init().