diff options
Diffstat (limited to 'BaseTools/Source/C/GenFv/GenFvInternalLib.c')
-rw-r--r-- | BaseTools/Source/C/GenFv/GenFvInternalLib.c | 428 |
1 files changed, 214 insertions, 214 deletions
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index 6a34b6f553..6a874f4e94 100644 --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c @@ -4,13 +4,13 @@ This file contains the internal functions required to generate a Firmware Volume Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
Portions Copyright (c) 2016 HP Development Company, L.P.<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
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+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
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -53,56 +53,56 @@ EFI_GUID mDefaultCapsuleGuid = {0x3B6686BD, 0x0D76, 0x4030, { 0 EFI_GUID mEfiFfsSectionAlignmentPaddingGuid = EFI_FFS_SECTION_ALIGNMENT_PADDING_GUID;
CHAR8 *mFvbAttributeName[] = {
- EFI_FVB2_READ_DISABLED_CAP_STRING,
- EFI_FVB2_READ_ENABLED_CAP_STRING,
- EFI_FVB2_READ_STATUS_STRING,
+ EFI_FVB2_READ_DISABLED_CAP_STRING,
+ EFI_FVB2_READ_ENABLED_CAP_STRING,
+ EFI_FVB2_READ_STATUS_STRING,
EFI_FVB2_WRITE_DISABLED_CAP_STRING,
- EFI_FVB2_WRITE_ENABLED_CAP_STRING,
- EFI_FVB2_WRITE_STATUS_STRING,
- EFI_FVB2_LOCK_CAP_STRING,
- EFI_FVB2_LOCK_STATUS_STRING,
+ EFI_FVB2_WRITE_ENABLED_CAP_STRING,
+ EFI_FVB2_WRITE_STATUS_STRING,
+ EFI_FVB2_LOCK_CAP_STRING,
+ EFI_FVB2_LOCK_STATUS_STRING,
NULL,
- EFI_FVB2_STICKY_WRITE_STRING,
- EFI_FVB2_MEMORY_MAPPED_STRING,
- EFI_FVB2_ERASE_POLARITY_STRING,
- EFI_FVB2_READ_LOCK_CAP_STRING,
- EFI_FVB2_READ_LOCK_STATUS_STRING,
- EFI_FVB2_WRITE_LOCK_CAP_STRING,
- EFI_FVB2_WRITE_LOCK_STATUS_STRING
+ EFI_FVB2_STICKY_WRITE_STRING,
+ EFI_FVB2_MEMORY_MAPPED_STRING,
+ EFI_FVB2_ERASE_POLARITY_STRING,
+ EFI_FVB2_READ_LOCK_CAP_STRING,
+ EFI_FVB2_READ_LOCK_STATUS_STRING,
+ EFI_FVB2_WRITE_LOCK_CAP_STRING,
+ EFI_FVB2_WRITE_LOCK_STATUS_STRING
};
CHAR8 *mFvbAlignmentName[] = {
- EFI_FVB2_ALIGNMENT_1_STRING,
- EFI_FVB2_ALIGNMENT_2_STRING,
- EFI_FVB2_ALIGNMENT_4_STRING,
- EFI_FVB2_ALIGNMENT_8_STRING,
- EFI_FVB2_ALIGNMENT_16_STRING,
- EFI_FVB2_ALIGNMENT_32_STRING,
- EFI_FVB2_ALIGNMENT_64_STRING,
- EFI_FVB2_ALIGNMENT_128_STRING,
- EFI_FVB2_ALIGNMENT_256_STRING,
- EFI_FVB2_ALIGNMENT_512_STRING,
- EFI_FVB2_ALIGNMENT_1K_STRING,
- EFI_FVB2_ALIGNMENT_2K_STRING,
- EFI_FVB2_ALIGNMENT_4K_STRING,
- EFI_FVB2_ALIGNMENT_8K_STRING,
- EFI_FVB2_ALIGNMENT_16K_STRING,
- EFI_FVB2_ALIGNMENT_32K_STRING,
- EFI_FVB2_ALIGNMENT_64K_STRING,
+ EFI_FVB2_ALIGNMENT_1_STRING,
+ EFI_FVB2_ALIGNMENT_2_STRING,
+ EFI_FVB2_ALIGNMENT_4_STRING,
+ EFI_FVB2_ALIGNMENT_8_STRING,
+ EFI_FVB2_ALIGNMENT_16_STRING,
+ EFI_FVB2_ALIGNMENT_32_STRING,
+ EFI_FVB2_ALIGNMENT_64_STRING,
+ EFI_FVB2_ALIGNMENT_128_STRING,
+ EFI_FVB2_ALIGNMENT_256_STRING,
+ EFI_FVB2_ALIGNMENT_512_STRING,
+ EFI_FVB2_ALIGNMENT_1K_STRING,
+ EFI_FVB2_ALIGNMENT_2K_STRING,
+ EFI_FVB2_ALIGNMENT_4K_STRING,
+ EFI_FVB2_ALIGNMENT_8K_STRING,
+ EFI_FVB2_ALIGNMENT_16K_STRING,
+ EFI_FVB2_ALIGNMENT_32K_STRING,
+ EFI_FVB2_ALIGNMENT_64K_STRING,
EFI_FVB2_ALIGNMENT_128K_STRING,
EFI_FVB2_ALIGNMENT_256K_STRING,
EFI_FVB2_ALIGNMENT_512K_STRING,
- EFI_FVB2_ALIGNMENT_1M_STRING,
- EFI_FVB2_ALIGNMENT_2M_STRING,
- EFI_FVB2_ALIGNMENT_4M_STRING,
- EFI_FVB2_ALIGNMENT_8M_STRING,
- EFI_FVB2_ALIGNMENT_16M_STRING,
- EFI_FVB2_ALIGNMENT_32M_STRING,
- EFI_FVB2_ALIGNMENT_64M_STRING,
+ EFI_FVB2_ALIGNMENT_1M_STRING,
+ EFI_FVB2_ALIGNMENT_2M_STRING,
+ EFI_FVB2_ALIGNMENT_4M_STRING,
+ EFI_FVB2_ALIGNMENT_8M_STRING,
+ EFI_FVB2_ALIGNMENT_16M_STRING,
+ EFI_FVB2_ALIGNMENT_32M_STRING,
+ EFI_FVB2_ALIGNMENT_64M_STRING,
EFI_FVB2_ALIGNMENT_128M_STRING,
EFI_FVB2_ALIGNMENT_256M_STRING,
EFI_FVB2_ALIGNMENT_512M_STRING,
- EFI_FVB2_ALIGNMENT_1G_STRING,
+ EFI_FVB2_ALIGNMENT_1G_STRING,
EFI_FVB2_ALIGNMENT_2G_STRING
};
@@ -258,7 +258,7 @@ Returns: //
strcpy (FvInfo->FvName, Value);
}
-
+
//
// Read Fv Attribute
//
@@ -409,7 +409,7 @@ UpdateFfsFileState ( Routine Description:
This function changes the FFS file attributes based on the erase polarity
- of the FV. Update the reserved bits of State to EFI_FVB2_ERASE_POLARITY.
+ of the FV. Update the reserved bits of State to EFI_FVB2_ERASE_POLARITY.
Arguments:
@@ -586,7 +586,7 @@ Arguments: The current offset must be valid.
DataAlignment The data alignment of the next FFS file.
FvEnd End of the empty data in FvImage.
- ExtHeader PI FvExtHeader Optional
+ ExtHeader PI FvExtHeader Optional
Returns:
@@ -723,12 +723,12 @@ Returns: }
memcpy ((UINT8 *)PadFile + CurFfsHeaderSize, ExtHeader, ExtHeader->ExtHeaderSize);
((EFI_FIRMWARE_VOLUME_HEADER *) FvImage->FileImage)->ExtHeaderOffset = (UINT16) ((UINTN) ((UINT8 *)PadFile + CurFfsHeaderSize) - (UINTN) FvImage->FileImage);
- //
- // Make next file start at QWord Boundry
- //
- while (((UINTN) FvImage->CurrentFilePointer & (EFI_FFS_FILE_HEADER_ALIGNMENT - 1)) != 0) {
- FvImage->CurrentFilePointer++;
- }
+ //
+ // Make next file start at QWord Boundry
+ //
+ while (((UINTN) FvImage->CurrentFilePointer & (EFI_FFS_FILE_HEADER_ALIGNMENT - 1)) != 0) {
+ FvImage->CurrentFilePointer++;
+ }
}
return EFI_SUCCESS;
@@ -766,7 +766,7 @@ EFI_STATUS WriteMapFile (
IN OUT FILE *FvMapFile,
IN CHAR8 *FileName,
- IN EFI_FFS_FILE_HEADER *FfsFile,
+ IN EFI_FFS_FILE_HEADER *FfsFile,
IN EFI_PHYSICAL_ADDRESS ImageBaseAddress,
IN PE_COFF_LOADER_IMAGE_CONTEXT *pImageContext
)
@@ -817,19 +817,19 @@ Returns: //
FunctionType = 0;
//
- // Print FileGuid to string buffer.
+ // Print FileGuid to string buffer.
//
PrintGuidToBuffer (&FfsFile->Name, (UINT8 *)FileGuidName, MAX_LINE_LEN, TRUE);
-
+
//
- // Construct Map file Name
+ // Construct Map file Name
//
if (strlen (FileName) >= MAX_LONG_FILE_PATH) {
return EFI_ABORTED;
}
strncpy (PeMapFileName, FileName, MAX_LONG_FILE_PATH - 1);
PeMapFileName[MAX_LONG_FILE_PATH - 1] = 0;
-
+
//
// Change '\\' to '/', unified path format.
//
@@ -840,10 +840,10 @@ Returns: }
Cptr ++;
}
-
+
//
// Get Map file
- //
+ //
Cptr = PeMapFileName + strlen (PeMapFileName);
while ((*Cptr != '.') && (Cptr >= PeMapFileName)) {
Cptr --;
@@ -864,30 +864,30 @@ Returns: while ((*Cptr != FILE_SEP_CHAR) && (Cptr >= PeMapFileName)) {
Cptr --;
}
- *Cptr2 = '\0';
+ *Cptr2 = '\0';
if (strlen (Cptr + 1) >= MAX_LINE_LEN) {
return EFI_ABORTED;
}
strncpy (KeyWord, Cptr + 1, MAX_LINE_LEN - 1);
KeyWord[MAX_LINE_LEN - 1] = 0;
- *Cptr2 = '.';
+ *Cptr2 = '.';
//
// AddressOfEntryPoint and Offset in Image
//
if (!pImageContext->IsTeImage) {
- ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) ((UINT8 *) pImageContext->Handle + pImageContext->PeCoffHeaderOffset);
- AddressOfEntryPoint = ImgHdr->Pe32.OptionalHeader.AddressOfEntryPoint;
- Offset = 0;
+ ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) ((UINT8 *) pImageContext->Handle + pImageContext->PeCoffHeaderOffset);
+ AddressOfEntryPoint = ImgHdr->Pe32.OptionalHeader.AddressOfEntryPoint;
+ Offset = 0;
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
(UINT8 *) ImgHdr +
- sizeof (UINT32) +
- sizeof (EFI_IMAGE_FILE_HEADER) +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
);
Index = ImgHdr->Pe32.FileHeader.NumberOfSections;
} else {
- TEImageHeader = (EFI_TE_IMAGE_HEADER *) pImageContext->Handle;
+ TEImageHeader = (EFI_TE_IMAGE_HEADER *) pImageContext->Handle;
AddressOfEntryPoint = TEImageHeader->AddressOfEntryPoint;
Offset = TEImageHeader->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER);
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (TEImageHeader + 1);
@@ -907,31 +907,31 @@ Returns: if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE && pImageContext->Machine == EFI_IMAGE_MACHINE_IA64) {
//
- // Process IPF PLABEL to get the real address after the image has been rebased.
+ // Process IPF PLABEL to get the real address after the image has been rebased.
// PLABEL structure is got by AddressOfEntryPoint offset to ImageBuffer stored in pImageContext->Handle.
//
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, ")\n");
+
fprintf (FvMapFile, "(GUID=%s", FileGuidName);
TextVirtualAddress = 0;
DataVirtualAddress = 0;
for (; Index > 0; Index --, SectionHeader ++) {
if (stricmp ((CHAR8 *)SectionHeader->Name, ".text") == 0) {
- TextVirtualAddress = SectionHeader->VirtualAddress;
- } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".data") == 0) {
- DataVirtualAddress = SectionHeader->VirtualAddress;
- } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".sdata") == 0) {
- DataVirtualAddress = SectionHeader->VirtualAddress;
- }
+ TextVirtualAddress = SectionHeader->VirtualAddress;
+ } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".data") == 0) {
+ DataVirtualAddress = SectionHeader->VirtualAddress;
+ } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".sdata") == 0) {
+ DataVirtualAddress = SectionHeader->VirtualAddress;
+ }
}
fprintf (FvMapFile, " .textbaseaddress=0x%010llx", (unsigned long long) (ImageBaseAddress + TextVirtualAddress));
fprintf (FvMapFile, " .databaseaddress=0x%010llx", (unsigned long long) (ImageBaseAddress + DataVirtualAddress));
fprintf (FvMapFile, ")\n\n");
-
+
//
// Open PeMapFile
//
@@ -941,7 +941,7 @@ Returns: return EFI_ABORTED;
}
VerboseMsg ("The map file is %s", PeMapFileName);
-
+
//
// Output Functions information into Fv Map file
//
@@ -956,7 +956,7 @@ Returns: }
//
// By Address and Static keyword
- //
+ //
if (FunctionType == 0) {
sscanf (Line, "%s", KeyWord);
if (stricmp (KeyWord, "Address") == 0) {
@@ -1001,7 +1001,7 @@ Returns: //
fprintf (FvMapFile, "\n\n");
fclose (PeMapFile);
-
+
return EFI_SUCCESS;
}
@@ -1196,7 +1196,7 @@ Returns: EFI_STATUS Status;
UINTN Index1;
UINT8 FileGuidString[PRINTED_GUID_BUFFER_SIZE];
-
+
Index1 = 0;
//
// Verify input parameters.
@@ -1236,7 +1236,7 @@ Returns: // Done with the file, from this point on we will just use the buffer read.
//
fclose (NewFile);
-
+
//
// Verify read successful
//
@@ -1245,20 +1245,20 @@ Returns: Error (NULL, 0, 0004, "Error reading file", FvInfo->FvFiles[Index]);
return EFI_ABORTED;
}
-
+
//
// For None PI Ffs file, directly add them into FvImage.
//
if (!FvInfo->IsPiFvImage) {
memcpy (FvImage->CurrentFilePointer, FileBuffer, FileSize);
if (FvInfo->SizeofFvFiles[Index] > FileSize) {
- FvImage->CurrentFilePointer += FvInfo->SizeofFvFiles[Index];
+ FvImage->CurrentFilePointer += FvInfo->SizeofFvFiles[Index];
} else {
- FvImage->CurrentFilePointer += FileSize;
+ FvImage->CurrentFilePointer += FileSize;
}
goto Done;
}
-
+
//
// Verify Ffs file
//
@@ -1303,7 +1303,7 @@ Returns: // Check if alignment is required
//
ReadFfsAlignment ((EFI_FFS_FILE_HEADER *) FileBuffer, &CurrentFileAlignment);
-
+
//
// Find the largest alignment of all the FFS files in the FV
//
@@ -1328,20 +1328,20 @@ Returns: return EFI_ABORTED;
}
//
- // Rebase the PE or TE image in FileBuffer of FFS file for XIP
+ // Rebase the PE or TE image in FileBuffer of FFS file for XIP
// Rebase for the debug genfvmap tool
//
Status = FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) *VtfFileImage - (UINTN) FvImage->FileImage, FvMapFile);
if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);
return Status;
- }
+ }
//
// copy VTF File
//
memcpy (*VtfFileImage, FileBuffer, FileSize);
-
- PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);
+
+ PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);
fprintf (FvReportFile, "0x%08X %s\n", (unsigned)(UINTN) (((UINT8 *)*VtfFileImage) - (UINTN)FvImage->FileImage), FileGuidString);
free (FileBuffer);
@@ -1374,19 +1374,19 @@ Returns: //
if ((UINTN) (FvImage->CurrentFilePointer + FileSize) <= (UINTN) (*VtfFileImage)) {
//
- // Rebase the PE or TE image in FileBuffer of FFS file for XIP.
+ // Rebase the PE or TE image in FileBuffer of FFS file for XIP.
// Rebase Bs and Rt drivers for the debug genfvmap tool.
//
Status = FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) FvImage->CurrentFilePointer - (UINTN) FvImage->FileImage, FvMapFile);
- if (EFI_ERROR (Status)) {
- Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);
- return Status;
- }
+ if (EFI_ERROR (Status)) {
+ Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);
+ return Status;
+ }
//
// Copy the file
//
memcpy (FvImage->CurrentFilePointer, FileBuffer, FileSize);
- PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);
+ PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);
fprintf (FvReportFile, "0x%08X %s\n", (unsigned) (FvImage->CurrentFilePointer - FvImage->FileImage), FileGuidString);
FvImage->CurrentFilePointer += FileSize;
} else {
@@ -1401,7 +1401,7 @@ Returns: FvImage->CurrentFilePointer++;
}
-Done:
+Done:
//
// Free allocated memory.
//
@@ -1458,7 +1458,7 @@ Returns: PadFile = (EFI_FFS_FILE_HEADER *) FvImage->CurrentFilePointer;
//
- // write PadFile FFS header with PadType, don't need to set PAD file guid in its header.
+ // write PadFile FFS header with PadType, don't need to set PAD file guid in its header.
//
PadFile->Type = EFI_FV_FILETYPE_FFS_PAD;
PadFile->Attributes = 0;
@@ -1629,7 +1629,7 @@ Returns: if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "could not get the PE32 entry point for the SEC core.");
return EFI_ABORTED;
- }
+ }
if (
Vtf0Detected &&
@@ -1650,7 +1650,7 @@ Returns: SecCorePhysicalAddress = FvInfo->BaseAddress;
SecCorePhysicalAddress += (UINTN) Pe32Section.Pe32Section + SecHeaderSize - (UINTN) FvImage->FileImage;
SecCorePhysicalAddress += EntryPoint;
- DebugMsg (NULL, 0, 9, "SecCore physical entry point address", "Address = 0x%llX", (unsigned long long) SecCorePhysicalAddress);
+ DebugMsg (NULL, 0, 9, "SecCore physical entry point address", "Address = 0x%llX", (unsigned long long) SecCorePhysicalAddress);
//
// Find the PEI Core
@@ -1758,18 +1758,18 @@ Returns: // Write lower 32 bits of physical address for Pei Core entry
//
*Ia32ResetAddressPtr = (UINT32) PeiCorePhysicalAddress;
-
+
//
// Write SecCore Entry point relative address into the jmp instruction in reset vector.
- //
+ //
Ia32ResetAddressPtr = (UINT32 *) ((UINTN) FvImage->Eof - IA32_SEC_CORE_ENTRY_OFFSET);
-
+
Ia32SecEntryOffset = (INT32) (SecCorePhysicalAddress - (FV_IMAGES_TOP_ADDRESS - IA32_SEC_CORE_ENTRY_OFFSET + 2));
if (Ia32SecEntryOffset <= -65536) {
Error (NULL, 0, 3000, "Invalid", "The SEC EXE file size is too large, it must be less than 64K.");
return STATUS_ERROR;
}
-
+
*(UINT16 *) Ia32ResetAddressPtr = (UINT16) Ia32SecEntryOffset;
//
@@ -1819,9 +1819,9 @@ Returns: //
WordPointer = (UINT16 *) (BytePointer + SIZEOF_STARTUP_DATA_ARRAY - 2);
*WordPointer = (UINT16) (0x10000 - (UINT32) CheckSum);
-
+
//
- // IpiVector at the 4k aligned address in the top 2 blocks in the PEI FV.
+ // IpiVector at the 4k aligned address in the top 2 blocks in the PEI FV.
//
IpiVector = (UINT32) (FV_IMAGES_TOP_ADDRESS - ((UINTN) FvImage->Eof - (UINTN) BytePointer));
DebugMsg (NULL, 0, 9, "Startup AP Vector address", "IpiVector at 0x%X", (unsigned) IpiVector);
@@ -2120,15 +2120,15 @@ UpdateArmResetVectorIfNeeded ( /*++
Routine Description:
- This parses the FV looking for SEC and patches that address into the
+ This parses the FV looking for SEC and patches that address into the
beginning of the FV header.
For ARM32 the reset vector is at 0x00000000 or 0xFFFF0000.
For AArch64 the reset vector is at 0x00000000.
- This would commonly map to the first entry in the ROM.
+ This would commonly map to the first entry in the ROM.
ARM32 Exceptions:
- Reset +0
+ Reset +0
Undefined +4
SWI +8
Prefetch Abort +12
@@ -2138,15 +2138,15 @@ Routine Description: We support two schemes on ARM.
1) Beginning of the FV is the reset vector
- 2) Reset vector is data bytes FDF file and that code branches to reset vector
+ 2) Reset vector is data bytes FDF file and that code branches to reset vector
in the beginning of the FV (fixed size offset).
Need to have the jump for the reset vector at location zero.
We also need to store the address or PEI (if it exists).
- We stub out a return from interrupt in case the debugger
+ We stub out a return from interrupt in case the debugger
is using SWI (not done for AArch64, not enough space in struct).
- The optional entry to the common exception handler is
- to support full featured exception handling from ROM and is currently
+ The optional entry to the common exception handler is
+ to support full featured exception handling from ROM and is currently
not support by this tool.
Arguments:
@@ -2243,7 +2243,7 @@ Returns: // 1 - PEI Entry Point
// 2 - movs pc,lr for a SWI handler
// 3 - Place holder for Common Exception Handler
- UINT32 ResetVector[4];
+ UINT32 ResetVector[4];
memset(ResetVector, 0, sizeof (ResetVector));
@@ -2356,8 +2356,8 @@ GetPe32Info ( Routine Description:
- Retrieves the PE32 entry point offset and machine type from PE image or TeImage.
- See EfiImage.h for machine types. The entry point offset is from the beginning
+ Retrieves the PE32 entry point offset and machine type from PE image or TeImage.
+ See EfiImage.h for machine types. The entry point offset is from the beginning
of the PE32 buffer passed in.
Arguments:
@@ -2399,13 +2399,13 @@ Returns: *BaseOfCode = TeHeader->BaseOfCode + sizeof (EFI_TE_IMAGE_HEADER) - TeHeader->StrippedSize;
*MachineType = TeHeader->Machine;
} else {
-
+
//
- // Then check whether
+ // Then check whether
// First is the DOS header
//
DosHeader = (EFI_IMAGE_DOS_HEADER *) Pe32;
-
+
//
// Verify DOS header is expected
//
@@ -2417,7 +2417,7 @@ Returns: // Immediately following is the NT header.
//
ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) ((UINTN) Pe32 + DosHeader->e_lfanew);
-
+
//
// Verify NT header is expected
//
@@ -2436,7 +2436,7 @@ Returns: //
// Verify machine type is supported
//
- if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != EFI_IMAGE_MACHINE_IA64) && (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) &&
+ if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != EFI_IMAGE_MACHINE_IA64) && (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) &&
(*MachineType != EFI_IMAGE_MACHINE_ARMT) && (*MachineType != EFI_IMAGE_MACHINE_AARCH64)) {
Error (NULL, 0, 3000, "Invalid", "Unrecognized machine type in the PE32 file.");
return EFI_UNSUPPORTED;
@@ -2506,7 +2506,7 @@ Returns: InfMemoryFile.FileImage = InfFileImage;
InfMemoryFile.CurrentFilePointer = InfFileImage;
InfMemoryFile.Eof = InfFileImage + InfFileSize;
-
+
//
// Parse the FV inf file for header information
//
@@ -2528,17 +2528,17 @@ Returns: Error (NULL, 0, 1001, "Missing option", "Output file name");
return EFI_ABORTED;
}
-
+
if (mFvDataInfo.FvBlocks[0].Length == 0) {
Error (NULL, 0, 1001, "Missing required argument", "Block Size");
return EFI_ABORTED;
}
-
+
//
// Debug message Fv File System Guid
//
if (mFvDataInfo.FvFileSystemGuidSet) {
- DebugMsg (NULL, 0, 9, "FV File System Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+ DebugMsg (NULL, 0, 9, "FV File System Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
(unsigned) mFvDataInfo.FvFileSystemGuid.Data1,
mFvDataInfo.FvFileSystemGuid.Data2,
mFvDataInfo.FvFileSystemGuid.Data3,
@@ -2611,7 +2611,7 @@ Returns: // Debug message Fv Name Guid
//
if (mFvDataInfo.FvNameGuidSet) {
- DebugMsg (NULL, 0, 9, "FV Name Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+ DebugMsg (NULL, 0, 9, "FV Name Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
(unsigned) mFvDataInfo.FvNameGuid.Data1,
mFvDataInfo.FvNameGuid.Data2,
mFvDataInfo.FvNameGuid.Data3,
@@ -2695,7 +2695,7 @@ Returns: goto Finish;
}
VerboseMsg ("the generated FV image size is %u bytes", (unsigned) mFvDataInfo.Size);
-
+
//
// support fv image and empty fv image
//
@@ -2716,7 +2716,7 @@ Returns: //
if (mFvDataInfo.FvAttributes == 0) {
//
- // Set Default Fv Attribute
+ // Set Default Fv Attribute
//
mFvDataInfo.FvAttributes = FV_DEFAULT_ATTRIBUTE;
}
@@ -2747,7 +2747,7 @@ Returns: FvHeader->Revision = EFI_FVH_REVISION;
FvHeader->ExtHeaderOffset = 0;
FvHeader->Reserved[0] = 0;
-
+
//
// Copy firmware block map
//
@@ -2802,7 +2802,7 @@ Returns: Status = EFI_ABORTED;
goto Finish;
}
-
+
//
// Open FvReport file
//
@@ -2883,7 +2883,7 @@ Returns: if (!mArm) {
//
// Update reset vector (SALE_ENTRY for IPF)
- // Now for IA32 and IA64 platform, the fv which has bsf file must have the
+ // Now for IA32 and IA64 platform, the fv which has bsf file must have the
// EndAddress of 0xFFFFFFFF (unless the section was rebased).
// Thus, only this type fv needs to update the reset vector.
// If the PEI Core is found, the VTF file will probably get
@@ -2892,29 +2892,29 @@ Returns: if (mFvDataInfo.ForceRebase == 1 ||
(mFvDataInfo.BaseAddress + mFvDataInfo.Size) == FV_IMAGES_TOP_ADDRESS) {
Status = UpdateResetVector (&FvImageMemoryFile, &mFvDataInfo, VtfFileImage);
- if (EFI_ERROR(Status)) {
+ if (EFI_ERROR(Status)) {
Error (NULL, 0, 3000, "Invalid", "Could not update the reset vector.");
- goto Finish;
+ goto Finish;
}
DebugMsg (NULL, 0, 9, "Update Reset vector in VTF file", NULL);
}
}
- }
+ }
if (mArm) {
Status = UpdateArmResetVectorIfNeeded (&FvImageMemoryFile, &mFvDataInfo);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "Could not update the reset vector.");
- goto Finish;
- }
-
+ goto Finish;
+ }
+
//
// Update Checksum for FvHeader
//
FvHeader->Checksum = 0;
FvHeader->Checksum = CalculateChecksum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength / sizeof (UINT16));
}
-
+
//
// Update FV Alignment attribute to the largest alignment of all the FFS files in the FV
//
@@ -2937,7 +2937,7 @@ Returns: FvHeader->Checksum = CalculateChecksum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength / sizeof (UINT16));
}
-WriteFile:
+WriteFile:
//
// Write fv file
//
@@ -2970,12 +2970,12 @@ Finish: if (FvReportName != NULL) {
free (FvReportName);
}
-
+
if (FvFile != NULL) {
fflush (FvFile);
fclose (FvFile);
}
-
+
if (FvMapFile != NULL) {
fflush (FvMapFile);
fclose (FvMapFile);
@@ -3084,7 +3084,7 @@ Returns: UINT32 FfsHeaderSize;
EFI_FFS_FILE_HEADER FfsHeader;
UINTN VtfFileSize;
-
+
FvExtendHeaderSize = 0;
VtfFileSize = 0;
fpin = NULL;
@@ -3097,19 +3097,19 @@ Returns: for (Index = 0; FvInfoPtr->FvBlocks[Index].NumBlocks > 0 && FvInfoPtr->FvBlocks[Index].Length > 0; Index++) {
FvInfoPtr->Size += FvInfoPtr->FvBlocks[Index].NumBlocks * FvInfoPtr->FvBlocks[Index].Length;
}
-
+
//
// Calculate the required sizes for all FFS files.
//
CurrentOffset = sizeof (EFI_FIRMWARE_VOLUME_HEADER);
-
+
for (Index = 1;; Index ++) {
CurrentOffset += sizeof (EFI_FV_BLOCK_MAP_ENTRY);
if (FvInfoPtr->FvBlocks[Index].NumBlocks == 0 || FvInfoPtr->FvBlocks[Index].Length == 0) {
break;
}
}
-
+
//
// Calculate PI extension header
//
@@ -3164,7 +3164,7 @@ Returns: // close file
//
fclose (fpin);
-
+
if (FvInfoPtr->IsPiFvImage) {
//
// Check whether this ffs file is vtf file
@@ -3183,7 +3183,7 @@ Returns: }
//
- // Get the alignment of FFS file
+ // Get the alignment of FFS file
//
ReadFfsAlignment (&FfsHeader, &FfsAlignment);
FfsAlignment = 1 << FfsAlignment;
@@ -3197,28 +3197,28 @@ Returns: CurrentOffset = (CurrentOffset + FfsHeaderSize + sizeof(EFI_FFS_FILE_HEADER) + FfsAlignment - 1) & ~(FfsAlignment - 1);
CurrentOffset -= FfsHeaderSize;
}
- }
+ }
//
// Add ffs file size
//
if (FvInfoPtr->SizeofFvFiles[Index] > FfsFileSize) {
- CurrentOffset += FvInfoPtr->SizeofFvFiles[Index];
+ CurrentOffset += FvInfoPtr->SizeofFvFiles[Index];
} else {
- CurrentOffset += FfsFileSize;
+ CurrentOffset += FfsFileSize;
}
-
+
//
// Make next ffs file start at QWord Boundry
//
if (FvInfoPtr->IsPiFvImage) {
- CurrentOffset = (CurrentOffset + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);
+ CurrentOffset = (CurrentOffset + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);
}
}
CurrentOffset += VtfFileSize;
DebugMsg (NULL, 0, 9, "FvImage size", "The calculated fv image size is 0x%x and the current set fv image size is 0x%x", (unsigned) CurrentOffset, (unsigned) FvInfoPtr->Size);
-
- if (FvInfoPtr->Size == 0) {
+
+ if (FvInfoPtr->Size == 0) {
//
// Update FvInfo data
//
@@ -3233,7 +3233,7 @@ Returns: Error (NULL, 0, 3000, "Invalid", "the required fv image size 0x%x exceeds the set fv image size 0x%x", (unsigned) CurrentOffset, (unsigned) FvInfoPtr->Size);
return EFI_INVALID_PARAMETER;
}
-
+
//
// Set Fv Size Information
//
@@ -3288,7 +3288,7 @@ Returns: EFI_STATUS
GetChildFvFromFfs (
- IN FV_INFO *FvInfo,
+ IN FV_INFO *FvInfo,
IN EFI_FFS_FILE_HEADER *FfsFile,
IN UINTN XipOffset
)
@@ -3319,7 +3319,7 @@ Returns: for (Index = 1;; Index++) {
//
- // Find FV section
+ // Find FV section
//
Status = GetSectionByType (FfsFile, EFI_SECTION_FIRMWARE_VOLUME_IMAGE, Index, &SubFvSection);
if (EFI_ERROR (Status)) {
@@ -3361,9 +3361,9 @@ Returns: }
EFI_STATUS
-FfsRebase (
- IN OUT FV_INFO *FvInfo,
- IN CHAR8 *FileName,
+FfsRebase (
+ IN OUT FV_INFO *FvInfo,
+ IN CHAR8 *FileName,
IN OUT EFI_FFS_FILE_HEADER *FfsFile,
IN UINTN XipOffset,
IN FILE *FvMapFile
@@ -3376,7 +3376,7 @@ Routine Description: rebase any PE32 sections found in the file using the base address.
Arguments:
-
+
FvInfo A pointer to FV_INFO struture.
FileName Ffs File PathName
FfsFile A pointer to Ffs file image.
@@ -3395,7 +3395,7 @@ Returns: {
EFI_STATUS Status;
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
- PE_COFF_LOADER_IMAGE_CONTEXT OrigImageContext;
+ PE_COFF_LOADER_IMAGE_CONTEXT OrigImageContext;
EFI_PHYSICAL_ADDRESS XipBase;
EFI_PHYSICAL_ADDRESS NewPe32BaseAddress;
UINTN Index;
@@ -3414,7 +3414,7 @@ Returns: UINT32 FfsHeaderSize;
UINT32 CurSecHdrSize;
- Index = 0;
+ Index = 0;
MemoryImagePointer = NULL;
TEImageHeader = NULL;
ImgHdr = NULL;
@@ -3429,7 +3429,7 @@ Returns: if ((FvInfo->BaseAddress == 0) && (FvInfo->ForceRebase == -1)) {
return EFI_SUCCESS;
}
-
+
//
// If ForceRebase Flag specified to FALSE, will always not take rebase action.
//
@@ -3475,7 +3475,7 @@ Returns: // Init Value
//
NewPe32BaseAddress = 0;
-
+
//
// Find Pe Image
//
@@ -3506,7 +3506,7 @@ Returns: // Keep Image Context for PE image in FV
//
memcpy (&OrigImageContext, &ImageContext, sizeof (ImageContext));
-
+
//
// Get File PdbPointer
//
@@ -3536,11 +3536,11 @@ Returns: return EFI_ABORTED;
}
//
- // PeImage has no reloc section. It will try to get reloc data from the original EFI image.
+ // PeImage has no reloc section. It will try to get reloc data from the original EFI image.
//
if (ImageContext.RelocationsStripped) {
//
- // Construct the original efi file Name
+ // Construct the original efi file Name
//
if (strlen (FileName) >= MAX_LONG_FILE_PATH) {
Error (NULL, 0, 2000, "Invalid", "The file name %s is too long.", FileName);
@@ -3622,7 +3622,7 @@ Returns: //
return EFI_SUCCESS;
}
-
+
//
// Relocation doesn't exist
//
@@ -3644,14 +3644,14 @@ Returns: }
memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);
ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((UINTN) ImageContext.SectionAlignment - 1));
-
+
Status = PeCoffLoaderLoadImage (&ImageContext);
if (EFI_ERROR (Status)) {
Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);
free ((VOID *) MemoryImagePointer);
return Status;
}
-
+
ImageContext.DestinationAddress = NewPe32BaseAddress;
Status = PeCoffLoaderRelocateImage (&ImageContext);
if (EFI_ERROR (Status)) {
@@ -3665,15 +3665,15 @@ Returns: //
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
(UINTN) ImgHdr +
- sizeof (UINT32) +
- sizeof (EFI_IMAGE_FILE_HEADER) +
+ sizeof (UINT32) +
+ sizeof (EFI_IMAGE_FILE_HEADER) +
ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
);
-
+
for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {
CopyMem (
- (UINT8 *) CurrentPe32Section.Pe32Section + CurSecHdrSize + SectionHeader->PointerToRawData,
- (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
+ (UINT8 *) CurrentPe32Section.Pe32Section + CurSecHdrSize + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
SectionHeader->SizeOfRawData
);
}
@@ -3684,7 +3684,7 @@ Returns: free (PeFileBuffer);
PeFileBuffer = NULL;
}
-
+
//
// Update Image Base Address
//
@@ -3739,13 +3739,13 @@ Returns: //
return EFI_SUCCESS;
}
-
+
//
// Now process TE sections
//
for (Index = 1;; Index++) {
NewPe32BaseAddress = 0;
-
+
//
// Find Te Image
//
@@ -3755,7 +3755,7 @@ Returns: }
CurSecHdrSize = GetSectionHeaderLength(CurrentPe32Section.CommonHeader);
-
+
//
// Calculate the TE base address, the FFS file base plus the offset of the TE section less the size stripped off
// by GenTEImage
@@ -3800,7 +3800,7 @@ Returns: //
if (ImageContext.RelocationsStripped) {
//
- // Construct the original efi file name
+ // Construct the original efi file name
//
if (strlen (FileName) >= MAX_LONG_FILE_PATH) {
Error (NULL, 0, 2000, "Invalid", "The file name %s is too long.", FileName);
@@ -3889,7 +3889,7 @@ Returns: }
//
// Reloacate TeImage
- //
+ //
ImageContext.DestinationAddress = NewPe32BaseAddress;
Status = PeCoffLoaderRelocateImage (&ImageContext);
if (EFI_ERROR (Status)) {
@@ -3897,7 +3897,7 @@ Returns: free ((VOID *) MemoryImagePointer);
return Status;
}
-
+
//
// Copy the relocated image into raw image file.
//
@@ -3905,19 +3905,19 @@ Returns: for (Index = 0; Index < TEImageHeader->NumberOfSections; Index ++, SectionHeader ++) {
if (!ImageContext.IsTeImage) {
CopyMem (
- (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
- (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
+ (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
SectionHeader->SizeOfRawData
);
} else {
CopyMem (
- (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
- (VOID*) (UINTN) (ImageContext.ImageAddress + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->VirtualAddress),
+ (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,
+ (VOID*) (UINTN) (ImageContext.ImageAddress + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->VirtualAddress),
SectionHeader->SizeOfRawData
);
}
}
-
+
//
// Free the allocated memory resource
//
@@ -3927,7 +3927,7 @@ Returns: free (PeFileBuffer);
PeFileBuffer = NULL;
}
-
+
//
// Update Image Base Address
//
@@ -3958,14 +3958,14 @@ Returns: }
WriteMapFile (
- FvMapFile,
- PdbPointer,
+ FvMapFile,
+ PdbPointer,
FfsFile,
- NewPe32BaseAddress,
+ NewPe32BaseAddress,
&OrigImageContext
);
}
-
+
return EFI_SUCCESS;
}
@@ -4013,7 +4013,7 @@ Returns: // Get Pad file size.
//
FileLength = GetFfsFileLength(PadFile);
- FileLength = (FileLength + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);
+ FileLength = (FileLength + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);
//
// FixPoint must be align on 0x1000 relative to FvImage Header
//
@@ -4026,7 +4026,7 @@ Returns: FixPoint += 0x1000;
}
FixPoint -= 0x1000;
-
+
if ((UINTN) FixPoint < ((UINTN) PadFile + GetFfsHeaderLength(PadFile))) {
//
// No alignment FixPoint in this Pad File.
@@ -4034,7 +4034,7 @@ Returns: continue;
}
- if ((UINTN) FvImage->Eof - (UINTN)FixPoint <= 0x20000) {
+ if ((UINTN) FvImage->Eof - (UINTN)FixPoint <= 0x20000) {
//
// Find the position to place ApResetVector
//
@@ -4042,7 +4042,7 @@ Returns: return EFI_SUCCESS;
}
}
-
+
return EFI_NOT_FOUND;
}
@@ -4121,7 +4121,7 @@ Returns: CapInfo->Flags |= CAPSULE_FLAGS_INITIATE_RESET;
}
} else if (strstr (Value, "PersistAcrossReset") != NULL) {
- CapInfo->Flags |= CAPSULE_FLAGS_PERSIST_ACROSS_RESET;
+ CapInfo->Flags |= CAPSULE_FLAGS_PERSIST_ACROSS_RESET;
if (strstr (Value, "InitiateReset") != NULL) {
CapInfo->Flags |= CAPSULE_FLAGS_INITIATE_RESET;
}
@@ -4174,12 +4174,12 @@ Returns: // Add the file
//
strcpy (CapInfo->CapFiles[Index], Value);
- DebugMsg (NULL, 0, 9, "Capsule component file", "the %uth file name is %s", (unsigned) Index, CapInfo->CapFiles[Index]);
+ DebugMsg (NULL, 0, 9, "Capsule component file", "the %uth file name is %s", (unsigned) Index, CapInfo->CapFiles[Index]);
} else {
break;
}
}
-
+
if (Index == 0) {
Warning (NULL, 0, 0, "Capsule components are not specified.", NULL);
}
@@ -4222,7 +4222,7 @@ Returns: UINT32 Index;
FILE *fpin, *fpout;
EFI_STATUS Status;
-
+
if (InfFileImage != NULL) {
//
// Initialize file structures
@@ -4230,7 +4230,7 @@ Returns: InfMemoryFile.FileImage = InfFileImage;
InfMemoryFile.CurrentFilePointer = InfFileImage;
InfMemoryFile.Eof = InfFileImage + InfFileSize;
-
+
//
// Parse the Cap inf file for header information
//
@@ -4239,7 +4239,7 @@ Returns: return Status;
}
}
-
+
if (mCapDataInfo.HeaderSize == 0) {
//
// make header size align 16 bytes.
@@ -4252,16 +4252,16 @@ Returns: Error (NULL, 0, 2000, "Invalid parameter", "The specified HeaderSize cannot be less than the size of EFI_CAPSULE_HEADER.");
return EFI_INVALID_PARAMETER;
}
-
+
if (CapFileName == NULL && mCapDataInfo.CapName[0] != '\0') {
CapFileName = mCapDataInfo.CapName;
}
-
+
if (CapFileName == NULL) {
Error (NULL, 0, 2001, "Missing required argument", "Output Capsule file name");
return EFI_INVALID_PARAMETER;
}
-
+
//
// Set Default Capsule Guid value
//
@@ -4299,7 +4299,7 @@ Returns: // Initialize the capsule header to zero
//
memset (CapBuffer, 0, mCapDataInfo.HeaderSize);
-
+
//
// create capsule header and get capsule body
//
@@ -4325,7 +4325,7 @@ Returns: Index ++;
CapSize += FileSize;
}
-
+
//
// write capsule data into the output file
//
@@ -4339,7 +4339,7 @@ Returns: fwrite (CapBuffer, 1, CapSize, fpout);
fclose (fpout);
free (CapBuffer);
-
+
VerboseMsg ("The size of the generated capsule image is %u bytes", (unsigned) CapSize);
return EFI_SUCCESS;
|