42 Print (L
"[UxCapsule]\n");
43 Print (L
"CapsuleHeader:\n");
45 Print (L
" HeaderSize - 0x%x\n", DisplayCapsule->CapsuleHeader.
HeaderSize);
46 Print (L
" Flags - 0x%x\n", DisplayCapsule->CapsuleHeader.
Flags);
48 Print (L
"ImagePayload:\n");
49 Print (L
" Version - 0x%x\n", DisplayCapsule->ImagePayload.Version);
50 Print (L
" Checksum - 0x%x\n", DisplayCapsule->ImagePayload.Checksum);
51 Print (L
" ImageType - 0x%x\n", DisplayCapsule->ImagePayload.ImageType);
52 Print (L
" Mode - 0x%x\n", DisplayCapsule->ImagePayload.Mode);
53 Print (L
" OffsetX - 0x%x\n", DisplayCapsule->ImagePayload.OffsetX);
54 Print (L
" OffsetY - 0x%x\n", DisplayCapsule->ImagePayload.OffsetY);
68 UINT64 *ItemOffsetList;
73 Print (L
"[FmpCapsule]\n");
74 Print (L
"CapsuleHeader:\n");
75 Print (L
" CapsuleGuid - %g\n", &CapsuleHeader->CapsuleGuid);
76 Print (L
" HeaderSize - 0x%x\n", CapsuleHeader->HeaderSize);
77 Print (L
" Flags - 0x%x\n", CapsuleHeader->Flags);
78 Print (L
" CapsuleImageSize - 0x%x\n", CapsuleHeader->CapsuleImageSize);
81 ItemOffsetList = (UINT64 *)(FmpCapsuleHeader + 1);
82 Print (L
"FmpHeader:\n");
83 Print (L
" Version - 0x%x\n", FmpCapsuleHeader->Version);
87 for (Index = 0; Index < Count; Index++) {
88 Print (L
" Offset[%d] - 0x%x\n", Index, ItemOffsetList[Index]);
92 Print (L
"FmpPayload[%d] ImageHeader:\n", Index);
94 Print (L
" Version - 0x%x\n", FmpImageHeader->Version);
99 if (FmpImageHeader->Version >= 2) {
101 if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
125 BOOLEAN EsrtGuidFound;
127 UINTN NestedCapsuleSize;
132 EsrtGuidFound =
FALSE;
134 if (!EFI_ERROR (Status)) {
135 ASSERT (Esrt !=
NULL);
136 EsrtEntry = (VOID *)(Esrt + 1);
139 EsrtGuidFound =
TRUE;
145 if (!EsrtGuidFound) {
153 NestedCapsuleHeader = (
EFI_CAPSULE_HEADER *)((UINT8 *)CapsuleHeader + CapsuleHeader->HeaderSize);
176 IN CHAR16 *CapsuleName
186 if (EFI_ERROR (Status)) {
187 Print (L
"CapsuleApp: Capsule (%s) is not found.\n", CapsuleName);
192 Print (L
"CapsuleApp: Capsule image (%s) is not a valid capsule.\n", CapsuleName);
193 Status = EFI_INVALID_PARAMETER;
197 CapsuleHeader = Buffer;
209 Print (L
"[NestedCapsule]\n");
210 Print (L
"CapsuleHeader:\n");
213 Print (L
" Flags - 0x%x\n", CapsuleHeader->
Flags);
219 if (Buffer !=
NULL) {
239 CHAR16 CapsuleVarName[20];
243 UINTN CapsuleFileNameSize;
244 CHAR16 CapsuleIndexData[12];
245 CHAR16 *CapsuleIndex;
246 CHAR16 *CapsuleFileName;
247 CHAR16 *CapsuleTarget;
251 &gEfiCapsuleReportGuid,
252 (VOID **)&CapsuleIndex,
255 if (!EFI_ERROR (Status)) {
256 ASSERT (CapsuleIndex !=
NULL);
257 CopyMem (CapsuleIndexData, CapsuleIndex, 11 *
sizeof (CHAR16));
258 CapsuleIndexData[11] = 0;
259 Print (L
"CapsuleMax - %s\n", CapsuleIndexData);
265 &gEfiCapsuleReportGuid,
266 (VOID **)&CapsuleIndex,
269 if (!EFI_ERROR (Status)) {
270 ASSERT (CapsuleIndex !=
NULL);
271 CopyMem (CapsuleIndexData, CapsuleIndex, 11 *
sizeof (CHAR16));
272 CapsuleIndexData[11] = 0;
273 Print (L
"CapsuleLast - %s\n", CapsuleIndexData);
277 StrCpyS (CapsuleVarName,
sizeof (CapsuleVarName)/
sizeof (CapsuleVarName[0]), L
"Capsule");
278 TempVarName = CapsuleVarName +
StrLen (CapsuleVarName);
282 UnicodeSPrint (TempVarName, 5 *
sizeof (CHAR16), L
"%04x", Index);
286 &gEfiCapsuleReportGuid,
287 (VOID **)&CapsuleResult,
290 if (Status == EFI_NOT_FOUND) {
292 }
else if (EFI_ERROR (Status)) {
296 ASSERT (CapsuleResult !=
NULL);
302 Print (L
"CapsuleName: %s\n", CapsuleVarName);
303 Print (L
" Capsule Guid: %g\n", &CapsuleResult->CapsuleGuid);
304 Print (L
" Capsule ProcessedTime: %t\n", &CapsuleResult->CapsuleProcessed);
305 Print (L
" Capsule Status: %r\n", CapsuleResult->CapsuleStatus);
308 if (
CompareGuid (&CapsuleResult->CapsuleGuid, &gEfiFmpCapsuleGuid)) {
311 Print (L
" Capsule FMP Version: 0x%x\n", CapsuleResultFmp->
Version);
315 CapsuleFileName = (CHAR16 *)(CapsuleResultFmp + 1);
316 Print (L
" Capsule FMP CapsuleFileName: \"%s\"\n", CapsuleFileName);
317 CapsuleFileNameSize =
StrSize (CapsuleFileName);
318 CapsuleTarget = (CHAR16 *)((
UINTN)CapsuleFileName + CapsuleFileNameSize);
319 Print (L
" Capsule FMP CapsuleTarget: \"%s\"\n", CapsuleTarget);
326 if (Index > 0xFFFF) {
334CHAR8 *mFwTypeString[] = {
341CHAR8 *mLastAttemptStatusString[] = {
343 "Error: Unsuccessful",
344 "Error: Insufficient Resources",
345 "Error: Incorrect Version",
346 "Error: Invalid Format",
348 "Error: Power Event AC",
349 "Error: Power Event Battery",
350 "Error: Unsatisfied Dependencies",
365 if (FwType <
sizeof (mFwTypeString) /
sizeof (mFwTypeString[0])) {
366 return mFwTypeString[FwType];
381 IN UINT32 LastAttemptStatus
384 if (LastAttemptStatus <
sizeof (mLastAttemptStatusString) /
sizeof (mLastAttemptStatusString[0])) {
385 return mLastAttemptStatusString[LastAttemptStatus];
387 return "Error: Unknown";
401 Print (L
" FwClass - %g\n", &EsrtEntry->FwClass);
403 Print (L
" FwVersion - 0x%x\n", EsrtEntry->FwVersion);
404 Print (L
" LowestSupportedFwVersion - 0x%x\n", EsrtEntry->LowestSupportedFwVersion);
405 Print (L
" CapsuleFlags - 0x%x\n", EsrtEntry->CapsuleFlags);
406 Print (L
" LastAttemptVersion - 0x%x\n", EsrtEntry->LastAttemptVersion);
427 Print (L
"EFI_SYSTEM_RESOURCE_TABLE:\n");
428 Print (L
"FwResourceCount - 0x%x\n", Esrt->FwResourceCount);
429 Print (L
"FwResourceCountMax - 0x%x\n", Esrt->FwResourceCountMax);
430 Print (L
"FwResourceVersion - 0x%lx\n", Esrt->FwResourceVersion);
432 EsrtEntry = (VOID *)(Esrt + 1);
433 for (Index = 0; Index < Esrt->FwResourceCount; Index++) {
434 Print (L
"EFI_SYSTEM_RESOURCE_ENTRY (%d):\n", Index);
451 Print (L
"##############\n");
452 Print (L
"# ESRT TABLE #\n");
453 Print (L
"##############\n");
456 if (EFI_ERROR (Status)) {
457 Print (L
"ESRT - %r\n", Status);
478 if (
CompareGuid (&CapsuleHeader->CapsuleGuid, &gWindowsUxCapsuleGuid)) {
483 if (
CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid)) {
488 Print (L
"[NestedCapusule]\n");
489 Print (L
"CapsuleHeader:\n");
490 Print (L
" CapsuleGuid - %g\n", &CapsuleHeader->CapsuleGuid);
491 Print (L
" HeaderSize - 0x%x\n", CapsuleHeader->HeaderSize);
492 Print (L
" Flags - 0x%x\n", CapsuleHeader->Flags);
493 Print (L
" CapsuleImageSize - 0x%x\n", CapsuleHeader->CapsuleImageSize);
516 for (Cptr = Str; *Cptr != L
'\0'; Cptr++) {
517 if ((L
'a' <= *Cptr) && (*Cptr <= L
'z')) {
518 *Cptr = *Cptr - L
'a' + L
'A';
544 for (Index = 0; Str[Index] != L
'.' && Str[Index] != L
'\0'; Index++) {
545 SubStr[Index] = Str[Index];
548 SubStr[Index] = L
'\0';
570 for (Index = 0; StrBuf[Index] != L
'\0'; Index++) {
573 while (PadLen != 0) {
574 StrBuf[Index] = Character;
579 StrBuf[Index] = L
'\0';
595 OUT CHAR16 *FileNameFirst,
596 OUT CHAR16 *FileNameExtension
602 StringLen =
StrLen (FileName);
603 for (Index = StringLen; Index > 0 && FileName[Index] != L
'.'; Index--) {
609 if ((Index == 0) && (FileName[Index] != L
'.')) {
610 FileNameExtension[0] = L
'\0';
613 StrCpyS (FileNameExtension, MAX_FILE_NAME_LEN, &FileName[Index+1]);
619 StrnCpyS (FileNameFirst, MAX_FILE_NAME_LEN, FileName, Index);
620 FileNameFirst[Index] = L
'\0';
643 CHAR16 FileName1[MAX_FILE_NAME_SIZE];
644 CHAR16 FileExtension1[MAX_FILE_NAME_SIZE];
645 CHAR16 FileName2[MAX_FILE_NAME_SIZE];
646 CHAR16 FileExtension2[MAX_FILE_NAME_SIZE];
647 CHAR16 TempSubStr1[MAX_FILE_NAME_SIZE];
648 CHAR16 TempSubStr2[MAX_FILE_NAME_SIZE];
651 INTN SubStrCmpResult;
665 if (SubStrLen1 > SubStrLen2) {
669 PadStrInTail (TempSubStr2, SubStrLen1 - SubStrLen2, L
' ');
670 }
else if (SubStrLen1 < SubStrLen2) {
674 PadStrInTail (TempSubStr1, SubStrLen2 - SubStrLen1, L
' ');
677 SubStrCmpResult =
StrnCmp (TempSubStr1, TempSubStr2, MAX_FILE_NAME_LEN);
678 if (SubStrCmpResult != 0) {
679 return SubStrCmpResult;
685 return StrnCmp (FileExtension1, FileExtension2, MAX_FILE_NAME_LEN);
700 IN BOOLEAN DumpCapsuleInfo
718 FileInfoBuffer =
NULL;
723 Status = Fs->OpenVolume (Fs, &Root);
724 if (EFI_ERROR (Status)) {
725 Print (L
"Cannot open volume. Status = %r\n", Status);
729 Status = Root->Open (Root, &DirHandle, EFI_CAPSULE_FILE_DIRECTORY, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, 0);
730 if (EFI_ERROR (Status)) {
731 Print (L
"Cannot open %s. Status = %r\n", EFI_CAPSULE_FILE_DIRECTORY, Status);
741 Print (L
"Get File Info Fail. Status = %r\n", Status);
750 if (EFI_ERROR (Status)) {
751 Print (L
"Get Next File Fail. Status = %r\n", Status);
756 if (FileCount == 0) {
757 Print (L
"Error: No capsule file found!\n");
758 Status = EFI_NOT_FOUND;
763 if (FileInfoBuffer ==
NULL) {
764 Status = EFI_OUT_OF_RESOURCES;
776 Print (L
"Get File Info Fail. Status = %r\n", Status);
785 if (EFI_ERROR (Status)) {
786 Print (L
"Get Next File Fail. Status = %r\n", Status);
801 Print (L
"The capsules will be performed by following order:\n");
803 for (Index = 0; Index < FileCount; Index++) {
804 Print (L
" %d.%s\n", Index + 1, FileInfoBuffer[Index]->FileName);
807 if (!DumpCapsuleInfo) {
812 Print (L
"The infomation of the capsules:\n");
814 for (Index = 0; Index < FileCount; Index++) {
816 Status = DirHandle->Open (DirHandle, &FileHandle, FileInfoBuffer[Index]->FileName, EFI_FILE_MODE_READ, 0);
817 if (EFI_ERROR (Status)) {
822 if (EFI_ERROR (Status)) {
823 Print (L
"Cannot read file %s. Status = %r\n", FileInfoBuffer[Index]->FileName, Status);
829 if (FileBuffer ==
NULL) {
830 Status = EFI_OUT_OF_RESOURCES;
835 if (EFI_ERROR (Status)) {
836 Print (L
"Cannot read file %s. Status = %r\n", FileInfoBuffer[Index]->FileName, Status);
842 Print (L
"**************************\n");
843 Print (L
" %d.%s:\n", Index + 1, FileInfoBuffer[Index]->FileName);
844 Print (L
"**************************\n");
851 if (FileInfoBuffer !=
NULL) {
852 for (Index = 0; Index < FileCount; Index++) {
853 if (FileInfoBuffer[Index] !=
NULL) {
874 IN BOOLEAN DumpCapsuleInfo
879 TempBlockPtr = BlockDescriptors;
882 if (TempBlockPtr->
Length != 0) {
883 if (DumpCapsuleInfo) {
884 Print (L
"******************************************************\n");
887 Print (L
"Capsule data starts at 0x%08x with size 0x%08x\n", TempBlockPtr->Union.
DataBlock, TempBlockPtr->
Length);
888 if (DumpCapsuleInfo) {
889 Print (L
"******************************************************\n");
912 IN BOOLEAN DumpCapsuleInfo
916 CHAR16 CapsuleVarName[30];
921 CHAR16 BootOptionName[20];
928 CapsuleDataPtr64 =
NULL;
932 if (ShellProtocol ==
NULL) {
933 Print (L
"Get Shell Protocol Fail\n");
940 Print (L
"#########################\n");
941 Print (L
"### Capsule on Memory ###\n");
942 Print (L
"#########################\n");
944 TempVarName = CapsuleVarName +
StrLen (CapsuleVarName);
949 sizeof (CapsuleVarName) - ((
UINTN)TempVarName - (
UINTN)CapsuleVarName),
958 &gEfiCapsuleVendorGuid,
959 (VOID **)&CapsuleDataPtr64,
962 if (EFI_ERROR (Status) || (CapsuleDataPtr64 ==
NULL)) {
964 Print (L
"No data.\n");
971 Print (L
"Capsule Description at 0x%08x\n", *CapsuleDataPtr64);
978 Print (L
"#########################\n");
979 Print (L
"### Capsule on Disk #####\n");
980 Print (L
"#########################\n");
983 &gEfiGlobalVariableGuid,
987 if (EFI_ERROR (Status) || (BootNext ==
NULL)) {
988 Print (L
"Get BootNext Variable Fail. Status = %r\n", Status);
990 UnicodeSPrint (BootOptionName,
sizeof (BootOptionName), L
"Boot%04x", *BootNext);
992 if (!EFI_ERROR (Status)) {
997 if (!EFI_ERROR (Status)) {
998 Print (L
"Capsules are provisioned on BootOption: %s\n", BootNextOptionEntry.Description);
1021 IN UINT32 DescriptorVersion,
1022 IN UINT8 DescriptorCount,
1024 IN UINT32 PackageVersion,
1025 IN CHAR16 *PackageVersionName
1032 Print (L
" DescriptorVersion - 0x%x\n", DescriptorVersion);
1033 Print (L
" DescriptorCount - 0x%x\n", DescriptorCount);
1034 Print (L
" DescriptorSize - 0x%x\n", DescriptorSize);
1035 Print (L
" PackageVersion - 0x%x\n", PackageVersion);
1036 Print (L
" PackageVersionName - \"%s\"\n", PackageVersionName);
1037 CurrentImageInfo = ImageInfo;
1038 for (Index = 0; Index < DescriptorCount; Index++) {
1039 Print (L
" ImageDescriptor (%d)\n", Index);
1042 Print (L
" ImageId - 0x%lx\n", CurrentImageInfo->
ImageId);
1044 Print (L
" Version - 0x%x\n", CurrentImageInfo->
Version);
1046 Print (L
" Size - 0x%x\n", CurrentImageInfo->
Size);
1061 if (DescriptorVersion > 1) {
1063 if (DescriptorVersion > 2) {
1067 if (DescriptorVersion > 3) {
1068 Print (L
" Dependencies - ");
1069 if (CurrentImageInfo->Dependencies ==
NULL) {
1074 Print (L
"%02x ", CurrentImageInfo->Dependencies->Dependencies[Index2]);
1075 }
while (CurrentImageInfo->Dependencies->Dependencies[Index2++] != EFI_FMP_DEP_END);
1101 IN UINT32 PackageVersion,
1102 IN CHAR16 *PackageVersionName,
1103 IN UINT32 PackageVersionNameMaxLen,
1104 IN UINT64 AttributesSupported,
1105 IN UINT64 AttributesSetting
1108 Print (L
" PackageVersion - 0x%x\n", PackageVersion);
1109 Print (L
" PackageVersionName - \"%s\"\n", PackageVersionName);
1110 Print (L
" PackageVersionNameMaxLen - 0x%x\n", PackageVersionNameMaxLen);
1111 Print (L
" AttributesSupported - 0x%lx\n", AttributesSupported);
1115 Print (L
" AttributesSetting - 0x%lx\n", AttributesSetting);
1132 UINTN NumberOfHandles;
1135 UINTN ImageInfoSize;
1136 UINT32 FmpImageInfoDescriptorVer;
1137 UINT8 FmpImageInfoCount;
1138 UINTN DescriptorSize;
1139 UINT32 PackageVersion;
1140 CHAR16 *PackageVersionName;
1141 UINT32 PackageVersionNameMaxLen;
1142 UINT64 AttributesSupported;
1143 UINT64 AttributesSetting;
1145 Print (L
"############\n");
1146 Print (L
"# FMP DATA #\n");
1147 Print (L
"############\n");
1148 Status =
gBS->LocateHandleBuffer (
1150 &gEfiFirmwareManagementProtocolGuid,
1155 if (EFI_ERROR (Status)) {
1156 Print (L
"FMP protocol - %r\n", EFI_NOT_FOUND);
1160 for (Index = 0; Index < NumberOfHandles; Index++) {
1161 Status =
gBS->HandleProtocol (
1162 HandleBuffer[Index],
1163 &gEfiFirmwareManagementProtocolGuid,
1166 if (EFI_ERROR (Status)) {
1171 Status = Fmp->GetImageInfo (
1181 if (Status != EFI_BUFFER_TOO_SMALL) {
1185 FmpImageInfoBuf =
NULL;
1187 if (FmpImageInfoBuf ==
NULL) {
1188 Status = EFI_OUT_OF_RESOURCES;
1192 PackageVersionName =
NULL;
1193 Status = Fmp->GetImageInfo (
1197 &FmpImageInfoDescriptorVer,
1207 if (EFI_ERROR (Status)) {
1208 Print (L
"FMP (%d) ImageInfo - %r\n", Index, Status);
1213 Print (L
"FMP (%d) ImageInfo:\n", Index);
1217 FmpImageInfoDescriptorVer,
1224 if (PackageVersionName !=
NULL) {
1233 PackageVersionName =
NULL;
1234 Status = Fmp->GetPackageInfo (
1237 &PackageVersionName,
1238 &PackageVersionNameMaxLen,
1239 &AttributesSupported,
1242 if (EFI_ERROR (Status)) {
1243 Print (L
"FMP (%d) PackageInfo - %r\n", Index, Status);
1245 Print (L
"FMP (%d) ImageInfo:\n", Index);
1249 PackageVersionNameMaxLen,
1250 AttributesSupported,
1254 if (PackageVersionName !=
NULL) {
1280 IN UINT8 DescriptorCount,
1288 CurrentImageInfo = ImageInfo;
1289 for (Index = 0; Index < DescriptorCount; Index++) {
1316 UINTN NumberOfHandles;
1319 UINTN ImageInfoSize;
1320 UINT32 FmpImageInfoDescriptorVer;
1321 UINT8 FmpImageInfoCount;
1322 UINTN DescriptorSize;
1323 UINT32 PackageVersion;
1324 CHAR16 *PackageVersionName;
1326 Status =
gBS->LocateHandleBuffer (
1328 &gEfiFirmwareManagementProtocolGuid,
1333 if (EFI_ERROR (Status)) {
1334 Print (L
"FMP protocol - %r\n", EFI_NOT_FOUND);
1339 for (Index = 0; Index < NumberOfHandles; Index++) {
1340 Status =
gBS->HandleProtocol (
1341 HandleBuffer[Index],
1342 &gEfiFirmwareManagementProtocolGuid,
1345 if (EFI_ERROR (Status)) {
1350 Status = Fmp->GetImageInfo (
1360 if (Status != EFI_BUFFER_TOO_SMALL) {
1364 FmpImageInfoBuf =
NULL;
1366 if (FmpImageInfoBuf ==
NULL) {
1368 Print (L
"Out of resource\n");
1372 PackageVersionName =
NULL;
1373 Status = Fmp->GetImageInfo (
1377 &FmpImageInfoDescriptorVer,
1387 if (EFI_ERROR (Status)) {
1392 if (PackageVersionName !=
NULL) {
1396 if (
IsThisFmpImageInfo (FmpImageInfoBuf, FmpImageInfoCount, DescriptorSize, ImageTypeId)) {
1401 if (TargetFmp !=
NULL) {
1423 IN CHAR16 *ImageName
1433 Print (L
"No FMP include ImageTypeId %g\n", ImageTypeId);
1437 if (ImageIndex > 0xFF) {
1438 Print (L
"ImageIndex 0x%x too big\n", ImageIndex);
1444 Status = Fmp->GetImage (Fmp, (UINT8)ImageIndex, Image, &ImageSize);
1445 if (Status != EFI_BUFFER_TOO_SMALL) {
1446 Print (L
"Fmp->GetImage - %r\n", Status);
1451 if (Image ==
NULL) {
1452 Print (L
"Allocate FmpImage 0x%x - %r\n", ImageSize, EFI_OUT_OF_RESOURCES);
1456 Status = Fmp->GetImage (Fmp, (UINT8)ImageIndex, Image, &ImageSize);
1457 if (EFI_ERROR (Status)) {
1458 Print (L
"Fmp->GetImage - %r\n", Status);
1463 Print (L
"CapsuleApp: Dump %g ImageIndex (0x%x) to %s %r\n", ImageTypeId, ImageIndex, ImageName, Status);
EFI_STATUS ReadFileToBuffer(IN CHAR16 *FileName, OUT UINTN *BufferSize, OUT VOID **Buffer)
EFI_STATUS WriteFileFromBuffer(IN CHAR16 *FileName, IN UINTN BufferSize, IN VOID *Buffer)
EFI_SHELL_PROTOCOL * GetShellProtocol(VOID)
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
INTN EFIAPI StrnCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString, IN UINTN Length)
RETURN_STATUS EFIAPI StrnCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
EFI_STATUS GetEfiSysPartitionFromBootOptionFilePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT EFI_DEVICE_PATH_PROTOCOL **FullPath, OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL **Fs)
EFI_FIRMWARE_MANAGEMENT_PROTOCOL * FindFmpFromImageTypeId(IN EFI_GUID *ImageTypeId)
VOID DumpProvisionedCapsule(IN BOOLEAN DumpCapsuleInfo)
CHAR8 * LastAttemptStatusToString(IN UINT32 LastAttemptStatus)
VOID DumpFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
VOID DumpEsrt(IN EFI_SYSTEM_RESOURCE_TABLE *Esrt)
VOID DumpBlockDescriptors(IN EFI_CAPSULE_BLOCK_DESCRIPTOR *BlockDescriptors, IN BOOLEAN DumpCapsuleInfo)
VOID DumpFmpPackageInfo(IN UINT32 PackageVersion, IN CHAR16 *PackageVersionName, IN UINT32 PackageVersionNameMaxLen, IN UINT64 AttributesSupported, IN UINT64 AttributesSetting)
CHAR8 * FwTypeToString(IN UINT32 FwType)
BOOLEAN IsThisFmpImageInfo(IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, IN UINT8 DescriptorCount, IN UINTN DescriptorSize, IN EFI_GUID *ImageTypeId)
EFI_STATUS DumpCapsuleStatusVariable(VOID)
STATIC CHAR16 * UpperCaseString(IN CHAR16 *Str)
STATIC VOID PadStrInTail(IN CHAR16 *StrBuf, IN UINTN PadLen, IN CHAR16 Character)
INTN EFIAPI CompareFileNameInAlphabet(IN VOID *Left, IN VOID *Right)
BOOLEAN IsNestedFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
EFI_STATUS DumpCapsuleFromDisk(IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Fs, IN BOOLEAN DumpCapsuleInfo)
VOID DumpEsrtEntry(IN EFI_SYSTEM_RESOURCE_ENTRY *EsrtEntry)
EFI_STATUS DumpCapsule(IN CHAR16 *CapsuleName)
STATIC VOID GetSubStringBeforePeriod(IN CHAR16 *Str, OUT CHAR16 *SubStr, OUT UINTN *SubStrLen)
VOID DumpFmpImage(IN EFI_GUID *ImageTypeId, IN UINTN ImageIndex, IN CHAR16 *ImageName)
VOID DumpUxCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
BOOLEAN IsValidCapsuleHeader(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN UINT64 CapsuleSize)
EFI_STATUS DumpCapsuleFromBuffer(IN EFI_CAPSULE_HEADER *CapsuleHeader)
STATIC VOID SplitFileNameExtension(IN CHAR16 *FileName, OUT CHAR16 *FileNameFirst, OUT CHAR16 *FileNameExtension)
VOID DumpFmpImageInfo(IN UINTN ImageInfoSize, IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, IN UINT32 DescriptorVersion, IN UINT8 DescriptorCount, IN UINTN DescriptorSize, IN UINT32 PackageVersion, IN CHAR16 *PackageVersionName)
#define EFI_CAPSULE_VARIABLE_NAME
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS EFIAPI FileHandleFindNextFile(IN EFI_FILE_HANDLE DirHandle, OUT EFI_FILE_INFO *Buffer, OUT BOOLEAN *NoFile)
EFI_STATUS EFIAPI FileHandleClose(IN EFI_FILE_HANDLE FileHandle)
EFI_STATUS EFIAPI FileHandleGetSize(IN EFI_FILE_HANDLE FileHandle, OUT UINT64 *Size)
EFI_STATUS EFIAPI FileHandleFindFirstFile(IN EFI_FILE_HANDLE DirHandle, OUT EFI_FILE_INFO **Buffer)
EFI_STATUS EFIAPI FileHandleRead(IN EFI_FILE_HANDLE FileHandle, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
#define IMAGE_ATTRIBUTE_UEFI_IMAGE
#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED
#define IMAGE_ATTRIBUTE_RESET_REQUIRED
#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE
#define IMAGE_ATTRIBUTE_IN_USE
#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED
RETURN_STATUS EFIAPI UnicodeValueToStringS(IN OUT CHAR16 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_FILE_INFO * FileInfo(IN EFI_FILE_HANDLE FHand)
VOID EFIAPI PerformQuickSort(IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN SORT_COMPARE CompareFunction)
UINT64 EFI_PHYSICAL_ADDRESS
EFI_STATUS EFIAPI EfiBootManagerVariableToLoadOption(IN CHAR16 *VariableName, IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
EFI_STATUS EFIAPI EfiGetSystemConfigurationTable(IN EFI_GUID *TableGuid, OUT VOID **Table)
EFI_STATUS EFIAPI GetVariable2(IN CONST CHAR16 *Name, IN CONST EFI_GUID *Guid, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)
EFI_PHYSICAL_ADDRESS DataBlock
EFI_PHYSICAL_ADDRESS ContinuationPointer
EFI_GUID UpdateImageTypeId
UINT64 AttributesSupported
UINT32 LastAttemptVersion
UINT32 LowestSupportedImageVersion
UINT16 EmbeddedDriverCount
UINT64 UpdateHardwareInstance
UINT64 ImageCapsuleSupport
EFI_GUID UpdateImageTypeId
UINT32 UpdateVendorCodeSize