Files
system76-edk2/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
Wei6 Xu 28889a7898 MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
REF: https://github.com/tianocore/tianocore.github.io/wiki/
UEFI-Capsule-on-Disk-Introducation

CoDCheckCapsuleOnDiskFlag() is to check if CapsuleOnDisk flag in
"OsIndications" Variable is enabled. It is used to indicate whether
capsule on disk is provisioned in normal boot path.

CoDClearCapsuleOnDiskFlag() is to to clear CapsuleOnDisk flags,
including "OsIndications" and "BootNext" variable.

CoDRelocateCapsule() is to relocate the capsules from EFI system
partition. Depends on PcdCapsuleInRamSupport, there are two solutions
to relocate the capsule on disk images:
When Capsule In Ram is supported, the Capsule On Disk images are
relocated into memory, and call UpdateCapsule() service to deliver
the capsules.
When Capsule In Ram is not supported, the Capsule On Disk images are
relocated into a temp file which will be stored in root directory on
a platform specific storage device. CapsuleOnDiskLoadPei PEIM will
retrieve the capsules from the relocation temp file and report
capsule hobs for them.

CoDRemoveTempFile() is to remove the relocation temp file in the next
boot after capsules are processed.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
2019-06-26 15:10:42 +08:00

99 lines
3.9 KiB
INI

## @file
# Capsule library instance for DXE_DRIVER.
#
# Capsule library instance for DXE_DRIVER module types.
#
# Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = DxeCapsuleLib
MODULE_UNI_FILE = DxeCapsuleLib.uni
FILE_GUID = 534E35DE-8EB3-47b3-A4E0-72A571E50733
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = CapsuleLib|DXE_DRIVER UEFI_APPLICATION
CONSTRUCTOR = DxeCapsuleLibConstructor
DESTRUCTOR = DxeCapsuleLibDestructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
DxeCapsuleLib.c
DxeCapsuleProcessLib.c
DxeCapsuleReportLib.c
CapsuleOnDisk.c
CapsuleOnDisk.h
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
MemoryAllocationLib
DxeServicesTableLib
UefiBootServicesTableLib
DevicePathLib
ReportStatusCodeLib
PrintLib
HobLib
BmpSupportLib
DisplayUpdateProgressLib
FileHandleLib
UefiBootManagerLib
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleMax ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSystemRebootAfterCapsuleProcessFlag ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeSubClassCapsule ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeProcessCapsulesBegin ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeProcessCapsulesEnd ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdatingFirmware ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdateFirmwareSuccess ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeUpdateFirmwareFailed ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleStatusCodeResettingSystem ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleInRamSupport ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCodRelocationDevPath ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdCoDRelocationFileName ## CONSUMES
[Protocols]
gEsrtManagementProtocolGuid ## CONSUMES
gEfiFirmwareManagementProtocolGuid ## CONSUMES
gEdkiiVariableLockProtocolGuid ## SOMETIMES_CONSUMES
gEdkiiFirmwareManagementProgressProtocolGuid ## SOMETIMES_CONSUMES
gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES
gEfiBlockIoProtocolGuid ## CONSUMES
gEfiDiskIoProtocolGuid ## CONSUMES
[Guids]
gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ## GUID
gWindowsUxCapsuleGuid ## SOMETIMES_CONSUMES ## GUID
## SOMETIMES_CONSUMES ## Variable:L"CapsuleMax"
## SOMETIMES_PRODUCES ## Variable:L"CapsuleMax"
gEfiCapsuleReportGuid
gEfiCapsuleVendorGuid ## SOMETIMES_CONSUMES ## Variable:L"CapsuleUpdateData"
gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
gEfiPartTypeSystemPartGuid ## SOMETIMES_CONSUMES
gEfiCapsuleVendorGuid ## SOMETIMES_CONSUMES ## Variable:L"CodRelocationInfo"
## SOMETIMES_CONSUMES ## Variable:L"OsIndications"
## SOMETIMES_PRODUCES ## Variable:L"OsIndications"
## SOMETIMES_CONSUMES ## Variable:L"BootNext"
## SOMETIMES_PRODUCES ## Variable:L"BootNext"
gEfiGlobalVariableGuid
gEdkiiCapsuleOnDiskNameGuid ## SOMETIMES_CONSUMES ## GUID
[Depex]
gEfiVariableWriteArchProtocolGuid