edk2/ArmVirtPkg/PrePi/ArchPrePi.c
Oliver Smith-Denny b471ed2969 ArmVirtPkg: Drop ARM Virtual Platforms
Per the additional suggestion in RFC
https://edk2.groups.io/g/devel/topic/rfc_remove_ovmf_ia32_and/114152215,
this drops ARM 32 bit virtual platforms. The full rationale
is included in the RFC.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-09 18:49:32 +00:00

22 lines
428 B
C

/** @file
*
* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
**/
#include "PrePi.h"
#include <AArch64/AArch64.h>
VOID
ArchInitialize (
VOID
)
{
if (ArmReadCurrentEL () == AARCH64_EL2) {
// Trap General Exceptions. All exceptions that would be routed to EL1 are routed to EL2
ArmWriteHcr (ArmReadHcr () | ARM_HCR_TGE);
}
}