I've read https://tf-m-user-guide.trustedfirmware.org/integration_guide/non-secure_cli... and https://tf-m-user-guide.trustedfirmware.org/design_docs/software/tfm_coopera... but I'm not sure that I understand the whole system.
For example, in this scenario:
1. NSPE is running a low-priority thread which has called into the PSA API. S partition is running to do the work. 2. NS interrupt occurs. 3. NS RTOS determines that a higher-priority thread should now run.
At step 2, the S context gets stored on the S stack. I guess at step 3 the NS RTOS ISR would manipulate the stack so that it "returns" to the higher-priority NS thread rather than to the secure partition? And then sometime later when it schedules in the low-priority thread, it will return to the interrupted S partition.
So the higher-priority thread can also make a PSA API call (provided the NS RTOS is notifying TF-M of the scheduling decisions it makes)?
Cypress Semiconductor (Canada), Inc. An Infineon Technologies Company Sr Prin Software Engr CSCA CSS ICW SW PSW 1 Chris.Brand@infineon.commailto:Chris.Brand@infineon.com
www.infineon.com<www.cypress.com> www.cypress.comhttp://www.cypress.com/ Discoverieshttp://www.infineon.com/discoveries Facebookhttp://www.facebook.com/infineon Twitterhttp://www.twitter.com/Infineon LinkedInhttp://www.linkedin.com/company/infineon-technologies
Part of your life. Part of tomorrow.
NOTICE: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material of Infineon Technologies AG and its affiliated entities which is for the exclusive use of the individual designated above as the recipient. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact immediately the sender by returning e-mail and delete the material from any computer. If you are not the specified recipient, you are hereby notified that all disclosure, reproduction, distribution or action taken on the basis of this message is prohibited.