]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update DXE Core so its own PE/COFF image is passed to the PeCoffExtraActionLib
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Aug 2010 05:20:15 +0000 (05:20 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Aug 2010 05:20:15 +0000 (05:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10769 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/DxeMain.h
MdeModulePkg/Core/Dxe/DxeMain.inf
MdeModulePkg/Core/Dxe/Image/Image.c

index 4ebce1de1264f1de9c3ae37c5b34eba68a3bfdeb..56b91b0c11e10d72d0f9b424af7be70a13de7b33 100644 (file)
@@ -74,6 +74,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/CacheMaintenanceLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/PeCoffLib.h>\r
+#include <Library/PeCoffGetEntryPointLib.h>\r
+#include <Library/PeCoffExtraActionLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/DevicePathLib.h>\r
index 1db57d5a253f01d53c88313dc7b5226992e78965..52a47f9f8c9d950208203de891a8c6a97aea744f 100644 (file)
@@ -82,6 +82,8 @@
   DebugLib\r
   DxeCoreEntryPoint\r
   PeCoffLib\r
+  PeCoffGetEntryPointLib\r
+  PeCoffExtraActionLib\r
   ExtractGuidedSectionLib\r
   MemoryAllocationLib\r
   UefiBootServicesTableLib\r
index 1bf799ea2d3a0139cdc2e3886ce9e2875a58fcfe..eadcae488c3242e24c13a47632b7c214c3b5fb38 100644 (file)
@@ -97,6 +97,8 @@ CoreInitializeImageServices (
   UINT64                            DxeCoreImageLength;\r
   VOID                              *DxeCoreEntryPoint;\r
   EFI_PEI_HOB_POINTERS              DxeCoreHob;\r
+  PE_COFF_LOADER_IMAGE_CONTEXT      ImageContext;\r
\r
   //\r
   // Searching for image hob\r
   //\r
@@ -116,6 +118,14 @@ CoreInitializeImageServices (
   DxeCoreImageLength      = DxeCoreHob.MemoryAllocationModule->MemoryAllocationHeader.MemoryLength;\r
   DxeCoreEntryPoint       = (VOID *) (UINTN) DxeCoreHob.MemoryAllocationModule->EntryPoint;\r
   gDxeCoreFileName        = &DxeCoreHob.MemoryAllocationModule->ModuleName;\r
+  \r
+  //\r
+  // Report DXE Core image information to the PE/COFF Extra Action Library\r
+  //\r
+  ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)DxeCoreImageBaseAddress;\r
+  ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageContext.ImageAddress);\r
+  PeCoffLoaderRelocateImageExtraAction (&ImageContext);\r
+\r
   //\r
   // Initialize the fields for an internal driver\r
   //\r