]> git.proxmox.com Git - mirror_edk2.git/commit - FmpDevicePkg/FmpDxe/FmpDxe.c
FmpDevicePkg/FmpDxe: Add check image path Last Attempt Status capability
authorMichael Kubacki <michael.kubacki@microsoft.com>
Mon, 19 Oct 2020 23:59:36 +0000 (07:59 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 28 Oct 2020 06:05:52 +0000 (06:05 +0000)
commit5550f4d33b64abc989ec6597ed6a19712b915c63
tree5b2e078d32f8a78b037a8b399911d825f9f523b9
parent2c1e9f1dc5efda0787d059cc1d5534a6c4409503
FmpDevicePkg/FmpDxe: Add check image path Last Attempt Status capability

CheckTheImage() is currently used to provide the CheckImage()
implementation for the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance
produced by FmpDxe in addition to being called internally in the
SetImage() path.

Since CheckTheImage() plays a major role in determining the
validity of a given firmware image, an internal version of the
function is introduced - CheckTheImageInternal() that is capable
of returning a Last Attempt Status code to internal callers such
as SetTheImage().

The CheckImage() API as defined in the UEFI Specification for
EFI_FIRMWARE_MANAGEMENT_PROTOCOL is not impacted by this change.

CheckTheImageInternal() contains unique Last Attempt Status codes
during error paths in the function so it is easier to identify
the issue with a particular image through the Last Attempt Status
code value.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
FmpDevicePkg/FmpDxe/FmpDxe.c
FmpDevicePkg/FmpDxe/FmpDxe.h