From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.58597.1672731880976148087 for ; Mon, 02 Jan 2023 23:44:41 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ChwvFnFM; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: marsx.lin@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672731880; x=1704267880; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=r7t4JFBqlv7SpehFPG+OyYISBhnm/cikYbb8AXNkOhA=; b=ChwvFnFMIfhlqaCXg1F5hpXIEFLd2hBzP+Hi2t3ZobkTG26sHOElYv2L VsDpgkPghfKN+V32y0wOFfohv5SRDIml5ONdKH6hCvipIORfsQHC6ZnBr bRZli84WAg1Y1khML8W0q5kcpuUg2lUBkwxE5ijq11aBIl9HCALaaO8Sl KzskNdUvpty594MllUhWvpf5v+ueyXMMmRo3WmpPcapfUlv2/V5dRb6Ox Lgf42t4XODF//c0FuTwnDpIYbSpGn6dr0YUam0TsyI0GdMqki9wMgcu9l eXPicfreH+RlUEF6ErvRjrltGb+t08qmqJ3IxhUungOKVTKJs2FLSmbkt Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="301977477" X-IronPort-AV: E=Sophos;i="5.96,296,1665471600"; d="scan'208";a="301977477" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 23:44:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="797092785" X-IronPort-AV: E=Sophos;i="5.96,296,1665471600"; d="scan'208";a="797092785" Received: from unknown (HELO marslinx-DESK1.gar.corp.intel.com) ([10.5.215.146]) by fmsmga001.fm.intel.com with ESMTP; 02 Jan 2023 23:44:37 -0800 From: marsx.lin@intel.com To: devel@edk2.groups.io Cc: MarsX Lin , Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo Subject: [PATCH] UefiPayloadPkg: remove the change that get platform specific logic Date: Tue, 3 Jan 2023 15:44:34 +0800 Message-Id: X-Mailer: git-send-email 2.33.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: MarsX Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4241 Since UefiPayloadPkg had supported multiple firmware volume, remove the platform specific logic via protocol Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: MarsX Lin --- .../Protocol/PlatformBootManagerOverride.h | 84 ------------------- .../PlatformBootManager.c | 27 ------ .../PlatformBootManagerLib.inf | 1 - UefiPayloadPkg/UefiPayloadPkg.dec | 2 - 4 files changed, 114 deletions(-) delete mode 100644 UefiPayloadPkg/Include/Protocol/PlatformBootManagerOver= ride.h diff --git a/UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h = b/UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h deleted file mode 100644 index 878ddc044b..0000000000 --- a/UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h +++ /dev/null @@ -1,84 +0,0 @@ -/** @file=0D - This file defines the Univeral Payload Platform BootManager Protocol.=0D -=0D - Copyright (c) 2021, Intel Corporation. All rights reserved.
=0D - SPDX-License-Identifier: BSD-2-Clause-Patent=0D -**/=0D -=0D -#ifndef __PLATFORM_BOOT_MANAGER_OVERRIDE_H__=0D -#define __PLATFORM_BOOT_MANAGER_OVERRIDE_H__=0D -=0D -/**=0D - Do the platform specific action before the console is connected.=0D -=0D - Such as:=0D - Update console variable;=0D - Register new Driver#### or Boot####;=0D - Signal ReadyToLock event.=0D -=0D - This function will override the default behavior in PlatformBootManagerL= ib=0D -**/=0D -typedef=0D -VOID=0D -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE)(= =0D - VOID=0D - );=0D -=0D -/**=0D - Do the platform specific action after the console is connected.=0D -=0D - Such as:=0D - Dynamically switch output mode;=0D - Signal console ready platform customized event;=0D - Run diagnostics like memory testing;=0D - Connect certain devices;=0D - Dispatch aditional option roms.=0D -=0D - This function will override the default behavior in PlatformBootManagerL= ib=0D -**/=0D -typedef=0D -VOID=0D -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE)(= =0D - VOID=0D - );=0D -=0D -/**=0D - This function is called each second during the boot manager waits the ti= meout.=0D - This function will override the default behavior in PlatformBootManagerL= ib=0D -=0D - @param TimeoutRemain The remaining timeout.=0D -**/=0D -typedef=0D -VOID=0D -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK)(= =0D - UINT16 TimeoutRemain=0D - );=0D -=0D -/**=0D - The function is called when no boot option could be launched,=0D - including platform recovery options and options pointing to applications= =0D - built into firmware volumes.=0D -=0D - If this function returns, BDS attempts to enter an infinite loop.=0D - This function will override the default behavior in PlatformBootManagerL= ib=0D -**/=0D -typedef=0D -VOID=0D -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT)(= =0D - VOID=0D - );=0D -=0D -///=0D -/// Provides an interface to override the default behavior in PlatformBoot= ManagerLib,=0D -/// so platform can provide its own platform specific logic through this p= rotocol=0D -///=0D -typedef struct {=0D - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE Befor= eConsole;=0D - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE After= Console;=0D - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK WaitC= allback;=0D - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT Unabl= eToBoot;=0D -} UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL;=0D -=0D -extern GUID gUniversalPayloadPlatformBootManagerOverrideProtocolGuid;=0D -=0D -#endif=0D diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index a92a260a6e..62637ae6aa 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -9,12 +9,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =0D #include "PlatformBootManager.h"=0D #include "PlatformConsole.h"=0D -#include =0D #include =0D #include =0D =0D -UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL *mUniversalPayl= oadPlatformBootManagerOverrideInstance =3D NULL;=0D -=0D /**=0D Signal EndOfDxe event and install SMM Ready to lock protocol.=0D =0D @@ -167,17 +164,6 @@ PlatformBootManagerBeforeConsole ( EFI_INPUT_KEY CustomKey;=0D EFI_INPUT_KEY Down;=0D EFI_BOOT_MANAGER_LOAD_OPTION BootOption;=0D - EFI_STATUS Status;=0D -=0D - Status =3D gBS->LocateProtocol (&gUniversalPayloadPlatformBootManagerOve= rrideProtocolGuid, NULL, (VOID **)&mUniversalPayloadPlatformBootManagerOver= rideInstance);=0D - if (EFI_ERROR (Status)) {=0D - mUniversalPayloadPlatformBootManagerOverrideInstance =3D NULL;=0D - }=0D -=0D - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) {=0D - mUniversalPayloadPlatformBootManagerOverrideInstance->BeforeConsole ()= ;=0D - return;=0D - }=0D =0D //=0D // Register ENTER as CONTINUE key=0D @@ -246,11 +232,6 @@ PlatformBootManagerAfterConsole ( EDKII_PLATFORM_LOGO_PROTOCOL *PlatformLogo;=0D EFI_STATUS Status;=0D =0D - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) {=0D - mUniversalPayloadPlatformBootManagerOverrideInstance->AfterConsole ();= =0D - return;=0D - }=0D -=0D Black.Blue =3D Black.Green =3D Black.Red =3D Black.Reserved =3D 0;=0D White.Blue =3D White.Green =3D White.Red =3D White.Reserved =3D 0xFF;=0D =0D @@ -297,10 +278,6 @@ PlatformBootManagerWaitCallback ( UINT16 TimeoutRemain=0D )=0D {=0D - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) {=0D - mUniversalPayloadPlatformBootManagerOverrideInstance->WaitCallback (Ti= meoutRemain);=0D - }=0D -=0D return;=0D }=0D =0D @@ -317,10 +294,6 @@ PlatformBootManagerUnableToBoot ( VOID=0D )=0D {=0D - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) {=0D - mUniversalPayloadPlatformBootManagerOverrideInstance->UnableToBoot ();= =0D - }=0D -=0D return;=0D }=0D =0D diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf index 7ec93420f2..f9626175e2 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf @@ -60,7 +60,6 @@ gEfiBootLogoProtocolGuid ## CONSUMES=0D gEfiDxeSmmReadyToLockProtocolGuid=0D gEfiSmmAccess2ProtocolGuid=0D - gUniversalPayloadPlatformBootManagerOverrideProtocolGuid=0D gEfiSerialIoProtocolGuid=0D gEfiPciRootBridgeIoProtocolGuid=0D =0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayload= Pkg.dec index 1ccfc32548..7d61d6eeae 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dec +++ b/UefiPayloadPkg/UefiPayloadPkg.dec @@ -52,8 +52,6 @@ #=0D gPlatformGOPPolicyGuid =3D { 0xec2e931b, 0x3281, 0x48a5= , { 0x81, 0x07, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d } }=0D =0D - gUniversalPayloadPlatformBootManagerOverrideProtocolGuid =3D { 0xdb3fc2d= f, 0x7376, 0x4a8d, { 0x82, 0xab, 0x91, 0x54, 0xa1, 0x36, 0xa6, 0x5a } }=0D -=0D ##########################################################################= ######=0D #=0D # PCD Declarations section - list of all PCDs Declared by this Package=0D --=20 2.33.0.windows.2