From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.1174.1577180334532597174 for ; Tue, 24 Dec 2019 01:38:54 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: ethan.tsao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2019 01:38:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,351,1571727600"; d="scan'208";a="268377906" Received: from ethantsa-mobl1.gar.corp.intel.com ([10.5.241.8]) by FMSMGA003.fm.intel.com with ESMTP; 24 Dec 2019 01:38:52 -0800 From: "Ethan Tsao" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty Subject: [Patch V3] IntelSiliconPkg/Include/Library:Add ConfigBlockLib.h Date: Tue, 24 Dec 2019 17:38:50 +0800 Message-Id: <20191224093850.16788-1-ethan.tsao@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2318 Move ConfigBlockLib.h and ConfigBlock.h to InstelSiliconPkg and remove all other ConfigBlockLib.h and ConfigBlock.h Signed-off-by: Ethan Tsao Cc: Ray Ni Cc: Rangasai V Chaganty --- Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc | 2 +- Silicon/Intel/{CoffeelakeSiliconPkg => IntelSiliconPkg}/Include/ConfigBlock.h | 0 Silicon/Intel/{CoffeelakeSiliconPkg => IntelSiliconPkg}/Include/Library/ConfigBlockLib.h | 0 Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 4 ++++ Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc | 1 + Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf | 2 +- Silicon/Intel/KabylakeSiliconPkg/Include/ConfigBlock.h | 53 ----------------------------------------------------- Silicon/Intel/KabylakeSiliconPkg/Include/Library/ConfigBlockLib.h | 64 ---------------------------------------------------------------- 8 files changed, 7 insertions(+), 119 deletions(-) diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc index 37c77d8f63..702a833cc4 100644 --- a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc +++ b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc @@ -147,7 +147,7 @@ gUefiCpuPkgTokenSpaceGuid.PcdCpuApTargetCstate|0 # Silicon Init Common Library # !include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc -ConfigBlockLib|ClientSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf +ConfigBlockLib|IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf PchTraceHubInitLib|ClientSiliconPkg/Library/BasePchTraceHubInitLib/BasePchTraceHubInitLib.inf [LibraryClasses.IA32] diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Include/ConfigBlock.h b/Silicon/Intel/IntelSiliconPkg/Include/ConfigBlock.h similarity index 100% rename from Silicon/Intel/CoffeelakeSiliconPkg/Include/ConfigBlock.h rename to Silicon/Intel/IntelSiliconPkg/Include/ConfigBlock.h diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Include/Library/ConfigBlockLib.h b/Silicon/Intel/IntelSiliconPkg/Include/Library/ConfigBlockLib.h similarity index 100% rename from Silicon/Intel/CoffeelakeSiliconPkg/Include/Library/ConfigBlockLib.h rename to Silicon/Intel/IntelSiliconPkg/Include/Library/ConfigBlockLib.h diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec index 22ebf19c4e..aad39f88ee 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec @@ -30,6 +30,10 @@ # PeiGetVtdPmrAlignmentLib|Include/Library/PeiGetVtdPmrAlignmentLib.h + ## @libraryclass Provides services to access ConfigBlock + # + ConfigBlockLib|Include/Library/ConfigBlockLib.h + [Guids] ## GUID for Package token space # {A9F8D54E-1107-4F0A-ADD0-4587E7A4A735} diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc index 0a6509d8b3..d90202d0f3 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc @@ -36,6 +36,7 @@ MicrocodeFlashAccessLib|IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.inf PeiGetVtdPmrAlignmentLib|IntelSiliconPkg/Library/PeiGetVtdPmrAlignmentLib/PeiGetVtdPmrAlignmentLib.inf TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf + ConfigBlockLib|IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf [LibraryClasses.common.PEIM] PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf diff --git a/Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf b/Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf index 37b4faaf65..87e7e315b7 100644 --- a/Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf +++ b/Silicon/Intel/IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf @@ -18,7 +18,7 @@ LIBRARY_CLASS = ConfigBlockLib [Packages] MdePkg/MdePkg.dec -KabylakeSiliconPkg/SiPkg.dec +IntelSiliconPkg/IntelSiliconPkg.dec [Sources] BaseConfigBlockLib.c diff --git a/Silicon/Intel/KabylakeSiliconPkg/Include/ConfigBlock.h b/Silicon/Intel/KabylakeSiliconPkg/Include/ConfigBlock.h deleted file mode 100644 index dd91a55e79..0000000000 --- a/Silicon/Intel/KabylakeSiliconPkg/Include/ConfigBlock.h +++ /dev/null @@ -1,53 +0,0 @@ -/** @file - Header file for Config Block Lib implementation - -Copyright (c) 2017, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef _CONFIG_BLOCK_H_ -#define _CONFIG_BLOCK_H_ - -#include -#include -#include -#include - -#pragma pack (push,1) - -/// -/// Config Block Header -/// -typedef struct _CONFIG_BLOCK_HEADER { - EFI_HOB_GUID_TYPE GuidHob; ///< Offset 0-23 GUID extension HOB header - UINT8 Revision; ///< Offset 24 Revision of this config block - UINT8 Attributes; ///< Offset 25 The main revision for config block - UINT8 Reserved[2]; ///< Offset 26-27 Reserved for future use -} CONFIG_BLOCK_HEADER; - -/// -/// Config Block -/// -typedef struct _CONFIG_BLOCK { - CONFIG_BLOCK_HEADER Header; ///< Offset 0-27 Header of config block - // - // Config Block Data - // -} CONFIG_BLOCK; - -/// -/// Config Block Table Header -/// -typedef struct _CONFIG_BLOCK_TABLE_STRUCT { - CONFIG_BLOCK_HEADER Header; ///< Offset 0-27 GUID number for main entry of config block - UINT8 Rsvd0[2]; ///< Offset 28-29 Reserved for future use - UINT16 NumberOfBlocks; ///< Offset 30-31 Number of config blocks (N) - UINT32 AvailableSize; ///< Offset 32-35 Current config block table size -/// -/// Individual Config Block Structures are added here in memory as part of AddConfigBlock() -/// -} CONFIG_BLOCK_TABLE_HEADER; -#pragma pack (pop) - -#endif // _CONFIG_BLOCK_H_ diff --git a/Silicon/Intel/KabylakeSiliconPkg/Include/Library/ConfigBlockLib.h b/Silicon/Intel/KabylakeSiliconPkg/Include/Library/ConfigBlockLib.h deleted file mode 100644 index 04c8ec5cca..0000000000 --- a/Silicon/Intel/KabylakeSiliconPkg/Include/Library/ConfigBlockLib.h +++ /dev/null @@ -1,64 +0,0 @@ -/** @file - Header file for Config Block Lib implementation - -Copyright (c) 2017, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef _CONFIG_BLOCK_LIB_H_ -#define _CONFIG_BLOCK_LIB_H_ - -/** - Create config block table - - @param[in] TotalSize - Max size to be allocated for the Config Block Table - @param[out] ConfigBlockTableAddress - On return, points to a pointer to the beginning of Config Block Table Address - - @retval EFI_INVALID_PARAMETER - Invalid Parameter - @retval EFI_OUT_OF_RESOURCES - Out of resources - @retval EFI_SUCCESS - Successfully created Config Block Table at ConfigBlockTableAddress -**/ -EFI_STATUS -EFIAPI -CreateConfigBlockTable ( - IN UINT16 TotalSize, - OUT VOID **ConfigBlockTableAddress - ); - -/** - Add config block into config block table structure - - @param[in] ConfigBlockTableAddress - A pointer to the beginning of Config Block Table Address - @param[out] ConfigBlockAddress - On return, points to a pointer to the beginning of Config Block Address - - @retval EFI_OUT_OF_RESOURCES - Config Block Table is full and cannot add new Config Block or - Config Block Offset Table is full and cannot add new Config Block. - @retval EFI_SUCCESS - Successfully added Config Block -**/ -EFI_STATUS -EFIAPI -AddConfigBlock ( - IN VOID *ConfigBlockTableAddress, - OUT VOID **ConfigBlockAddress - ); - -/** - Retrieve a specific Config Block data by GUID - - @param[in] ConfigBlockTableAddress - A pointer to the beginning of Config Block Table Address - @param[in] ConfigBlockGuid - A pointer to the GUID uses to search specific Config Block - @param[out] ConfigBlockAddress - On return, points to a pointer to the beginning of Config Block Address - - @retval EFI_NOT_FOUND - Could not find the Config Block - @retval EFI_SUCCESS - Config Block found and return -**/ -EFI_STATUS -EFIAPI -GetConfigBlock ( - IN VOID *ConfigBlockTableAddress, - IN EFI_GUID *ConfigBlockGuid, - OUT VOID **ConfigBlockAddress - ); - -#endif // _CONFIG_BLOCK_LIB_H_ -- 2.16.2.windows.1