]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Image/Image.c
Code scrub for DxeCore
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Image / Image.c
index b4a1581f1f79b1c6bb1dfdc3a89256aaf91e7bf4..0c4baae2f7e565e10a6ee6a6a80e452534942bfd 100644 (file)
@@ -416,8 +416,8 @@ CoreLoadPeImage (
     Status = Image->Ebc->CreateThunk (\r
                            Image->Ebc,\r
                            Image->Handle,\r
-                           (VOID *)(UINTN)Image->ImageContext.EntryPoint,\r
-                           (VOID **)&Image->EntryPoint\r
+                           (VOID *)(UINTN) Image->ImageContext.EntryPoint,\r
+                           (VOID **) &Image->EntryPoint\r
                            );\r
     if (EFI_ERROR(Status)) {\r
       goto Done;\r
@@ -466,20 +466,12 @@ CoreLoadPeImage (
     UINTN StartIndex;\r
     CHAR8 EfiFileName[256];\r
 \r
-    if (Image->ImageContext.Machine != IMAGE_FILE_MACHINE_IA64) {\r
-      DEBUG ((DEBUG_INFO | DEBUG_LOAD,\r
-              "Loading driver at 0x%10p EntryPoint=0x%10p ",\r
-              (VOID *)(UINTN)Image->ImageContext.ImageAddress,\r
-              (VOID *)(UINTN)Image->ImageContext.EntryPoint));\r
-    } else {\r
-      //\r
-      // For IPF Image, the real entry point should be print.\r
-      //\r
-      DEBUG ((DEBUG_INFO | DEBUG_LOAD,\r
-              "Loading driver at 0x%10p EntryPoint=0x%10p ",\r
-              (VOID *)(UINTN)Image->ImageContext.ImageAddress,\r
-              (VOID *)(UINTN)(*(UINT64 *)(UINTN)Image->ImageContext.EntryPoint)));\r
-    }\r
+    \r
+    DEBUG ((DEBUG_INFO | DEBUG_LOAD,\r
+           "Loading driver at 0x%10p EntryPoint=0x%10p ",\r
+           (VOID *)(UINTN) Image->ImageContext.ImageAddress,\r
+           FUNCTION_ENTRY_POINT ((UINTN) Image->ImageContext.EntryPoint)));\r
+   \r
 \r
     //\r
     // Print Module Name by Pdb file path\r
@@ -559,7 +551,7 @@ CoreLoadedImageInfo (
   if (!EFI_ERROR (Status)) {\r
     Image = LOADED_IMAGE_PRIVATE_DATA_FROM_THIS (LoadedImage);\r
   } else {\r
-    DEBUG ((DEBUG_LOAD, "CoreLoadedImageInfo: Not an ImageHandle %x\n", ImageHandle));\r
+    DEBUG ((DEBUG_LOAD, "CoreLoadedImageInfo: Not an ImageHandle %p\n", ImageHandle));\r
     Image = NULL;\r
   }\r
 \r
@@ -698,7 +690,7 @@ CoreLoadImageCommon (
   Status = CoreHandleProtocol (DeviceHandle, &gEfiDevicePathProtocolGuid, (VOID **)&HandleFilePath);\r
   if (!EFI_ERROR (Status)) {\r
     FilePathSize = CoreDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
-    FilePath = (EFI_DEVICE_PATH_PROTOCOL *) ( ((UINT8 *)FilePath) + FilePathSize );\r
+    FilePath = (EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *)FilePath) + FilePathSize );\r
   }\r
 \r
   //\r
@@ -1061,12 +1053,7 @@ CoreStartImage (
   DEBUG_CODE_BEGIN ();\r
     if (Image->ExitDataSize != 0 || Image->ExitData != NULL) {\r
 \r
-      DEBUG (\r
-        (DEBUG_LOAD,\r
-        "StartImage: ExitDataSize %d, ExitData %x",\r
-                            Image->ExitDataSize,\r
-        Image->ExitData)\r
-        );\r
+      DEBUG ((DEBUG_LOAD, "StartImage: ExitDataSize %d, ExitData %x", Image->ExitDataSize, Image->ExitData));\r
       if (Image->ExitData != NULL) {\r
         DEBUG ((DEBUG_LOAD, " (%hs)", Image->ExitData));\r
       }\r