summaryrefslogtreecommitdiffstats
path: root/EdkNt32Pkg/Pei/FlashMap
diff options
context:
space:
mode:
Diffstat (limited to 'EdkNt32Pkg/Pei/FlashMap')
-rw-r--r--EdkNt32Pkg/Pei/FlashMap/FlashMap.c25
-rw-r--r--EdkNt32Pkg/Pei/FlashMap/FlashMap.msa22
2 files changed, 40 insertions, 7 deletions
diff --git a/EdkNt32Pkg/Pei/FlashMap/FlashMap.c b/EdkNt32Pkg/Pei/FlashMap/FlashMap.c
index 54dc137a76..af8e13c9ff 100644
--- a/EdkNt32Pkg/Pei/FlashMap/FlashMap.c
+++ b/EdkNt32Pkg/Pei/FlashMap/FlashMap.c
@@ -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:
diff --git a/EdkNt32Pkg/Pei/FlashMap/FlashMap.msa b/EdkNt32Pkg/Pei/FlashMap/FlashMap.msa
index 2dba783f02..1a098cf057 100644
--- a/EdkNt32Pkg/Pei/FlashMap/FlashMap.msa
+++ b/EdkNt32Pkg/Pei/FlashMap/FlashMap.msa
@@ -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>