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

The mask of native interrupt in arm32 abort/svc modes #1742

Closed
david-wang-2015 opened this issue Aug 9, 2017 · 2 comments
Closed

The mask of native interrupt in arm32 abort/svc modes #1742

david-wang-2015 opened this issue Aug 9, 2017 · 2 comments
Labels

Comments

@david-wang-2015
Copy link

Hi,
It seems in arm32 mode, the abort/svc handlers don't take care of the native interrupt mask (in GICv2, it's FIQ). After the quick check, it seems for the cpu0 it's masked (I guess BL2 did this?) while for the other cpus, it's unmasked.
Can anybody help me to understand if the native interrupt should or should not be masked in these modes?
I'm doing the fix of GICv3 for these modes as the foreign interrupt is FIQ which is not masked by hardware in arm32.
Thanks.

@jenswi-linaro
Copy link
Contributor

Foreign interrupts should always be masked before the abort/svc handler is called. The svc handler ('tee_svc_handler()`) will enable them if needed.

Native interrupts can be enabled when the svc handler (tee_svc_handler()) is called. I think it should be OK to have native interrupts enabled for abort handler too.

Since we need to make some changes what do you think about this:
Both native and foreign interrupts are masked before the handler is called. Then the handler itself can decide when they can be unmasked.

So basically adding an unconditional cpsid f at the beginning of thread_und_handler(), thread_svc_handler(), thread_pabort_handler() and thread_dabort_handler() and then a call at the beginning of tee_svc_handler() to re-enable native interrupts.

@github-actions
Copy link

github-actions bot commented Feb 1, 2020

This issue has been marked as a stale issue because it has been open (more than) 30 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 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Feb 1, 2020
@github-actions github-actions bot closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants