summaryrefslogtreecommitdiff
path: root/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-08-03 08:52:48 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-08-03 08:52:48 +0000
commit6d3aa33ed03ca6d9d1af2e5425e8c5adec3f5f5d (patch)
tree530b8cacfa82a599c62375ad936ccbc21bb8c1d6 /Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c
parentc8db3056ecfec7d4c0c6dd20cfc23c9daa4fb196 (diff)
downloadedk2-platforms-6d3aa33ed03ca6d9d1af2e5425e8c5adec3f5f5d.tar.xz
Replace the FlashMapHob with PCD defined in FDF on Nt32 platform. Currently, the tool can not generate correct PCD value in FDF, so in the patch, we still define the flash layout PCDs in DSC for short term.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3544 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c')
-rw-r--r--Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c b/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c
index 2431133136..643b92c446 100644
--- a/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c
+++ b/Nt32Pkg/WinNtFirmwareVolumePei/WinntFwh.c
@@ -34,9 +34,7 @@ Revision History
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/HobLib.h>
-
-#include <FlashLayout.h>
-
+#include <Library/PcdLib.h>
EFI_STATUS
EFIAPI
@@ -68,6 +66,7 @@ Returns:
DEBUG ((EFI_D_ERROR, "NT 32 Firmware Volume PEIM Loaded\n"));
+ __asm int 3;
//
// Get the Fwh Information PPI
//
@@ -107,15 +106,24 @@ Returns:
EFI_RESOURCE_FIRMWARE_DEVICE,
(EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),
FdBase,
- (FvHeader->FvLength + EFI_WINNT_RUNTIME_UPDATABLE_LENGTH + EFI_WINNT_FTW_SPARE_BLOCK_LENGTH)
+ (
+ FvHeader->FvLength +
+ PcdGet32 (PcdFlashNvStorageVariableSize) +
+ PcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
+ PcdGet32 (PcdFlashNvStorageFtwSpareSize) +
+ PcdGet32 (PcdWinNtFlashNvStorageEventLogSize)
+ )
);
-
//
// Hard code the address of the spare block and variable services.
// Assume it's a hard coded offset from FV0 in FD0.
//
- FdBase = FdBase + EFI_WINNT_RUNTIME_UPDATABLE_OFFSET;
- FdSize = EFI_WINNT_RUNTIME_UPDATABLE_LENGTH + EFI_WINNT_FTW_SPARE_BLOCK_LENGTH;
+ FdBase = FdBase + PcdGet32 (PcdWinNtFlashNvStorageVariableBase);
+ FdSize =
+ PcdGet32 (PcdFlashNvStorageVariableSize) +
+ PcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
+ PcdGet32 (PcdFlashNvStorageFtwSpareSize) +
+ PcdGet32 (PcdWinNtFlashNvStorageEventLogSize);
BuildFvHob (FdBase, FdSize);
} else {