SignedCapsulePkg/SystemFirmwareReportDxe: Pass thru on same handle
https://bugzilla.tianocore.org/show_bug.cgi?id=928 Use HandleProtocol() to pass thru a SetImage() call to the System FMP Protocol that must be on the same handle as the FMP Protocol. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
FmpSetImage() will receive untrusted input and do basic validation.
|
FmpSetImage() will receive untrusted input and do basic validation.
|
||||||
|
|
||||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -194,9 +194,13 @@ FmpSetImage (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pass Thru
|
// Pass Thru to System FMP Protocol on same handle as FMP Protocol
|
||||||
//
|
//
|
||||||
Status = gBS->LocateProtocol(&gSystemFmpProtocolGuid, NULL, (VOID **)&SystemFmp);
|
Status = gBS->HandleProtocol(
|
||||||
|
SystemFmpPrivate->Handle,
|
||||||
|
&gSystemFmpProtocolGuid,
|
||||||
|
(VOID **)&SystemFmp
|
||||||
|
);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
|
DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
|
||||||
SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
|
SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
|
||||||
|
Reference in New Issue
Block a user