3 Copyright (c) 2007 - 2009, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 This contains all code necessary to build the GenFvImage.exe utility.
19 This utility relies heavily on the GenFvImage Lib. Definitions for both
20 can be found in the Tiano Firmware Volume Generation Utility
21 Specification, review draft.
26 // File included in build
31 #include "GenFvInternalLib.h"
36 #define UTILITY_NAME "GenFv"
39 // Utility version information
41 #define UTILITY_MAJOR_VERSION 0
42 #define UTILITY_MINOR_VERSION 1
43 #define GENFV_UPDATE_TIME " updated on 2008/11/21"
45 EFI_GUID mEfiFirmwareFileSystem2Guid
= EFI_FIRMWARE_FILE_SYSTEM2_GUID
;
56 Displays the standard utility information to SDTOUT
68 fprintf (stdout
, "%s Version %d.%d %s\n", UTILITY_NAME
, UTILITY_MAJOR_VERSION
, UTILITY_MINOR_VERSION
, GENFV_UPDATE_TIME
);
80 Displays the utility usage syntax to STDOUT
95 fprintf (stdout
, "\nUsage: %s [options]\n\n", UTILITY_NAME
);
98 // Copyright declaration
100 fprintf (stdout
, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
105 fprintf (stdout
, "Options:\n");
106 fprintf (stdout
, " -o FileName, --outputfile FileName\n\
107 File is the FvImage or CapImage to be created.\n");
108 fprintf (stdout
, " -i FileName, --inputfile FileName\n\
109 File is the input FV.inf or Cap.inf to specify\n\
110 how to construct FvImage or CapImage.\n");
111 fprintf (stdout
, " -b BlockSize, --blocksize BlockSize\n\
112 BlockSize is one HEX or DEC format value\n\
113 BlockSize is required by Fv Image.\n");
114 fprintf (stdout
, " -n NumberBlock, --numberblock NumberBlock\n\
115 NumberBlock is one HEX or DEC format value\n\
116 NumberBlock is one optional parameter.\n");
117 fprintf (stdout
, " -f FfsFile, --ffsfile FfsFile\n\
118 FfsFile is placed into Fv Image\n\
119 multi files can input one by one\n");
120 fprintf (stdout
, " -s FileTakenSize, --filetakensize FileTakenSize\n\
121 FileTakenSize specifies the size of the required\n\
122 space that the input file is placed in Fvimage.\n\
123 It is specified together with the input file.\n");
124 fprintf (stdout
, " -r Address, --baseaddr Address\n\
125 Address is the rebase start address for drivers that\n\
126 run in Flash. It supports DEC or HEX digital format.\n\
127 If it is set to zero, no rebase action will be taken\n");
128 fprintf (stdout
, " -a AddressFile, --addrfile AddressFile\n\
129 AddressFile is one file used to record boot driver base\n\
130 address and runtime driver base address. And this tool\n\
131 will update these two addresses after it relocates all\n\
132 boot drivers and runtime drivers in this fv iamge to\n\
133 the preferred loaded memory address.\n");
134 fprintf (stdout
, " -m logfile, --map logfile\n\
135 Logfile is the output fv map file name. if it is not\n\
136 given, the FvName.map will be the default map file name\n");
137 fprintf (stdout
, " -g Guid, --guid Guid\n\
138 GuidValue is one specific capsule guid value\n\
139 or fv file system guid value.\n\
140 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n");
141 fprintf (stdout
, " --FvNameGuid Guid Guid is used to specify Fv Name.\n\
142 Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n");
143 fprintf (stdout
, " --capflag CapFlag Capsule Reset Flag can be PersistAcrossReset,\n\
144 or PopulateSystemTable or InitiateReset or not set\n");
145 fprintf (stdout
, " --capheadsize HeadSize\n\
146 HeadSize is one HEX or DEC format value\n\
147 HeadSize is required by Capsule Image.\n");
148 fprintf (stdout
, " -c, --capsule Create Capsule Image.\n");
149 fprintf (stdout
, " -p, --dump Dump Capsule Image header.\n");
150 fprintf (stdout
, " -v, --verbose Turn on verbose output with informational messages.\n");
151 fprintf (stdout
, " -q, --quiet Disable all messages except key message and fatal error\n");
152 fprintf (stdout
, " -d, --debug level Enable debug messages, at input debug level.\n");
153 fprintf (stdout
, " --version Show program's version number and exit.\n");
154 fprintf (stdout
, " -h, --help Show this help message and exit.\n");
169 This utility uses GenFvImage.Lib to build a firmware volume image.
173 FvInfFileName The name of an FV image description file or Capsule Image.
175 Arguments come in pair in any order.
180 EFI_SUCCESS No error conditions detected.
181 EFI_INVALID_PARAMETER One or more of the input parameters is invalid.
182 EFI_OUT_OF_RESOURCES A resource required by the utility was unavailable.
183 Most commonly this will be memory allocation
185 EFI_LOAD_ERROR GenFvImage.lib could not be loaded.
186 EFI_ABORTED Error executing the GenFvImage lib.
197 CHAR8 ValueString
[_MAX_PATH
];
200 MEMORY_FILE AddrMemoryFile
;
202 EFI_CAPSULE_HEADER
*CapsuleHeader
;
203 UINT64 LogLevel
, TempNumber
;
215 CapsuleHeader
= NULL
;
221 Status
= EFI_SUCCESS
;
223 SetUtilityName (UTILITY_NAME
);
226 Error (NULL
, 0, 1001, "Missing options", "No input options specified.");
232 // Init global data to Zero
234 memset (&mFvDataInfo
, 0, sizeof (FV_INFO
));
235 memset (&mCapDataInfo
, 0, sizeof (CAP_INFO
));
237 // Set the default FvGuid
239 memcpy (&mFvDataInfo
.FvFileSystemGuid
, &mEfiFirmwareFileSystem2Guid
, sizeof (EFI_GUID
));
242 // Parse command line
247 if ((stricmp (argv
[0], "-h") == 0) || (stricmp (argv
[0], "--help") == 0)) {
250 return STATUS_SUCCESS
;
253 if (stricmp (argv
[0], "--version") == 0) {
255 return STATUS_SUCCESS
;
259 if ((stricmp (argv
[0], "-i") == 0) || (stricmp (argv
[0], "--inputfile") == 0)) {
260 InfFileName
= argv
[1];
261 if (InfFileName
== NULL
) {
262 Error (NULL
, 0, 1003, "Invalid option value", "Input file can't be null");
270 if ((stricmp (argv
[0], "-a") == 0) || (stricmp (argv
[0], "--addrfile") == 0)) {
271 AddrFileName
= argv
[1];
272 if (AddrFileName
== NULL
) {
273 Error (NULL
, 0, 1003, "Invalid option value", "Address file can't be null");
281 if ((stricmp (argv
[0], "-o") == 0) || (stricmp (argv
[0], "--outputfile") == 0)) {
282 OutFileName
= argv
[1];
283 if (OutFileName
== NULL
) {
284 Error (NULL
, 0, 1003, "Invalid option value", "Output file can't be null");
292 if ((stricmp (argv
[0], "-r") == 0) || (stricmp (argv
[0], "--baseaddr") == 0)) {
293 Status
= AsciiStringToUint64 (argv
[1], FALSE
, &TempNumber
);
294 if (EFI_ERROR (Status
)) {
295 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
298 mFvDataInfo
.BaseAddress
= TempNumber
;
299 mFvDataInfo
.BaseAddressSet
= TRUE
;
305 if ((stricmp (argv
[0], "-b") == 0) || (stricmp (argv
[0], "--blocksize") == 0)) {
306 Status
= AsciiStringToUint64 (argv
[1], FALSE
, &TempNumber
);
307 if (EFI_ERROR (Status
)) {
308 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
311 if (TempNumber
== 0) {
312 Error (NULL
, 0, 1003, "Invalid option value", "Fv block size can't be be set to zero");
315 mFvDataInfo
.FvBlocks
[0].Length
= (UINT32
) TempNumber
;
316 DebugMsg (NULL
, 0, 9, "FV Block Size", "%s = 0x%llx", EFI_BLOCK_SIZE_STRING
, (unsigned long long) TempNumber
);
322 if ((stricmp (argv
[0], "-n") == 0) || (stricmp (argv
[0], "--numberblock") == 0)) {
323 Status
= AsciiStringToUint64 (argv
[1], FALSE
, &TempNumber
);
324 if (EFI_ERROR (Status
)) {
325 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
328 if (TempNumber
== 0) {
329 Error (NULL
, 0, 1003, "Invalid option value", "Fv block number can't be set to zero");
332 mFvDataInfo
.FvBlocks
[0].NumBlocks
= (UINT32
) TempNumber
;
333 DebugMsg (NULL
, 0, 9, "FV Number Block", "%s = 0x%llx", EFI_NUM_BLOCKS_STRING
, (unsigned long long) TempNumber
);
339 if ((stricmp (argv
[0], "-f") == 0) || (stricmp (argv
[0], "--ffsfile") == 0)) {
340 if (argv
[1] == NULL
) {
341 Error (NULL
, 0, 1003, "Invalid option value", "Input Ffsfile can't be null");
344 strcpy (mFvDataInfo
.FvFiles
[Index
], argv
[1]);
345 DebugMsg (NULL
, 0, 9, "FV component file", "the %uth name is %s", (unsigned) Index
+ 1, argv
[1]);
350 if ((stricmp (argv
[0], "-s") == 0) || (stricmp (argv
[0], "--filetakensize") == 0)) {
351 if (argv
[1] == NULL
) {
352 Error (NULL
, 0, 1003, "Invalid option value", "Ffsfile Size can't be null");
355 Status
= AsciiStringToUint64 (argv
[1], FALSE
, &TempNumber
);
356 if (EFI_ERROR (Status
)) {
357 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
360 mFvDataInfo
.SizeofFvFiles
[Index
] = (UINT32
) TempNumber
;
361 DebugMsg (NULL
, 0, 9, "FV component file size", "the %uth size is %s", (unsigned) Index
+ 1, argv
[1]);
370 if ((stricmp (argv
[0], "-s") == 0) || (stricmp (argv
[0], "--filetakensize") == 0)) {
371 Error (NULL
, 0, 1003, "Invalid option", "It must be specified together with -f option to specify the file size.");
375 if ((stricmp (argv
[0], "-c") == 0) || (stricmp (argv
[0], "--capsule") == 0)) {
382 if (stricmp (argv
[0], "--capheadsize") == 0) {
384 // Get Capsule Image Header Size
386 Status
= AsciiStringToUint64 (argv
[1], FALSE
, &TempNumber
);
387 if (EFI_ERROR (Status
)) {
388 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
391 mCapDataInfo
.HeaderSize
= (UINT32
) TempNumber
;
392 DebugMsg (NULL
, 0, 9, "Capsule Header size", "%s = 0x%llx", EFI_CAPSULE_HEADER_SIZE_STRING
, (unsigned long long) TempNumber
);
398 if (stricmp (argv
[0], "--capflag") == 0) {
400 // Get Capsule Header
402 if (argv
[1] == NULL
) {
403 Error (NULL
, 0, 1003, "Option value is not set", "%s = %s", argv
[0], argv
[1]);
406 if (strcmp (argv
[1], "PopulateSystemTable") == 0) {
407 mCapDataInfo
.Flags
|= CAPSULE_FLAGS_PERSIST_ACROSS_RESET
| CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE
;
408 } else if (strcmp (argv
[1], "PersistAcrossReset") == 0) {
409 mCapDataInfo
.Flags
|= CAPSULE_FLAGS_PERSIST_ACROSS_RESET
;
410 } else if (strcmp (argv
[1], "InitiateReset") == 0) {
411 mCapDataInfo
.Flags
|= CAPSULE_FLAGS_PERSIST_ACROSS_RESET
| CAPSULE_FLAGS_INITIATE_RESET
;
413 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
416 DebugMsg (NULL
, 0, 9, "Capsule Flag", argv
[1]);
422 if (stricmp (argv
[0], "--capguid") == 0) {
424 // Get the Capsule Guid
426 Status
= StringToGuid (argv
[1], &mCapDataInfo
.CapGuid
);
427 if (EFI_ERROR (Status
)) {
428 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", EFI_CAPSULE_GUID_STRING
, argv
[1]);
431 DebugMsg (NULL
, 0, 9, "Capsule Guid", "%s = %s", EFI_CAPSULE_GUID_STRING
, argv
[1]);
437 if ((stricmp (argv
[0], "-g") == 0) || (stricmp (argv
[0], "--guid") == 0)) {
439 // Get the Capsule or Fv Guid
441 Status
= StringToGuid (argv
[1], &mCapDataInfo
.CapGuid
);
442 if (EFI_ERROR (Status
)) {
443 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", EFI_GUID_STRING
, argv
[1]);
446 memcpy (&mFvDataInfo
.FvFileSystemGuid
, &mCapDataInfo
.CapGuid
, sizeof (EFI_GUID
));
447 mFvDataInfo
.FvFileSystemGuidSet
= TRUE
;
448 DebugMsg (NULL
, 0, 9, "Capsule Guid", "%s = %s", EFI_CAPSULE_GUID_STRING
, argv
[1]);
449 DebugMsg (NULL
, 0, 9, "FV Guid", "%s = %s", EFI_FV_FILESYSTEMGUID_STRING
, argv
[1]);
455 if (stricmp (argv
[0], "--FvNameGuid") == 0) {
459 Status
= StringToGuid (argv
[1], &mFvDataInfo
.FvNameGuid
);
460 if (EFI_ERROR (Status
)) {
461 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", EFI_GUID_STRING
, argv
[1]);
464 mFvDataInfo
.FvNameGuidSet
= TRUE
;
465 DebugMsg (NULL
, 0, 9, "FV Name Guid", "%s = %s", EFI_FV_NAMEGUID_STRING
, argv
[1]);
471 if ((stricmp (argv
[0], "-p") == 0) || (stricmp (argv
[0], "--dump") == 0)) {
478 if ((stricmp (argv
[0], "-m") == 0) || (stricmp (argv
[0], "--map") == 0)) {
479 MapFileName
= argv
[1];
480 if (MapFileName
== NULL
) {
481 Error (NULL
, 0, 1003, "Invalid option value", "Map file can't be null");
489 if ((stricmp (argv
[0], "-v") == 0) || (stricmp (argv
[0], "--verbose") == 0)) {
490 SetPrintLevel (VERBOSE_LOG_LEVEL
);
491 VerboseMsg ("Verbose output Mode Set!");
497 if ((stricmp (argv
[0], "-q") == 0) || (stricmp (argv
[0], "--quiet") == 0)) {
498 SetPrintLevel (KEY_LOG_LEVEL
);
499 KeyMsg ("Quiet output Mode Set!");
505 if ((stricmp (argv
[0], "-d") == 0) || (stricmp (argv
[0], "--debug") == 0)) {
506 Status
= AsciiStringToUint64 (argv
[1], FALSE
, &LogLevel
);
507 if (EFI_ERROR (Status
)) {
508 Error (NULL
, 0, 1003, "Invalid option value", "%s = %s", argv
[0], argv
[1]);
512 Error (NULL
, 0, 1003, "Invalid option value", "Debug Level range is 0-9, current input level is %d", (int) LogLevel
);
515 SetPrintLevel (LogLevel
);
516 DebugMsg (NULL
, 0, 9, "Debug Mode Set", "Debug Output Mode Level %s is set!", argv
[1]);
523 // Don't recognize the parameter.
525 Error (NULL
, 0, 1000, "Unknown option", "%s", argv
[0]);
529 VerboseMsg ("%s tool start.", UTILITY_NAME
);
532 // check input parameter, InfFileName can be NULL
534 if (InfFileName
== NULL
&& DumpCapsule
) {
535 Error (NULL
, 0, 1001, "Missing option", "Input Capsule Image");
538 VerboseMsg ("the input FvInf or CapInf file name is %s", InfFileName
);
540 if (!DumpCapsule
&& OutFileName
== NULL
) {
541 Error (NULL
, 0, 1001, "Missing option", "Output File");
544 if (OutFileName
!= NULL
) {
545 VerboseMsg ("the output file name is %s", OutFileName
);
549 // Read boot and runtime address from address file
551 if (AddrFileName
!= NULL
) {
552 VerboseMsg ("the input address file name is %s", AddrFileName
);
553 Status
= GetFileImage (AddrFileName
, &InfFileImage
, &InfFileSize
);
554 if (EFI_ERROR (Status
)) {
558 AddrMemoryFile
.FileImage
= InfFileImage
;
559 AddrMemoryFile
.CurrentFilePointer
= InfFileImage
;
560 AddrMemoryFile
.Eof
= InfFileImage
+ InfFileSize
;
563 // Read the boot driver base address for this FV image
565 Status
= FindToken (&AddrMemoryFile
, OPTIONS_SECTION_STRING
, EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING
, 0, ValueString
);
566 if (Status
== EFI_SUCCESS
) {
568 // Get the base address
570 Status
= AsciiStringToUint64 (ValueString
, FALSE
, &TempNumber
);
571 if (EFI_ERROR (Status
)) {
572 Error (NULL
, 0, 2000, "Invalid parameter", "%s = %s", EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING
, ValueString
);
575 mFvDataInfo
.BootBaseAddress
= TempNumber
;
576 DebugMsg (NULL
, 0, 9, "Boot driver base address", "%s = %s", EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING
, ValueString
);
580 // Read the FV runtime driver base address
582 Status
= FindToken (&AddrMemoryFile
, OPTIONS_SECTION_STRING
, EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING
, 0, ValueString
);
583 if (Status
== EFI_SUCCESS
) {
585 // Get the base address
587 Status
= AsciiStringToUint64 (ValueString
, FALSE
, &TempNumber
);
588 if (EFI_ERROR (Status
)) {
589 Error (NULL
, 0, 2000, "Invalid parameter", "%s = %s", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING
, ValueString
);
592 mFvDataInfo
.RuntimeBaseAddress
= TempNumber
;
593 DebugMsg (NULL
, 0, 9, "Runtime driver base address", "%s = %s", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING
, ValueString
);
597 // free the allocated memory space for addr file.
605 // Read the INF file image
607 if (InfFileName
!= NULL
) {
608 Status
= GetFileImage (InfFileName
, &InfFileImage
, &InfFileSize
);
609 if (EFI_ERROR (Status
)) {
615 VerboseMsg ("Dump the capsule header information for the input capsule image %s", InfFileName
);
617 // Dump Capsule Image Header Information
619 CapsuleHeader
= (EFI_CAPSULE_HEADER
*) InfFileImage
;
620 if (OutFileName
== NULL
) {
623 FpFile
= fopen (OutFileName
, "w");
624 if (FpFile
== NULL
) {
625 Error (NULL
, 0, 0001, "Error opening file", OutFileName
);
629 fprintf (FpFile
, "Capsule %s Image Header Information\n", InfFileName
);
630 fprintf (FpFile
, " GUID %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X\n",
631 (unsigned) CapsuleHeader
->CapsuleGuid
.Data1
,
632 (unsigned) CapsuleHeader
->CapsuleGuid
.Data2
,
633 (unsigned) CapsuleHeader
->CapsuleGuid
.Data3
,
634 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[0],
635 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[1],
636 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[2],
637 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[3],
638 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[4],
639 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[5],
640 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[6],
641 (unsigned) CapsuleHeader
->CapsuleGuid
.Data4
[7]);
642 fprintf (FpFile
, " Header size 0x%08X\n", (unsigned) CapsuleHeader
->HeaderSize
);
643 fprintf (FpFile
, " Flags 0x%08X\n", (unsigned) CapsuleHeader
->Flags
);
644 fprintf (FpFile
, " Capsule image size 0x%08X\n", (unsigned) CapsuleHeader
->CapsuleImageSize
);
646 } else if (CapsuleFlag
) {
647 VerboseMsg ("Create capsule image");
649 // Call the GenerateCapImage to generate Capsule Image
651 for (Index
= 0; mFvDataInfo
.FvFiles
[Index
][0] != '\0'; Index
++) {
652 strcpy (mCapDataInfo
.CapFiles
[Index
], mFvDataInfo
.FvFiles
[Index
]);
655 Status
= GenerateCapImage (
661 VerboseMsg ("Create Fv image and its map file");
662 if (mFvDataInfo
.BaseAddress
!= 0) {
663 VerboseMsg ("FvImage Rebase Address is 0x%llX", (unsigned long long) mFvDataInfo
.BaseAddress
);
666 // Call the GenerateFvImage to generate Fv Image
668 Status
= GenerateFvImage (
677 // free InfFileImage memory
679 if (InfFileImage
!= NULL
) {
684 // update boot driver address and runtime driver address in address file
686 if (Status
== EFI_SUCCESS
&& AddrFileName
!= NULL
) {
687 FpFile
= fopen (AddrFileName
, "w");
688 if (FpFile
== NULL
) {
689 Error (NULL
, 0, 0001, "Error opening file", AddrFileName
);
692 fprintf (FpFile
, OPTIONS_SECTION_STRING
);
693 fprintf (FpFile
, "\n");
694 if (mFvDataInfo
.BootBaseAddress
!= 0) {
695 fprintf (FpFile
, EFI_FV_BOOT_DRIVER_BASE_ADDRESS_STRING
);
699 (unsigned long long)mFvDataInfo
.BootBaseAddress
701 DebugMsg (NULL
, 0, 9, "Updated boot driver base address", "%s = 0x%llx", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING
, (unsigned long long) mFvDataInfo
.BootBaseAddress
);
703 if (mFvDataInfo
.RuntimeBaseAddress
!= 0) {
704 fprintf (FpFile
, EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING
);
708 (unsigned long long)mFvDataInfo
.RuntimeBaseAddress
710 DebugMsg (NULL
, 0, 9, "Updated runtime driver base address", "%s = 0x%llx", EFI_FV_RUNTIME_DRIVER_BASE_ADDRESS_STRING
, (unsigned long long) mFvDataInfo
.RuntimeBaseAddress
);
715 if (Status
== EFI_SUCCESS
) {
716 DebugMsg (NULL
, 0, 9, "The Total Fv Size", "%s = 0x%x", EFI_FV_TOTAL_SIZE_STRING
, (unsigned) mFvTotalSize
);
717 DebugMsg (NULL
, 0, 9, "The used Fv Size", "%s = 0x%x", EFI_FV_TAKEN_SIZE_STRING
, (unsigned) mFvTakenSize
);
718 DebugMsg (NULL
, 0, 9, "The space Fv size", "%s = 0x%x", EFI_FV_SPACE_SIZE_STRING
, (unsigned) (mFvTotalSize
- mFvTakenSize
));
721 VerboseMsg ("%s tool done with return code is 0x%x.", UTILITY_NAME
, GetUtilityStatus ());
723 return GetUtilityStatus ();