+ case 'F':\r
+ case 'f':\r
+ if (!BaseAddressSet) {\r
+ strcpy (InfFileName, argv[Index + 1]);\r
+ //\r
+ // Read the INF file image\r
+ //\r
+ Status = GetFileImage (InfFileName, &InfFileImage, &InfFileSize);\r
+ if (EFI_ERROR (Status)) {\r
+ PrintUsage ();\r
+ Error (NULL, 0, 0, argv[Index + 1], "-f FvInfFile can't be opened.");\r
+ return STATUS_ERROR;\r
+ }\r
+ //\r
+ // Initialize file structures\r
+ //\r
+ InfMemoryFile.FileImage = InfFileImage;\r
+ InfMemoryFile.CurrentFilePointer = InfFileImage;\r
+ InfMemoryFile.Eof = InfFileImage + InfFileSize;\r
+ //\r
+ // Read BaseAddress from fv.inf file.\r
+ //\r
+ FindToken (&InfMemoryFile, "[options]", "EFI_BASE_ADDRESS", 0, InfFileName);\r
+ //\r
+ // free Inf File Image\r
+ //\r
+ free (InfFileImage);\r
+ \r
+ //\r
+ // Convert string to UINT64 base address.\r
+ //\r
+ Status = AsciiStringToUint64 (InfFileName, FALSE, &BaseAddress);\r
+ if (EFI_ERROR (Status)) {\r
+ PrintUsage ();\r
+ Error (NULL, 0, 0, argv[Index + 1], "can't find the base address in the specified fv.inf file.");\r
+ return STATUS_ERROR;\r
+ }\r
+\r
+ BaseAddressSet = TRUE;\r
+ } else {\r
+ PrintUsage ();\r
+ Error (NULL, 0, 0, argv[Index + 1], "BaseAddress has been got once from fv.inf or the specified base address.");\r
+ return STATUS_ERROR;\r
+ }\r
+ break;\r
+\r