mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
ArmVirtPkg/PrePi: Don't clear HCR_EL2 fields when setting TGE
HCR_EL2 may contain fields that should be preserved (such as E2H, which may be RES1 for all intents and purposes other than reading back the register). So preserve the existing value when setting the TGE bit. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
f60a839480
commit
91171b6b94
@ -17,6 +17,6 @@ ArchInitialize (
|
||||
{
|
||||
if (ArmReadCurrentEL () == AARCH64_EL2) {
|
||||
// Trap General Exceptions. All exceptions that would be routed to EL1 are routed to EL2
|
||||
ArmWriteHcr (ARM_HCR_TGE);
|
||||
ArmWriteHcr (ArmReadHcr () | ARM_HCR_TGE);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user