public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiewen Yao <jiewen.yao@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: [Patch 2/2] SignedCapsulePkg/SystemFirmwareReportDxe: Pass thru on same handle
Date: Mon,  9 Apr 2018 22:53:39 -0700	[thread overview]
Message-ID: <20180410055339.17532-3-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20180410055339.17532-1-michael.d.kinney@intel.com>

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
---
 .../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.<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;
-- 
2.14.2.windows.3



  parent reply	other threads:[~2018-04-10  5:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10  5:53 [Patch 0/2] SignedCapsulePkg/SystemFirmwareUpdate: Kinney, Michael D
2018-04-10  5:53 ` [Patch 1/2] SignedCapsulePkg/SystemFirmwareUpdateDxe: Single FMP Kinney, Michael D
2018-04-10  5:53 ` Kinney, Michael D [this message]
2018-04-11  6:26 ` [Patch 0/2] SignedCapsulePkg/SystemFirmwareUpdate: Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180410055339.17532-3-michael.d.kinney@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox