From nobody Mon Feb 9 14:00:47 2026 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+91742+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+91742+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1658515608; cv=none; d=zohomail.com; s=zohoarc; b=oCdZGgPl54DNvxb/nLpb8DW33epRJlK+cDU+bgCg438knZc7dabex6qSVPswjwWleMB/F2/exT9w6vai+/R7WCVy3F/wKp3mQG1IEUMO8wUDZn8ooNOXuYbHlXsuR/KQxqCYmGv3Q6muFZ/FvYrnnltjsjK4Xd4pdLJoaeZkOBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658515608; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Dyrk98m+cGiYRNOgp4y0FVgloYPv3Hfqw6I5ZQrxSq4=; b=h1ReQW+mINSyV5/kxCfUG442s973NdqkmpAHQUyO7s4FRspdC5TFLlPVUQKM10nx21/P79Dop4RCINn40Ex2xaQ+JW+5AKL9ZAmoMCJQdWWjLk9G6tY0X+iO6SCo0e7lTMgilAj2hkH0Rw7qIf44zUNROyS1fB6C3qbSpneorR0= 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+91742+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 1658515608879333.5912325085475; Fri, 22 Jul 2022 11:46:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id kqzmYY1788612xDwQSibVcFU; Fri, 22 Jul 2022 11:46:47 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.11538.1658515598830308993 for ; Fri, 22 Jul 2022 11:46:40 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10416"; a="288138279" X-IronPort-AV: E=Sophos;i="5.93,186,1654585200"; d="scan'208";a="288138279" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2022 11:46:39 -0700 X-IronPort-AV: E=Sophos;i="5.93,186,1654585200"; d="scan'208";a="666767985" X-Received: from iworam-desk.amr.corp.intel.com ([10.24.80.243]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2022 11:46:39 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Isaac Oram , Chasel Chiu , Nate DeSimone Subject: [edk2-devel][edk2-platforms][PATCH V1 10/13] PurleyOpenBoardPkg/Build: Reduce unnecessary code Date: Fri, 22 Jul 2022 11:46:21 -0700 Message-Id: In-Reply-To: References: 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,isaac.w.oram@intel.com X-Gm-Message-State: fzP7a86WeRzV346fQuW4IM2Sx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1658515607; bh=5oDF29q4/HC5i+Xv1Tu7FKXPHZlfw6FMjDPmXUBWaCw=; h=Cc:Date:From:Reply-To:Subject:To; b=SqBNmHgO+EJVS3TJsM/0nv0T9bz0H53+P5A0ToPQxzhwUL7sgRUJyAKcTab/HxaGfYa lSkn2gotkXMvGAhauOTtCkRQ8xTrxVpwsvNeNnPsk0P3I+bQGPli6JztAvoLN+95ypHL9 IxmvbbQaKFrKMf3bP986RNdX6uGyOpttX6M= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1658515609236100046 Content-Type: text/plain; charset="utf-8" Leverage common includes to reduce duplicated or low value code. Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Isaac Oram --- .../BoardMtOlympus/PlatformPkgConfig.dsc | 46 +++++----------- .../BoardMtOlympus/PlatformPkgPcd.dsc | 52 +++++-------------- .../BoardTiogaPass/PlatformPkgConfig.dsc | 48 +++++------------ .../BoardTiogaPass/PlatformPkgPcd.dsc | 52 +++++-------------- 4 files changed, 49 insertions(+), 149 deletions(-) diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgCo= nfig.dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgConf= ig.dsc index 2bd714c01e..2359243310 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgConfig.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgConfig.dsc @@ -14,40 +14,18 @@ gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4 =20 [PcdsFeatureFlag] - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - - !if $(TARGET) =3D=3D DEBUG - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE - !else - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE - !endif + # + # MinPlatform common include for required feature PCD + # These PCD must be set before the core include files, CoreCommonLib, + # CorePeiLib, and CoreDxeLib. + # Optional MinPlatformPkg features should be enabled after this + # + !include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc + + # + # Commonly used MinPlatform feature configuration logic that maps functi= onity to stage + # + !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc =20 gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|TRUE =20 diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPc= d.dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc index 050f9b6228..069f463d5e 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/PlatformPkgPcd.dsc @@ -61,42 +61,18 @@ ###################################### # Platform Configuration ###################################### - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - -!if $(TARGET) =3D=3D DEBUG - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE -!else - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE -!endif + # + # MinPlatform common include for required feature PCD + # These PCD must be set before the core include files, CoreCommonLib, + # CorePeiLib, and CoreDxeLib. + # Optional MinPlatformPkg features should be enabled after this + # + !include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc + + # + # Commonly used MinPlatform feature configuration logic that maps functi= onity to stage + # + !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc =20 [PcdsFeatureFlag.X64] gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard|FALSE @@ -278,10 +254,6 @@ [PcdsPatchableInModule.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042 =20 -!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable =3D=3D TRUE - gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1 -!endif - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000 gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x10000000 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress|0xFED00000 diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgCo= nfig.dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgConf= ig.dsc index cefb81b76e..e393cf3097 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgConfig.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgConfig.dsc @@ -14,40 +14,18 @@ gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4 =20 [PcdsFeatureFlag] - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - - !if $(TARGET) =3D=3D DEBUG - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE - !else - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE - !endif + # + # MinPlatform common include for required feature PCD + # These PCD must be set before the core include files, CoreCommonLib, + # CorePeiLib, and CoreDxeLib. + # Optional MinPlatformPkg features should be enabled after this + # + !include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc + + # + # Commonly used MinPlatform feature configuration logic that maps functi= onity to stage + # + !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc =20 gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|TRUE =20 @@ -62,4 +40,4 @@ !if gPlatformTokenSpaceGuid.PcdFastBoot =3D=3D TRUE gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable|FALSE gPlatformTokenSpaceGuid.PcdUpdateConsoleInBds|FALSE -!endif \ No newline at end of file +!endif diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgPc= d.dsc b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgPcd.dsc index 5940c40dfc..d8cd559490 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgPcd.dsc +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/PlatformPkgPcd.dsc @@ -61,42 +61,18 @@ ###################################### # Platform Configuration ###################################### - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >=3D 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - -!if $(TARGET) =3D=3D DEBUG - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE -!else - gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE -!endif + # + # MinPlatform common include for required feature PCD + # These PCD must be set before the core include files, CoreCommonLib, + # CorePeiLib, and CoreDxeLib. + # Optional MinPlatformPkg features should be enabled after this + # + !include MinPlatformPkg/Include/Dsc/MinPlatformFeaturesPcd.dsc.inc + + # + # Commonly used MinPlatform feature configuration logic that maps functi= onity to stage + # + !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc =20 [PcdsFeatureFlag.X64] gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard|FALSE @@ -281,10 +257,6 @@ [PcdsPatchableInModule.common] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042 =20 -!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable =3D=3D TRUE - gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1 -!endif - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000 gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x10000000 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress|0xFED00000 --=20 2.36.1.windows.1 -=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 (#91742): https://edk2.groups.io/g/devel/message/91742 Mute This Topic: https://groups.io/mt/92554236/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-