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.web09.647.1573861852977185222 for ; Fri, 15 Nov 2019 15:50:53 -0800 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; 15 Nov 2019 15:50:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,310,1569308400"; d="scan'208";a="195543341" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga007.jf.intel.com with ESMTP; 15 Nov 2019 15:50:52 -0800 Received: from orsmsx160.amr.corp.intel.com (10.22.226.43) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 15 Nov 2019 15:50:52 -0800 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.67]) by ORSMSX160.amr.corp.intel.com ([169.254.13.204]) with mapi id 14.03.0439.000; Fri, 15 Nov 2019 15:50:52 -0800 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Kubacki, Michael A" CC: "Chaganty, Rangasai V" , "Gao, Liming" Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 32/49] AdvancedFeaturePkg: Add temporary build workaround Thread-Topic: [edk2-devel] [edk2-platforms][PATCH V1 32/49] AdvancedFeaturePkg: Add temporary build workaround Thread-Index: AQHVmdKxF0N2hgP5U0+0rPDsnW1h26eMq2bQ Date: Fri, 15 Nov 2019 23:50:51 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BDB350@ORSMSX114.amr.corp.intel.com> References: <20191113032816.4056-1-michael.a.kubacki@intel.com> <20191113032816.4056-33-michael.a.kubacki@intel.com> In-Reply-To: <20191113032816.4056-33-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWNmZDgxZDYtNzVmYS00YzY3LWE3ODAtMjNhOGI4MWM4NGU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUnNkVGhcL0VkUDlcL1J6d0RONUJRdGc3MWlFT2dSVU40XC9IQTFtdzBQdWtJQUlRa3ZSOWgzaUMrTUlvY2dnWlg4eiJ9 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: Tuesday, November 12, 2019 7:28 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Gao, Liming Subject: [edk2-devel] [edk2-platforms][PATCH V1 32/49] AdvancedFeaturePkg:= Add temporary build workaround This change adds a temporary build workaround to allow the advanced featur= e PCDs to be used in conditional statements in DSC files even if they are n= ot referenced in INF files. Support to allow a FeaturePCD to be used in a conditional statement withou= t being referenced in an INF file has been requested in the following Bugzi= lla item: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2270 This change can be reverted when that Bugzilla is completed and the change= is submitted to edk2. Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Michael Kubacki --- Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc = | 2 + Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/TemporaryBuild= Workaround.dsc | 74 ++++++++++++++++++++ Features/Intel/AdvancedFeaturePkg= /TemporaryBuildWorkaround/TemporaryBuildWorkaround.inf | 57 +++++++++++++++ Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/TemporaryBuild= Workaround.c | 31 ++++++++ 4 files changed, 164 insertions(+) diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Fe= atures/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc index 50c0e81048..23e7c6474a 100644 --- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc +++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc @@ -30,6 +30,8 @@ PEI_ARCH =3D IA32 DXE_ARCH =3D X64 =20 +!include=20 +AdvancedFeaturePkg/TemporaryBuildWorkaround/TemporaryBuildWorkaround.ds +c + #########################################################################= ####### # # Advanced Feature Enable section - all advanced features are enabling fo= r the diff --git a/Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkarou= nd/TemporaryBuildWorkaround.dsc b/Features/Intel/AdvancedFeaturePkg/Tempora= ryBuildWorkaround/TemporaryBuildWorkaround.dsc new file mode 100644 index 0000000000..227ae00908 --- /dev/null +++ b/Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/Tempora +++ ryBuildWorkaround.dsc @@ -0,0 +1,74 @@ +## @file +# Build description file for a temporary build workaround. +# +# The feature enable PCD for advanced features must be referenced in an= =20 +INF # to be referenced in DSC/FDF files. This DSC only exists in the=20 +build to # allow the PCDs to be referenced. This workaround does not=20 +affect the final # flash image or boot in any way. +# +# The request to update BaseTools to allow a PCD to be referenced in=20 +DSC/FDF # files without requiring the PCD to be referenced in an INF=20 +file is tracked # here:=20 +https://bugzilla.tianocore.org/show_bug.cgi?id=3D2270 +# +# When the BaseTools update is complete, this file can entirely be=20 +removed # from this package. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
# #=20 +SPDX-License-Identifier: BSD-2-Clause-Patent # ## + +# +# BEGIN:Temporary Build Workaround (resolution:=20 +https://bugzilla.tianocore.org/show_bug.cgi?id=3D2270) +# + +# THIS FILE IS TEMPORARY. PLEASE TRY TO LOOK PAST THE "HACKS" ASSOCIATED = WITH IT. +# +# With the BaseTools change requested, the changes needed to move to the = end state are simply: +# 1. Remove the !include for this file in AdvancedFeatures.dsc # 2.=20 +Remove this directory + +!if $(PLATFORM_NAME) !=3D AdvancedFeaturePkg # # AdvancedFeaturePkg=20 +initializes all FeaturePCDs to TRUE so they can conveniently be built in = one package. +# Board packages will normally only enable (and therefore reference) a=20 +small subset of advanced features # relative to the board. If an INF=20 +does not reference a package DEC file (which will be the case if the #=20 +feature is not enabled) then the DSC must set ("define") the PCD for the = conditional statements based # on the PCD to work. +# +# AdvancedFeaturePkg has no problem as it naturally has a need to set al = PCDs to TRUE for build. +# The section below sets all PCDs to FALSE in the DSC file so if the=20 +feature is not enabled by a board, # the build will still be successful. +# +[PcdsFeatureFlag] + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable = |FALSE + gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable = |FALSE + gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable = |FALSE + gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable = |FALSE + gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable = |FALSE + gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable = |FALSE + gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable = |FALSE +!endif + +# +# The LibraryClasses required to build TemporaryBuildWorkaround.inf #=20 +(mostly libraries requiring other libraries) # [LibraryClasses] + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + +BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.in +f + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf + +PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt +/PeiServicesTablePointerLibIdt.inf + +# +# The driver that references all feature PCDs to satsify current build=20 +limitations # [Components] + +AdvancedFeaturePkg/TemporaryBuildWorkaround/TemporaryBuildWorkaround.in +f +# +# END:Temporary Build Workaround (resolution:=20 +https://bugzilla.tianocore.org/show_bug.cgi?id=3D2270) +# diff --git a/Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/Te= mporaryBuildWorkaround.inf b/Features/Intel/AdvancedFeaturePkg/TemporaryBui= ldWorkaround/TemporaryBuildWorkaround.inf new file mode 100644 index 0000000000..74176d1989 --- /dev/null +++ b/Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/Tempora +++ ryBuildWorkaround.inf @@ -0,0 +1,57 @@ +### @file +# Component information file for a temporary build workaround. +# +# The feature enable PCD for this package must be referenced in an INF=20 +to be # referenced in DSC/FDF files. This driver is only included in=20 +the build to # allow the PCD to be referenced. This driver is not=20 +included in the flash # image and does not affect the boot in any way. +# +# The request to update BaseTools to allow a PCD to be referenced in=20 +DSC/FDF # files without requiring the PCD to be referenced in an INF=20 +file is tracked # here:=20 +https://bugzilla.tianocore.org/show_bug.cgi?id=3D2270 +# +# When the BaseTools update is complete, this file can entirely be=20 +removed # from this package. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
# #=20 +SPDX-License-Identifier: BSD-2-Clause-Patent # ### + +[Defines] + INF_VERSION =3D 0x00010017 + BASE_NAME =3D TemporaryBuildWorkaround + FILE_GUID =3D 8846A81E-F552-4917-81F5-80B62E4EFBAC + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D PEIM + ENTRY_POINT =3D TemporaryBuildWorkaroundEntry + +[LibraryClasses] + BaseLib + PeimEntryPoint + +[Packages] + MdePkg/MdePkg.dec + Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec + Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dec + Network/NetworkFeaturePkg/NetworkFeaturePkg.dec + OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec + PowerManagement/S3FeaturePkg/S3FeaturePkg.dec + SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec + UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec + +[FeaturePcd] + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable + gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable + gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable + gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable + gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable + gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable + gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable + +[Sources] + TemporaryBuildWorkaround.c + +[Depex] + TRUE diff --git a/Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/Te= mporaryBuildWorkaround.c b/Features/Intel/AdvancedFeaturePkg/TemporaryBuild= Workaround/TemporaryBuildWorkaround.c new file mode 100644 index 0000000000..2cd91b06f0 --- /dev/null +++ b/Features/Intel/AdvancedFeaturePkg/TemporaryBuildWorkaround/Tempora +++ ryBuildWorkaround.c @@ -0,0 +1,31 @@ +/** @file + Source code file for a temporary build workaround. + + The purpose of this workaround is described in the module INF file. + +Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +/** + An empty entry point function. + + @param FileHandle Handle of the file being invoked. + @param PeiServices Describes the list of possible PEI Services. + + @retval EFI_SUCCESS This function always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +TemporaryBuildWorkaroundEntry ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + return EFI_SUCCESS; +} -- 2.16.2.windows.1