summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-28 08:14:30 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-28 08:14:30 +0000
commit3d7b0992fccc89cc049de91d02b4869ec81cf9fb (patch)
treee3731a47419ab758cb9c5d37137d0ab169dc82be /MdeModulePkg/Core/Dxe
parent64253026df2cc1538eb05c9dc2a5403e54ae1af2 (diff)
downloadedk2-platforms-3d7b0992fccc89cc049de91d02b4869ec81cf9fb.tar.xz
1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain.
2. Add three PeCoff library instances for NT32 PeImage load. 3. Update PeCoffGetEntryPointLib to support TeImage. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3965 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.h1
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.inf2
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c4
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c8
4 files changed, 6 insertions, 9 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index c5c4f34c49..ed531f7bcc 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -82,6 +82,7 @@ Revision History
#include <Library/PeCoffLoaderLib.h>
#include <Library/CacheMaintenanceLib.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/PeCoffLib.h>
#include "DebugImageInfo.h"
#include "Library.h"
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf
index 3b8519b6db..9d6ecd0fba 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.inf
+++ b/MdeModulePkg/Core/Dxe/DxeMain.inf
@@ -78,7 +78,6 @@
[LibraryClasses]
BaseMemoryLib
CacheMaintenanceLib
- PeCoffLoaderLib
UefiDecompressLib
CustomDecompressLib
PerformanceLib
@@ -87,6 +86,7 @@
UefiLib
DebugLib
DxeCoreEntryPoint
+ PeCoffLib
[Guids]
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 26bc94c13f..53f1d5f594 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -25,7 +25,6 @@ Abstract:
// DXE Core Global Variables for Protocols from PEI
//
EFI_HANDLE mDecompressHandle = NULL;
-EFI_PEI_PE_COFF_LOADER_PROTOCOL *gEfiPeiPeCoffLoader = NULL;
//
// DXE Core globals for Architecture Protocols
@@ -370,9 +369,6 @@ Returns:
);
ASSERT_EFI_ERROR (Status);
- gEfiPeiPeCoffLoader = GetPeCoffLoaderProtocol ();
- ASSERT (gEfiPeiPeCoffLoader != NULL);
-
//
// Register for the GUIDs of the Architectural Protocols, so the rest of the
// EFI Boot Services and EFI Runtime Services tables can be filled in.
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index e227f3a6bf..9232cabcef 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -213,7 +213,7 @@ Returns:
//
// Get information about the image being loaded
//
- Status = gEfiPeiPeCoffLoader->GetImageInfo (gEfiPeiPeCoffLoader, &Image->ImageContext);
+ Status = PeCoffLoaderGetImageInfo (&Image->ImageContext);
if (EFI_ERROR (Status)) {
return Status;
}
@@ -305,7 +305,7 @@ Returns:
//
// Load the image from the file into the allocated memory
//
- Status = gEfiPeiPeCoffLoader->LoadImage (gEfiPeiPeCoffLoader, &Image->ImageContext);
+ Status = PeCoffLoaderLoadImage (&Image->ImageContext);
if (EFI_ERROR (Status)) {
goto Done;
}
@@ -328,7 +328,7 @@ Returns:
//
// Relocate the image in memory
//
- Status = gEfiPeiPeCoffLoader->RelocateImage (gEfiPeiPeCoffLoader, &Image->ImageContext);
+ Status = PeCoffLoaderRelocateImage (&Image->ImageContext);
if (EFI_ERROR (Status)) {
goto Done;
}
@@ -1085,7 +1085,7 @@ Returns:
//
// Unload image, free Image->ImageContext->ModHandle
//
- gEfiPeiPeCoffLoader->UnloadImage (gEfiPeiPeCoffLoader, &Image->ImageContext);
+ PeCoffLoaderUnloadImage (&Image->ImageContext);
//
// Free our references to the image handle