summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-03-29 18:50:39 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-03-31 11:44:36 +0100
commit7e5f1b673870897eeb1a9fba1c2b006ca366579c (patch)
treeb47be28dcfc4560d526be80ebf84a6b67a2c6d5c /ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c
parentd180dea0a81f49e25d7c4e4727c3368af7964ced (diff)
downloadedk2-7e5f1b673870897eeb1a9fba1c2b006ca366579c.tar.gz
edk2-7e5f1b673870897eeb1a9fba1c2b006ca366579c.tar.bz2
edk2-7e5f1b673870897eeb1a9fba1c2b006ca366579c.zip
ArmVirtPkg/PlatformHasAcpiDtDxe: allow guest level ACPI disable override
In general, we should not present two separate (and inevitably different) hardware descriptions to the OS, in the form of ACPI tables and a device tree blob. For this reason, we recently added the logic to ArmVirtQemu to only expose the ACPI 2.0 entry point if no DT binary is being passed, and vice versa. However, this is arguably a regression for those who relied on DT descriptions being available, even if the former behavior can be restored by passing the -no-acpi switch to QEMU. So allow a secret handshake with the UEFI Shell, to set a variable that will result in ACPI to be disabled on subsequent boots even if -no-acpi was not passed on the QEMU command line. setvar -nv -bs -guid 50bea1e5-a2c5-46e9-9b3a-59596516b00a ForceNoAcpi =01 To delete the variable and revert to the old situation, simply omit the value after the = setvar -nv -bs -guid 50bea1e5-a2c5-46e9-9b3a-59596516b00a ForceNoAcpi = Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c')
-rw-r--r--ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c b/ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c
index 8932dacabe..da3cee645c 100644
--- a/ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c
+++ b/ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.c
@@ -17,6 +17,7 @@
#include <Guid/PlatformHasDeviceTree.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
#include <Library/QemuFwCfgLib.h>
#include <Library/UefiBootServicesTableLib.h>
@@ -37,6 +38,7 @@ PlatformHasAcpiDt (
// errors here.
//
if (MAX_UINTN == MAX_UINT64 &&
+ !PcdGetBool (PcdForceNoAcpi) &&
!EFI_ERROR (
QemuFwCfgFindFile (
"etc/table-loader",