From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 25332225FA04F for ; Mon, 9 Apr 2018 22:53:43 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2018 22:53:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,430,1517904000"; d="scan'208";a="44905375" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.254.74.27]) by fmsmga004.fm.intel.com with ESMTP; 09 Apr 2018 22:53:42 -0700 From: "Kinney, Michael D" To: edk2-devel@lists.01.org Cc: Jiewen Yao , Michael D Kinney Date: Mon, 9 Apr 2018 22:53:39 -0700 Message-Id: <20180410055339.17532-3-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.14.2.windows.3 In-Reply-To: <20180410055339.17532-1-michael.d.kinney@intel.com> References: <20180410055339.17532-1-michael.d.kinney@intel.com> Subject: [Patch 2/2] SignedCapsulePkg/SystemFirmwareReportDxe: Pass thru on same handle X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2018 05:53:43 -0000 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 Signed-off-by: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 --- .../Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.c | 10 +++++++--- 1 file 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.
+ Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
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; -- 2.14.2.windows.3