47BOOLEAN mDxeCapsuleLibEndOfDxe =
FALSE;
52BOOLEAN mDxeCapsuleLibIsExitBootService =
FALSE;
97 IN CHAR16 *CapFileName OPTIONAL
129 return CompareGuid (&CapsuleHeader->CapsuleGuid, &gEdkiiCapsuleOnDiskNameGuid);
145 if (
CompareGuid (&gEfiFmpCapsuleGuid, CapsuleGuid)) {
169 IN UINT64 CapsuleSize
172 if (CapsuleHeader->CapsuleImageSize != CapsuleSize) {
176 if (CapsuleHeader->HeaderSize >= CapsuleHeader->CapsuleImageSize) {
206 OUT UINT16 *EmbeddedDriverCount OPTIONAL
213 UINT64 *ItemOffsetList;
216 UINTN FmpCapsuleSize;
217 UINTN FmpCapsuleHeaderSize;
219 UINTN FmpImageHeaderSize;
225 if (CapsuleHeader->HeaderSize >= CapsuleHeader->CapsuleImageSize) {
226 DEBUG ((DEBUG_ERROR,
"HeaderSize(0x%x) >= CapsuleImageSize(0x%x)\n", CapsuleHeader->HeaderSize, CapsuleHeader->CapsuleImageSize));
227 return EFI_INVALID_PARAMETER;
231 EndOfCapsule = (UINT8 *)CapsuleHeader + CapsuleHeader->CapsuleImageSize;
232 FmpCapsuleSize = (
UINTN)EndOfCapsule - (
UINTN)FmpCapsuleHeader;
235 DEBUG ((DEBUG_ERROR,
"FmpCapsuleSize(0x%x) < EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER\n", FmpCapsuleSize));
236 return EFI_INVALID_PARAMETER;
240 if (FmpCapsuleHeader->Version != EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION) {
241 DEBUG ((DEBUG_ERROR,
"FmpCapsuleHeader->Version(0x%x) != EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION\n", FmpCapsuleHeader->Version));
242 return EFI_INVALID_PARAMETER;
245 ItemOffsetList = (UINT64 *)(FmpCapsuleHeader + 1);
251 DEBUG ((DEBUG_ERROR,
"ItemNum(0x%x) too big\n", ItemNum));
252 return EFI_INVALID_PARAMETER;
258 for (Index = 0; Index < ItemNum; Index++) {
259 if (ItemOffsetList[Index] >= FmpCapsuleSize) {
260 DEBUG ((DEBUG_ERROR,
"ItemOffsetList[%d](0x%lx) >= FmpCapsuleSize(0x%x)\n", Index, ItemOffsetList[Index], FmpCapsuleSize));
261 return EFI_INVALID_PARAMETER;
264 if (ItemOffsetList[Index] < FmpCapsuleHeaderSize) {
265 DEBUG ((DEBUG_ERROR,
"ItemOffsetList[%d](0x%lx) < FmpCapsuleHeaderSize(0x%x)\n", Index, ItemOffsetList[Index], FmpCapsuleHeaderSize));
266 return EFI_INVALID_PARAMETER;
273 if (ItemOffsetList[Index] <= ItemOffsetList[Index - 1]) {
274 DEBUG ((DEBUG_ERROR,
"ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index - 1, ItemOffsetList[Index - 1]));
275 return EFI_INVALID_PARAMETER;
283 if (Index == ItemNum - 1) {
284 EndOfPayload = (UINT8 *)((
UINTN)EndOfCapsule - (
UINTN)FmpCapsuleHeader);
286 EndOfPayload = (UINT8 *)(
UINTN)ItemOffsetList[Index+1];
289 FmpImageSize = (
UINTN)EndOfPayload - ItemOffsetList[Index];
292 if ((ImageHeader->Version > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) ||
293 (ImageHeader->Version < 1))
295 DEBUG ((DEBUG_ERROR,
"ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version));
296 return EFI_INVALID_PARAMETER;
299 if (ImageHeader->Version == 1) {
301 }
else if (ImageHeader->Version == 2) {
305 if (FmpImageSize < FmpImageHeaderSize) {
306 DEBUG ((DEBUG_ERROR,
"FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize));
307 return EFI_INVALID_PARAMETER;
313 return EFI_INVALID_PARAMETER;
321 EndOfPayload = (UINT8 *)(FmpCapsuleHeader + 1);
322 if (EndOfPayload != EndOfCapsule) {
323 DEBUG ((DEBUG_ERROR,
"EndOfPayload(0x%x) mismatch, EndOfCapsule(0x%x)\n", EndOfPayload, EndOfCapsule));
324 return EFI_INVALID_PARAMETER;
327 return EFI_UNSUPPORTED;
330 if (EmbeddedDriverCount !=
NULL) {
365 return EFI_UNSUPPORTED;
372 PayloadSize = CapsuleHeader->CapsuleImageSize - CapsuleHeader->HeaderSize;
379 return EFI_INVALID_PARAMETER;
382 if (ImagePayload->Version != 1) {
383 return EFI_UNSUPPORTED;
386 if (
CalculateCheckSum8 ((UINT8 *)CapsuleHeader, CapsuleHeader->CapsuleImageSize) != 0) {
387 return EFI_UNSUPPORTED;
393 if (ImagePayload->ImageType != 0) {
394 return EFI_UNSUPPORTED;
400 Status =
gBS->HandleProtocol (
gST->
ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **)&GraphicsOutput);
401 if (EFI_ERROR (Status)) {
402 Status =
gBS->LocateProtocol (&gEfiGraphicsOutputProtocolGuid,
NULL, (VOID **)&GraphicsOutput);
403 if (EFI_ERROR (Status)) {
404 return EFI_UNSUPPORTED;
408 if (GraphicsOutput->
Mode->
Mode != ImagePayload->Mode) {
409 return EFI_UNSUPPORTED;
424 if (EFI_ERROR (Status)) {
428 Status = GraphicsOutput->Blt (
434 (
UINTN)ImagePayload->OffsetX,
435 (
UINTN)ImagePayload->OffsetY,
461 IN UINT32 DescriptorVersion,
462 IN UINT8 DescriptorCount,
464 IN UINT32 PackageVersion,
465 IN CHAR16 *PackageVersionName
471 DEBUG ((DEBUG_VERBOSE,
" DescriptorVersion - 0x%x\n", DescriptorVersion));
472 DEBUG ((DEBUG_VERBOSE,
" DescriptorCount - 0x%x\n", DescriptorCount));
473 DEBUG ((DEBUG_VERBOSE,
" DescriptorSize - 0x%x\n", DescriptorSize));
474 DEBUG ((DEBUG_VERBOSE,
" PackageVersion - 0x%x\n", PackageVersion));
475 DEBUG ((DEBUG_VERBOSE,
" PackageVersionName - %s\n\n", PackageVersionName));
476 CurrentImageInfo = ImageInfo;
477 for (Index = 0; Index < DescriptorCount; Index++) {
478 DEBUG ((DEBUG_VERBOSE,
" ImageDescriptor (%d)\n", Index));
479 DEBUG ((DEBUG_VERBOSE,
" ImageIndex - 0x%x\n", CurrentImageInfo->
ImageIndex));
480 DEBUG ((DEBUG_VERBOSE,
" ImageTypeId - %g\n", &CurrentImageInfo->
ImageTypeId));
481 DEBUG ((DEBUG_VERBOSE,
" ImageId - 0x%lx\n", CurrentImageInfo->
ImageId));
482 DEBUG ((DEBUG_VERBOSE,
" ImageIdName - %s\n", CurrentImageInfo->
ImageIdName));
483 DEBUG ((DEBUG_VERBOSE,
" Version - 0x%x\n", CurrentImageInfo->
Version));
484 DEBUG ((DEBUG_VERBOSE,
" VersionName - %s\n", CurrentImageInfo->
VersionName));
485 DEBUG ((DEBUG_VERBOSE,
" Size - 0x%x\n", CurrentImageInfo->
Size));
489 if (DescriptorVersion > 1) {
491 if (DescriptorVersion > 2) {
518 UINT64 *ItemOffsetList;
522 DEBUG ((DEBUG_VERBOSE,
"FmpCapsule:\n"));
523 DEBUG ((DEBUG_VERBOSE,
" Version - 0x%x\n", FmpCapsuleHeader->Version));
527 ItemOffsetList = (UINT64 *)(FmpCapsuleHeader + 1);
529 DEBUG ((DEBUG_VERBOSE,
" ItemOffsetList[%d] - 0x%lx\n", Index, ItemOffsetList[Index]));
533 DEBUG ((DEBUG_VERBOSE,
" ItemOffsetList[%d] - 0x%lx\n", Index, ItemOffsetList[Index]));
536 DEBUG ((DEBUG_VERBOSE,
" ImageHeader:\n"));
537 DEBUG ((DEBUG_VERBOSE,
" Version - 0x%x\n", ImageHeader->Version));
542 if (ImageHeader->Version >= 2) {
544 if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
561 UINTN NumberOfHandles;
566 UINT32 FmpImageInfoDescriptorVer;
567 UINT8 FmpImageInfoCount;
568 UINTN DescriptorSize;
569 UINT32 PackageVersion;
570 CHAR16 *PackageVersionName;
572 Status =
gBS->LocateHandleBuffer (
574 &gEfiFirmwareManagementProtocolGuid,
579 if (EFI_ERROR (Status)) {
583 for (Index = 0; Index < NumberOfHandles; Index++) {
584 Status =
gBS->HandleProtocol (
586 &gEfiFirmwareManagementProtocolGuid,
589 if (EFI_ERROR (Status)) {
594 Status = Fmp->GetImageInfo (
604 if (Status != EFI_BUFFER_TOO_SMALL) {
609 if (FmpImageInfoBuf ==
NULL) {
613 PackageVersionName =
NULL;
614 Status = Fmp->GetImageInfo (
618 &FmpImageInfoDescriptorVer,
624 if (EFI_ERROR (Status)) {
629 DEBUG ((DEBUG_INFO,
"FMP (%d) ImageInfo:\n", Index));
633 FmpImageInfoDescriptorVer,
640 if (PackageVersionName !=
NULL) {
671 IN UINT64 UpdateHardwareInstance,
674 OUT BOOLEAN **ResetRequiredBuf OPTIONAL
679 UINTN NumberOfHandles;
681 BOOLEAN *MatchedResetRequiredBuffer;
682 UINTN MatchedNumberOfHandles;
687 UINT32 FmpImageInfoDescriptorVer;
688 UINT8 FmpImageInfoCount;
689 UINTN DescriptorSize;
690 UINT32 PackageVersion;
691 CHAR16 *PackageVersionName;
695 if (NoHandles !=
NULL) {
699 if (HandleBuf !=
NULL) {
703 if (ResetRequiredBuf !=
NULL) {
704 *ResetRequiredBuf =
NULL;
707 Status =
gBS->LocateHandleBuffer (
709 &gEfiFirmwareManagementProtocolGuid,
714 if (EFI_ERROR (Status)) {
718 MatchedNumberOfHandles = 0;
720 MatchedHandleBuffer =
NULL;
721 if (HandleBuf !=
NULL) {
723 if (MatchedHandleBuffer ==
NULL) {
725 return EFI_OUT_OF_RESOURCES;
729 MatchedResetRequiredBuffer =
NULL;
730 if (ResetRequiredBuf !=
NULL) {
731 MatchedResetRequiredBuffer =
AllocateZeroPool (
sizeof (BOOLEAN) * NumberOfHandles);
732 if (MatchedResetRequiredBuffer ==
NULL) {
733 if (MatchedHandleBuffer !=
NULL) {
738 return EFI_OUT_OF_RESOURCES;
742 for (Index = 0; Index < NumberOfHandles; Index++) {
743 Status =
gBS->HandleProtocol (
745 &gEfiFirmwareManagementProtocolGuid,
748 if (EFI_ERROR (Status)) {
753 Status = Fmp->GetImageInfo (
763 if (Status != EFI_BUFFER_TOO_SMALL) {
768 if (FmpImageInfoBuf ==
NULL) {
772 PackageVersionName =
NULL;
773 Status = Fmp->GetImageInfo (
777 &FmpImageInfoDescriptorVer,
783 if (EFI_ERROR (Status)) {
788 if (PackageVersionName !=
NULL) {
792 TempFmpImageInfo = FmpImageInfoBuf;
793 for (Index2 = 0; Index2 < FmpImageInfoCount; Index2++) {
798 if ((UpdateHardwareInstance == 0) ||
802 if (MatchedHandleBuffer !=
NULL) {
803 MatchedHandleBuffer[MatchedNumberOfHandles] = HandleBuffer[Index];
806 if (MatchedResetRequiredBuffer !=
NULL) {
807 MatchedResetRequiredBuffer[MatchedNumberOfHandles] = (((TempFmpImageInfo->
AttributesSupported &
813 MatchedNumberOfHandles++;
826 if (MatchedNumberOfHandles == 0) {
827 return EFI_NOT_FOUND;
830 if (NoHandles !=
NULL) {
831 *NoHandles = MatchedNumberOfHandles;
834 if (HandleBuf !=
NULL) {
835 *HandleBuf = MatchedHandleBuffer;
838 if (ResetRequiredBuf !=
NULL) {
839 *ResetRequiredBuf = MatchedResetRequiredBuffer;
861 UINT32 FmpImageInfoDescriptorVer;
862 UINT8 FmpImageInfoCount;
863 UINTN DescriptorSize;
864 UINT32 PackageVersion;
865 CHAR16 *PackageVersionName;
867 Status =
gBS->HandleProtocol (
869 &gEfiFirmwareManagementProtocolGuid,
872 if (EFI_ERROR (Status)) {
877 Status = Fmp->GetImageInfo (
887 if (Status != EFI_BUFFER_TOO_SMALL) {
892 if (FmpImageInfoBuf ==
NULL) {
896 PackageVersionName =
NULL;
897 Status = Fmp->GetImageInfo (
901 &FmpImageInfoDescriptorVer,
907 if (EFI_ERROR (Status)) {
912 return FmpImageInfoDescriptorVer;
938 Status =
gBS->HandleProtocol (
940 &gEfiFirmwareManagementProtocolGuid,
943 if (EFI_ERROR (Status)) {
951 Status =
gBS->HandleProtocol (
956 if (EFI_ERROR (Status)) {
960 if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
961 Image = (UINT8 *)(ImageHeader + 1);
968 if (ImageHeader->Version == 1) {
975 if (ImageHeader->UpdateVendorCodeSize == 0) {
978 VendorCode = Image + ImageHeader->UpdateImageSize;
982 DEBUG ((DEBUG_INFO,
"Fmp->SetImage ...\n"));
983 DEBUG ((DEBUG_INFO,
"ImageTypeId - %g, ", &ImageHeader->UpdateImageTypeId));
984 DEBUG ((DEBUG_INFO,
"PayloadIndex - 0x%x, ", PayloadIndex));
985 DEBUG ((DEBUG_INFO,
"ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex));
986 if (ImageHeader->Version >= 2) {
987 DEBUG ((DEBUG_INFO,
"(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
988 if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
989 DEBUG ((DEBUG_INFO,
"(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport));
993 DEBUG ((DEBUG_INFO,
"\n"));
1000 if (EFI_ERROR (Status)) {
1001 ProgressCallback =
NULL;
1004 Status = Fmp->SetImage (
1006 ImageHeader->UpdateImageIndex,
1008 ImageHeader->UpdateImageSize,
1016 if (ProgressCallback !=
NULL) {
1020 DEBUG ((DEBUG_INFO,
"Fmp->SetImage - %r\n", Status));
1021 if (AbortReason !=
NULL) {
1022 DEBUG ((DEBUG_ERROR,
"%s\n", AbortReason));
1044 IN VOID *ImageBuffer,
1062 if (DriverDevicePath ==
NULL) {
1063 return EFI_OUT_OF_RESOURCES;
1066 DEBUG ((DEBUG_INFO,
"FmpCapsule: LoadImage ...\n"));
1067 Status =
gBS->LoadImage (
1075 DEBUG ((DEBUG_INFO,
"FmpCapsule: LoadImage - %r\n", Status));
1076 if (EFI_ERROR (Status)) {
1083 if (Status == EFI_SECURITY_VIOLATION) {
1084 gBS->UnloadImage (ImageHandle);
1091 DEBUG ((DEBUG_INFO,
"FmpCapsule: StartImage ...\n"));
1092 Status =
gBS->StartImage (
1097 DEBUG ((DEBUG_INFO,
"FmpCapsule: StartImage - %r\n", Status));
1098 if (EFI_ERROR (Status)) {
1099 DEBUG ((DEBUG_ERROR,
"Driver Return Status = %r\n", Status));
1123 IN CHAR16 *CapFileName OPTIONAL
1128 UINT32 FmpImageInfoDescriptorVer;
1133 FmpDevicePath =
NULL;
1134 if (Handle !=
NULL) {
1135 gBS->HandleProtocol (
1137 &gEfiDevicePathProtocolGuid,
1138 (VOID **)&FmpDevicePath
1154 Status =
gBS->LocateProtocol (&gEsrtManagementProtocolGuid,
NULL, (VOID **)&EsrtProtocol);
1155 if (EFI_ERROR (Status)) {
1159 if (Handle ==
NULL) {
1169 StatusEsrt = EsrtProtocol->GetEsrtEntry (&ImageHeader->UpdateImageTypeId, &EsrtEntry);
1170 if (!EFI_ERROR (StatusEsrt)) {
1171 if (!EFI_ERROR (CapsuleStatus)) {
1178 EsrtProtocol->UpdateEsrtEntry (&EsrtEntry);
1206 IN CHAR16 *CapFileName OPTIONAL,
1207 OUT BOOLEAN *ResetRequired OPTIONAL
1213 UINT64 *ItemOffsetList;
1217 BOOLEAN *ResetRequiredBuffer;
1218 UINTN NumberOfHandles;
1220 UINT64 UpdateHardwareInstance;
1236 if (FmpCapsuleHeader->Version > EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION) {
1237 return EFI_INVALID_PARAMETER;
1240 ItemOffsetList = (UINT64 *)(FmpCapsuleHeader + 1);
1261 DriverLen = CapsuleHeader->CapsuleImageSize - CapsuleHeader->HeaderSize - (
UINTN)ItemOffsetList[Index];
1263 DriverLen = (
UINTN)ItemOffsetList[Index + 1] - (
UINTN)ItemOffsetList[Index];
1267 (UINT8 *)FmpCapsuleHeader + ItemOffsetList[Index],
1270 if (EFI_ERROR (Status)) {
1271 DEBUG ((DEBUG_ERROR,
"Driver Return Status = %r\n", Status));
1279 DEBUG ((DEBUG_INFO,
"FmpCapsule: route payload to right FMP instance ...\n"));
1289 UpdateHardwareInstance = 0;
1293 if (ImageHeader->Version >= 2) {
1299 UpdateHardwareInstance,
1302 &ResetRequiredBuffer
1304 if (EFI_ERROR (Status) ||
1305 (HandleBuffer ==
NULL) ||
1306 (ResetRequiredBuffer ==
NULL))
1320 for (Index2 = 0; Index2 < NumberOfHandles; Index2++) {
1323 HandleBuffer[Index2],
1334 HandleBuffer[Index2],
1341 if (ResetRequired !=
NULL) {
1342 *ResetRequired |= ResetRequiredBuffer[Index2];
1347 HandleBuffer[Index2],
1356 if (HandleBuffer !=
NULL) {
1360 if (ResetRequiredBuffer !=
NULL) {
1366 return EFI_NOT_READY;
1392 BOOLEAN EsrtGuidFound;
1394 UINTN NestedCapsuleSize;
1398 EsrtGuidFound =
FALSE;
1399 if (mDxeCapsuleLibIsExitBootService) {
1400 if (mEsrtTable !=
NULL) {
1402 for (Index = 0; Index < mEsrtTable->
FwResourceCount; Index++, EsrtEntry++) {
1404 EsrtGuidFound =
TRUE;
1413 Status =
gBS->LocateProtocol (&gEsrtManagementProtocolGuid,
NULL, (VOID **)&EsrtProtocol);
1414 if (!EFI_ERROR (Status)) {
1415 Status = EsrtProtocol->GetEsrtEntry (&CapsuleHeader->CapsuleGuid, &Entry);
1416 if (!EFI_ERROR (Status)) {
1417 EsrtGuidFound =
TRUE;
1424 if (!EsrtGuidFound) {
1426 &CapsuleHeader->CapsuleGuid,
1432 if (!EFI_ERROR (Status)) {
1433 EsrtGuidFound =
TRUE;
1438 if (!EsrtGuidFound) {
1446 NestedCapsuleHeader = (
EFI_CAPSULE_HEADER *)((UINT8 *)CapsuleHeader + CapsuleHeader->HeaderSize);
1460 DEBUG ((DEBUG_INFO,
"IsNestedFmpCapsule\n"));
1508 if (
CompareGuid (&gWindowsUxCapsuleGuid, &CapsuleHeader->CapsuleGuid)) {
1523 if (CapsuleHeader->HeaderSize == CapsuleHeader->CapsuleImageSize) {
1533 DEBUG ((DEBUG_ERROR,
"Unknown Capsule Guid - %g\n", &CapsuleHeader->CapsuleGuid));
1534 return EFI_UNSUPPORTED;
1555 IN CHAR16 *CapFileName OPTIONAL,
1556 OUT BOOLEAN *ResetRequired OPTIONAL
1563 return EFI_UNSUPPORTED;
1569 if (
CompareGuid (&gWindowsUxCapsuleGuid, &CapsuleHeader->CapsuleGuid)) {
1570 DEBUG ((DEBUG_INFO,
"ProcessCapsuleImage for WindowsUxCapsule ...\n"));
1580 DEBUG ((DEBUG_INFO,
"ProcessCapsuleImage for FmpCapsule ...\n"));
1581 DEBUG ((DEBUG_INFO,
"ValidateFmpCapsule ...\n"));
1583 DEBUG ((DEBUG_INFO,
"ValidateFmpCapsule - %r\n", Status));
1584 if (EFI_ERROR (Status)) {
1592 DEBUG ((DEBUG_INFO,
"ProcessFmpCapsuleImage ...\n"));
1594 DEBUG ((DEBUG_INFO,
"ProcessFmpCapsuleImage - %r\n", Status));
1599 return EFI_UNSUPPORTED;
1637 mDxeCapsuleLibEndOfDxe =
TRUE;
1657 Status =
gBS->CreateEventEx (
1662 &gEfiEndOfDxeEventGroupGuid,
1663 &mDxeCapsuleLibEndOfDxeEvent
1692 Status =
gBS->CloseEvent (mDxeCapsuleLibEndOfDxeEvent);
UINT8 EFIAPI CalculateCheckSum8(IN CONST UINT8 *Buffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
RETURN_STATUS EFIAPI TranslateBmpToGopBlt(IN VOID *BmpImage, IN UINTN BmpImageSize, IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **GopBlt, IN OUT UINTN *GopBltSize, OUT UINTN *PixelHeight, OUT UINTN *PixelWidth)
#define HARDWARE_DEVICE_PATH
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
EFI_STATUS ValidateFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader, OUT UINT16 *EmbeddedDriverCount OPTIONAL)
BOOLEAN IsFmpCapsuleGuid(IN EFI_GUID *CapsuleGuid)
EFI_STATUS StartFmpImage(IN VOID *ImageBuffer, IN UINTN ImageSize)
EFI_STATUS EFIAPI DxeCapsuleLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
UINT32 GetFmpImageInfoDescriptorVer(IN EFI_HANDLE Handle)
EFI_STATUS EFIAPI ProcessCapsuleImage(IN EFI_CAPSULE_HEADER *CapsuleHeader)
VOID EFIAPI DxeCapsuleLibEndOfDxe(IN EFI_EVENT Event, IN VOID *Context)
BOOLEAN IsFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
VOID DumpFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL * mFmpProgress
BOOLEAN IsCapsuleNameCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
EFI_STATUS RecordCapsuleStatusVariable(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN EFI_STATUS CapsuleStatus)
EFI_STATUS EFIAPI ProcessThisCapsuleImage(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN CHAR16 *CapFileName OPTIONAL, OUT BOOLEAN *ResetRequired OPTIONAL)
BOOLEAN IsNestedFmpCapsule(IN EFI_CAPSULE_HEADER *CapsuleHeader)
EFI_STATUS EFIAPI DxeCapsuleLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID RecordFmpCapsuleStatus(IN EFI_HANDLE Handle OPTIONAL, IN EFI_CAPSULE_HEADER *CapsuleHeader, IN EFI_STATUS CapsuleStatus, IN UINTN PayloadIndex, IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader, IN CHAR16 *CapFileName OPTIONAL)
EFI_STATUS SetFmpImageData(IN EFI_HANDLE Handle, IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader, IN UINTN PayloadIndex)
EFI_STATUS EFIAPI UpdateImageProgress(IN UINTN Completion)
EFI_STATUS GetFmpHandleBufferByType(IN EFI_GUID *UpdateImageTypeId, IN UINT64 UpdateHardwareInstance, OUT UINTN *NoHandles OPTIONAL, OUT EFI_HANDLE **HandleBuf OPTIONAL, OUT BOOLEAN **ResetRequiredBuf OPTIONAL)
EFI_STATUS ProcessFmpCapsuleImage(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN CHAR16 *CapFileName OPTIONAL, OUT BOOLEAN *ResetRequired OPTIONAL)
EFI_STATUS RecordFmpCapsuleStatusVariable(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN EFI_STATUS CapsuleStatus, IN UINTN PayloadIndex, IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader, IN EFI_DEVICE_PATH_PROTOCOL *FmpDevicePath OPTIONAL, IN CHAR16 *CapFileName OPTIONAL)
BOOLEAN IsValidCapsuleHeader(IN EFI_CAPSULE_HEADER *CapsuleHeader, IN UINT64 CapsuleSize)
VOID DumpAllFmpInfo(VOID)
EFI_STATUS EFIAPI SupportCapsuleImage(IN EFI_CAPSULE_HEADER *CapsuleHeader)
EFI_STATUS DisplayCapsuleImage(IN EFI_CAPSULE_HEADER *CapsuleHeader)
VOID InitCapsuleVariable(VOID)
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)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define IMAGE_ATTRIBUTE_RESET_REQUIRED
#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION
EFI_STATUS(EFIAPI * EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS)(IN UINTN Completion)
EFI_GUID gEdkiiFirmwareManagementProgressProtocolGuid
#define OFFSET_OF(TYPE, Field)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define LAST_ATTEMPT_STATUS_SUCCESS
UINT64 EFI_PHYSICAL_ADDRESS
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE * Mode
UINT64 AttributesSupported
UINT32 LastAttemptVersion
UINT32 LowestSupportedImageVersion
UINT16 EmbeddedDriverCount
UINT64 UpdateHardwareInstance
UINT64 ImageCapsuleSupport
EFI_GUID UpdateImageTypeId
UINT32 UpdateVendorCodeSize
UINT32 LastAttemptVersion
EFI_HANDLE ConsoleOutHandle
EFI_PHYSICAL_ADDRESS StartingAddress
EFI_PHYSICAL_ADDRESS EndingAddress