Sync BaseTools Trunk (version r2387) to EDKII main trunk.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
|
||||
Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 1999 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available
|
||||
under the terms and conditions of the BSD License which accompanies this
|
||||
distribution. The full text of the license may be found at
|
||||
@@ -1141,7 +1141,6 @@ Returns:
|
||||
EFI_STATUS Status;
|
||||
UINT64 CompStartAddress;
|
||||
UINT64 FileSize;
|
||||
UINT64 NumByteRead;
|
||||
UINT64 NumAdjustByte;
|
||||
UINT8 *Buffer;
|
||||
FILE *Fp;
|
||||
@@ -1189,7 +1188,7 @@ Returns:
|
||||
//
|
||||
// Read first 64 bytes of PAL header and use it to find version info
|
||||
//
|
||||
NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
|
||||
fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
|
||||
|
||||
//
|
||||
// PAL header contains the version info. Currently, we will use the header
|
||||
@@ -1200,7 +1199,7 @@ Returns:
|
||||
}
|
||||
}
|
||||
|
||||
NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
|
||||
fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
|
||||
fclose (Fp);
|
||||
|
||||
//
|
||||
@@ -1329,7 +1328,6 @@ Returns:
|
||||
UINT64 AbsAddress;
|
||||
UINTN RelativeAddress;
|
||||
UINT64 FileSize;
|
||||
UINT64 NumByteRead;
|
||||
UINT8 *Buffer;
|
||||
FILE *Fp;
|
||||
FIT_TABLE *PalFitPtr;
|
||||
@@ -1367,7 +1365,7 @@ Returns:
|
||||
//
|
||||
// Read, Get version Info and discard the PAL header.
|
||||
//
|
||||
NumByteRead = fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
|
||||
fread (Buffer, sizeof (UINT8), SIZE_OF_PAL_HEADER, Fp);
|
||||
|
||||
//
|
||||
// Extract the version info from header of PAL_A. Once done, discrad this buffer
|
||||
@@ -1379,7 +1377,7 @@ Returns:
|
||||
//
|
||||
// Read PAL_A file in a buffer
|
||||
//
|
||||
NumByteRead = fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
|
||||
fread (Buffer, sizeof (UINT8), (UINTN) FileSize, Fp);
|
||||
fclose (Fp);
|
||||
|
||||
PalStartAddress = Fv1EndAddress - (SIZE_TO_OFFSET_PAL_A_END + FileSize);
|
||||
@@ -1759,7 +1757,6 @@ Returns:
|
||||
UINT8 *Buffer;
|
||||
UINT8 *LocalVtfBuffer;
|
||||
UINTN FileSize;
|
||||
UINTN NumByteRead;
|
||||
FILE *Fp;
|
||||
|
||||
if (!strcmp (FileName, "")) {
|
||||
@@ -1784,7 +1781,7 @@ Returns:
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
NumByteRead = fread (Buffer, sizeof (UINT8), FileSize, Fp);
|
||||
fread (Buffer, sizeof (UINT8), FileSize, Fp);
|
||||
|
||||
LocalVtfBuffer = (UINT8 *) Vtf1EndBuffer - SIZE_IA32_RESET_VECT;
|
||||
memcpy (LocalVtfBuffer, Buffer, FileSize);
|
||||
@@ -2121,7 +2118,6 @@ Returns:
|
||||
FILE *Fp;
|
||||
UINT64 *StartAddressPtr;
|
||||
UINTN FirstFwVSize;
|
||||
UINTN NumByte;
|
||||
|
||||
StartAddressPtr = malloc (sizeof (UINT64));
|
||||
if (StartAddressPtr == NULL) {
|
||||
@@ -2141,7 +2137,7 @@ Returns:
|
||||
|
||||
FirstFwVSize = _filelength (fileno (Fp));
|
||||
fseek (Fp, (long) (FirstFwVSize - (UINTN) (SIZE_IA32_RESET_VECT + SIZE_SALE_ENTRY_POINT)), SEEK_SET);
|
||||
NumByte = fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
|
||||
fwrite ((VOID *) StartAddressPtr, sizeof (UINT64), 1, Fp);
|
||||
|
||||
if (Fp) {
|
||||
fclose (Fp);
|
||||
|
Reference in New Issue
Block a user