TF-M: does not allow PSA Connect to proceed with IRQs locked #36998
Labels
area: TF-M
ARM Trusted Firmware-M (TF-M)
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Stale
Describe the bug
If PSA Calls (psa_connect, psa_call, etc.) are invoked with interrupts locked in Mainline Cortex-M (that is setting BASEPRI register to a non-zero value), the PSA calls are not successful.
In particular, psa_connect calls are returning a zero (invalid) handle.
Also: the problem occurs If BASEPRI is set to a value less or equal to 32. For BASEPRI values larger than 32 the psa calls are running successfully.
This should not be a HW (core) problem, as TF-M boosts Secure priorities with AIRCR.PRIS setting at boot.
Impact
PSA calls can not execute with locked non-secure priorities.
This prevents us from calling directly sys_reboot() in non-secure builds, because this function does interrupt locking before calling reset. It might be that TF-M does not allow IRQ locking in PSA calls (unlikely, since this concerns non-secure world), but in that case this should be documented explicitly.
This is likely a TF-M bug, but since it is a problem with the integration with Zephyr, this ticket is suppose to track the resolution of this issue (possibly in upstream TFM).
The text was updated successfully, but these errors were encountered: