From 48799ab2d987c97ebda65cf371d4a21dbe0eb346 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 5 May 2016 17:09:04 +0200 Subject: [PATCH] ArmVirtPkg/PlatformBootManagerLib: don't launch the Boot Manager Menu MdeModulePkg/BDS doesn't launch the UI (Boot Manager Menu) from the platform side. The platform is expected to store the boot timeout only, in PcdPlatformBootTimeOut. This is usually done in PlatformBootManagerBeforeConsole(). (ArmVirtXen is not modified, as it uses PlatformIntelBdsLib from ArmPlatformPkg, not ArmVirtPkg.) The patch parallels OvmfPkg commit 8dc0f0a6aab0. Cc: Ard Biesheuvel Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Reviewed-by: Ruiyu Ni --- ArmVirtPkg/ArmVirtQemu.dsc | 3 ++- ArmVirtPkg/ArmVirtQemuKernel.dsc | 3 ++- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 7 +++++-- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h | 6 ------ .../PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 34323bf83d..9a8038dc0a 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -139,7 +139,6 @@ !else gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1 !endif - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 # # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM @@ -191,6 +190,8 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 [PcdsDynamicDefault.common] + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 + ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI # enumeration to complete before installing ACPI tables. gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index 42e01135f8..aaf177d091 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -128,7 +128,6 @@ !else gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1 !endif - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 # # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM @@ -179,6 +178,8 @@ gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40 [PcdsDynamicDefault.common] + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 + ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI # enumeration to complete before installing ACPI tables. gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 81cee15af9..b114420fd0 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -390,6 +390,11 @@ PlatformBootManagerBeforeConsole ( (EFI_DEVICE_PATH_PROTOCOL *)&mSerialConsole, NULL); EfiBootManagerUpdateConsoleVariable (ErrOut, (EFI_DEVICE_PATH_PROTOCOL *)&mSerialConsole, NULL); + + // + // Set the front page timeout from the QEMU configuration. + // + PcdSet16 (PcdPlatformBootTimeOut, GetFrontPageTimeoutFromQemu ()); } /** @@ -434,8 +439,6 @@ PlatformBootManagerAfterConsole ( // it. // BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); - - PlatformBdsEnterFrontPage (GetFrontPageTimeoutFromQemu(), TRUE); } /** diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h index 410c309cfc..df1519c241 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h @@ -26,12 +26,6 @@ #include #include -VOID -PlatformBdsEnterFrontPage ( - IN UINT16 TimeoutDefault, - IN BOOLEAN ConnectAllHappened - ); - /** Download the kernel, the initial ramdisk, and the kernel command line from QEMU's fw_cfg. Construct a minimal SimpleFileSystem that contains the two diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 2be987f9eb..bbadea705e 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -65,6 +65,7 @@ [Pcd] gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut [Guids] gEfiFileInfoGuid -- 2.39.2