]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain.
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / DxeLoad.c
index a81475484f60e506032eee84c56860e3d688a819..cb13a7d4b08564b7318cc3ddf4bdf1cdc391f99c 100644 (file)
@@ -174,7 +174,6 @@ DxeLoadCore (
   EFI_PHYSICAL_ADDRESS                      DxeCoreAddress;\r
   UINT64                                    DxeCoreSize;\r
   EFI_PHYSICAL_ADDRESS                      DxeCoreEntryPoint;\r
-  EFI_PEI_PE_COFF_LOADER_PROTOCOL           *PeiEfiPeiPeCoffLoader;\r
   EFI_BOOT_MODE                             BootMode;\r
   EFI_PEI_FV_HANDLE                         VolumeHandle;\r
   EFI_PEI_FILE_HANDLE                       FileHandle;\r
@@ -200,12 +199,6 @@ DxeLoadCore (
     // Now should have a HOB with the DXE core w/ the old HOB destroyed\r
     //\r
   }\r
-\r
-  //\r
-  // Install the PEI Protocols that are shared between PEI and DXE\r
-  //\r
-  PeiEfiPeiPeCoffLoader = (EFI_PEI_PE_COFF_LOADER_PROTOCOL *) GetPeCoffLoaderProtocol ();\r
-  ASSERT (PeiEfiPeiPeCoffLoader != NULL);\r
   \r
   //\r
   // If any FV contains an encapsulated FV extract that FV\r
@@ -244,14 +237,6 @@ DxeLoadCore (
     );\r
 \r
   //\r
-  // Add HOB for the PE/COFF Loader Protocol\r
-  //\r
-  BuildGuidDataHob (\r
-    &gEfiPeiPeCoffLoaderGuid,\r
-    (VOID *)&PeiEfiPeiPeCoffLoader,\r
-    sizeof (VOID *)\r
-    );\r
-  //\r
   // Report Status Code EFI_SW_PEI_PC_HANDOFF_TO_NEXT\r
   //\r
   REPORT_STATUS_CODE (\r
@@ -456,9 +441,6 @@ PeiLoadFile (
   EFI_STATUS                        Status;\r
   PE_COFF_LOADER_IMAGE_CONTEXT      ImageContext;\r
   VOID                              *Pe32Data;\r
-  EFI_PEI_PE_COFF_LOADER_PROTOCOL   *PeiEfiPeiPeCoffLoader;\r
-\r
-  PeiEfiPeiPeCoffLoader = (EFI_PEI_PE_COFF_LOADER_PROTOCOL *)GetPeCoffLoaderProtocol ();\r
   //\r
   // First try to find the required section in this ffs file.\r
   //\r
@@ -489,7 +471,7 @@ PeiLoadFile (
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  Status = PeiEfiPeiPeCoffLoader->GetImageInfo (PeiEfiPeiPeCoffLoader, &ImageContext);\r
+  Status = PeCoffLoaderGetImageInfo (&ImageContext);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
@@ -502,14 +484,14 @@ PeiLoadFile (
   //\r
   // Load the image to our new buffer\r
   //\r
-  Status = PeiEfiPeiPeCoffLoader->LoadImage (PeiEfiPeiPeCoffLoader, &ImageContext);\r
+  Status = PeCoffLoaderLoadImage (&ImageContext);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   //\r
   // Relocate the image in our new buffer\r
   //\r
-  Status = PeiEfiPeiPeCoffLoader->RelocateImage (PeiEfiPeiPeCoffLoader, &ImageContext);\r
+  Status = PeCoffLoaderRelocateImage (&ImageContext);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r