/** @file\r
Source file for CD recovery PEIM\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
#include "PeiCdExpress.h"\r
\r
PEI_CD_EXPRESS_PRIVATE_DATA *mPrivateData = NULL;\r
+CHAR8 *mRecoveryFileName;\r
+UINTN mRecoveryFileNameSize;\r
\r
/**\r
- Installs the Device Recovery Module PPI, Initialize BlockIo Ppi \r
+ Installs the Device Recovery Module PPI, Initialize BlockIo Ppi\r
installation notification\r
\r
@param FileHandle The file handle of the image.\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
+ mRecoveryFileNameSize = PcdGetSize(PcdRecoveryFileName) / sizeof(CHAR16);\r
+ mRecoveryFileName = AllocatePool(mRecoveryFileNameSize);\r
+ if (mRecoveryFileName == NULL) {\r
+ return EFI_OUT_OF_RESOURCES;\r
+ }\r
+ Status = UnicodeStrToAsciiStrS(PcdGetPtr(PcdRecoveryFileName), mRecoveryFileName, mRecoveryFileNameSize);\r
+ if (EFI_ERROR(Status)) {\r
+ return Status;\r
+ }\r
+\r
//\r
// Initialize Private Data (to zero, as is required by subsequent operations)\r
//\r
}\r
\r
PrivateData->CapsuleCount = 0;\r
- Status = UpdateBlocksAndVolumes (PrivateData);\r
+ Status = UpdateBlocksAndVolumes (PrivateData, TRUE);\r
+ Status = UpdateBlocksAndVolumes (PrivateData, FALSE);\r
\r
//\r
// Installs Ppi\r
PrivateData->DeviceRecoveryPpi.GetRecoveryCapsuleInfo = GetRecoveryCapsuleInfo;\r
PrivateData->DeviceRecoveryPpi.LoadRecoveryCapsule = LoadRecoveryCapsule;\r
\r
- PrivateData->PpiDescriptor.Flags = (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST);\r
- PrivateData->PpiDescriptor.Guid = &gEfiPeiDeviceRecoveryModulePpiGuid;\r
- PrivateData->PpiDescriptor.Ppi = &PrivateData->DeviceRecoveryPpi;\r
+ PrivateData->PpiDescriptor.Flags = (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST);\r
+ PrivateData->PpiDescriptor.Guid = &gEfiPeiDeviceRecoveryModulePpiGuid;\r
+ PrivateData->PpiDescriptor.Ppi = &PrivateData->DeviceRecoveryPpi;\r
\r
Status = PeiServicesInstallPpi (&PrivateData->PpiDescriptor);\r
if (EFI_ERROR (Status)) {\r
//\r
PrivateData->NotifyDescriptor.Flags =\r
(\r
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK |\r
- EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST\r
+ EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK\r
);\r
PrivateData->NotifyDescriptor.Guid = &gEfiPeiVirtualBlockIoPpiGuid;\r
PrivateData->NotifyDescriptor.Notify = BlockIoNotifyEntry;\r
+\r
+ PrivateData->NotifyDescriptor2.Flags =\r
+ (\r
+ EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK |\r
+ EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST\r
+ );\r
+ PrivateData->NotifyDescriptor2.Guid = &gEfiPeiVirtualBlockIo2PpiGuid;\r
+ PrivateData->NotifyDescriptor2.Notify = BlockIoNotifyEntry;\r
+\r
return PeiServicesNotifyPpi (&PrivateData->NotifyDescriptor);\r
\r
}\r
\r
/**\r
- BlockIo installation notification function. \r
- \r
+ BlockIo installation notification function.\r
+\r
This function finds out all the current Block IO PPIs in the system and add them\r
into private data.\r
\r
IN VOID *Ppi\r
)\r
{\r
- UpdateBlocksAndVolumes (mPrivateData);\r
+ if (CompareGuid (NotifyDescriptor->Guid, &gEfiPeiVirtualBlockIo2PpiGuid)) {\r
+ UpdateBlocksAndVolumes (mPrivateData, TRUE);\r
+ } else {\r
+ UpdateBlocksAndVolumes (mPrivateData, FALSE);\r
+ }\r
\r
return EFI_SUCCESS;\r
}\r
Finds out all the current Block IO PPIs in the system and add them into private data.\r
\r
@param PrivateData The private data structure that contains recovery module information.\r
+ @param BlockIo2 Boolean to show whether using BlockIo2 or BlockIo.\r
\r
@retval EFI_SUCCESS The blocks and volumes are updated successfully.\r
\r
**/\r
EFI_STATUS\r
UpdateBlocksAndVolumes (\r
- IN OUT PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData\r
+ IN OUT PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData,\r
+ IN BOOLEAN BlockIo2\r
)\r
{\r
EFI_STATUS Status;\r
EFI_PEI_PPI_DESCRIPTOR *TempPpiDescriptor;\r
UINTN BlockIoPpiInstance;\r
EFI_PEI_RECOVERY_BLOCK_IO_PPI *BlockIoPpi;\r
+ EFI_PEI_RECOVERY_BLOCK_IO2_PPI *BlockIo2Ppi;\r
UINTN NumberBlockDevices;\r
UINTN IndexBlockDevice;\r
EFI_PEI_BLOCK_IO_MEDIA Media;\r
+ EFI_PEI_BLOCK_IO2_MEDIA Media2;\r
EFI_PEI_SERVICES **PeiServices;\r
\r
IndexBlockDevice = 0;\r
+ BlockIo2Ppi = NULL;\r
+ BlockIoPpi = NULL;\r
//\r
// Find out all Block Io Ppi instances within the system\r
// Assuming all device Block Io Peims are dispatched already\r
//\r
for (BlockIoPpiInstance = 0; BlockIoPpiInstance < PEI_CD_EXPRESS_MAX_BLOCK_IO_PPI; BlockIoPpiInstance++) {\r
- Status = PeiServicesLocatePpi (\r
- &gEfiPeiVirtualBlockIoPpiGuid,\r
- BlockIoPpiInstance,\r
- &TempPpiDescriptor,\r
- (VOID **) &BlockIoPpi\r
- );\r
+ if (BlockIo2) {\r
+ Status = PeiServicesLocatePpi (\r
+ &gEfiPeiVirtualBlockIo2PpiGuid,\r
+ BlockIoPpiInstance,\r
+ &TempPpiDescriptor,\r
+ (VOID **) &BlockIo2Ppi\r
+ );\r
+ } else {\r
+ Status = PeiServicesLocatePpi (\r
+ &gEfiPeiVirtualBlockIoPpiGuid,\r
+ BlockIoPpiInstance,\r
+ &TempPpiDescriptor,\r
+ (VOID **) &BlockIoPpi\r
+ );\r
+ }\r
if (EFI_ERROR (Status)) {\r
//\r
// Done with all Block Io Ppis\r
}\r
\r
PeiServices = (EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();\r
- Status = BlockIoPpi->GetNumberOfBlockDevices (\r
- PeiServices,\r
- BlockIoPpi,\r
- &NumberBlockDevices\r
- );\r
+ if (BlockIo2) {\r
+ Status = BlockIo2Ppi->GetNumberOfBlockDevices (\r
+ PeiServices,\r
+ BlockIo2Ppi,\r
+ &NumberBlockDevices\r
+ );\r
+ } else {\r
+ Status = BlockIoPpi->GetNumberOfBlockDevices (\r
+ PeiServices,\r
+ BlockIoPpi,\r
+ &NumberBlockDevices\r
+ );\r
+ }\r
if (EFI_ERROR (Status) || (NumberBlockDevices == 0)) {\r
continue;\r
}\r
// Just retrieve the first block, should emulate all blocks.\r
//\r
for (IndexBlockDevice = 1; IndexBlockDevice <= NumberBlockDevices && PrivateData->CapsuleCount < PEI_CD_EXPRESS_MAX_CAPSULE_NUMBER; IndexBlockDevice ++) {\r
- Status = BlockIoPpi->GetBlockDeviceMediaInfo (\r
- PeiServices,\r
- BlockIoPpi,\r
- IndexBlockDevice,\r
- &Media\r
- );\r
- if (EFI_ERROR (Status) ||\r
- !Media.MediaPresent ||\r
- ((Media.DeviceType != IdeCDROM) && (Media.DeviceType != UsbMassStorage)) ||\r
- (Media.BlockSize != PEI_CD_BLOCK_SIZE)\r
- ) {\r
- continue;\r
+ if (BlockIo2) {\r
+ Status = BlockIo2Ppi->GetBlockDeviceMediaInfo (\r
+ PeiServices,\r
+ BlockIo2Ppi,\r
+ IndexBlockDevice,\r
+ &Media2\r
+ );\r
+ if (EFI_ERROR (Status) ||\r
+ !Media2.MediaPresent ||\r
+ ((Media2.InterfaceType != MSG_ATAPI_DP) && (Media2.InterfaceType != MSG_USB_DP)) ||\r
+ (Media2.BlockSize != PEI_CD_BLOCK_SIZE)\r
+ ) {\r
+ continue;\r
+ }\r
+ DEBUG ((EFI_D_INFO, "PeiCdExpress InterfaceType is %d\n", Media2.InterfaceType));\r
+ DEBUG ((EFI_D_INFO, "PeiCdExpress MediaPresent is %d\n", Media2.MediaPresent));\r
+ DEBUG ((EFI_D_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media2.BlockSize));\r
+ } else {\r
+ Status = BlockIoPpi->GetBlockDeviceMediaInfo (\r
+ PeiServices,\r
+ BlockIoPpi,\r
+ IndexBlockDevice,\r
+ &Media\r
+ );\r
+ if (EFI_ERROR (Status) ||\r
+ !Media.MediaPresent ||\r
+ ((Media.DeviceType != IdeCDROM) && (Media.DeviceType != UsbMassStorage)) ||\r
+ (Media.BlockSize != PEI_CD_BLOCK_SIZE)\r
+ ) {\r
+ continue;\r
+ }\r
+ DEBUG ((EFI_D_INFO, "PeiCdExpress DeviceType is %d\n", Media.DeviceType));\r
+ DEBUG ((EFI_D_INFO, "PeiCdExpress MediaPresent is %d\n", Media.MediaPresent));\r
+ DEBUG ((EFI_D_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media.BlockSize));\r
}\r
\r
- DEBUG ((EFI_D_INFO, "PeiCdExpress DeviceType is %d\n", Media.DeviceType));\r
- DEBUG ((EFI_D_INFO, "PeiCdExpress MediaPresent is %d\n", Media.MediaPresent));\r
- DEBUG ((EFI_D_INFO, "PeiCdExpress BlockSize is 0x%x\n", Media.BlockSize));\r
DEBUG ((EFI_D_INFO, "PeiCdExpress Status is %d\n", Status));\r
\r
DEBUG ((EFI_D_INFO, "IndexBlockDevice is %d\n", IndexBlockDevice));\r
- PrivateData->CapsuleData[PrivateData->CapsuleCount].IndexBlock = IndexBlockDevice; \r
- PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo = BlockIoPpi;\r
+ PrivateData->CapsuleData[PrivateData->CapsuleCount].IndexBlock = IndexBlockDevice;\r
+ if (BlockIo2) {\r
+ PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo2 = BlockIo2Ppi;\r
+ } else {\r
+ PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo = BlockIoPpi;\r
+ }\r
Status = FindRecoveryCapsules (PrivateData);\r
DEBUG ((EFI_D_INFO, "Status is %d\n", Status));\r
\r
if (EFI_ERROR (Status)) {\r
continue;\r
}\r
- \r
+\r
PrivateData->CapsuleCount++;\r
}\r
\r
EFI_STATUS Status;\r
UINTN Lba;\r
EFI_PEI_RECOVERY_BLOCK_IO_PPI *BlockIoPpi;\r
+ EFI_PEI_RECOVERY_BLOCK_IO2_PPI *BlockIo2Ppi;\r
UINTN BufferSize;\r
UINT8 *Buffer;\r
UINT8 Type;\r
//\r
IndexBlockDevice = PrivateData->CapsuleData[PrivateData->CapsuleCount].IndexBlock;\r
BlockIoPpi = PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo;\r
+ BlockIo2Ppi = PrivateData->CapsuleData[PrivateData->CapsuleCount].BlockIo2;\r
\r
VolumeSpaceSize = 0;\r
StartOfVolume = TRUE;\r
\r
while (TRUE) {\r
SetMem (Buffer, BufferSize, 0);\r
- Status = BlockIoPpi->ReadBlocks (\r
- PrivateData->PeiServices,\r
- BlockIoPpi,\r
- IndexBlockDevice,\r
- Lba,\r
- BufferSize,\r
- Buffer\r
- );\r
+ if (BlockIo2Ppi != NULL) {\r
+ Status = BlockIo2Ppi->ReadBlocks (\r
+ (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
+ BlockIo2Ppi,\r
+ IndexBlockDevice,\r
+ Lba,\r
+ BufferSize,\r
+ Buffer\r
+ );\r
+ } else {\r
+ Status = BlockIoPpi->ReadBlocks (\r
+ (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
+ BlockIoPpi,\r
+ IndexBlockDevice,\r
+ Lba,\r
+ BufferSize,\r
+ Buffer\r
+ );\r
+ }\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
RoorDirRecord = (PEI_CD_EXPRESS_DIR_FILE_RECORD *) (Buffer + PEI_CD_EXPRESS_ROOT_DIR_RECORD_OFFSET);\r
RootDirLBA = RoorDirRecord->LocationOfExtent[0];\r
\r
- Status = RetrieveCapsuleFileFromRoot (PrivateData, BlockIoPpi, IndexBlockDevice, RootDirLBA);\r
+ Status = RetrieveCapsuleFileFromRoot (PrivateData, BlockIoPpi, BlockIo2Ppi, IndexBlockDevice, RootDirLBA);\r
if (!EFI_ERROR (Status)) {\r
//\r
// Just look for the first primary descriptor\r
\r
@param PrivateData The private data structure that contains recovery module information.\r
@param BlockIoPpi The Block IO PPI used to access the volume.\r
+ @param BlockIo2Ppi The Block IO 2 PPI used to access the volume.\r
@param IndexBlockDevice The index of current block device.\r
@param Lba The starting logic block address to retrieve capsule.\r
\r
@retval EFI_SUCCESS The recovery capsule is successfully found in the volume.\r
@retval EFI_NOT_FOUND The recovery capsule is not found in the volume.\r
- @retval Others \r
+ @retval Others\r
\r
**/\r
EFI_STATUS\r
RetrieveCapsuleFileFromRoot (\r
IN OUT PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData,\r
IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *BlockIoPpi,\r
+ IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *BlockIo2Ppi,\r
IN UINTN IndexBlockDevice,\r
IN UINT32 Lba\r
)\r
\r
SetMem (Buffer, BufferSize, 0);\r
\r
- Status = BlockIoPpi->ReadBlocks (\r
- PrivateData->PeiServices,\r
- BlockIoPpi,\r
- IndexBlockDevice,\r
- Lba,\r
- BufferSize,\r
- Buffer\r
- );\r
+ if (BlockIo2Ppi != NULL) {\r
+ Status = BlockIo2Ppi->ReadBlocks (\r
+ (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
+ BlockIo2Ppi,\r
+ IndexBlockDevice,\r
+ Lba,\r
+ BufferSize,\r
+ Buffer\r
+ );\r
+ } else {\r
+ Status = BlockIoPpi->ReadBlocks (\r
+ (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
+ BlockIoPpi,\r
+ IndexBlockDevice,\r
+ Lba,\r
+ BufferSize,\r
+ Buffer\r
+ );\r
+ }\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
}\r
}\r
\r
- if (Index != (sizeof (PEI_RECOVERY_FILE_NAME) - 1)) {\r
+ if (Index != mRecoveryFileNameSize - 1) {\r
Buffer += FileRecord->Length;\r
continue;\r
}\r
\r
- if (!StringCmp (FileRecord->FileID, (UINT8 *) PEI_RECOVERY_FILE_NAME, sizeof (PEI_RECOVERY_FILE_NAME) - 1, FALSE)) {\r
+ if (!StringCmp (FileRecord->FileID, (UINT8 *)mRecoveryFileName, mRecoveryFileNameSize - 1, FALSE)) {\r
Buffer += FileRecord->Length;\r
continue;\r
}\r
\r
PrivateData->CapsuleData[PrivateData->CapsuleCount].CapsuleStartLBA = FileRecord->LocationOfExtent[0];\r
- PrivateData->CapsuleData[PrivateData->CapsuleCount].CapsuleSize =\r
+ PrivateData->CapsuleData[PrivateData->CapsuleCount].CapsuleBlockAlignedSize =\r
(\r
FileRecord->DataLength[0] /\r
PEI_CD_BLOCK_SIZE +\r
1\r
) *\r
PEI_CD_BLOCK_SIZE;\r
+ PrivateData->CapsuleData[PrivateData->CapsuleCount].CapsuleSize = FileRecord->DataLength[0];\r
\r
return EFI_SUCCESS;\r
}\r
Returns the number of DXE capsules residing on the device.\r
\r
This function searches for DXE capsules from the associated device and returns\r
- the number and maximum size in bytes of the capsules discovered. Entry 1 is \r
- assumed to be the highest load priority and entry N is assumed to be the lowest \r
+ the number and maximum size in bytes of the capsules discovered. Entry 1 is\r
+ assumed to be the highest load priority and entry N is assumed to be the lowest\r
priority.\r
\r
- @param[in] PeiServices General-purpose services that are available \r
+ @param[in] PeiServices General-purpose services that are available\r
to every PEIM\r
@param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
instance.\r
- @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On \r
- output, *NumberRecoveryCapsules contains \r
- the number of recovery capsule images \r
- available for retrieval from this PEIM \r
+ @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On\r
+ output, *NumberRecoveryCapsules contains\r
+ the number of recovery capsule images\r
+ available for retrieval from this PEIM\r
instance.\r
\r
@retval EFI_SUCCESS One or more capsules were discovered.\r
PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData;\r
\r
PrivateData = PEI_CD_EXPRESS_PRIVATE_DATA_FROM_THIS (This);\r
- UpdateBlocksAndVolumes (PrivateData);\r
+ UpdateBlocksAndVolumes (PrivateData, TRUE);\r
+ UpdateBlocksAndVolumes (PrivateData, FALSE);\r
*NumberRecoveryCapsules = PrivateData->CapsuleCount;\r
\r
if (*NumberRecoveryCapsules == 0) {\r
This function gets the size and type of the capsule specified by CapsuleInstance.\r
\r
@param[in] PeiServices General-purpose services that are available to every PEIM\r
- @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI \r
+ @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
instance.\r
- @param[in] CapsuleInstance Specifies for which capsule instance to retrieve \r
- the information. This parameter must be between \r
- one and the value returned by GetNumberRecoveryCapsules() \r
+ @param[in] CapsuleInstance Specifies for which capsule instance to retrieve\r
+ the information. This parameter must be between\r
+ one and the value returned by GetNumberRecoveryCapsules()\r
in NumberRecoveryCapsules.\r
- @param[out] Size A pointer to a caller-allocated UINTN in which \r
- the size of the requested recovery module is \r
+ @param[out] Size A pointer to a caller-allocated UINTN in which\r
+ the size of the requested recovery module is\r
returned.\r
- @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which \r
- the type of the requested recovery capsule is \r
- returned. The semantic meaning of the value \r
+ @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which\r
+ the type of the requested recovery capsule is\r
+ returned. The semantic meaning of the value\r
returned is defined by the implementation.\r
\r
@retval EFI_SUCCESS One or more capsules were discovered.\r
This function, by whatever mechanism, retrieves a DXE capsule from some device\r
and loads it into memory. Note that the published interface is device neutral.\r
\r
- @param[in] PeiServices General-purpose services that are available \r
+ @param[in] PeiServices General-purpose services that are available\r
to every PEIM\r
@param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI\r
instance.\r
@param[in] CapsuleInstance Specifies which capsule instance to retrieve.\r
- @param[out] Buffer Specifies a caller-allocated buffer in which \r
+ @param[out] Buffer Specifies a caller-allocated buffer in which\r
the requested recovery capsule will be returned.\r
\r
@retval EFI_SUCCESS The capsule was loaded correctly.\r
EFI_STATUS Status;\r
PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData;\r
EFI_PEI_RECOVERY_BLOCK_IO_PPI *BlockIoPpi;\r
+ EFI_PEI_RECOVERY_BLOCK_IO2_PPI *BlockIo2Ppi;\r
UINTN NumberRecoveryCapsules;\r
\r
Status = GetNumberRecoveryCapsules (PeiServices, This, &NumberRecoveryCapsules);\r
\r
PrivateData = PEI_CD_EXPRESS_PRIVATE_DATA_FROM_THIS (This);\r
BlockIoPpi = PrivateData->CapsuleData[CapsuleInstance - 1].BlockIo;\r
+ BlockIo2Ppi = PrivateData->CapsuleData[CapsuleInstance - 1].BlockIo2;\r
\r
- Status = BlockIoPpi->ReadBlocks (\r
- PrivateData->PeiServices,\r
- BlockIoPpi,\r
- PrivateData->CapsuleData[CapsuleInstance - 1].IndexBlock,\r
- PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleStartLBA,\r
- PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleSize,\r
- Buffer\r
- );\r
+ if (BlockIo2Ppi != NULL) {\r
+ Status = BlockIo2Ppi->ReadBlocks (\r
+ PeiServices,\r
+ BlockIo2Ppi,\r
+ PrivateData->CapsuleData[CapsuleInstance - 1].IndexBlock,\r
+ PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleStartLBA,\r
+ PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleBlockAlignedSize,\r
+ Buffer\r
+ );\r
+ } else {\r
+ Status = BlockIoPpi->ReadBlocks (\r
+ PeiServices,\r
+ BlockIoPpi,\r
+ PrivateData->CapsuleData[CapsuleInstance - 1].IndexBlock,\r
+ PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleStartLBA,\r
+ PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleBlockAlignedSize,\r
+ Buffer\r
+ );\r
+ }\r
return Status;\r
}\r
\r