]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLibNull.c
MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
authorWei6 Xu <wei6.xu@intel.com>
Mon, 24 Jun 2019 06:52:31 +0000 (14:52 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Wed, 26 Jun 2019 07:10:42 +0000 (15:10 +0800)
commit28889a78988f5bcc016f1e1857837779a6e04eca
treea821f06897e481b3919605ab9262db4dd4173c69
parente761d18f012421bf7d82da509483c2390798355b
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>
MdeModulePkg/Include/Library/CapsuleLib.h
MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c [new file with mode: 0644]
MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.h [new file with mode: 0644]
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLibNull.c
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c