ArmPlatformPkg: Document that we don't support HCR_EL2.E2H being set

The existing code here predates its existence as it's assuming that
CPTR_EL2 has the traditional layout rather than being like CPACR_EL1
(likely also true elsewhere for other registers), and the UEFI spec has
nothing to say on the matter. One assumes the intent is that if you're
in EL2 you're in EL2 proper, and it would be very strange to enter EDK2
with E2H set. Document this existing assumption.

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
This commit is contained in:
Jessica Clarke 2024-11-06 21:01:07 +00:00 committed by mergify[bot]
parent 3299c36ba1
commit 6f07aeb49c
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ ASM_FUNC(SetupExceptionLevel2)
orr x0, x0, #(1 << 5) // Enable EL2 SError and Abort
msr hcr_el2, x0 // Write back our settings
// NB: We assume that we have not been entered on VHE systems with
// HCR_EL2.E2H set.
msr cptr_el2, xzr // Disable copro traps to EL2
// Enable Timer access for non-secure EL1 and EL0