From a7566234e92c91ba43e0f016b7d14fb08b871161 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Wed, 20 Apr 2016 15:46:46 +0800 Subject: OvmfPkg/PlatformBootManagerLib: Follow PlatformBootManagerLib interfaces Change the function name to follow new library class PlatformBootManagerLib interfaces. NOTE: There is no progress bar during BDS timeout waiting. In order to show the progress bar, PlatformBootManagerWaitCallback () needs to change to draw it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Laszlo Ersek --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 42 ++++++------- .../Library/PlatformBootManagerLib/BdsPlatform.h | 3 +- .../PlatformBootManagerLib/PlatformBdsLib.inf | 73 ---------------------- .../PlatformBootManagerLib.inf | 73 ++++++++++++++++++++++ 4 files changed, 93 insertions(+), 98 deletions(-) delete mode 100644 OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf create mode 100644 OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf (limited to 'OvmfPkg/Library/PlatformBootManagerLib') diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 8354f31ac2..1988b3e04c 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -1,7 +1,7 @@ /** @file Platform BDS customizations. - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -107,7 +107,7 @@ SaveS3BootScript ( // VOID EFIAPI -PlatformBdsInit ( +PlatformBootManagerBeforeConsole ( VOID ) /*++ @@ -128,7 +128,7 @@ Returns: EFI_HANDLE Handle; EFI_STATUS Status; - DEBUG ((EFI_D_INFO, "PlatformBdsInit\n")); + DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n")); InstallDevicePathCallback (); VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid, @@ -1249,11 +1249,8 @@ SaveS3BootScript ( VOID EFIAPI -PlatformBdsPolicyBehavior ( - IN OUT LIST_ENTRY *DriverOptionList, - IN OUT LIST_ENTRY *BootOptionList, - IN PROCESS_CAPSULES ProcessCapsules, - IN BASEM_MEMORY_TEST BaseMemoryTest +PlatformBootManagerAfterConsole ( + VOID ) /*++ @@ -1263,26 +1260,12 @@ Routine Description: is driven by boot mode. IBV/OEM can customize this code for their specific policy action. -Arguments: - - DriverOptionList - The header of the driver option link list - - BootOptionList - The header of the boot option link list - - ProcessCapsules - A pointer to ProcessCapsules() - - BaseMemoryTest - A pointer to BaseMemoryTest() - -Returns: - - None. - --*/ { EFI_STATUS Status; EFI_BOOT_MODE BootMode; - DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n")); + DEBUG ((EFI_D_INFO, "PlatformBootManagerAfterConsole\n")); if (PcdGetBool (PcdOvmfFlashVariablesEnable)) { DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior: not restoring NvVars " @@ -1570,6 +1553,19 @@ InstallDevicePathCallback ( ); } +/** + This function is called each second during the boot manager waits the timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +PlatformBootManagerWaitCallback ( + UINT16 TimeoutRemain + ) +{ +} + /** Lock the ConsoleIn device in system table. All key presses will be ignored until the Password is typed in. The only way to diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h index d6ff316080..84f5b6f9b9 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h @@ -1,7 +1,7 @@ /** @file Platform BDS customizations include file. - Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -40,7 +40,6 @@ Abstract: #include #include #include -#include #include #include #include diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf deleted file mode 100644 index 239d50f882..0000000000 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf +++ /dev/null @@ -1,73 +0,0 @@ -## @file -# Platform BDS customizations library. -# -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
-# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = PlatformBdsLib - FILE_GUID = FB65006C-AC9F-4992-AD80-184B2BDBBD83 - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources] - BdsPlatform.c - PlatformData.c - QemuKernel.c - BdsPlatform.h - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - OvmfPkg/OvmfPkg.dec - -[LibraryClasses] - BaseLib - MemoryAllocationLib - UefiBootServicesTableLib - BaseMemoryLib - DebugLib - PcdLib - GenericBdsLib - PciLib - NvVarsFileLib - QemuFwCfgLib - LoadLinuxLib - QemuBootOrderLib - UefiLib - -[Pcd] - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile - gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent - gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable - gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId - -[Pcd.IA32, Pcd.X64] - gEfiMdePkgTokenSpaceGuid.PcdFSBClock - -[Protocols] - gEfiDecompressProtocolGuid - gEfiPciRootBridgeIoProtocolGuid - gEfiS3SaveStateProtocolGuid # PROTOCOL SOMETIMES_CONSUMED - gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL SOMETIMES_PRODUCED - -[Guids] - gEfiEndOfDxeEventGroupGuid - gRootBridgesConnectedEventGroupGuid diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf new file mode 100644 index 0000000000..abac516607 --- /dev/null +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -0,0 +1,73 @@ +## @file +# Platform BDS customizations library. +# +# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = PlatformBootManagerLib + FILE_GUID = FB65006C-AC9F-4992-AD80-184B2BDBBD83 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# + +[Sources] + BdsPlatform.c + PlatformData.c + QemuKernel.c + BdsPlatform.h + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec + OvmfPkg/OvmfPkg.dec + +[LibraryClasses] + BaseLib + MemoryAllocationLib + UefiBootServicesTableLib + BaseMemoryLib + DebugLib + PcdLib + GenericBdsLib + PciLib + NvVarsFileLib + QemuFwCfgLib + LoadLinuxLib + QemuBootOrderLib + UefiLib + +[Pcd] + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile + gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId + +[Pcd.IA32, Pcd.X64] + gEfiMdePkgTokenSpaceGuid.PcdFSBClock + +[Protocols] + gEfiDecompressProtocolGuid + gEfiPciRootBridgeIoProtocolGuid + gEfiS3SaveStateProtocolGuid # PROTOCOL SOMETIMES_CONSUMED + gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL SOMETIMES_PRODUCED + +[Guids] + gEfiEndOfDxeEventGroupGuid + gRootBridgesConnectedEventGroupGuid -- cgit v1.2.3