diff options
Diffstat (limited to 'SignedCapsulePkg')
-rw-r--r-- | SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c index fb7b63be9d..8802404c9a 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c @@ -202,17 +202,24 @@ FmpSetImage ( (VOID **)&SystemFmp
);
if (EFI_ERROR(Status)) {
- DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
- SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
- VarStatus = gRT->SetVariable(
- SYSTEM_FMP_LAST_ATTEMPT_VARIABLE_NAME,
- &gSystemFmpLastAttemptVariableGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
- sizeof(SystemFmpPrivate->LastAttempt),
- &SystemFmpPrivate->LastAttempt
- );
- DEBUG((DEBUG_INFO, "(Agent)SetLastAttemp - %r\n", VarStatus));
- return Status;
+ Status = gBS->LocateProtocol (
+ &gSystemFmpProtocolGuid,
+ NULL,
+ (VOID **)&SystemFmp
+ );
+ if (EFI_ERROR(Status)) {
+ DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
+ SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
+ VarStatus = gRT->SetVariable(
+ SYSTEM_FMP_LAST_ATTEMPT_VARIABLE_NAME,
+ &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);
|