From mboxrd@z Thu Jan 1 00:00:00 1970 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:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=H2btAVmJ; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658515599; x=1690051599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nqz7Z0EKRNmS6B9HMBR63+lmdKKtJ04RwvOJgWp6/XM=; b=H2btAVmJj1JJ0roQcicriDx5CTu38u49YsbpRdjyU2LL/JKa5tEZQzH4 4kGl8tGtCkE6tTAw48NW7fOm2eMaZigDKdf1bBWYdanyDtguL/hlsxO4K mOlSVci8zVkM/+eNprAQJT+hegJs9htsMtJBhy5rexgPIxIctveVQaCZD 8d4GRdhWCm/IGHxYJWY7s/tGAaKWw6mDJpDpJ4PEJIq3iY+SEos5xvuC1 pGflMegvJb47xnmt3rcz2Tg4HYqyMhSXs6Y5HfSwoHjdAnyQeebUu2o60 vYZCIakf3c1yYX3Gzw1xRjJNZh5w5tu+D5ofxZ/PIgChv4PQqpXv/7MZI w==; X-IronPort-AV: E=McAfee;i="6400,9594,10416"; a="288138269" X-IronPort-AV: E=Sophos;i="5.93,186,1654585200"; d="scan'208";a="288138269" 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:38 -0700 X-IronPort-AV: E=Sophos;i="5.93,186,1654585200"; d="scan'208";a="666767976" 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:38 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Isaac Oram , Chasel Chiu , Nate DeSimone Subject: [edk2-devel][edk2-platforms][PATCH V1 07/13] WhiskeyLakeOpenBoardPkg/Build: Reduce unnecessary code Date: Fri, 22 Jul 2022 11:46:18 -0700 Message-Id: X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Leverage common includes to reduce duplicated or low value code. Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Isaac Oram --- .../UpXtreme/OpenBoardPkgPcd.dsc | 51 +++++-------------- .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 51 +++++-------------- 2 files changed, 24 insertions(+), 78 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc index 8f3cc6ba28..a7e9a41e2c 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc @@ -121,42 +121,18 @@ ###################################### # Platform Configuration ###################################### - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|TRUE - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - -!if $(TARGET) == 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 functionity to stage + # + !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc ###################################### # Board Configuration @@ -191,9 +167,6 @@ !endif gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x5000 gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe|TRUE -!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable == TRUE - gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1 -!endif gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE # diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc index 4a5d5ef03b..daf5411ac3 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc @@ -121,42 +121,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 >= 1 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3 - gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4 - gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5 - gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE -!endif - -!if $(TARGET) == 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 functionity to stage + # + !include BoardModulePkg/Include/Dsc/CommonStageConfig.dsc.inc ###################################### # Board Configuration @@ -191,9 +167,6 @@ !endif gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x5000 gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe|TRUE -!if gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable == TRUE - gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|0x1 -!endif gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|FALSE !if $(TARGET) == DEBUG gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE -- 2.36.1.windows.1