I was afraid that this was the proposal. No lower priority NS threads can run while waiting for the secure interrupt. Only higher priority threads that are initiated by a NS interrupt can run.

 

Alan

 

From: Reinhard Keil [mailto:Reinhard.Keil@arm.com]
Sent: Thursday, April 2, 2020 6:39 AM
To: DeMars, Alan; tf-m@lists.trustedfirmware.org
Cc: nd
Subject: [EXTERNAL] RE: [TF-M] Multi-threaded single-scheduler model proposal

 

Alan,

 

The un-interrupted execution flow in such scenarios should look like:

 

  1. NS thread calls secure service,  S execution in thread mode
  2. S execution triggers crypto hardware accelerator then executes WFE (wait for interrupts, but still is in thread mode)
  3. crypto hardware raises IRQ, interrupt execution in secure mode
  4. After interrupt execution, return to secure thread mode
  5. When secure service completes return to NS thread mode

 

The only time where NS interrupts are effectively blocked are during (3) interrupt execution in secure mode.  Important is to keep this interrupts short.  During (1), (2), (4), (5) RTOS pre-emption is not blocked.


Is this in-line with your thinking?

Reinhard