audk/FmpDevicePkg
Michael Kubacki b96b44feab FmpDevicePkg/FmpDxe: Call FmpDeviceLib WithStatus() functions
Commit 6ad819c introduced two new functions in FmpDeviceLib:
1. FmpDeviceCheckImageWithStatus ()
2. FmpDeviceSetImageWithStatus ()

These functions allow an FmpDeviceLib implementation to return a
Last Attempt Status code value within the Device Library range from
LAST_ATTEMPT_STATUS_DEVICE_LIBRARY_MIN_ERROR_CODE_VALUE to
LAST_ATTEMPT_STATUS_DEVICE_LIBRARY_MAX_ERROR_CODE_VALUE.

To maintain backward compatibility, commit 6ad819c did not update
the FmpDxe driver to invoke these functions. FmpDeviceLib instances
should update their FmpDeviceCheckImage () function to simply call
FmpDeviceCheckImageWithStatus (). Similarly, FmpDeviceSetImage ()
should simply call FmpDeviceSetImageWithStatus (). This is
demonstrated in the implementation of these functions in
FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c. By doing so,
the library can remain compatible with FmpDxe implementations before
and after this transition.

This commit updates FmpDxe to call the WithStatus () version of
these functions enabling the Last Attempt Status code returned to
be accessible to FmpDxe.

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>
Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-11-10 01:32:43 +00:00
..
CapsuleUpdatePolicyDxe FmpDevicePkg: Fix spelling errors 2019-10-23 08:08:08 -07:00
FmpDxe FmpDevicePkg/FmpDxe: Call FmpDeviceLib WithStatus() functions 2020-11-10 01:32:43 +00:00
Include FmpDevicePkg/FmpDeviceLib: Add Last Attempt Status to Check/Set API 2020-10-28 06:05:52 +00:00
Library FmpDevicePkg/FmpDeviceLib: Add Last Attempt Status to Check/Set API 2020-10-28 06:05:52 +00:00
PrivateInclude FmpDevicePkg: Add Last Attempt Status header files 2020-10-28 06:05:52 +00:00
Test FmpDevicePkg: Add Last Attempt Status support to dependency libs 2020-10-28 06:05:52 +00:00
FmpDevicePkg.ci.yaml FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
FmpDevicePkg.dec FmpDevicePkg: Add FmpDependencyDevice library class and NULL instance 2020-05-15 06:11:44 +00:00
FmpDevicePkg.dsc FmpDevicePkg: Add RngLib instance to DSC 2020-10-19 01:58:15 +00:00
FmpDevicePkg.uni FmpDevicePkg: Fix spelling errors 2019-10-23 08:08:08 -07:00
FmpDevicePkgExtra.uni FmpDevicePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:00 -07:00