diff options
-rw-r--r-- | EdkModulePkg/EdkModulePkg.fpd | 270 | ||||
-rw-r--r-- | EdkModulePkg/EdkModulePkg.spd | 80 | ||||
-rw-r--r-- | EdkModulePkg/Universal/PCD/Pei/Pcd.c | 16 | ||||
-rw-r--r-- | EdkModulePkg/Universal/PCD/Pei/Pcd.msa | 60 | ||||
-rw-r--r-- | EdkModulePkg/Universal/PCD/Pei/Service.c | 13 |
5 files changed, 321 insertions, 118 deletions
diff --git a/EdkModulePkg/EdkModulePkg.fpd b/EdkModulePkg/EdkModulePkg.fpd index 719b135..c3c44a5 100644 --- a/EdkModulePkg/EdkModulePkg.fpd +++ b/EdkModulePkg/EdkModulePkg.fpd @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<PlatformSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PlatformHeader>
<PlatformName>EdkModuleAll</PlatformName>
@@ -231,6 +231,38 @@ <MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseCallbackOnSetEnabled</C_Name>
+ <Token>0x00010032</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseExEnabled</C_Name>
+ <Token>0x00010033</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseGetSizeEnabled</C_Name>
+ <Token>0x00010031</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseSetEnabled</C_Name>
+ <Token>0x00010030</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@@ -4847,6 +4879,38 @@ <MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseCallbackOnSetEnabled</C_Name>
+ <Token>0x00010032</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseExEnabled</C_Name>
+ <Token>0x00010033</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseGetSizeEnabled</C_Name>
+ <Token>0x00010031</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseSetEnabled</C_Name>
+ <Token>0x00010030</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@@ -8835,6 +8899,38 @@ <MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseCallbackOnSetEnabled</C_Name>
+ <Token>0x00010032</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseExEnabled</C_Name>
+ <Token>0x00010033</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseGetSizeEnabled</C_Name>
+ <Token>0x00010031</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseSetEnabled</C_Name>
+ <Token>0x00010030</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@@ -12827,6 +12923,38 @@ <MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseCallbackOnSetEnabled</C_Name>
+ <Token>0x00010032</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseExEnabled</C_Name>
+ <Token>0x00010033</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseGetSizeEnabled</C_Name>
+ <Token>0x00010031</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
+ <PcdData ItemType="FEATURE_FLAG">
+ <C_Name>PcdPeiPcdDatabaseSetEnabled</C_Name>
+ <Token>0x00010030</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <MaxDatumSize>1</MaxDatumSize>
+ <Value>true</Value>
+ </PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@@ -16702,74 +16830,74 @@ </ModuleSaBuildOptions>
</ModuleSA>
</FrameworkModules>
- <DynamicPcdBuildDefinitions> - <PcdBuildData ItemType="DYNAMIC"> - <C_Name>PcdFlashNvStorageVariableBase</C_Name> - <Token>0x30000001</Token> - <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName> - <DatumType>UINT32</DatumType> - <MaxDatumSize>4</MaxDatumSize> - <SkuInfo> - <SkuId>0</SkuId> - <Value>0x0</Value> - </SkuInfo> - </PcdBuildData> - <PcdBuildData ItemType="DYNAMIC"> - <C_Name>PcdFlashNvStorageVariableSize</C_Name> - <Token>0x30000002</Token> - <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName> - <DatumType>UINT32</DatumType> - <MaxDatumSize>4</MaxDatumSize> - <SkuInfo> - <SkuId>0</SkuId> - <Value>0x0</Value> - </SkuInfo> - </PcdBuildData> - <PcdBuildData ItemType="DYNAMIC"> - <C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name> - <Token>0x30000010</Token> - <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName> - <DatumType>UINT32</DatumType> - <MaxDatumSize>4</MaxDatumSize> - <SkuInfo> - <SkuId>0</SkuId> - <Value>0x0</Value> - </SkuInfo> - </PcdBuildData> - <PcdBuildData ItemType="DYNAMIC"> - <C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name> - <Token>0x30000011</Token> - <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName> - <DatumType>UINT32</DatumType> - <MaxDatumSize>4</MaxDatumSize> - <SkuInfo> - <SkuId>0</SkuId> - <Value>0x0</Value> - </SkuInfo> - </PcdBuildData> - <PcdBuildData ItemType="DYNAMIC"> - <C_Name>PcdFlashNvStorageFtwSpareBase</C_Name> - <Token>0x30000013</Token> - <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName> - <DatumType>UINT32</DatumType> - <MaxDatumSize>4</MaxDatumSize> - <SkuInfo> - <SkuId>0</SkuId> - <Value>0x0</Value> - </SkuInfo> - </PcdBuildData> - <PcdBuildData ItemType="DYNAMIC"> - <C_Name>PcdFlashNvStorageFtwSpareSize</C_Name> - <Token>0x30000014</Token> - <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName> - <DatumType>UINT32</DatumType> - <MaxDatumSize>4</MaxDatumSize> - <SkuInfo> - <SkuId>0</SkuId> - <Value>0x0</Value> - </SkuInfo> + <DynamicPcdBuildDefinitions>
+ <PcdBuildData ItemType="DYNAMIC">
+ <C_Name>PcdFlashNvStorageVariableBase</C_Name>
+ <Token>0x30000001</Token>
+ <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>UINT32</DatumType>
+ <MaxDatumSize>4</MaxDatumSize>
+ <SkuInfo>
+ <SkuId>0</SkuId>
+ <Value>0x0</Value>
+ </SkuInfo>
+ </PcdBuildData>
+ <PcdBuildData ItemType="DYNAMIC">
+ <C_Name>PcdFlashNvStorageVariableSize</C_Name>
+ <Token>0x30000002</Token>
+ <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>UINT32</DatumType>
+ <MaxDatumSize>4</MaxDatumSize>
+ <SkuInfo>
+ <SkuId>0</SkuId>
+ <Value>0x0</Value>
+ </SkuInfo>
+ </PcdBuildData>
+ <PcdBuildData ItemType="DYNAMIC">
+ <C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
+ <Token>0x30000010</Token>
+ <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>UINT32</DatumType>
+ <MaxDatumSize>4</MaxDatumSize>
+ <SkuInfo>
+ <SkuId>0</SkuId>
+ <Value>0x0</Value>
+ </SkuInfo>
+ </PcdBuildData>
+ <PcdBuildData ItemType="DYNAMIC">
+ <C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
+ <Token>0x30000011</Token>
+ <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>UINT32</DatumType>
+ <MaxDatumSize>4</MaxDatumSize>
+ <SkuInfo>
+ <SkuId>0</SkuId>
+ <Value>0x0</Value>
+ </SkuInfo>
+ </PcdBuildData>
+ <PcdBuildData ItemType="DYNAMIC">
+ <C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
+ <Token>0x30000013</Token>
+ <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>UINT32</DatumType>
+ <MaxDatumSize>4</MaxDatumSize>
+ <SkuInfo>
+ <SkuId>0</SkuId>
+ <Value>0x0</Value>
+ </SkuInfo>
+ </PcdBuildData>
+ <PcdBuildData ItemType="DYNAMIC">
+ <C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
+ <Token>0x30000014</Token>
+ <TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>UINT32</DatumType>
+ <MaxDatumSize>4</MaxDatumSize>
+ <SkuInfo>
+ <SkuId>0</SkuId>
+ <Value>0x0</Value>
+ </SkuInfo>
</PcdBuildData>
- </DynamicPcdBuildDefinitions>
+ </DynamicPcdBuildDefinitions>
<BuildOptions>
<Options>
<!--MSFT tool chain options definition : IA32-->
@@ -16785,7 +16913,7 @@ <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="SLINK">"/NOLOGO"</Option>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="DLINK">"/NOLOGO", "/Machine:AMD64", "/ALIGN:32", "/DLL", "/NODEFAULTLIB", "/OPT:REF", "/ENTRY:${ENTRYPOINT}", "/SUBSYSTEM:${SUBSYSTEM}"</Option>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASM">"/nologo", "/W3", "/WX", "/c", "/DEFI32"</Option>
- <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASMLINK"></Option>
+ <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASMLINK"/>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="PP">"/nologo", "/P", "/TC", "/FI${DEST_DIR_DEBUG}/AutoGen.h"</Option>
<Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASL">"/nologo"</Option>
<!--MSFT tool chain options definition : IPF-->
@@ -16793,7 +16921,7 @@ <Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="SLINK">"/NOLOGO"</Option>
<Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="DLINK">"/NOLOGO", "/NODEFAULTLIB", "/IGNORE:4086", "/MAP", "/OPT:REF", "/MACHINE:IA64", "/ENTRY:${ENTRYPOINT}", "/SUBSYSTEM:${SUBSYSTEM}"</Option>
<Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="ASM">"-N us", "-X explicit", "-M ilp64", "-N so", "-W4"</Option>
- <Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="ASMLINK"></Option>
+ <Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="ASMLINK"/>
<Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="PP">"/nologo", "/P", "/TC"</Option>
<Option ToolChainFamily="MSFT" SupArchList="IPF" ToolCode="ASL">"/nologo"</Option>
<!--INTEL tool chain options definition : EBC-->
@@ -16804,7 +16932,7 @@ <!--GCC tool chain options definition : IA32-->
<Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="CC">"-Os", "-fshort-wchar", "-fno-strict-aliasing", "-Wall", "-Werror", "-c", "-include ${DEST_DIR_DEBUG}/AutoGen.h"</Option>
<Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="ASM">"-c", "-imacros ${DEST_DIR_DEBUG}/AutoGen.h"</Option>
- <Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="SLINK"></Option>
+ <Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="SLINK"/>
<Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="DLINK">"-nostdlib", "-O2", "--gc-sections", "--dll", "--export-all-symbols", "--entry _${ENTRYPOINT}"</Option>
<Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="ASMLINK"/>
<Option ToolChainFamily="GCC" SupArchList="IA32" ToolCode="PP">"-E", "-x assembler-with-cpp", "-include ${DEST_DIR_DEBUG}/AutoGen.h"</Option>
diff --git a/EdkModulePkg/EdkModulePkg.spd b/EdkModulePkg/EdkModulePkg.spd index 86d33e6..48f4927 100644 --- a/EdkModulePkg/EdkModulePkg.spd +++ b/EdkModulePkg/EdkModulePkg.spd @@ -7,11 +7,11 @@ <Abstract>Edk Module Package Reference Implementations</Abstract>
<Description>This Module provides standard reference information for EFI/Tiano implementations.</Description>
<Copyright>Copyright (c) 2006, Intel Corporation.</Copyright>
- <License>All rights reserved.
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which accompanies this distribution.
- The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES
+ <License>All rights reserved. + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this distribution. + The full text of the license may be found at http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</SpdHeader>
@@ -457,11 +457,9 @@ <Entry Name="GenericPlatformTokenSpace">
<C_Name>gEfiGenericPlatformTokenSpaceGuid</C_Name>
<GuidValue>18D15EA6-9E14-40a1-B39C-59C44DA9D891</GuidValue>
- <HelpText>
- This is the token space GUID for platform generic PCD definitions.
- Now FlashLayout and Platform CPU belong to this space.
- </HelpText>
- </Entry>
+ <HelpText>This is the token space GUID for platform generic PCD definitions. + Now FlashLayout and Platform CPU belong to this space.</HelpText>
+ </Entry>
<Entry Name="EdkModulePkgTokenSpace">
<C_Name>gEfiEdkModulePkgTokenSpaceGuid</C_Name>
<GuidValue>8CC4092F-F60E-46d1-B41C-1E761DF50582</GuidValue>
@@ -814,7 +812,7 @@ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<ValidUsage>FIXED_AT_BUILD</ValidUsage>
- <HelpText>The maximum number of callback function, which will be triggered when
+ <HelpText>The maximum number of callback function, which will be triggered when a PCD entry is been set, can be registered for a single PCD entry in PEI phase.</HelpText>
</PcdEntry>
<PcdEntry>
@@ -823,7 +821,7 @@ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<ValidUsage>FIXED_AT_BUILD</ValidUsage>
- <HelpText>The base address of the VPD (Vital Product Data) region. It is
+ <HelpText>The base address of the VPD (Vital Product Data) region. It is normally a region reserved on flash.</HelpText>
</PcdEntry>
<PcdEntry>
@@ -857,7 +855,7 @@ <DatumType>BOOLEAN</DatumType>
<ValidUsage>FEATURE_FLAG</ValidUsage>
<DefaultValue>TRUE</DefaultValue>
- <HelpText>This feature flag can be used to enable or disable the Pcd PEIM database
+ <HelpText>This feature flag can be used to enable or disable the Pcd PEIM database traverse capability. Disable it can reduce the size of final image generated.</HelpText>
</PcdEntry>
<PcdEntry>
@@ -867,7 +865,7 @@ <DatumType>BOOLEAN</DatumType>
<ValidUsage>FEATURE_FLAG</ValidUsage>
<DefaultValue>TRUE</DefaultValue>
- <HelpText>This feature flag can be used to enable or disable the Pcd DXE database
+ <HelpText>This feature flag can be used to enable or disable the Pcd DXE database traverse capability. Disable it can reduce the size of final image generated.</HelpText>
</PcdEntry>
<PcdEntry>
@@ -1003,11 +1001,9 @@ <DatumType>VOID*</DatumType>
<ValidUsage>DYNAMIC</ValidUsage>
<DefaultValue>{}</DefaultValue>
- <HelpText>
- This PCD is a array of EFI_PHYSICAL_ADDERSS of each Firmware Volume on the
- platform. FVB driver will make use of this PCD entry to install EFI_FIRMWARE_BLOCK_PROTOCOL
- on every FV specified.
- </HelpText>
+ <HelpText>This PCD is a array of EFI_PHYSICAL_ADDERSS of each Firmware Volume on the + platform. FVB driver will make use of this PCD entry to install EFI_FIRMWARE_BLOCK_PROTOCOL + on every FV specified.</HelpText>
</PcdEntry>
<PcdEntry>
<C_Name>PcdFlashFvBaseArrayElementNumber</C_Name>
@@ -1016,11 +1012,45 @@ <DatumType>UINT8</DatumType>
<ValidUsage>DYNAMIC</ValidUsage>
<DefaultValue>3</DefaultValue>
- <HelpText>
- This PCD is a number element in the array defined by PcdFlashFvBaseArray in
- gEfiGenericPlatformTokenSpaceGuid. Normally, we have 3 firmware volumes:
- FV_MAIN, FV_RECOVERY, NV_STORAGE.
- </HelpText>
+ <HelpText>This PCD is a number element in the array defined by PcdFlashFvBaseArray in + gEfiGenericPlatformTokenSpaceGuid. Normally, we have 3 firmware volumes: + FV_MAIN, FV_RECOVERY, NV_STORAGE.</HelpText>
+ </PcdEntry>
+ <PcdEntry>
+ <C_Name>PcdPeiPcdDatabaseSetEnabled</C_Name>
+ <Token>0x00010030</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <ValidUsage>FEATURE_FLAG</ValidUsage>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the SET capability of PCD service PEIM. If a platform does not do PCD SET operation in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
+ <PcdEntry>
+ <C_Name>PcdPeiPcdDatabaseGetSizeEnabled</C_Name>
+ <Token>0x00010031</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <ValidUsage>FEATURE_FLAG</ValidUsage>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the GET size capability of PCD service PEIM. If a platform does not do PCD get size operation in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
+ <PcdEntry>
+ <C_Name>PcdPeiPcdDatabaseCallbackOnSetEnabled</C_Name>
+ <Token>0x00010032</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <ValidUsage>FEATURE_FLAG</ValidUsage>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the Callback On SET capability of PCD service PEIM. If a platform does not register any callback on set in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
+ <PcdEntry>
+ <C_Name>PcdPeiPcdDatabaseExEnabled</C_Name>
+ <Token>0x00010033</Token>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <ValidUsage>FEATURE_FLAG</ValidUsage>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the PCD service PEIM to handle DynamicEX PCD. If a platform has no module to use DynamicEX in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
</PcdEntry>
</PcdDeclarations>
-</PackageSurfaceArea>
+</PackageSurfaceArea>
\ No newline at end of file diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.c b/EdkModulePkg/Universal/PCD/Pei/Pcd.c index 40013cf..33972d3 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.c @@ -174,6 +174,10 @@ PeiPcdGetSize ( UINTN Size;
UINTN MaxSize;
+ if (!FeaturePcdGet(PcdPeiPcdDatabaseGetSizeEnabled)) {
+ return EFI_UNSUPPORTED;
+ }
+
PeiPcdDb = GetPcdDatabase ();
//
// TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
@@ -281,6 +285,10 @@ PeiPcdGetSizeEx ( IN UINTN ExTokenNumber
)
{
+ if ((!FeaturePcdGet (PcdPeiPcdDatabaseGetSizeEnabled)) || !FeaturePcdGet (PcdPeiPcdDatabaseExEnabled)) {
+ return EFI_UNSUPPORTED;
+ }
+
return PeiPcdGetSize (GetExPcdTokenNumber (Guid, ExTokenNumber));
}
@@ -446,6 +454,10 @@ PeiRegisterCallBackOnSet ( IN PCD_PPI_CALLBACK CallBackFunction
)
{
+ if (!FeaturePcdGet(PcdPeiPcdDatabaseCallbackOnSetEnabled)) {
+ return EFI_UNSUPPORTED;
+ }
+
ASSERT (CallBackFunction != NULL);
return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, TRUE);
@@ -461,6 +473,10 @@ PcdUnRegisterCallBackOnSet ( IN PCD_PPI_CALLBACK CallBackFunction
)
{
+ if (!FeaturePcdGet(PcdPeiPcdDatabaseCallbackOnSetEnabled)) {
+ return EFI_UNSUPPORTED;
+ }
+
ASSERT (CallBackFunction != NULL);
return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, FALSE);
diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.msa b/EdkModulePkg/Universal/PCD/Pei/Pcd.msa index 9510738..0ae491a 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.msa +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.msa @@ -1,13 +1,5 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
+<?xml version="1.0" encoding="UTF-8"?>
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MsaHeader>
<ModuleName>PcdPeim</ModuleName>
<ModuleType>PEIM</ModuleType>
@@ -16,11 +8,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.--> <Abstract>Component description file for Pcd Database PEIM module</Abstract>
<Description>This DXE driver implement and produce the PCD PPI.</Description>
<Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
- <License>All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ <License>All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</MsaHeader>
@@ -93,23 +85,47 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.--> </Extern>
</Externs>
<PcdCoded>
- <PcdEntry PcdItemType="FIXED_AT_BUILD">
+ <PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdMaxPeiPcdCallBackNumberPerPcdEntry</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
- <HelpText>The maximum number of callback function, which will be triggered when
+ <HelpText>The maximum number of callback function, which will be triggered when a PCD entry is been set, can be registered for a single PCD entry in PEI phase.</HelpText>
</PcdEntry>
- <PcdEntry PcdItemType="FIXED_AT_BUILD">
+ <PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdVpdBaseAddress</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
- <HelpText>The base address of the VPD (Vital Product Data) region. It is
+ <HelpText>The base address of the VPD (Vital Product Data) region. It is normally a region reserved on flash.</HelpText>
</PcdEntry>
- <PcdEntry PcdItemType="FEATURE_FLAG">
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
<C_Name>PcdPeiPcdDatabaseTraverseEnabled</C_Name>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
- <HelpText>This feature flag can be used to enable or disable the Pcd PEIM database
+ <HelpText>This feature flag can be used to enable or disable the Pcd PEIM database traverse capability. Disable it can reduce the size of final image generated.</HelpText>
</PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdPeiPcdDatabaseCallbackOnSetEnabled</C_Name>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the Callback On SET capability of PCD service PEIM. If a platform does not register any callback on set in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdPeiPcdDatabaseExEnabled</C_Name>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the PCD service PEIM to handle DynamicEX PCD. If a platform has no module to use DynamicEX in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdPeiPcdDatabaseGetSizeEnabled</C_Name>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the GET size capability of PCD service PEIM. If a platform does not do PCD get size operation in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdPeiPcdDatabaseSetEnabled</C_Name>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>This feature flag can be used to enable or disable the SET capability of PCD service PEIM. If a platform does not do PCD SET operation in PEI phase. This flag can be set to DISABLE to save size.</HelpText>
+ </PcdEntry>
</PcdCoded>
-</ModuleSurfaceArea>
+</ModuleSurfaceArea>
\ No newline at end of file diff --git a/EdkModulePkg/Universal/PCD/Pei/Service.c b/EdkModulePkg/Universal/PCD/Pei/Service.c index 255267c..521c88b 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Service.c +++ b/EdkModulePkg/Universal/PCD/Pei/Service.c @@ -337,6 +337,10 @@ SetWorker ( VOID *InternalData;
UINTN MaxSize;
+ if (!FeaturePcdGet(PcdPeiPcdDatabaseSetEnabled)) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
// We have to decrement TokenNumber by 1 to make it usable
@@ -462,6 +466,10 @@ ExSetWorker ( {
UINTN TokenNumber;
+ if (!FeaturePcdGet(PcdPeiPcdDatabaseSetEnabled)) {
+ return EFI_UNSUPPORTED;
+ }
+
TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber);
InvokeCallbackOnSet (ExTokenNumber, Guid, TokenNumber, Data, *Size);
@@ -480,6 +488,11 @@ ExGetWorker ( IN UINTN GetSize
)
{
+ if (!FeaturePcdGet (PcdPeiPcdDatabaseExEnabled)) {
+ ASSERT (FALSE);
+ return 0;
+ }
+
return GetWorker (GetExPcdTokenNumber (Guid, ExTokenNumber), GetSize);
}
|