Sync basetools' source and binary files with r1707 of the basetools project.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2009-09-11 03:14:43 +00:00
parent f22911b49e
commit fd171542e0
91 changed files with 1794 additions and 974 deletions

View File

@ -88,8 +88,8 @@ Returns:
// If dumping an image, then do that and quit
//
if (mOptions.DumpOption == 1) {
for (FList = mOptions.FileList; FList != NULL; FList = FList->Next) {
if ((Ptr0 = strstr ((CONST CHAR8 *)FList->FileName, DEFAULT_OUTPUT_EXTENSION)) != NULL) {
if (mOptions.FileList != NULL) {
if ((Ptr0 = strstr ((CONST CHAR8 *) mOptions.FileList->FileName, DEFAULT_OUTPUT_EXTENSION)) != NULL) {
DumpImage (mOptions.FileList);
goto BailOut;
} else {
@ -163,7 +163,7 @@ Returns:
}
if (mOptions.Verbose) {
VerboseMsg(" Output size = 0x%X\n", Size);
VerboseMsg(" Output size = 0x%X\n", (unsigned) Size);
}
if (Status != STATUS_SUCCESS) {
@ -238,7 +238,8 @@ Returns:
UINT32 Index;
UINT8 ByteCheckSum;
PciDs23 = NULL;
PciDs30 = NULL;
Status = STATUS_SUCCESS;
//
@ -255,7 +256,7 @@ Returns:
fseek (InFptr, 0, SEEK_END);
FileSize = ftell (InFptr);
if (mOptions.Verbose) {
VerboseMsg(" File size = 0x%X\n", FileSize);
VerboseMsg(" File size = 0x%X\n", (unsigned) FileSize);
}
fseek (InFptr, 0, SEEK_SET);
@ -365,7 +366,7 @@ Returns:
Buffer[FileSize - 1] = (UINT8) ((~ByteCheckSum) + 1);
if (mOptions.Verbose) {
VerboseMsg(" Checksum = %02x\n\n", (UINT32) Buffer[FileSize - 1]);
VerboseMsg(" Checksum = %02x\n\n", Buffer[FileSize - 1]);
}
//
@ -495,7 +496,7 @@ Returns:
}
if (mOptions.Verbose) {
VerboseMsg(" File size = 0x%X\n", FileSize);
VerboseMsg(" File size = 0x%X\n", (unsigned) FileSize);
}
//
// Allocate memory for the entire file (in case we have to compress), then
@ -540,7 +541,7 @@ Returns:
// Now compute the size, then swap buffer pointers.
//
if (mOptions.Verbose) {
VerboseMsg(" Comp size = 0x%X\n", CompressedFileSize);
VerboseMsg(" Comp size = 0x%X\n", (unsigned) CompressedFileSize);
}
TotalSize = CompressedFileSize + HeaderSize;
@ -820,7 +821,7 @@ Returns:
}
if (mOptions.Verbose) {
VerboseMsg(" Got subsystem = 0x%X from image\n", (int) *SubSystem);
VerboseMsg(" Got subsystem = 0x%X from image\n", *SubSystem);
}
//
@ -999,7 +1000,7 @@ Returns:
return 1;
}
if (DebugLevel > 9) {
Error (NULL, 0, 2000, "Invalid option value", "Debug Level range is 0-9, currnt input level is %d", Argv[1]);
Error (NULL, 0, 2000, "Invalid option value", "Debug Level range is 0-9, current input level is %d", Argv[1]);
return 1;
}
if (DebugLevel>=5 && DebugLevel<=9) {
@ -1301,10 +1302,10 @@ Returns:
//
// Dump the contents of the header
//
fprintf (stdout, "Image %d -- Offset 0x%X\n", ImageCount, ImageStart);
fprintf (stdout, "Image %u -- Offset 0x%X\n", (unsigned) ImageCount, (unsigned) ImageStart);
fprintf (stdout, " ROM header contents\n");
fprintf (stdout, " Signature 0x%04X\n", (UINT32) PciRomHdr.Signature);
fprintf (stdout, " PCIR offset 0x%04X\n", (UINT32) PciRomHdr.PcirOffset);
fprintf (stdout, " Signature 0x%04X\n", PciRomHdr.Signature);
fprintf (stdout, " PCIR offset 0x%04X\n", PciRomHdr.PcirOffset);
//
// Find PCI data structure
//
@ -1349,11 +1350,11 @@ Returns:
fprintf (
stdout,
" Class Code 0x%06X\n",
(UINT32) (PciDs23.ClassCode[0] | (PciDs23.ClassCode[1] << 8) | (PciDs23.ClassCode[2] << 16))
(unsigned) (PciDs23.ClassCode[0] | (PciDs23.ClassCode[1] << 8) | (PciDs23.ClassCode[2] << 16))
);
fprintf (stdout, " Image size 0x%X\n", PciDs23.ImageLength * 512);
fprintf (stdout, " Image size 0x%X\n", (unsigned) PciDs23.ImageLength * 512);
fprintf (stdout, " Code revision: 0x%04X\n", PciDs23.CodeRevision);
fprintf (stdout, " Indicator 0x%02X", (UINT32) PciDs23.Indicator);
fprintf (stdout, " Indicator 0x%02X", PciDs23.Indicator);
} else {
fprintf (
stdout,
@ -1367,18 +1368,18 @@ Returns:
fprintf (stdout, " Device ID 0x%04X\n", PciDs30.DeviceId);
fprintf (stdout, " Length 0x%04X\n", PciDs30.Length);
fprintf (stdout, " Revision 0x%04X\n", PciDs30.Revision);
fprintf (stdout, " DeviceListOffset 0x%02X\n", (UINT32) PciDs30.DeviceListOffset);
fprintf (stdout, " DeviceListOffset 0x%02X\n", PciDs30.DeviceListOffset);
fprintf (
stdout,
" Class Code 0x%06X\n",
(UINT32) (PciDs30.ClassCode[0] | (PciDs30.ClassCode[1] << 8) | (PciDs30.ClassCode[2] << 16))
(unsigned) (PciDs30.ClassCode[0] | (PciDs30.ClassCode[1] << 8) | (PciDs30.ClassCode[2] << 16))
);
fprintf (stdout, " Image size 0x%X\n", PciDs30.ImageLength * 512);
fprintf (stdout, " Image size 0x%X\n", (unsigned) PciDs30.ImageLength * 512);
fprintf (stdout, " Code revision: 0x%04X\n", PciDs30.CodeRevision);
fprintf (stdout, " MaxRuntimeImageLength 0x%02X\n", (UINT32) PciDs30.MaxRuntimeImageLength);
fprintf (stdout, " ConfigUtilityCodeHeaderOffset 0x%02X\n", (UINT32) PciDs30.ConfigUtilityCodeHeaderOffset);
fprintf (stdout, " DMTFCLPEntryPointOffset 0x%02X\n", (UINT32) PciDs30.DMTFCLPEntryPointOffset);
fprintf (stdout, " Indicator 0x%02X", (UINT32) PciDs30.Indicator);
fprintf (stdout, " MaxRuntimeImageLength 0x%02X\n", PciDs30.MaxRuntimeImageLength);
fprintf (stdout, " ConfigUtilityCodeHeaderOffset 0x%02X\n", PciDs30.ConfigUtilityCodeHeaderOffset);
fprintf (stdout, " DMTFCLPEntryPointOffset 0x%02X\n", PciDs30.DMTFCLPEntryPointOffset);
fprintf (stdout, " Indicator 0x%02X", PciDs30.Indicator);
}
//
// Print the indicator, used to flag the last image
@ -1392,9 +1393,9 @@ Returns:
// Print the code type. If EFI code, then we can provide more info.
//
if (mOptions.Pci23 == 1) {
fprintf (stdout, " Code type 0x%02X", (UINT32) PciDs23.CodeType);
fprintf (stdout, " Code type 0x%02X", PciDs23.CodeType);
} else {
fprintf (stdout, " Code type 0x%02X", (UINT32) PciDs30.CodeType);
fprintf (stdout, " Code type 0x%02X", PciDs30.CodeType);
}
if (PciDs23.CodeType == PCI_CODE_TYPE_EFI_IMAGE || PciDs30.CodeType == PCI_CODE_TYPE_EFI_IMAGE) {
fprintf (stdout, " (EFI image)\n");
@ -1414,11 +1415,11 @@ Returns:
//
// Now dump more info
//
fprintf (stdout, " EFI Signature 0x%04X\n", EfiRomHdr.EfiSignature);
fprintf (stdout, " EFI Signature 0x%04X\n", (unsigned) EfiRomHdr.EfiSignature);
fprintf (
stdout,
" Compression Type 0x%04X ",
(UINT32) EfiRomHdr.CompressionType
EfiRomHdr.CompressionType
);
if (EfiRomHdr.CompressionType == EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED) {
fprintf (stdout, "(compressed)\n");
@ -1441,8 +1442,8 @@ Returns:
fprintf (
stdout,
" EFI image offset 0x%04X (@0x%X)\n",
(UINT32) EfiRomHdr.EfiImageHeaderOffset,
(UINT32) (EfiRomHdr.EfiImageHeaderOffset + ImageStart)
EfiRomHdr.EfiImageHeaderOffset,
EfiRomHdr.EfiImageHeaderOffset + (unsigned) ImageStart
);
} else {