-/*++\r
+/**@file\r
\r
-Copyright (c) 2006 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
Revision History\r
\r
---*/\r
+**/\r
\r
//\r
// The package level header files this module uses\r
// The protocols, PPI and GUID defintions for this module\r
//\r
#include <Guid/EventGroup.h>\r
-#include <Protocol/FvbExtension.h>\r
#include <Protocol/FirmwareVolumeBlock.h>\r
-#include <Guid/AlternateFvBlock.h>\r
#include <Protocol/DevicePath.h>\r
//\r
// The Library classes this module consumes\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/DevicePathLib.h>\r
\r
#include "FWBlockService.h"\r
\r
\r
ESAL_FWB_GLOBAL *mFvbModuleGlobal;\r
\r
-EFI_FW_VOL_BLOCK_DEVICE mFvbDeviceTemplate = {\r
- FVB_DEVICE_SIGNATURE,\r
+FV_MEMMAP_DEVICE_PATH mFvMemmapDevicePathTemplate = {\r
{\r
{\r
+ HARDWARE_DEVICE_PATH,\r
+ HW_MEMMAP_DP,\r
{\r
- HARDWARE_DEVICE_PATH,\r
- HW_MEMMAP_DP,\r
- {\r
- sizeof (MEMMAP_DEVICE_PATH),\r
- 0\r
- }\r
- },\r
- EfiMemoryMappedIO,\r
- 0,\r
- 0,\r
+ (UINT8)(sizeof (MEMMAP_DEVICE_PATH)),\r
+ (UINT8)(sizeof (MEMMAP_DEVICE_PATH) >> 8)\r
+ }\r
},\r
+ EfiMemoryMappedIO,\r
+ (EFI_PHYSICAL_ADDRESS) 0,\r
+ (EFI_PHYSICAL_ADDRESS) 0,\r
+ },\r
+ {\r
+ END_DEVICE_PATH_TYPE,\r
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+ {\r
+ END_DEVICE_PATH_LENGTH,\r
+ 0\r
+ }\r
+ }\r
+};\r
+\r
+FV_PIWG_DEVICE_PATH mFvPIWGDevicePathTemplate = {\r
+ {\r
{\r
- END_DEVICE_PATH_TYPE,\r
- END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+ MEDIA_DEVICE_PATH,\r
+ MEDIA_PIWG_FW_VOL_DP,\r
{\r
- sizeof (EFI_DEVICE_PATH_PROTOCOL),\r
- 0\r
+ (UINT8)(sizeof (MEDIA_FW_VOL_DEVICE_PATH)),\r
+ (UINT8)(sizeof (MEDIA_FW_VOL_DEVICE_PATH) >> 8)\r
}\r
- }\r
+ },\r
+ { 0 }\r
},\r
+ {\r
+ END_DEVICE_PATH_TYPE,\r
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
+ {\r
+ END_DEVICE_PATH_LENGTH,\r
+ 0\r
+ }\r
+ }\r
+};\r
+\r
+EFI_FW_VOL_BLOCK_DEVICE mFvbDeviceTemplate = {\r
+ FVB_DEVICE_SIGNATURE,\r
+ NULL,\r
0,\r
{\r
FvbProtocolGetAttributes,\r
FvbProtocolWrite,\r
FvbProtocolEraseBlocks,\r
NULL\r
- },\r
- {\r
- FvbExtendProtocolEraseCustomBlockRange\r
}\r
};\r
\r
EFI_STATUS\r
FvbGetVolumeAttributes (\r
IN UINTN Instance,\r
- OUT EFI_FVB_ATTRIBUTES *Attributes,\r
+ OUT EFI_FVB_ATTRIBUTES_2 *Attributes,\r
IN ESAL_FWB_GLOBAL *Global,\r
IN BOOLEAN Virtual\r
)\r
\r
--*/\r
{\r
- EFI_FVB_ATTRIBUTES Attributes;\r
- UINTN LbaAddress;\r
- UINTN LbaLength;\r
- EFI_STATUS Status;\r
+ EFI_FVB_ATTRIBUTES_2 Attributes;\r
+ UINTN LbaAddress;\r
+ UINTN LbaLength;\r
+ EFI_STATUS Status;\r
\r
//\r
// Check for invalid conditions\r
\r
--*/\r
{\r
- EFI_FVB_ATTRIBUTES Attributes;\r
- UINTN LbaAddress;\r
- UINTN LbaLength;\r
- EFI_STATUS Status;\r
+ EFI_FVB_ATTRIBUTES_2 Attributes;\r
+ UINTN LbaAddress;\r
+ UINTN LbaLength;\r
+ EFI_STATUS Status;\r
\r
//\r
// Check for invalid conditions\r
--*/\r
{\r
\r
- EFI_FVB_ATTRIBUTES Attributes;\r
- UINTN LbaAddress;\r
- UINTN LbaLength;\r
- EFI_STATUS Status;\r
- UINT8 Data;\r
+ EFI_FVB_ATTRIBUTES_2 Attributes;\r
+ UINTN LbaAddress;\r
+ UINTN LbaLength;\r
+ EFI_STATUS Status;\r
+ UINT8 Data;\r
\r
//\r
// Check if the FV is write enabled\r
return EFI_SUCCESS;\r
}\r
\r
-EFI_STATUS\r
-FvbEraseCustomBlockRange (\r
- IN UINTN Instance,\r
- IN EFI_LBA StartLba,\r
- IN UINTN OffsetStartLba,\r
- IN EFI_LBA LastLba,\r
- IN UINTN OffsetLastLba,\r
- IN ESAL_FWB_GLOBAL *Global,\r
- IN BOOLEAN Virtual\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Erases and initializes a specified range of a firmware volume\r
-\r
-Arguments:\r
- Instance - The FV instance to be erased\r
- StartLba - The starting logical block index to be erased\r
- OffsetStartLba - Offset into the starting block at which to\r
- begin erasing\r
- LastLba - The last logical block index to be erased\r
- OffsetStartLba - Offset into the last block at which to end erasing\r
- Global - Pointer to ESAL_FWB_GLOBAL that contains all\r
- instance data\r
- Virtual - Whether CPU is in virtual or physical mode\r
-\r
-Returns:\r
- EFI_SUCCESS - The firmware volume was erased successfully\r
- EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state\r
- EFI_DEVICE_ERROR - The block device is not functioning correctly and\r
- could not be written. Firmware device may have been\r
- partially erased\r
- EFI_INVALID_PARAMETER - Instance not found\r
-\r
---*/\r
-{\r
- EFI_LBA Index;\r
- UINTN LbaSize;\r
- UINTN ScratchLbaSizeData;\r
-\r
- //\r
- // First LBA\r
- //\r
- FvbGetLbaAddress (Instance, StartLba, NULL, &LbaSize, NULL, Global, Virtual);\r
-\r
- //\r
- // Use the scratch space as the intermediate buffer to transfer data\r
- // Back up the first LBA in scratch space.\r
- //\r
- FvbReadBlock (Instance, StartLba, 0, &LbaSize, Global->FvbScratchSpace[Virtual], Global, Virtual);\r
-\r
- //\r
- // erase now\r
- //\r
- FvbEraseBlock (Instance, StartLba, Global, Virtual);\r
- ScratchLbaSizeData = OffsetStartLba;\r
-\r
- //\r
- // write the data back to the first block\r
- //\r
- if (ScratchLbaSizeData > 0) {\r
- FvbWriteBlock (Instance, StartLba, 0, &ScratchLbaSizeData, Global->FvbScratchSpace[Virtual], Global, Virtual);\r
- }\r
- //\r
- // Middle LBAs\r
- //\r
- if (LastLba > (StartLba + 1)) {\r
- for (Index = (StartLba + 1); Index <= (LastLba - 1); Index++) {\r
- FvbEraseBlock (Instance, Index, Global, Virtual);\r
- }\r
- }\r
- //\r
- // Last LBAs, the same as first LBAs\r
- //\r
- if (LastLba > StartLba) {\r
- FvbGetLbaAddress (Instance, LastLba, NULL, &LbaSize, NULL, Global, Virtual);\r
- FvbReadBlock (Instance, LastLba, 0, &LbaSize, Global->FvbScratchSpace[Virtual], Global, Virtual);\r
- FvbEraseBlock (Instance, LastLba, Global, Virtual);\r
- }\r
-\r
- ScratchLbaSizeData = LbaSize - (OffsetStartLba + 1);\r
-\r
- return FvbWriteBlock (\r
- Instance,\r
- LastLba,\r
- (OffsetLastLba + 1),\r
- &ScratchLbaSizeData,\r
- Global->FvbScratchSpace[Virtual],\r
- Global,\r
- Virtual\r
- );\r
-}\r
-\r
EFI_STATUS\r
FvbSetVolumeAttributes (\r
- IN UINTN Instance,\r
- IN OUT EFI_FVB_ATTRIBUTES *Attributes,\r
- IN ESAL_FWB_GLOBAL *Global,\r
- IN BOOLEAN Virtual\r
+ IN UINTN Instance,\r
+ IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes,\r
+ IN ESAL_FWB_GLOBAL *Global,\r
+ IN BOOLEAN Virtual\r
)\r
/*++\r
\r
Arguments:\r
Instance - The FV instance whose attributes is going to be\r
modified\r
- Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES\r
+ Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES_2\r
containing the desired firmware volume settings.\r
On successful return, it contains the new settings\r
of the firmware volume\r
\r
--*/\r
{\r
- EFI_FW_VOL_INSTANCE *FwhInstance;\r
- EFI_FVB_ATTRIBUTES OldAttributes;\r
- EFI_FVB_ATTRIBUTES *AttribPtr;\r
- UINT32 Capabilities;\r
- UINT32 OldStatus;\r
- UINT32 NewStatus;\r
- EFI_STATUS Status;\r
+ EFI_FW_VOL_INSTANCE *FwhInstance;\r
+ EFI_FVB_ATTRIBUTES_2 OldAttributes;\r
+ EFI_FVB_ATTRIBUTES_2 *AttribPtr;\r
+ UINT32 Capabilities;\r
+ UINT32 OldStatus;\r
+ UINT32 NewStatus;\r
+ EFI_STATUS Status;\r
+ EFI_FVB_ATTRIBUTES_2 UnchangedAttributes;\r
\r
//\r
// Find the right instance of the FVB private data\r
Status = GetFvbInstance (Instance, Global, &FwhInstance, Virtual);\r
ASSERT_EFI_ERROR (Status);\r
\r
- AttribPtr = (EFI_FVB_ATTRIBUTES *) &(FwhInstance->VolumeHeader.Attributes);\r
+ AttribPtr = (EFI_FVB_ATTRIBUTES_2 *) &(FwhInstance->VolumeHeader.Attributes);\r
OldAttributes = *AttribPtr;\r
Capabilities = OldAttributes & (EFI_FVB2_READ_DISABLED_CAP | \\r
EFI_FVB2_READ_ENABLED_CAP | \\r
OldStatus = OldAttributes & EFI_FVB2_STATUS;\r
NewStatus = *Attributes & EFI_FVB2_STATUS;\r
\r
+ UnchangedAttributes = EFI_FVB2_READ_DISABLED_CAP | \\r
+ EFI_FVB2_READ_ENABLED_CAP | \\r
+ EFI_FVB2_WRITE_DISABLED_CAP | \\r
+ EFI_FVB2_WRITE_ENABLED_CAP | \\r
+ EFI_FVB2_LOCK_CAP | \\r
+ EFI_FVB2_STICKY_WRITE | \\r
+ EFI_FVB2_MEMORY_MAPPED | \\r
+ EFI_FVB2_ERASE_POLARITY | \\r
+ EFI_FVB2_READ_LOCK_CAP | \\r
+ EFI_FVB2_WRITE_LOCK_CAP | \\r
+ EFI_FVB2_ALIGNMENT;\r
+\r
+ //\r
+ // Some attributes of FV is read only can *not* be set\r
+ //\r
+ if ((OldAttributes & UnchangedAttributes) ^ (*Attributes & UnchangedAttributes)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
//\r
// If firmware volume is locked, no status bit can be updated\r
//\r
EFIAPI\r
FvbProtocolGetAttributes (\r
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
- OUT EFI_FVB_ATTRIBUTES *Attributes\r
+ OUT EFI_FVB_ATTRIBUTES_2 *Attributes\r
)\r
/*++\r
\r
EFIAPI\r
FvbProtocolSetAttributes (\r
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
- IN OUT EFI_FVB_ATTRIBUTES *Attributes\r
+ IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes\r
)\r
/*++\r
\r
break;\r
}\r
\r
- NumOfLba = VA_ARG (args, UINT32);\r
+ NumOfLba = VA_ARG (args, UINTN);\r
\r
//\r
// Check input parameters\r
//\r
- if (NumOfLba == 0) {\r
+ if ((NumOfLba == 0) || ((StartingLba + NumOfLba) > NumOfBlocks)) {\r
VA_END (args);\r
return EFI_INVALID_PARAMETER;\r
}\r
-\r
- if ((StartingLba + NumOfLba) > NumOfBlocks) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
} while (1);\r
\r
VA_END (args);\r
break;\r
}\r
\r
- NumOfLba = VA_ARG (args, UINT32);\r
+ NumOfLba = VA_ARG (args, UINTN);\r
\r
while (NumOfLba > 0) {\r
Status = FvbEraseBlock (FvbDevice->Instance, StartingLba, mFvbModuleGlobal, EfiGoneVirtual ());\r
EFIAPI\r
FvbProtocolWrite (\r
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
- IN CONST EFI_LBA Lba,\r
- IN CONST UINTN Offset,\r
- IN OUT UINTN *NumBytes,\r
- IN CONST UINT8 *Buffer\r
+ IN EFI_LBA Lba,\r
+ IN UINTN Offset,\r
+ IN OUT UINTN *NumBytes,\r
+ IN UINT8 *Buffer\r
)\r
/*++\r
\r
\r
FvbDevice = FVB_DEVICE_FROM_THIS (This);\r
\r
- return FvbWriteBlock (FvbDevice->Instance, Lba, Offset, NumBytes, Buffer, mFvbModuleGlobal, EfiGoneVirtual ());\r
+ return FvbWriteBlock (FvbDevice->Instance, (EFI_LBA)Lba, (UINTN)Offset, NumBytes, (UINT8 *)Buffer, mFvbModuleGlobal, EfiGoneVirtual ());\r
}\r
\r
EFI_STATUS\r
\r
return FvbReadBlock (FvbDevice->Instance, Lba, Offset, NumBytes, Buffer, mFvbModuleGlobal, EfiGoneVirtual ());\r
}\r
-//\r
-// FVB Extension Protocols\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-FvbExtendProtocolEraseCustomBlockRange (\r
- IN EFI_FVB_EXTENSION_PROTOCOL *This,\r
- IN EFI_LBA StartLba,\r
- IN UINTN OffsetStartLba,\r
- IN EFI_LBA LastLba,\r
- IN UINTN OffsetLastLba\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Erases and initializes a specified range of a firmware volume\r
-\r
-Arguments:\r
- This - Calling context\r
- StartLba - The starting logical block index to be erased\r
- OffsetStartLba - Offset into the starting block at which to\r
- begin erasing\r
- LastLba - The last logical block index to be erased\r
- OffsetStartLba - Offset into the last block at which to end erasing\r
\r
-Returns:\r
- EFI_SUCCESS - The firmware volume was erased successfully\r
- EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state\r
- EFI_DEVICE_ERROR - The block device is not functioning correctly and\r
- could not be written. Firmware device may have been\r
- partially erased\r
-\r
---*/\r
-{\r
- EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
-\r
- FvbDevice = FVB_EXTEND_DEVICE_FROM_THIS (This);\r
-\r
- return FvbEraseCustomBlockRange (\r
- FvbDevice->Instance,\r
- StartLba,\r
- OffsetStartLba,\r
- LastLba,\r
- OffsetLastLba,\r
- mFvbModuleGlobal,\r
- EfiGoneVirtual ()\r
- );\r
-}\r
-\r
-STATIC\r
EFI_STATUS\r
ValidateFvHeader (\r
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader\r
\r
--*/\r
{\r
- UINT16 *Ptr;\r
- UINT16 HeaderLength;\r
- UINT16 Checksum;\r
-\r
//\r
// Verify the header revision, header signature, length\r
// Length of FvBlock cannot be 2**64-1\r
) {\r
return EFI_NOT_FOUND;\r
}\r
+ \r
//\r
// Verify the header checksum\r
//\r
- HeaderLength = (UINT16) (FwVolHeader->HeaderLength / 2);\r
- Ptr = (UINT16 *) FwVolHeader;\r
- Checksum = 0;\r
- while (HeaderLength > 0) {\r
- Checksum = Checksum + (*Ptr);\r
- HeaderLength--;\r
- Ptr++;\r
- }\r
-\r
- if (Checksum != 0) {\r
+ if (CalculateCheckSum16 ((UINT16 *) FwVolHeader, FwVolHeader->HeaderLength) != 0) {\r
return EFI_NOT_FOUND;\r
}\r
\r
EFI_HANDLE FwbHandle;\r
EFI_FW_VOL_BLOCK_DEVICE *FvbDevice;\r
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *OldFwbInterface;\r
- EFI_DEVICE_PATH_PROTOCOL *TempFwbDevicePath;\r
- FV_DEVICE_PATH TempFvbDevicePathData;\r
UINT32 MaxLbaSize;\r
EFI_PHYSICAL_ADDRESS BaseAddress;\r
UINT64 Length;\r
UINTN NumOfBlocks;\r
EFI_PEI_HOB_POINTERS FvHob;\r
\r
- //\r
+ //\r
// Get the DXE services table\r
//\r
DxeServices = gDS;\r
- __asm int 3;\r
\r
//\r
// Allocate runtime services data for global variable, which contains\r
FwVolHeader->HeaderLength\r
);\r
}\r
-\r
+ \r
FwhInstance->FvBase[FVB_PHYSICAL] = (UINTN) BaseAddress;\r
FwhInstance->FvBase[FVB_VIRTUAL] = (UINTN) BaseAddress;\r
\r
\r
for (PtrBlockMapEntry = FwVolHeader->BlockMap; PtrBlockMapEntry->NumBlocks != 0; PtrBlockMapEntry++) {\r
//\r
- // Get the maximum size of a block. The size will be used to allocate\r
- // buffer for Scratch space, the intermediate buffer for FVB extension\r
- // protocol\r
+ // Get the maximum size of a block.\r
//\r
if (MaxLbaSize < PtrBlockMapEntry->Length) {\r
MaxLbaSize = PtrBlockMapEntry->Length;\r
\r
FvbDevice->Instance = mFvbModuleGlobal->NumFv;\r
mFvbModuleGlobal->NumFv++;\r
-\r
+ \r
+ \r
//\r
// Set up the devicepath\r
//\r
- FvbDevice->DevicePath.MemMapDevPath.StartingAddress = BaseAddress;\r
- FvbDevice->DevicePath.MemMapDevPath.EndingAddress = BaseAddress + (FwVolHeader->FvLength - 1);\r
-\r
+ if (FwVolHeader->ExtHeaderOffset == 0) {\r
+ //\r
+ // FV does not contains extension header, then produce MEMMAP_DEVICE_PATH\r
+ //\r
+ FvbDevice->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);\r
+ ((FV_MEMMAP_DEVICE_PATH *) FvbDevice->DevicePath)->MemMapDevPath.StartingAddress = BaseAddress;\r
+ ((FV_MEMMAP_DEVICE_PATH *) FvbDevice->DevicePath)->MemMapDevPath.EndingAddress = BaseAddress + FwVolHeader->FvLength - 1;\r
+ } else {\r
+ FvbDevice->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);\r
+ CopyGuid (\r
+ &((FV_PIWG_DEVICE_PATH *)FvbDevice->DevicePath)->FvDevPath.FvName, \r
+ (GUID *)(UINTN)(BaseAddress + FwVolHeader->ExtHeaderOffset)\r
+ );\r
+ }\r
//\r
// Find a handle with a matching device path that has supports FW Block protocol\r
//\r
- TempFwbDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) &TempFvbDevicePathData;\r
- CopyMem (TempFwbDevicePath, &FvbDevice->DevicePath, sizeof (FV_DEVICE_PATH));\r
- Status = gBS->LocateDevicePath (&gEfiFirmwareVolumeBlockProtocolGuid, &TempFwbDevicePath, &FwbHandle);\r
+ Status = gBS->LocateDevicePath (&gEfiFirmwareVolumeBlockProtocolGuid, &FvbDevice->DevicePath, &FwbHandle);\r
if (EFI_ERROR (Status)) {\r
//\r
// LocateDevicePath fails so install a new interface and device path\r
&gEfiFirmwareVolumeBlockProtocolGuid,\r
&FvbDevice->FwVolBlockInstance,\r
&gEfiDevicePathProtocolGuid,\r
- &FvbDevice->DevicePath,\r
+ FvbDevice->DevicePath,\r
NULL\r
);\r
ASSERT_EFI_ERROR (Status);\r
- } else if (EfiIsDevicePathEnd (TempFwbDevicePath)) {\r
+ } else if (IsDevicePathEnd (FvbDevice->DevicePath)) {\r
//\r
// Device allready exists, so reinstall the FVB protocol\r
//\r
Status = gBS->HandleProtocol (\r
FwbHandle,\r
&gEfiFirmwareVolumeBlockProtocolGuid,\r
- &OldFwbInterface\r
+ (VOID**)&OldFwbInterface\r
);\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
ASSERT (FALSE);\r
}\r
- //\r
- // Install FVB Extension Protocol on the same handle\r
- //\r
- Status = gBS->InstallMultipleProtocolInterfaces (\r
- &FwbHandle,\r
- &gEfiFvbExtensionProtocolGuid,\r
- &FvbDevice->FvbExtension,\r
- &gEfiAlternateFvBlockGuid,\r
- NULL,\r
- NULL\r
- );\r
-\r
- ASSERT_EFI_ERROR (Status);\r
\r
FwhInstance = (EFI_FW_VOL_INSTANCE *)\r
(\r
FvHob.Raw = GET_NEXT_HOB (FvHob);\r
}\r
\r
- //\r
- // Allocate for scratch space, an intermediate buffer for FVB extention\r
- //\r
- mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL] = AllocateRuntimePool (MaxLbaSize);\r
- ASSERT (mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL] != NULL);\r
-\r
- mFvbModuleGlobal->FvbScratchSpace[FVB_VIRTUAL] = mFvbModuleGlobal->FvbScratchSpace[FVB_PHYSICAL];\r
-\r
return EFI_SUCCESS;\r
}\r