Skip to content

Commit 6f07aeb

Browse files
jrtc27mergify[bot]
authored andcommitted
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>
1 parent 3299c36 commit 6f07aeb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ArmPlatformPkg/Sec/AArch64/Helper.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ ASM_FUNC(SetupExceptionLevel2)
2828
orr x0, x0, #(1 << 5) // Enable EL2 SError and Abort
2929
msr hcr_el2, x0 // Write back our settings
3030

31+
// NB: We assume that we have not been entered on VHE systems with
32+
// HCR_EL2.E2H set.
3133
msr cptr_el2, xzr // Disable copro traps to EL2
3234

3335
// Enable Timer access for non-secure EL1 and EL0

0 commit comments

Comments
 (0)