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.web10.17892.1641954049038531757 for ; Tue, 11 Jan 2022 18:20:52 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=G7EI2Moq; 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=1641954052; x=1673490052; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q32ptqcav6av7yRThwXXmC4gLrGvBTHYt64WLukddkY=; b=G7EI2Moq42MJt/BNFcYt4ySv+ZTYNinKCvRMNJDAxlSl4FKsrJQ8SdOK vqzH0y2jMsB5Ls5AcUoSnzLrG37jr5FsaOQa/tPlX5H6QEybr3fshYCXw AO41cJD9NPOo/bAhzBDnYEDmUp0u0XTKQWxKRbcaJ8psNqB0gdldraqVa I5QoJvMBHnhD9uiDT2SrUQh2tmUjTKuMVWSlsKI8pfxd2TCm3KSIzkvNh zxAC1OgeODv/V8NuhF18EnDqllKCMWd+IhwqlSLPRmpKgrXmr8U4huYBm hmwzLGE+rzEYM6tFcTF0CLstWeiHesRHOB/z55ujkQRHHh+9bbjhWlk8E Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10224"; a="243439837" X-IronPort-AV: E=Sophos;i="5.88,281,1635231600"; d="scan'208";a="243439837" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 18:20:49 -0800 X-IronPort-AV: E=Sophos;i="5.88,281,1635231600"; d="scan'208";a="528990339" Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 18:20:49 -0800 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Isaac Oram , Sai Chaganty , Liming Gao Subject: [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use MinPlatform build include files Date: Tue, 11 Jan 2022 18:20:20 -0800 Message-Id: <9fe41786a6142a31b8724632f37eab047e3d9deb.1641953242.git.isaac.w.oram@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Also added feature enable flag Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Isaac Oram --- Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h | 2 +- Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf | 13 ++++ Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf | 11 ++++ Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 62 -------------------- Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md | 12 ++-- Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec | 6 ++ Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc | 18 ++++++ 7 files changed, 55 insertions(+), 69 deletions(-) diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h index 947813815e..2e50270ee6 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h @@ -12,7 +12,7 @@ /** Get a Serial Port device used for SPCR. - The caller should call FreePool() to free the memory if return value is not NULL. + The caller should call FreePool () to free the memory if return value is not NULL. @retval NULL Can not get device. @retval Others A serial port device path. diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf new file mode 100644 index 0000000000..f963f567c2 --- /dev/null +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf @@ -0,0 +1,13 @@ +## @file +# FDF file for post-memory SpcrFeature advanced feature. +# +# This file is intended to be included into another package so advanced features +# can be conditionally included in the flash image by enabling the respective +# feature via its FeaturePCD. +# +# Copyright (C) 2022 Intel Corporation. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +INF SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf new file mode 100644 index 0000000000..3c461e7fbc --- /dev/null +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf @@ -0,0 +1,11 @@ +## @file +# FDF file for pre-memory SpcrFeature advanced feature. +# +# This file is intended to be included into another package so advanced features +# can be conditionally included in the flash image by enabling the respective +# feature via its FeaturePCD. +# +# Copyright (C) 2022 Intel Corporation. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc index c51e552df5..b06ddf4fe6 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc @@ -25,40 +25,9 @@ !error "DXE_ARCH must be specified to build this feature!" !endif -################################################################################ -# -# Library Class section - list of all Library Classes needed by this feature. -# -################################################################################ - -!include MdePkg/MdeLibs.dsc.inc - [LibraryClasses] - ####################################### - # Edk2 Packages - ####################################### - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - - ####################################### - # SpcrFeaturePkg Packages - ####################################### SpcrDeviceLib|SpcrFeaturePkg/Library/SpcrDeviceLibNull/SpcrDeviceLibNull.inf -[LibraryClasses.common.DXE_DRIVER] - ####################################### - # Edk2 Packages - ####################################### - MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf - ################################################################################ # # Component section - list of all components that need built for this feature. @@ -74,38 +43,7 @@ # ################################################################################ -# -# Feature DXE Components -# - # @todo: Change below line to [Components.$(DXE_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308 # is completed. [Components.X64] - ##################################### - # Spcr Feature Package - ##################################### - - # Add library instances here that are not included in package components and should be tested - # in the package build. - - # Add components here that should be included in the package build. SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf - #{ -# -# SpcrDeviceLib|SpcrFeaturePkg/Library/SpcrDeviceLibNull/SpcrDeviceLibNull.inf -# } - -################################################################################################### -# -# BuildOptions Section - Define the module specific tool chain flags that should be used as -# the default flags for a module. These flags are appended to any -# standard flags that are defined by the build process. They can be -# applied for any modules or only those modules with the specific -# module style (EDK or EDKII) specified in [Components] section. -# -# For advanced features, it is recommended to enable [BuildOptions] in -# the applicable INF file so it does not affect the whole board package -# build when this DSC file is active. -# -################################################################################################### -[BuildOptions] diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md index 0a5d48876d..66138ee0f6 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md @@ -22,10 +22,10 @@ Platform can implement its own library to select the serial port device. * SpcrDeviceLibNull ## SpcrAcpiDxe -The main driver of convert the serial port device info to ACPI table. -It will call the function GetSpcrDevice() in the library SpcrDeviceLib to get the serial port device path. +The main driver of convert the serial port device info into an ACPI table. +It will call the function GetSpcrDevice () in the library SpcrDeviceLib to get the serial port device path. If the serial port device path is not NULL, then use gEfiPciIoProtocolGuid to get the PCI info, and use the gEfiSerialIoProtocolGuid to get the serial port info, such as the baud rate etc. -If the serial port device is PCI device 00:16:03 (AMT serial over lan PCI device), then will set the BaseAddress. +If the serial port device is PCI device 00:16:03 (AMT serial over LAN PCI device), then will set the BaseAddress. At last fill the ACPI table as Windows required. ## SpcrDeviceLibNull @@ -37,19 +37,19 @@ Fill the serial port device info used for SPCR to ACPI table. ## Configuration There is not special configuration. -But the platform maybe implemente its own SpcrDeviceLib. +But the platform may implement its own SpcrDeviceLib. ## Data Flows GetSpcrDevice() -> serial port device path -> get PCI info and serial port info -> ACPI table. ## Control Flows -GetSpcrDevice() in SpcrDeviceLib -> SpcrAcpiDxe. +GetSpcrDevice () in SpcrDeviceLib -> SpcrAcpiDxe. ## Build Flows There is not special build flow. ## Test Point Results -* Check the output ACPI table. +There are not test points implemented. ## Functional Exit Criteria * Check the output ACPI table. diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec index 03776abf06..b084fad892 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec @@ -21,6 +21,12 @@ [Includes] Include +[Guids] + gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, { 0xb8, 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }} + +[PcdsFeatureFlag] + gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x00000001 + [LibraryClasses] ## @libraryclass Provides an API for get SPCR device. # diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc index 82d2d3ac73..2ee874a58e 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc @@ -24,6 +24,24 @@ PEI_ARCH = IA32 DXE_ARCH = X64 +[Packages] + MinPlatformPkg/MinPlatformPkg.dec + +[PcdsFeatureFlag] + # + # PCD needed for MinPlatform build includes + # + gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE + gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE + gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE + +# +# Include common libraries +# +!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc +!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc +!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc + # # This package always builds the feature. # -- 2.27.0.windows.1