]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: remove the change that get platform specific logic
authorMarsX Lin <marsx.lin@intel.com>
Tue, 3 Jan 2023 06:55:20 +0000 (14:55 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 23 Feb 2023 07:47:12 +0000 (07:47 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4241

Since UefiPayloadPkg had supported multiple firmware volume,
remove the platform specific logic via protocol

Cc: Ray Ni <ray.ni@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Gua Guo <gua.guo@intel.com>
Reviewed-by: James Lu <james.lu@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: MarsX Lin <marsx.lin@intel.com>
UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h [deleted file]
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
UefiPayloadPkg/UefiPayloadPkg.dec

diff --git a/UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h b/UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h
deleted file mode 100644 (file)
index 878ddc0..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/** @file\r
-  This file defines the Univeral Payload Platform BootManager Protocol.\r
-\r
-  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-**/\r
-\r
-#ifndef __PLATFORM_BOOT_MANAGER_OVERRIDE_H__\r
-#define __PLATFORM_BOOT_MANAGER_OVERRIDE_H__\r
-\r
-/**\r
-  Do the platform specific action before the console is connected.\r
-\r
-  Such as:\r
-    Update console variable;\r
-    Register new Driver#### or Boot####;\r
-    Signal ReadyToLock event.\r
-\r
-  This function will override the default behavior in PlatformBootManagerLib\r
-**/\r
-typedef\r
-VOID\r
-(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE)(\r
-  VOID\r
-  );\r
-\r
-/**\r
-  Do the platform specific action after the console is connected.\r
-\r
-  Such as:\r
-    Dynamically switch output mode;\r
-    Signal console ready platform customized event;\r
-    Run diagnostics like memory testing;\r
-    Connect certain devices;\r
-    Dispatch aditional option roms.\r
-\r
-  This function will override the default behavior in PlatformBootManagerLib\r
-**/\r
-typedef\r
-VOID\r
-(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE)(\r
-  VOID\r
-  );\r
-\r
-/**\r
-  This function is called each second during the boot manager waits the timeout.\r
-  This function will override the default behavior in PlatformBootManagerLib\r
-\r
-  @param TimeoutRemain  The remaining timeout.\r
-**/\r
-typedef\r
-VOID\r
-(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK)(\r
-  UINT16          TimeoutRemain\r
-  );\r
-\r
-/**\r
-  The function is called when no boot option could be launched,\r
-  including platform recovery options and options pointing to applications\r
-  built into firmware volumes.\r
-\r
-  If this function returns, BDS attempts to enter an infinite loop.\r
-  This function will override the default behavior in PlatformBootManagerLib\r
-**/\r
-typedef\r
-VOID\r
-(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT)(\r
-  VOID\r
-  );\r
-\r
-///\r
-/// Provides an interface to override the default behavior in PlatformBootManagerLib,\r
-/// so platform can provide its own platform specific logic through this protocol\r
-///\r
-typedef struct {\r
-  UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE    BeforeConsole;\r
-  UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE     AfterConsole;\r
-  UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK     WaitCallback;\r
-  UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT    UnableToBoot;\r
-} UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL;\r
-\r
-extern GUID  gUniversalPayloadPlatformBootManagerOverrideProtocolGuid;\r
-\r
-#endif\r
index a92a260a6e2d3a0198ecde7efed30467ff471925..62637ae6aa0c509742e672586b9fc2e3fc395bf1 100644 (file)
@@ -9,12 +9,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 #include "PlatformBootManager.h"\r
 #include "PlatformConsole.h"\r
-#include <Protocol/PlatformBootManagerOverride.h>\r
 #include <Guid/BootManagerMenu.h>\r
 #include <Library/HobLib.h>\r
 \r
-UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL  *mUniversalPayloadPlatformBootManagerOverrideInstance = NULL;\r
-\r
 /**\r
   Signal EndOfDxe event and install SMM Ready to lock protocol.\r
 \r
@@ -167,17 +164,6 @@ PlatformBootManagerBeforeConsole (
   EFI_INPUT_KEY                 CustomKey;\r
   EFI_INPUT_KEY                 Down;\r
   EFI_BOOT_MANAGER_LOAD_OPTION  BootOption;\r
-  EFI_STATUS                    Status;\r
-\r
-  Status = gBS->LocateProtocol (&gUniversalPayloadPlatformBootManagerOverrideProtocolGuid, NULL, (VOID **)&mUniversalPayloadPlatformBootManagerOverrideInstance);\r
-  if (EFI_ERROR (Status)) {\r
-    mUniversalPayloadPlatformBootManagerOverrideInstance = NULL;\r
-  }\r
-\r
-  if (mUniversalPayloadPlatformBootManagerOverrideInstance != NULL) {\r
-    mUniversalPayloadPlatformBootManagerOverrideInstance->BeforeConsole ();\r
-    return;\r
-  }\r
 \r
   //\r
   // Register ENTER as CONTINUE key\r
@@ -246,11 +232,6 @@ PlatformBootManagerAfterConsole (
   EDKII_PLATFORM_LOGO_PROTOCOL   *PlatformLogo;\r
   EFI_STATUS                     Status;\r
 \r
-  if (mUniversalPayloadPlatformBootManagerOverrideInstance != NULL) {\r
-    mUniversalPayloadPlatformBootManagerOverrideInstance->AfterConsole ();\r
-    return;\r
-  }\r
-\r
   Black.Blue = Black.Green = Black.Red = Black.Reserved = 0;\r
   White.Blue = White.Green = White.Red = White.Reserved = 0xFF;\r
 \r
@@ -297,10 +278,6 @@ PlatformBootManagerWaitCallback (
   UINT16  TimeoutRemain\r
   )\r
 {\r
-  if (mUniversalPayloadPlatformBootManagerOverrideInstance != NULL) {\r
-    mUniversalPayloadPlatformBootManagerOverrideInstance->WaitCallback (TimeoutRemain);\r
-  }\r
-\r
   return;\r
 }\r
 \r
@@ -317,10 +294,6 @@ PlatformBootManagerUnableToBoot (
   VOID\r
   )\r
 {\r
-  if (mUniversalPayloadPlatformBootManagerOverrideInstance != NULL) {\r
-    mUniversalPayloadPlatformBootManagerOverrideInstance->UnableToBoot ();\r
-  }\r
-\r
   return;\r
 }\r
 \r
index 7ec93420f21e0bfb935d22802874577838f8e5b6..f9626175e21680d261831a4a0723e064d05ae41a 100644 (file)
@@ -60,7 +60,6 @@
   gEfiBootLogoProtocolGuid        ## CONSUMES\r
   gEfiDxeSmmReadyToLockProtocolGuid\r
   gEfiSmmAccess2ProtocolGuid\r
-  gUniversalPayloadPlatformBootManagerOverrideProtocolGuid\r
   gEfiSerialIoProtocolGuid\r
   gEfiPciRootBridgeIoProtocolGuid\r
 \r
index 1ccfc3254885055d464bb8e5136c1d7cbda005e9..7d61d6eeae6cc5c2cb93e747d6179ee5bd52f518 100644 (file)
@@ -52,8 +52,6 @@
   #\r
   gPlatformGOPPolicyGuid                  = { 0xec2e931b, 0x3281, 0x48a5, { 0x81, 0x07, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d } }\r
 \r
-  gUniversalPayloadPlatformBootManagerOverrideProtocolGuid = { 0xdb3fc2df, 0x7376, 0x4a8d, { 0x82, 0xab, 0x91, 0x54, 0xa1, 0x36, 0xa6, 0x5a } }\r
-\r
 ################################################################################\r
 #\r
 # PCD Declarations section - list of all PCDs Declared by this Package\r