mirror of https://github.com/acidanthera/audk.git
SignedCapsulePkg SystemFirmwareReportDxe: Try LocateProtocol
Try LocateProtocol after HandleProtocol fails to be compatible with old SystemFirmwareUpdateDxe. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
7343bc8062
commit
fc0494a654
|
@ -202,17 +202,24 @@ FmpSetImage (
|
||||||
(VOID **)&SystemFmp
|
(VOID **)&SystemFmp
|
||||||
);
|
);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
|
Status = gBS->LocateProtocol (
|
||||||
SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
|
&gSystemFmpProtocolGuid,
|
||||||
VarStatus = gRT->SetVariable(
|
NULL,
|
||||||
SYSTEM_FMP_LAST_ATTEMPT_VARIABLE_NAME,
|
(VOID **)&SystemFmp
|
||||||
&gSystemFmpLastAttemptVariableGuid,
|
);
|
||||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
if (EFI_ERROR(Status)) {
|
||||||
sizeof(SystemFmpPrivate->LastAttempt),
|
DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
|
||||||
&SystemFmpPrivate->LastAttempt
|
SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
|
||||||
);
|
VarStatus = gRT->SetVariable(
|
||||||
DEBUG((DEBUG_INFO, "(Agent)SetLastAttemp - %r\n", VarStatus));
|
SYSTEM_FMP_LAST_ATTEMPT_VARIABLE_NAME,
|
||||||
return Status;
|
&gSystemFmpLastAttemptVariableGuid,
|
||||||
|
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||||
|
sizeof(SystemFmpPrivate->LastAttempt),
|
||||||
|
&SystemFmpPrivate->LastAttempt
|
||||||
|
);
|
||||||
|
DEBUG((DEBUG_INFO, "(Agent)SetLastAttemp - %r\n", VarStatus));
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SystemFmp->SetImage(SystemFmp, ImageIndex, Image, ImageSize, VendorCode, Progress, AbortReason);
|
return SystemFmp->SetImage(SystemFmp, ImageIndex, Image, ImageSize, VendorCode, Progress, AbortReason);
|
||||||
|
|
Loading…
Reference in New Issue