From nobody Sat May 18 22:54:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+97867+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+97867+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1672743492; cv=none; d=zohomail.com; s=zohoarc; b=PY8JFWZshvD1/fHm/u2WqkOlCi0+2J2wl/E40X9jaBUsyXrb5LePIgHYSvkN62KwBe5I+RDkujNcYi75/lyKOZ6kf8JvWb2WvUgIKx8qnQno+BfSOrStfGuo+zXHiHIt9MovclFxiXbHdrvhmy8yubDejBZVsGX71acLHObMbTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672743492; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=tF9DW/yiB6XjAJQ1wZULH42QxyXCemJIDzxm5KD3tis=; b=nWbWZSt1JiPdusHh5fqnI35P6TWRXXCD2S2F5gg//PY9R1iv5oD0pYeB028mdSmcZVxJNfyLRzCh7C8lb28/onWzr9rISI6K5gpbBmfraUfIT4GDR6jZNau0hk4NEVkvJMj6x9/MFSyvcXyNhIRZ6WR63LaMsPDeCmVDNJaAwbg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+97867+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 167274349282136.399439573001814; Tue, 3 Jan 2023 02:58:12 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id Dx0WYY1788612xfwbF7EtZr6; Tue, 03 Jan 2023 02:58:12 -0800 X-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 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" X-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" X-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: [edk2-devel] [PATCH] UefiPayloadPkg: remove the change that get platform specific logic Date: Tue, 3 Jan 2023 15:44:34 +0800 Message-Id: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marsx.lin@intel.com X-Gm-Message-State: ImVYEQwrjTAQ4zfVpJoJpjelx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1672743492; bh=jw4KSvmMbyFKkHbqqdqr7U0hG92I6JBymKFO9lDByp8=; h=Cc:Date:From:Reply-To:Subject:To; b=hmyhyBgqWrlwbB/mgZc+LXApPMgiyse3wKE5Hs3hzEOEiLolxjT5JDaXhQDhxNmVSZA UUrAwgjZ0NvukDlNERi2LX8jXmWYVOotWmSTTlQ/vl45p2Xw8UDwP6GAmLj/+UISkYESH 20chRI7/bH29ZIJ271eijppO/CYBVxlDS9o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1672743494887100001 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Guo Dong --- .../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 - This file defines the Univeral Payload Platform BootManager Protocol. - - Copyright (c) 2021, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef __PLATFORM_BOOT_MANAGER_OVERRIDE_H__ -#define __PLATFORM_BOOT_MANAGER_OVERRIDE_H__ - -/** - Do the platform specific action before the console is connected. - - Such as: - Update console variable; - Register new Driver#### or Boot####; - Signal ReadyToLock event. - - This function will override the default behavior in PlatformBootManagerL= ib -**/ -typedef -VOID -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE)( - VOID - ); - -/** - Do the platform specific action after the console is connected. - - Such as: - Dynamically switch output mode; - Signal console ready platform customized event; - Run diagnostics like memory testing; - Connect certain devices; - Dispatch aditional option roms. - - This function will override the default behavior in PlatformBootManagerL= ib -**/ -typedef -VOID -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE)( - VOID - ); - -/** - This function is called each second during the boot manager waits the ti= meout. - This function will override the default behavior in PlatformBootManagerL= ib - - @param TimeoutRemain The remaining timeout. -**/ -typedef -VOID -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK)( - UINT16 TimeoutRemain - ); - -/** - The function is called when no boot option could be launched, - including platform recovery options and options pointing to applications - built into firmware volumes. - - If this function returns, BDS attempts to enter an infinite loop. - This function will override the default behavior in PlatformBootManagerL= ib -**/ -typedef -VOID -(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT)( - VOID - ); - -/// -/// Provides an interface to override the default behavior in PlatformBoot= ManagerLib, -/// so platform can provide its own platform specific logic through this p= rotocol -/// -typedef struct { - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE Befor= eConsole; - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE After= Console; - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK WaitC= allback; - UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT Unabl= eToBoot; -} UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL; - -extern GUID gUniversalPayloadPlatformBootManagerOverrideProtocolGuid; - -#endif 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 =20 #include "PlatformBootManager.h" #include "PlatformConsole.h" -#include #include #include =20 -UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL *mUniversalPayl= oadPlatformBootManagerOverrideInstance =3D NULL; - /** Signal EndOfDxe event and install SMM Ready to lock protocol. =20 @@ -167,17 +164,6 @@ PlatformBootManagerBeforeConsole ( EFI_INPUT_KEY CustomKey; EFI_INPUT_KEY Down; EFI_BOOT_MANAGER_LOAD_OPTION BootOption; - EFI_STATUS Status; - - Status =3D gBS->LocateProtocol (&gUniversalPayloadPlatformBootManagerOve= rrideProtocolGuid, NULL, (VOID **)&mUniversalPayloadPlatformBootManagerOver= rideInstance); - if (EFI_ERROR (Status)) { - mUniversalPayloadPlatformBootManagerOverrideInstance =3D NULL; - } - - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) { - mUniversalPayloadPlatformBootManagerOverrideInstance->BeforeConsole (); - return; - } =20 // // Register ENTER as CONTINUE key @@ -246,11 +232,6 @@ PlatformBootManagerAfterConsole ( EDKII_PLATFORM_LOGO_PROTOCOL *PlatformLogo; EFI_STATUS Status; =20 - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) { - mUniversalPayloadPlatformBootManagerOverrideInstance->AfterConsole (); - return; - } - Black.Blue =3D Black.Green =3D Black.Red =3D Black.Reserved =3D 0; White.Blue =3D White.Green =3D White.Red =3D White.Reserved =3D 0xFF; =20 @@ -297,10 +278,6 @@ PlatformBootManagerWaitCallback ( UINT16 TimeoutRemain ) { - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) { - mUniversalPayloadPlatformBootManagerOverrideInstance->WaitCallback (Ti= meoutRemain); - } - return; } =20 @@ -317,10 +294,6 @@ PlatformBootManagerUnableToBoot ( VOID ) { - if (mUniversalPayloadPlatformBootManagerOverrideInstance !=3D NULL) { - mUniversalPayloadPlatformBootManagerOverrideInstance->UnableToBoot (); - } - return; } =20 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 gEfiDxeSmmReadyToLockProtocolGuid gEfiSmmAccess2ProtocolGuid - gUniversalPayloadPlatformBootManagerOverrideProtocolGuid gEfiSerialIoProtocolGuid gEfiPciRootBridgeIoProtocolGuid =20 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 @@ # gPlatformGOPPolicyGuid =3D { 0xec2e931b, 0x3281, 0x48a5= , { 0x81, 0x07, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d } } =20 - gUniversalPayloadPlatformBootManagerOverrideProtocolGuid =3D { 0xdb3fc2d= f, 0x7376, 0x4a8d, { 0x82, 0xab, 0x91, 0x54, 0xa1, 0x36, 0xa6, 0x5a } } - ##########################################################################= ###### # # PCD Declarations section - list of all PCDs Declared by this Package --=20 2.33.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97867): https://edk2.groups.io/g/devel/message/97867 Mute This Topic: https://groups.io/mt/96025985/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-