ANDROID: trusty: Support pseudo-nmi mode.
Use local_daif_mask/local_daif_restore instead of local_irq_disable/
local_irq_enable to disable interrupts around smc call on arm64. This
allows trusty to see interrupts when pseudo-nmi support is enabled since
the pmr register that is normally used to mask interrupt in this mode
does not get context switched. This meant that Trusty interrupts, which
are in the same priority range as Linux interrupts, would always be masked
when entering Trusty, and on GICv3 systems trigger an infinite loop
where Linux sees there is an interrupt for Trusty, but when Trusty runs
the interrupt is not visible so it returns to Linux which then sees the
interrupt again, etc... This mode also needs a trusty change since even
the default PMR mask is different.
Bug: 308278090
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 710f2a2cfddd6f2c057c0c080572be46a13bb103)
(cherry picked from https://partner-android-review.googlesource.com/q/commit:f8a7c6389fb4c93f5292b48cb7742bacf48db909)
Merged-In: I6aaf7dd205a0570fb26b5e347e1cbd9c777437c6
Change-Id: I6aaf7dd205a0570fb26b5e347e1cbd9c777437c6
1 file changed