MdeModulePkg CdExpressPei: Use correct PeiServices pointer to call low level BlockIoP...
[mirror_edk2.git] / MdeModulePkg / Universal / Disk / CdExpressPei / PeiCdExpress.c
index ee0b4e6..dccb460 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Source file for CD recovery PEIM\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, 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
@@ -259,7 +259,7 @@ FindRecoveryCapsules (
   while (TRUE) {\r
     SetMem (Buffer, BufferSize, 0);\r
     Status = BlockIoPpi->ReadBlocks (\r
-                          PrivateData->PeiServices,\r
+                          (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
                           BlockIoPpi,\r
                           IndexBlockDevice,\r
                           Lba,\r
@@ -350,7 +350,7 @@ RetrieveCapsuleFileFromRoot (
   SetMem (Buffer, BufferSize, 0);\r
 \r
   Status = BlockIoPpi->ReadBlocks (\r
-                        PrivateData->PeiServices,\r
+                        (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
                         BlockIoPpi,\r
                         IndexBlockDevice,\r
                         Lba,\r
@@ -566,7 +566,7 @@ LoadRecoveryCapsule (
   BlockIoPpi  = PrivateData->CapsuleData[CapsuleInstance - 1].BlockIo;\r
 \r
   Status = BlockIoPpi->ReadBlocks (\r
-                        PrivateData->PeiServices,\r
+                        PeiServices,\r
                         BlockIoPpi,\r
                         PrivateData->CapsuleData[CapsuleInstance - 1].IndexBlock,\r
                         PrivateData->CapsuleData[CapsuleInstance - 1].CapsuleStartLBA,\r