summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/GenFv
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-23 11:46:50 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-23 11:46:50 +0000
commit79714906ae765f161969dfddc34adee857be97d6 (patch)
treeedfd2444a65e6abf6964368cafbbba170de48bf7 /BaseTools/Source/C/GenFv
parentfc5de6be8b50a00b55cb0fdc310f02c057866e01 (diff)
downloadedk2-79714906ae765f161969dfddc34adee857be97d6.tar.gz
edk2-79714906ae765f161969dfddc34adee857be97d6.tar.bz2
edk2-79714906ae765f161969dfddc34adee857be97d6.zip
Sync EDKII BaseTools to BaseTools project r1940
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10307 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/GenFv')
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 00d008573a..7368bbbf9c 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -677,7 +677,7 @@ EFI_STATUS
WriteMapFile (
IN OUT FILE *FvMapFile,
IN CHAR8 *FileName,
- IN EFI_GUID *FileGuidPtr,
+ IN EFI_FFS_FILE_HEADER *FfsFile,
IN EFI_PHYSICAL_ADDRESS ImageBaseAddress,
IN PE_COFF_LOADER_IMAGE_CONTEXT *pImageContext
)
@@ -692,7 +692,7 @@ Arguments:
FvMapFile A pointer to FvMap File
FileName Ffs File PathName
- FileGuidPtr Guid Value of Ffs file
+ FfsFile A pointer to Ffs file image.
ImageBaseAddress PeImage Base Address.
pImageContext Image Context Information.
@@ -723,7 +723,6 @@ Returns:
UINT32 DataVirtualAddress;
EFI_PHYSICAL_ADDRESS LinkTimeBaseAddress;
-
//
// Init local variable
//
@@ -731,7 +730,7 @@ Returns:
//
// Print FileGuid to string buffer.
//
- PrintGuidToBuffer (FileGuidPtr, (UINT8 *)FileGuidName, MAX_LINE_LEN, TRUE);
+ PrintGuidToBuffer (&FfsFile->Name, (UINT8 *)FileGuidName, MAX_LINE_LEN, TRUE);
//
// Construct Map file Name
@@ -808,7 +807,12 @@ Returns:
fprintf (FvMapFile, "%s (Fixed Flash Address, ", KeyWord);
fprintf (FvMapFile, "BaseAddress=0x%010llx, ", (unsigned long long) (ImageBaseAddress + Offset));
}
- fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
+
+ if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE && pImageContext->Machine == EFI_IMAGE_MACHINE_IA64) {
+ fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (*(UINT64 *)((UINTN) pImageContext->Handle + (UINTN) AddressOfEntryPoint)));
+ } else {
+ fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
+ }
fprintf (FvMapFile, ")\n");
fprintf (FvMapFile, "(GUID=%s", FileGuidName);
@@ -3094,7 +3098,7 @@ Returns:
PdbPointer = FileName;
}
- WriteMapFile (FvMapFile, PdbPointer, (EFI_GUID *) FfsFile, NewPe32BaseAddress, &OrigImageContext);
+ WriteMapFile (FvMapFile, PdbPointer, FfsFile, NewPe32BaseAddress, &OrigImageContext);
}
if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE &&
@@ -3320,7 +3324,7 @@ Returns:
WriteMapFile (
FvMapFile,
PdbPointer,
- (EFI_GUID *) FfsFile,
+ FfsFile,
NewPe32BaseAddress,
&OrigImageContext
);