MdeModulePkg/CdExpressPei: Add RecoveryBlockIo2Ppi support

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17481 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Feng Tian
2015-05-20 06:32:03 +00:00
committed by erictian
parent 3fe5862f00
commit f9964c8019
3 changed files with 173 additions and 66 deletions

View File

@@ -1,7 +1,7 @@
/** @file
Header file for CD recovery PEIM
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <PiPei.h>
#include <Ppi/BlockIo.h>
#include <Ppi/BlockIo2.h>
#include <Guid/RecoveryDevice.h>
#include <Ppi/DeviceRecoveryModule.h>
@@ -67,6 +68,7 @@ typedef struct {
UINTN CapsuleSize;
UINTN IndexBlock;
EFI_PEI_RECOVERY_BLOCK_IO_PPI *BlockIo;
EFI_PEI_RECOVERY_BLOCK_IO2_PPI *BlockIo2;
} PEI_CD_EXPRESS_CAPSULE_DATA;
#define PEI_CD_EXPRESS_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('p', 'c', 'd', 'e')
@@ -77,6 +79,7 @@ typedef struct {
EFI_PEI_DEVICE_RECOVERY_MODULE_PPI DeviceRecoveryPpi;
EFI_PEI_PPI_DESCRIPTOR PpiDescriptor;
EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor;
EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor2;
UINT8 *BlockBuffer;
UINTN CapsuleCount;
@@ -130,13 +133,15 @@ BlockIoNotifyEntry (
Finds out all the current Block IO PPIs in the system and add them into private data.
@param PrivateData The private data structure that contains recovery module information.
@param BlockIo2 Boolean to show whether using BlockIo2 or BlockIo.
@retval EFI_SUCCESS The blocks and volumes are updated successfully.
**/
EFI_STATUS
UpdateBlocksAndVolumes (
IN OUT PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData
IN OUT PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData,
IN BOOLEAN BlockIo2
);
/**
@@ -253,6 +258,7 @@ FindRecoveryCapsules (
@param PrivateData The private data structure that contains recovery module information.
@param BlockIoPpi The Block IO PPI used to access the volume.
@param BlockIo2Ppi The Block IO 2 PPI used to access the volume.
@param IndexBlockDevice The index of current block device.
@param Lba The starting logic block address to retrieve capsule.
@@ -266,6 +272,7 @@ EFIAPI
RetrieveCapsuleFileFromRoot (
IN OUT PEI_CD_EXPRESS_PRIVATE_DATA *PrivateData,
IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *BlockIoPpi,
IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *BlockIo2Ppi,
IN UINTN IndexBlockDevice,
IN UINT32 Lba
);