When the secure service starts a hardware process (ie crypto accelerator), how does it then block, allowing other NS threads to run while waiting for the hardware process to finish as signaled by a secure interrupt? And then, how does that secure interrupt unblock the thread waiting for it so that the secure service request can complete?
Alan
From: Reinhard Keil [mailto:Reinhard.Keil@arm.com] Sent: Thursday, April 2, 2020 6:22 AM To: DeMars, Alan; tf-m@lists.trustedfirmware.org Cc: nd Subject: [EXTERNAL] RE: [TF-M] Multi-threaded single-scheduler model proposal
Alan,
Yes, pre-emption must be supported otherwise time deterministic execution on non-secure side would be impossible.
A fundamental attribute of v8-M is interrupt execution in NS while S thread execution. Interrupts are not blocked (provided that priorities are selected correctly).
Pre-emption in an Cortex-M RTOS works typically with the PendSV interrupt. Important is that PendSV interrupt on NS is not blocked by secure execution. This should already ensure that an RTOS can schedule execution back to NS while anther NS thread is currently execute a secure service.
Reinhard