Modify FtwLite and Variable DXE driver to use PCD instead of FlashMap HOB

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1236 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xgu3 2006-08-10 12:28:02 +00:00
parent 382aab1c37
commit 202c5d55e5
9 changed files with 513 additions and 71 deletions

View File

@ -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>
@ -1183,8 +1183,26 @@
<Instance ModuleGuid="f12b59c9-76d0-4661-ad7c-f04d1bef0558" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bd4d540e-04b0-4b10-8fd5-4a7bb533cf67" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableSize</C_Name>
<Token>0x30000002</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
@ -1431,7 +1449,7 @@
<Instance ModuleGuid="9dbf6f25-0da2-4a1d-8e12-e78de6ab4d0e" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
@ -1604,6 +1622,8 @@
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -1670,6 +1690,38 @@
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<Token>0x30000013</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFC0000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<Token>0x30000014</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00010000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<Token>0x30000010</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFBE000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<Token>0x30000011</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00002000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@ -5747,6 +5799,8 @@
<Instance ModuleGuid="f12b59c9-76d0-4661-ad7c-f04d1bef0558" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bd4d540e-04b0-4b10-8fd5-4a7bb533cf67" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -5813,6 +5867,22 @@
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableSize</C_Name>
<Token>0x30000002</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@ -5995,7 +6065,7 @@
<Instance ModuleGuid="9dbf6f25-0da2-4a1d-8e12-e78de6ab4d0e" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
@ -6168,6 +6238,8 @@
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -6234,6 +6306,38 @@
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<Token>0x30000013</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFC0000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<Token>0x30000014</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00010000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<Token>0x30000010</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFBE000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<Token>0x30000011</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00002000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@ -9686,6 +9790,8 @@
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bd4d540e-04b0-4b10-8fd5-4a7bb533cf67" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<Instance ModuleGuid="61999c3c-72a5-4506-a4ff-4271d18a1d14" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -9752,6 +9858,22 @@
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableSize</C_Name>
<Token>0x30000002</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@ -9935,7 +10057,7 @@
<Instance ModuleGuid="9dbf6f25-0da2-4a1d-8e12-e78de6ab4d0e" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
@ -10108,6 +10230,8 @@
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -10174,6 +10298,38 @@
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<Token>0x30000013</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFC0000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<Token>0x30000014</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00010000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<Token>0x30000010</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFBE000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<Token>0x30000011</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00002000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@ -13536,7 +13692,7 @@
<Instance ModuleGuid="9dbf6f25-0da2-4a1d-8e12-e78de6ab4d0e" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
@ -13709,6 +13865,8 @@
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -13775,6 +13933,38 @@
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<Token>0x30000013</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFC0000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<Token>0x30000014</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00010000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<Token>0x30000010</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0xFFFBE000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<Token>0x30000011</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x00002000</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
@ -16512,6 +16702,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>
</PcdBuildData>
</DynamicPcdBuildDefinitions>
<BuildOptions>
<Options>
<!--MSFT tool chain options definition : IA32-->

View File

@ -632,10 +632,8 @@ InitializeFtwLite (
UINTN Length;
EFI_STATUS Status;
UINTN Offset;
EFI_FLASH_MAP_ENTRY_DATA *FlashMapEntry;
EFI_FV_BLOCK_MAP_ENTRY *FvbMapEntry;
UINT32 LbaIndex;
EFI_PEI_HOB_POINTERS GuidHob;
//
// Allocate Private data of this driver,
@ -668,29 +666,11 @@ InitializeFtwLite (
FtwLiteDevice->FtwLastRecord = NULL;
FtwLiteDevice->SpareAreaLength = 0;
FtwLiteDevice->WorkSpaceLength = 0;
FtwLiteDevice->WorkSpaceAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwWorkingBase);
FtwLiteDevice->WorkSpaceLength = (UINTN) PcdGet32 (PcdFlashNvStorageFtwWorkingSize);
GuidHob.Raw = GetHobList ();
while (NULL != (GuidHob.Raw = GetNextGuidHob (&gEfiFlashMapHobGuid, GuidHob.Raw))) {
FlashMapEntry = (EFI_FLASH_MAP_ENTRY_DATA *) GET_GUID_HOB_DATA (GuidHob.Guid);
//
// Get the FTW work space Flash Map SUB area
//
if ((FlashMapEntry->AreaType == EFI_FLASH_AREA_FTW_STATE) && (FlashMapEntry->NumEntries == 1)) {
FtwLiteDevice->WorkSpaceAddress = FlashMapEntry->Entries[0].Base;
FtwLiteDevice->WorkSpaceLength = (UINTN) FlashMapEntry->Entries[0].Length;
}
//
// Get the FTW backup SUB area
//
if ((FlashMapEntry->AreaType == EFI_FLASH_AREA_FTW_BACKUP) && (FlashMapEntry->NumEntries == 1)) {
FtwLiteDevice->SpareAreaAddress = FlashMapEntry->Entries[0].Base;
FtwLiteDevice->SpareAreaLength = (UINTN) FlashMapEntry->Entries[0].Length;
}
GuidHob.Raw = GET_NEXT_HOB (GuidHob);
}
FtwLiteDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwSpareBase);
FtwLiteDevice->SpareAreaLength = (UINTN) PcdGet32 (PcdFlashNvStorageFtwSpareSize);
ASSERT ((FtwLiteDevice->WorkSpaceLength != 0) && (FtwLiteDevice->SpareAreaLength != 0));

View File

@ -30,6 +30,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
<OutputFileBasename>FtwLite</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>PcdLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>DebugLib</Keyword>
</LibraryClass>
@ -96,4 +99,26 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
<ModuleEntryPoint>InitializeFtwLite</ModuleEntryPoint>
</Extern>
</Externs>
<PcdCoded>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get base address of the FTW spare block section in NV firmware volume.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get size of the FTW spare block section in NV firmware volume.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get base address of the FTW working block section in NV firmware volume.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get size of the FTW working block section in NV firmware volume.</HelpText>
</PcdEntry>
</PcdCoded>
</ModuleSurfaceArea>

View File

@ -1254,14 +1254,14 @@ Returns:
UINT32 Instance;
EFI_PHYSICAL_ADDRESS FvVolHdr;
EFI_FLASH_MAP_ENTRY_DATA *FlashMapEntryData;
UINT64 TempVariableStoreHeader;
EFI_GCD_MEMORY_SPACE_DESCRIPTOR GcdDescriptor;
EFI_FLASH_SUBAREA_ENTRY VariableStoreEntry;
UINT64 BaseAddress;
UINT64 Length;
UINTN Index;
UINT8 Data;
EFI_PEI_HOB_POINTERS GuidHob;
Status = gBS->AllocatePool (
EfiRuntimeServicesData,
@ -1305,35 +1305,13 @@ Returns:
// Get non volatile varaible store
//
FlashMapEntryData = NULL;
GuidHob.Raw = GetHobList ();
while (NULL != (GuidHob.Raw = GetNextGuidHob (&gEfiFlashMapHobGuid, GuidHob.Raw))) {
FlashMapEntryData = (EFI_FLASH_MAP_ENTRY_DATA *) GET_GUID_HOB_DATA (GuidHob.Guid);
if (FlashMapEntryData->AreaType == EFI_FLASH_AREA_EFI_VARIABLES) {
break;
}
GuidHob.Raw = GET_NEXT_HOB (GuidHob);
}
if (NULL == GuidHob.Raw || FlashMapEntryData == NULL) {
gBS->FreePool (mVariableModuleGlobal);
gBS->FreePool (VolatileVariableStore);
return EFI_NOT_FOUND;
}
//
// Currently only one non-volatile variable store is supported
//
if (FlashMapEntryData->NumEntries != 1) {
gBS->FreePool (mVariableModuleGlobal);
gBS->FreePool (VolatileVariableStore);
return EFI_UNSUPPORTED;
}
CopyMem (&VariableStoreEntry, &FlashMapEntryData->Entries[0], sizeof (VariableStoreEntry));
TempVariableStoreHeader = (UINT64) PcdGet32 (PcdFlashNvStorageVariableBase);
VariableStoreEntry.Base = TempVariableStoreHeader + \
(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) (TempVariableStoreHeader)) -> HeaderLength);
VariableStoreEntry.Length = (UINT64) PcdGet32 (PcdFlashNvStorageVariableSize) - \
(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) (TempVariableStoreHeader)) -> HeaderLength);
VariableStoreEntry.Length = (UINT64) PcdGet32 (PcdFlashNvStorageVariableSize);
//
// Mark the variable storage region of the FLASH as RUNTIME
//

View File

@ -30,6 +30,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
<OutputFileBasename>Variable</OutputFileBasename>
</ModuleDefinitions>
<LibraryClassDefinitions>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>PcdLib</Keyword>
</LibraryClass>
<LibraryClass Usage="ALWAYS_CONSUMED">
<Keyword>BaseLib</Keyword>
</LibraryClass>
@ -150,4 +153,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
<SetVirtualAddressMapCallBack>VariableClassAddressChangeEvent</SetVirtualAddressMapCallBack>
</Extern>
</Externs>
<PcdCoded>
<PcdEntry PcdItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>
The driver gets the Variable store base address from this PCD. This base address point to
an EFI_FIRMWARE_VOLUMN_HEADER struct.
</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableSize</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>
The driver gets the Variable store base address from this PCD. This base address point to
an EFI_FIRMWARE_VOLUMN_HEADER struct.
</HelpText>
</PcdEntry>
</PcdCoded>
</ModuleSurfaceArea>

View File

@ -48,9 +48,9 @@ Abstract:
#define EFI_WINNT_RUNTIME_UPDATABLE_FV_HEADER_LENGTH 0x48
#define EFI_VARIABLE_STORE_OFFSET (EFI_WINNT_RUNTIME_UPDATABLE_OFFSET + EFI_WINNT_RUNTIME_UPDATABLE_FV_HEADER_LENGTH)
#define EFI_VARIABLE_STORE_OFFSET EFI_WINNT_RUNTIME_UPDATABLE_OFFSET
#define EFI_VARIABLE_STORE_LENGTH (0x00C000 - EFI_WINNT_RUNTIME_UPDATABLE_FV_HEADER_LENGTH)
#define EFI_VARIABLE_STORE_LENGTH 0x00C000
#define EFI_EVENT_LOG_OFFSET (EFI_VARIABLE_STORE_OFFSET + EFI_VARIABLE_STORE_LENGTH)

View File

@ -714,13 +714,53 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<Instance ModuleGuid="9dbf6f25-0da2-4a1d-8e12-e78de6ab4d0e" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<Token>0x30000013</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<Token>0x30000014</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<Token>0x30000010</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<Token>0x30000011</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0</Value>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableSize</C_Name>
<Token>0x30000002</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
@ -892,7 +932,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0</Value>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
@ -2672,6 +2712,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="50bcb105-6634-441d-b403-659110a03ad2" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -2738,6 +2780,38 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<Token>0x30000013</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<Token>0x30000014</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<Token>0x30000010</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<Token>0x30000011</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>FV_RECOVERY</FvBinding>
@ -2758,6 +2832,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<Instance ModuleGuid="f12b59c9-76d0-4661-ad7c-f04d1bef0558" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bd4d540e-04b0-4b10-8fd5-4a7bb533cf67" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
<!--Pkg: MdePkg Mod: DxePcdLib Path: MdePkg\Library\DxePcdLib\DxePcdLib.msa-->
<Instance ModuleGuid="af97eb89-4cc6-45f8-a514-ca025b346480" ModuleVersion="1.0" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec" PackageVersion="0.3"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
@ -2824,6 +2900,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableBase</C_Name>
<Token>0x30000001</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
<PcdData ItemType="DYNAMIC">
<C_Name>PcdFlashNvStorageVariableSize</C_Name>
<Token>0x30000002</Token>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>FV_RECOVERY</FvBinding>
@ -6826,7 +6918,62 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<MaxDatumSize>4</MaxDatumSize>
<SkuInfo>
<SkuId>0</SkuId>
<Value>0</Value>
<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>
<PcdBuildData ItemType="DYNAMIC">

View File

@ -176,6 +176,25 @@ Returns:
FlashHobData.SubAreaData.Base = FdBase + (EFI_PHYSICAL_ADDRESS) (UINTN) mFlashAreaData[Index].Base;
FlashHobData.SubAreaData.Length = (EFI_PHYSICAL_ADDRESS) (UINTN) mFlashAreaData[Index].Length;
//
// We also update a PCD entry so that any driver that depend on
// PCD entry will get the information.
//
if (FlashHobData.AreaType == EFI_FLASH_AREA_EFI_VARIABLES) {
PcdSet32 (PcdFlashNvStorageVariableBase, (UINT32) FlashHobData.SubAreaData.Base);
PcdSet32 (PcdFlashNvStorageVariableSize, (UINT32) FlashHobData.SubAreaData.Length);
}
if (FlashHobData.AreaType == EFI_FLASH_AREA_FTW_STATE) {
PcdSet32 (PcdFlashNvStorageFtwWorkingBase, (UINT32) FlashHobData.SubAreaData.Base);
PcdSet32 (PcdFlashNvStorageFtwWorkingSize, (UINT32) FlashHobData.SubAreaData.Length);
}
if (FlashHobData.AreaType == EFI_FLASH_AREA_FTW_BACKUP) {
PcdSet32 (PcdFlashNvStorageFtwSpareBase, (UINT32) FlashHobData.SubAreaData.Base);
PcdSet32 (PcdFlashNvStorageFtwSpareSize, (UINT32) FlashHobData.SubAreaData.Length);
}
switch (FlashHobData.AreaType) {
case EFI_FLASH_AREA_RECOVERY_BIOS:
case EFI_FLASH_AREA_MAIN_BIOS:
@ -202,12 +221,6 @@ Returns:
&gEfiFirmwareVolumeBlockProtocolGuid,
sizeof (EFI_GUID)
);
//
// We also update a PCD entry so that any driver that depend on
// PCD entry PcdFlashNvStorageVariableBase will get the information.
//
PcdSet32 (PcdFlashNvStorageVariableBase, (UINT32) FlashHobData.SubAreaData.Base);
break;
default:

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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
@ -103,5 +103,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
normally a FIXED_AT_BUILD type as system memory map is fixed to BIOS.
</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwSpareBase</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get base address of the FTW spare block section in NV firmware volume.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwSpareSize</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get size of the FTW spare block section in NV firmware volume.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwWorkingBase</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get base address of the FTW working block section in NV firmware volume.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FIXED_AT_BUILD" Usage="ALWAYS_CONSUMED">
<C_Name>PcdFlashNvStorageFtwWorkingSize</C_Name>
<TokenSpaceGuidCName>gEfiGenericPlatformTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>To get size of the FTW working block section in NV firmware volume.</HelpText>
</PcdEntry>
</PcdCoded>
</ModuleSurfaceArea>