From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.3171.1571297129749399267 for ; Thu, 17 Oct 2019 00:25:30 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 00:25:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,306,1566889200"; d="scan'208";a="186405182" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga007.jf.intel.com with ESMTP; 17 Oct 2019 00:25:28 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 00:25:28 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.228]) by ORSMSX116.amr.corp.intel.com ([169.254.7.79]) with mapi id 14.03.0439.000; Thu, 17 Oct 2019 00:25:28 -0700 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Kubacki, Michael A" CC: "Chaganty, Rangasai V" , "Ni, Ray" Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] IntelSiliconPkg/BootMediaLib: Reduce library API Thread-Topic: [edk2-devel] [edk2-platforms][PATCH V1 1/1] IntelSiliconPkg/BootMediaLib: Reduce library API Thread-Index: AQHVgtYM/2+M1z/iyUesZefE9qqxjqdech4g Date: Thu, 17 Oct 2019 07:25:28 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AAEF71F23@ORSMSX114.amr.corp.intel.com> References: <20191014212616.18376-1-michael.a.kubacki@intel.com> In-Reply-To: <20191014212616.18376-1-michael.a.kubacki@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzlmMTI0YzUtNGU0Yy00MTgyLWE1YWQtYThhM2NhN2JkZDAxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ0trYTU5M1RObk9vWWR6M3NMWHFkd0JRclY1V2NMeWJZa0R1NG5mQ29wKzF0NGZOMVhcL2xzbXJcL1V2Umd6OTg4In0= x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: devel@edk2.groups.io On Behalf Of Kubacki, Mi= chael A Sent: Monday, October 14, 2019 2:26 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Ni, Ray Subject: [edk2-devel] [edk2-platforms][PATCH V1 1/1] IntelSiliconPkg/BootM= ediaLib: Reduce library API Removes the following functions from FirmwareBootMediaLib.h: * FirmwareBootMediaIsSpi () * FirmwareBootMediaIsUfs () * FirmwareBootMediaIsEmmc () * FirmwareBootMediaIsNvme () It is preferred to have a single method to retrieve the firmware boot medi= a. To reduce overall maintenance effort over time, the FirmwareBootMediaIsX= xx () pattern is removed in favor of returning the firmware boot media type= via GetFirmwareBootMediaType (). Cc: Sai Chaganty Cc: Ray Ni Signed-off-by: Michael Kubacki --- Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwar= eBootMediaLib.inf | 1 - Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBo= otMediaLib.inf | 1 - Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h = | 48 --------- Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/FirmwareBootM= ediaLib.c | 109 -------------------- 4 files changed, 159 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/D= xeSmmFirmwareBootMediaLib.inf b/Silicon/Intel/IntelSiliconPkg/Library/PeiDx= eSmmBootMediaLib/DxeSmmFirmwareBootMediaLib.inf index 83ed5f04af..7e10b5f7a7 100644 --- a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFi= rmwareBootMediaLib.inf +++ b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmm +++ FirmwareBootMediaLib.inf @@ -27,7 +27,6 @@ # =20 [Sources] - FirmwareBootMediaLib.c DxeSmmFirmwareBootMediaLib.c =20 [Packages] diff --git a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/P= eiFirmwareBootMediaLib.inf b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSm= mBootMediaLib/PeiFirmwareBootMediaLib.inf index 063c4027d3..ff1da31387 100644 --- a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmw= areBootMediaLib.inf +++ b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFir +++ mwareBootMediaLib.inf @@ -22,7 +22,6 @@ LIBRARY_CLASS =3D FirmwareBootMediaLib =20 [Sources] - FirmwareBootMediaLib.c PeiFirmwareBootMediaLib.c =20 [Packages] diff --git a/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMed= iaLib.h b/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLi= b.h index aca9593a84..b36ebacf30 100644 --- a/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h +++ b/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib +++ .h @@ -55,52 +55,4 @@ FirmwareBootMediaIsKnown ( VOID ); =20 -/** - Determines if the platform firmware is booting from SPI. - - @retval TRUE Platform firmware is booting from SPI - @retval FALSE Platform firmware is booting from a non-SPI device = or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsSpi ( - VOID - ); - -/** - Determines if the platform firmware is booting from UFS. - - @retval TRUE Platform firmware is booting from UFS - @retval FALSE Platform firmware is booting from a non-UFS device = or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsUfs ( - VOID - ); - -/** - Determines if the platform firmware is booting from eMMC. - - @retval TRUE Platform firmware is booting from eMMC - @retval FALSE Platform firmware is booting from a non-eMMC device= or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsEmmc ( - VOID - ); - -/** - Determines if the platform firmware is booting from NVMe. - - @retval TRUE Platform firmware is booting from NVMe. - @retval FALSE Platform firmware is booting from a non-NVMe device= or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsNvme ( - VOID - ); - #endif diff --git a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/F= irmwareBootMediaLib.c b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBoot= MediaLib/FirmwareBootMediaLib.c deleted file mode 100644 index 11a14d172d..0000000000 --- a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/Firmware= BootMediaLib.c +++ /dev/null @@ -1,109 +0,0 @@ -/** @file - This library identifies the firmware boot media device. - - The firmware boot media device is used to make system initialization de= cisions in the boot flow dependent - upon firmware boot media. Note that the firmware boot media is the stor= age media that the boot firmware is stored on. - It is not the OS storage media which may be stored upon a different non= -volatile storage device. - - This file contains library implementation common to all boot phases. - -Copyright (c) 2019, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include -#include -#include - -/** - Determines if the platform firmware is booting from SPI. - - @retval TRUE Platform firmware is booting from SPI - @retval FALSE Platform firmware is booting from a non-SPI device = or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsSpi ( - VOID - ) -{ - EFI_STATUS Status; - FW_BOOT_MEDIA_TYPE BootMedia; - - Status =3D GetFirmwareBootMediaType (&BootMedia); - if (EFI_ERROR (Status) || BootMedia !=3D FwBootMediaSpi) { - return FALSE; - } else { - return TRUE; - } -} - -/** - Determines if the platform firmware is booting from UFS. - - @retval TRUE Platform firmware is booting from UFS - @retval FALSE Platform firmware is booting from a non-UFS device = or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsUfs ( - VOID - ) -{ - EFI_STATUS Status; - FW_BOOT_MEDIA_TYPE BootMedia; - - Status =3D GetFirmwareBootMediaType (&BootMedia); - if (EFI_ERROR (Status) || BootMedia !=3D FwBootMediaUfs) { - return FALSE; - } else { - return TRUE; - } -} - -/** - Determines if the platform firmware is booting from eMMC. - - @retval TRUE Platform firmware is booting from eMMC - @retval FALSE Platform firmware is booting from a non-eMMC device= or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsEmmc ( - VOID - ) -{ - EFI_STATUS Status; - FW_BOOT_MEDIA_TYPE BootMedia; - - Status =3D GetFirmwareBootMediaType (&BootMedia); - if (EFI_ERROR (Status) || BootMedia !=3D FwBootMediaEmmc) { - return FALSE; - } else { - return TRUE; - } -} - -/** - Determines if the platform firmware is booting from NVMe. - - @retval TRUE Platform firmware is booting from NVMe. - @retval FALSE Platform firmware is booting from a non-NVMe device= or the boot media is unknown -**/ -BOOLEAN -EFIAPI -FirmwareBootMediaIsNvme ( - VOID - ) -{ - EFI_STATUS Status; - FW_BOOT_MEDIA_TYPE BootMedia; - - Status =3D GetFirmwareBootMediaType (&BootMedia); - if (EFI_ERROR (Status) || BootMedia !=3D FwBootMediaNvme) { - return FALSE; - } else { - return TRUE; - } -} -- 2.16.2.windows.1