UINTN Index;\r
UINTN StartIndex;\r
CHAR8 EfiFileName[256];\r
-\r
- DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading driver at 0x%10p EntryPoint=0x%10p ", (VOID *)(UINTN)Image->ImageContext.ImageAddress, (VOID *)(UINTN)Image->ImageContext.EntryPoint));\r
+ \r
+ if (Image->ImageContext.Machine != IMAGE_FILE_MACHINE_IA64) {\r
+ DEBUG ((EFI_D_INFO | EFI_D_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 ((EFI_D_INFO | EFI_D_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
+ //\r
+ // Print Module Name by Pdb file path\r
+ //\r
if (Image->ImageContext.PdbPointer != NULL) {\r
StartIndex = 0;\r
for (Index = 0; Image->ImageContext.PdbPointer[Index] != 0; Index++) {\r
EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_CORE_PC_HANDOFF_TO_NEXT\r
);\r
\r
+ DEBUG_CODE_BEGIN ();\r
+\r
+ EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION PtrPeImage;\r
+ PtrPeImage.Pe32 = (EFI_IMAGE_NT_HEADERS32 *) ((UINTN) DxeCoreAddress + ((EFI_IMAGE_DOS_HEADER *) (UINTN) DxeCoreAddress)->e_lfanew);\r
+ \r
+ if (PtrPeImage.Pe32->FileHeader.Machine != IMAGE_FILE_MACHINE_IA64) {\r
+ DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading DXE CORE at 0x%08x EntryPoint=0x%08x\n", (UINTN) DxeCoreAddress, (UINTN) DxeCoreEntryPoint));\r
+ } else {\r
+ //\r
+ // For IPF Image, the real entry point should be print.\r
+ //\r
+ DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading DXE CORE at 0x%08x EntryPoint=0x%08x\n", (UINTN) DxeCoreAddress, (UINTN) (*(UINT64 *)(UINTN)DxeCoreEntryPoint)));\r
+ }\r
+\r
+ DEBUG_CODE_END ();\r
//\r
// Transfer control to the DXE Core\r
// The handoff state is simply a pointer to the HOB list\r
//\r
- DEBUG ((EFI_D_INFO, "DXE Core Entry Point 0x%08x\n", (UINTN) DxeCoreEntryPoint));\r
HandOffToDxeCore (DxeCoreEntryPoint, HobList, &mPpiSignal);\r
//\r
// If we get here, then the DXE Core returned. This is an error\r
FileOccupiedSize = GET_OCCUPIED_SIZE (FileLength, 8);\r
FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)*FileHeader + FileOccupiedSize);\r
}\r
-\r
+ \r
FileOffset = (UINT32) ((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);\r
ASSERT (FileOffset <= 0xFFFFFFFF);\r
- \r
+\r
while (FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) {\r
//\r
// Get FileState which is the highest bit of the State \r
case EFI_FILE_MARKED_FOR_UPDATE:\r
if (CalculateHeaderChecksum (FfsFileHeader) != 0) {\r
ASSERT (FALSE);\r
+ *FileHeader = NULL;\r
return EFI_NOT_FOUND;\r
}\r
\r
break;\r
\r
default:\r
+ *FileHeader = NULL;\r
return EFI_NOT_FOUND;\r
-\r
} \r
}\r
-\r
+ \r
+ *FileHeader = NULL;\r
return EFI_NOT_FOUND; \r
}\r
\r
*ImageSizeArg = ImageSize;\r
}\r
\r
- //\r
- // Print debug message: Loading PEIM at 0x12345678 EntryPoint=0x12345688 Driver.efi\r
- //\r
- DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading PEIM at 0x%08x EntryPoint=0x%08x ", (UINTN) ImageAddress, *EntryPoint));\r
DEBUG_CODE_BEGIN ();\r
CHAR8 *AsciiString;\r
CHAR8 AsciiBuffer[512];\r
INT32 Index;\r
INT32 Index1;\r
+\r
+ //\r
+ // Print debug message: Loading PEIM at 0x12345678 EntryPoint=0x12345688 Driver.efi\r
+ //\r
+ if (Machine != IMAGE_FILE_MACHINE_IA64) {\r
+ DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading PEIM at 0x%08x EntryPoint=0x%08x ", (UINTN) ImageAddress, *EntryPoint));\r
+ } else {\r
+ //\r
+ // For IPF Image, the real entry point should be print.\r
+ //\r
+ DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading PEIM at 0x%08x EntryPoint=0x%08x ", (UINTN) ImageAddress, (UINTN) (*(UINT64 *)(UINTN)*EntryPoint)));\r
+ }\r
\r
+ //\r
+ // Print Module Name by PeImage PDB file name.\r
+ //\r
AsciiString = PeCoffLoaderGetPdbPointer (Pe32Data);\r
\r
if (AsciiString != NULL) {\r