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:
@@ -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:
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user