summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinney, Michael D <michael.d.kinney@intel.com>2018-04-09 15:47:19 -0700
committerStar Zeng <star.zeng@intel.com>2018-07-13 09:44:11 +0800
commitc3e2883788dcb6ccb7196699a228e9bfde7ae722 (patch)
tree6c66f60819bbd618fad71ddd2d6ba0a42269fd23
parent688829df30488da32b5d134253cd3560ad5c57c3 (diff)
downloadedk2-c3e2883788dcb6ccb7196699a228e9bfde7ae722.tar.gz
edk2-c3e2883788dcb6ccb7196699a228e9bfde7ae722.tar.bz2
edk2-c3e2883788dcb6ccb7196699a228e9bfde7ae722.zip
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> (cherry picked from commit 153f5c7a93be09403891404c06e5b0e24eb019a3)
-rw-r--r--SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c
index f5f9827c77..e750e5d4ce 100644
--- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c
+++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c
@@ -8,7 +8,7 @@
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
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
@@ -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)) {
DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;