diff options
author | Feng Tian <feng.tian@intel.com> | 2015-05-20 05:57:50 +0000 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2016-04-06 23:22:43 -0700 |
commit | 8a467be153517b5338fb5bfdcbdbe0931b198854 (patch) | |
tree | dab2acadf2efa51809909535b4750d36da291020 /FatPkg/FatPei/FatLiteLib.c | |
parent | 55248f85d180b0bbb0409638cc28e28a053123bd (diff) | |
download | edk2-8a467be153517b5338fb5bfdcbdbe0931b198854.tar.gz edk2-8a467be153517b5338fb5bfdcbdbe0931b198854.tar.bz2 edk2-8a467be153517b5338fb5bfdcbdbe0931b198854.zip |
FatPkg: Add RecoveryBlockIo2Ppi support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(based on FatPkg commit add52adf722d2b0f1db4c8780a30289dacd59e02)
[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg/FatPei/FatLiteLib.c')
-rw-r--r-- | FatPkg/FatPei/FatLiteLib.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/FatPkg/FatPei/FatLiteLib.c b/FatPkg/FatPei/FatLiteLib.c index 06f031defe..109789a54b 100644 --- a/FatPkg/FatPei/FatLiteLib.c +++ b/FatPkg/FatPei/FatLiteLib.c @@ -1,7 +1,7 @@ /** @file
General purpose supporting routines for FAT recovery PEIM
-Copyright (c) 2006 - 2013, 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 of the BSD License which accompanies this
@@ -87,7 +87,17 @@ FatReadBlock ( // Status = BlockDev->ReadFunc
// (PrivateData->PeiServices, BlockDev->PhysicalDevNo, Lba, BufferSize, Buffer);
//
- Status = BlockDev->BlockIo->ReadBlocks (
+ if (BlockDev->BlockIo2 != NULL) {
+ Status = BlockDev->BlockIo2->ReadBlocks (
+ (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),
+ BlockDev->BlockIo2,
+ BlockDev->PhysicalDevNo,
+ Lba,
+ BufferSize,
+ Buffer
+ );
+ } else {
+ Status = BlockDev->BlockIo->ReadBlocks (
(EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),
BlockDev->BlockIo,
BlockDev->PhysicalDevNo,
@@ -95,6 +105,7 @@ FatReadBlock ( BufferSize,
Buffer
);
+ }
} else {
Status = FatReadDisk (
|