]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformBootManagerLib: Follow PlatformBootManagerLib interfaces
authorRuiyu Ni <ruiyu.ni@intel.com>
Wed, 20 Apr 2016 07:46:46 +0000 (15:46 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 4 May 2016 00:47:36 +0000 (08:47 +0800)
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 <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf [deleted file]
OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf [new file with mode: 0644]

index 8354f31ac2fe806a212dd0132e3d18f6d56213df..1988b3e04c3034f7f78971f9565fddac563728b0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Platform BDS customizations.\r
 \r
-  Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -107,7 +107,7 @@ SaveS3BootScript (
 //\r
 VOID\r
 EFIAPI\r
-PlatformBdsInit (\r
+PlatformBootManagerBeforeConsole (\r
   VOID\r
   )\r
 /*++\r
@@ -128,7 +128,7 @@ Returns:
   EFI_HANDLE Handle;\r
   EFI_STATUS Status;\r
 \r
-  DEBUG ((EFI_D_INFO, "PlatformBdsInit\n"));\r
+  DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n"));\r
   InstallDevicePathCallback ();\r
 \r
   VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,\r
@@ -1249,11 +1249,8 @@ SaveS3BootScript (
 \r
 VOID\r
 EFIAPI\r
-PlatformBdsPolicyBehavior (\r
-  IN OUT LIST_ENTRY                  *DriverOptionList,\r
-  IN OUT LIST_ENTRY                  *BootOptionList,\r
-  IN PROCESS_CAPSULES                ProcessCapsules,\r
-  IN BASEM_MEMORY_TEST               BaseMemoryTest\r
+PlatformBootManagerAfterConsole (\r
+  VOID\r
   )\r
 /*++\r
 \r
@@ -1263,26 +1260,12 @@ Routine Description:
   is driven by boot mode. IBV/OEM can customize this code for their specific\r
   policy action.\r
 \r
-Arguments:\r
-\r
-  DriverOptionList - The header of the driver option link list\r
-\r
-  BootOptionList   - The header of the boot option link list\r
-\r
-  ProcessCapsules  - A pointer to ProcessCapsules()\r
-\r
-  BaseMemoryTest   - A pointer to BaseMemoryTest()\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
 --*/\r
 {\r
   EFI_STATUS                         Status;\r
   EFI_BOOT_MODE                      BootMode;\r
 \r
-  DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n"));\r
+  DEBUG ((EFI_D_INFO, "PlatformBootManagerAfterConsole\n"));\r
 \r
   if (PcdGetBool (PcdOvmfFlashVariablesEnable)) {\r
     DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior: not restoring NvVars "\r
@@ -1570,6 +1553,19 @@ InstallDevicePathCallback (
                           );\r
 }\r
 \r
+/**\r
+  This function is called each second during the boot manager waits the timeout.\r
+\r
+  @param TimeoutRemain  The remaining timeout.\r
+**/\r
+VOID\r
+EFIAPI\r
+PlatformBootManagerWaitCallback (\r
+  UINT16          TimeoutRemain\r
+  )\r
+{\r
+}\r
+\r
 /**\r
   Lock the ConsoleIn device in system table. All key\r
   presses will be ignored until the Password is typed in. The only way to\r
index d6ff31608028acb79132a5a45a8ea673398a1746..84f5b6f9b90f1d902b23cea61f66ffe125cfcb6d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Platform BDS customizations include file.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -40,7 +40,6 @@ Abstract:
 #include <Library/PcdLib.h>\r
 #include <Library/PciLib.h>\r
 #include <Library/GenericBdsLib.h>\r
-#include <Library/PlatformBdsLib.h>\r
 #include <Library/HobLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/DxeServicesTableLib.h>\r
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBdsLib.inf
deleted file mode 100644 (file)
index 239d50f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-## @file\r
-#  Platform BDS customizations library.\r
-#\r
-#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
-#  This program and the accompanying materials\r
-#  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution.  The full text of the license may be found at\r
-#  http://opensource.org/licenses/bsd-license.php\r
-#\r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = PlatformBdsLib\r
-  FILE_GUID                      = FB65006C-AC9F-4992-AD80-184B2BDBBD83\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PlatformBdsLib|DXE_DRIVER\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
-#\r
-\r
-[Sources]\r
-  BdsPlatform.c\r
-  PlatformData.c\r
-  QemuKernel.c\r
-  BdsPlatform.h\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
-  OvmfPkg/OvmfPkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  MemoryAllocationLib\r
-  UefiBootServicesTableLib\r
-  BaseMemoryLib\r
-  DebugLib\r
-  PcdLib\r
-  GenericBdsLib\r
-  PciLib\r
-  NvVarsFileLib\r
-  QemuFwCfgLib\r
-  LoadLinuxLib\r
-  QemuBootOrderLib\r
-  UefiLib\r
-\r
-[Pcd]\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile\r
-  gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent\r
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable\r
-  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId\r
-\r
-[Pcd.IA32, Pcd.X64]\r
-  gEfiMdePkgTokenSpaceGuid.PcdFSBClock\r
-\r
-[Protocols]\r
-  gEfiDecompressProtocolGuid\r
-  gEfiPciRootBridgeIoProtocolGuid\r
-  gEfiS3SaveStateProtocolGuid                   # PROTOCOL SOMETIMES_CONSUMED\r
-  gEfiDxeSmmReadyToLockProtocolGuid             # PROTOCOL SOMETIMES_PRODUCED\r
-\r
-[Guids]\r
-  gEfiEndOfDxeEventGroupGuid\r
-  gRootBridgesConnectedEventGroupGuid\r
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
new file mode 100644 (file)
index 0000000..abac516
--- /dev/null
@@ -0,0 +1,73 @@
+## @file\r
+#  Platform BDS customizations library.\r
+#\r
+#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+#  This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = PlatformBootManagerLib\r
+  FILE_GUID                      = FB65006C-AC9F-4992-AD80-184B2BDBBD83\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = PlatformBootManagerLib|DXE_DRIVER\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources]\r
+  BdsPlatform.c\r
+  PlatformData.c\r
+  QemuKernel.c\r
+  BdsPlatform.h\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+  OvmfPkg/OvmfPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  MemoryAllocationLib\r
+  UefiBootServicesTableLib\r
+  BaseMemoryLib\r
+  DebugLib\r
+  PcdLib\r
+  GenericBdsLib\r
+  PciLib\r
+  NvVarsFileLib\r
+  QemuFwCfgLib\r
+  LoadLinuxLib\r
+  QemuBootOrderLib\r
+  UefiLib\r
+\r
+[Pcd]\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId\r
+\r
+[Pcd.IA32, Pcd.X64]\r
+  gEfiMdePkgTokenSpaceGuid.PcdFSBClock\r
+\r
+[Protocols]\r
+  gEfiDecompressProtocolGuid\r
+  gEfiPciRootBridgeIoProtocolGuid\r
+  gEfiS3SaveStateProtocolGuid                   # PROTOCOL SOMETIMES_CONSUMED\r
+  gEfiDxeSmmReadyToLockProtocolGuid             # PROTOCOL SOMETIMES_PRODUCED\r
+\r
+[Guids]\r
+  gEfiEndOfDxeEventGroupGuid\r
+  gRootBridgesConnectedEventGroupGuid\r