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>
70 lines
2.1 KiB
C
70 lines
2.1 KiB
C
/** @file
|
|
DXE capsule report related function.
|
|
Dummy function for runtime module, because CapsuleDxeRuntime
|
|
does not need record capsule status variable.
|
|
|
|
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#include <PiDxe.h>
|
|
#include <Protocol/FirmwareManagement.h>
|
|
#include <Guid/FmpCapsule.h>
|
|
#include <Library/CapsuleLib.h>
|
|
|
|
/**
|
|
Record capsule status variable and to local cache.
|
|
|
|
@param[in] CapsuleHeader The capsule image header
|
|
@param[in] CapsuleStatus The capsule process stauts
|
|
|
|
@retval EFI_SUCCESS The capsule status variable is recorded.
|
|
@retval EFI_OUT_OF_RESOURCES No resource to record the capsule status variable.
|
|
**/
|
|
EFI_STATUS
|
|
RecordCapsuleStatusVariable (
|
|
IN EFI_CAPSULE_HEADER *CapsuleHeader,
|
|
IN EFI_STATUS CapsuleStatus
|
|
)
|
|
{
|
|
return EFI_UNSUPPORTED;
|
|
}
|
|
|
|
/**
|
|
Record FMP capsule status variable and to local cache.
|
|
|
|
@param[in] CapsuleHeader The capsule image header
|
|
@param[in] CapsuleStatus The capsule process stauts
|
|
@param[in] PayloadIndex FMP payload index
|
|
@param[in] ImageHeader FMP image header
|
|
@param[in] FmpDevicePath DevicePath associated with the FMP producer
|
|
@param[in] CapFileName Capsule file name
|
|
|
|
@retval EFI_SUCCESS The capsule status variable is recorded.
|
|
@retval EFI_OUT_OF_RESOURCES No resource to record the capsule status variable.
|
|
**/
|
|
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
|
|
)
|
|
{
|
|
return EFI_UNSUPPORTED;
|
|
}
|
|
|
|
/**
|
|
Initialize capsule related variables.
|
|
**/
|
|
VOID
|
|
InitCapsuleVariable (
|
|
VOID
|
|
)
|
|
{
|
|
return;
|
|
}
|