Allow the FaultTolerantWriteDxe addresses to be dynamic PCD's.

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
This commit is contained in:
jljusten 2009-09-26 07:15:38 +00:00
parent eb14b48130
commit b6183e4195
1 changed files with 3 additions and 2 deletions

View File

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