]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Allow the FaultTolerantWriteDxe addresses to be dynamic PCD's.
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 26 Sep 2009 07:15:38 +0000 (07:15 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 26 Sep 2009 07:15:38 +0000 (07:15 +0000)
PcdFlashNvStorageFtwWorkingBase and PcdFlashNvStorageFtwSpareBase are
now updated each time an FVB instance is installed.  This allows the
PCDs to be set at runtime at any time before the FVB is installed.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9312 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c

index e0ac6ee17c87e2da01d33a71285f8670c130b736..0a003ad721826d2d7c79846db208bfc5e4cefe60 100644 (file)
@@ -890,6 +890,9 @@ FvbNotificationEvent (
   FvbHandle = NULL;\r
   Fvb       = NULL;\r
 \r
+  FtwDevice->WorkSpaceAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwWorkingBase);\r
+  FtwDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwSpareBase);\r
+\r
   //\r
   // Locate all handles of Fvb protocol\r
   //\r
@@ -1204,10 +1207,8 @@ InitializeFaultTolerantWrite (
   // Initialize other parameters, and set WorkSpace as FTW_ERASED_BYTE.\r
   //\r
 \r
-  FtwDevice->WorkSpaceAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwWorkingBase);\r
   FtwDevice->WorkSpaceLength  = (UINTN) PcdGet32 (PcdFlashNvStorageFtwWorkingSize);\r
 \r
-  FtwDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwSpareBase);\r
   FtwDevice->SpareAreaLength  = (UINTN) PcdGet32 (PcdFlashNvStorageFtwSpareSize);\r
 \r
   if ((FtwDevice->WorkSpaceLength == 0) || (FtwDevice->SpareAreaLength == 0)) {\r