Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF-M: does not allow PSA Connect to proceed with IRQs locked #36998

Closed
ioannisg opened this issue Jul 16, 2021 · 2 comments
Closed

TF-M: does not allow PSA Connect to proceed with IRQs locked #36998

ioannisg opened this issue Jul 16, 2021 · 2 comments
Assignees
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

Comments

@ioannisg
Copy link
Member

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).

@ioannisg ioannisg added bug The issue is a bug, or the PR is fixing a bug area: TF-M ARM Trusted Firmware-M (TF-M) labels Jul 16, 2021
@ioannisg
Copy link
Member Author

Note that this issue was not present in earlier versions of TF-M.

@cfriedt cfriedt added the priority: low Low impact/importance bug label Jul 20, 2021
@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants