public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH v4 03/14] efi: Fix to use null handle to create new handle for efi_fmp_raw
Date: Wed, 19 May 2021 14:44:54 +0900	[thread overview]
Message-ID: <162140309457.47256.11132864507511171368.stgit@localhost> (raw)
In-Reply-To: <162140306116.47256.6799058439792039400.stgit@localhost>

When running the efidebug capsule disk-update command, the efi_fmp_raw
protocol installation is failed with 2 (EFI_INVALID_PARAMETER) as
below. This is because the code passes efi_root instaed of handle.

=> efidebug capsule disk-update
EFI: Call: efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL)
  EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbaf5988)
    EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
      EFI: Entry efi_install_protocol_interface(00000000fbaf5988, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6ee8)
        EFI: new handle 00000000fbb37520
      EFI: Exit: efi_install_protocol_interface: 0
    EFI: 0 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
  EFI: Exit: efi_install_multiple_protocol_interfaces: 0
EFI: 0 returned by efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL)
EFI: Call: efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL)
  EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbfec648)
    EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
      EFI: Entry efi_install_protocol_interface(00000000fbfec648, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6f18)
        EFI: handle 00000000fbaf8520
      EFI: Exit: efi_install_protocol_interface: 2
    EFI: 2 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
  EFI: Exit: efi_install_multiple_protocol_interfaces: 2
EFI: 2 returned by efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL)
Command failed, result=1

To fix this issue, pass the handle variable as same as the efi_fmp_fit
installation.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
---
 lib/efi_loader/efi_capsule.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 6ee883d5b1..f038245c93 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -949,7 +949,7 @@ efi_status_t __weak arch_efi_load_capsule_drivers(void)
 	if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) {
 		handle = NULL;
 		ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
-				&efi_root,
+				&handle,
 				&efi_guid_firmware_management_protocol,
 				&efi_fmp_raw, NULL));
 	}

  parent reply	other threads:[~2021-05-19  5:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  5:44 [PATCH v4 00/14] arm64: synquacer: Add SynQuacer/DeveloperBox support Masami Hiramatsu
2021-05-19  5:44 ` [PATCH v4 01/14] ata: ahci-pci: Use scsi_ops to initialize ops Masami Hiramatsu
2021-05-19  5:44 ` [PATCH v4 02/14] dm: pci: Skip setting VGA bridge bits if parent device is the host bus Masami Hiramatsu
2021-05-19  5:44 ` Masami Hiramatsu [this message]
2021-05-19  5:45 ` [PATCH v4 04/14] gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs Masami Hiramatsu
2021-05-19  5:45 ` [PATCH v4 05/14] pci: synquacer: Add SynQuacer ECAM based PCIe driver Masami Hiramatsu
2021-05-19  5:45 ` [PATCH v4 06/14] mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver Masami Hiramatsu
2021-05-19  5:45 ` [PATCH v4 07/14] spi: synquacer: Add HSSPI SPI controller driver for SynQuacer Masami Hiramatsu
2021-05-19  5:45 ` [PATCH v4 08/14] net: synquacer: Add netsec driver Masami Hiramatsu
2021-05-19  5:46 ` [PATCH v4 09/14] i2c: synquacer: SNI Synquacer I2C controller Masami Hiramatsu
2021-05-19  5:46 ` [PATCH v4 10/14] ARM: dts: synquacer: Add device trees for DeveloperBox Masami Hiramatsu
2021-05-19  5:46 ` [PATCH v4 11/14] board: synquacer: Add DeveloperBox 96boards EE support Masami Hiramatsu
2021-05-19  5:46 ` [PATCH v4 12/14] dfu_mtd: Ignore non-implemented lock device failure Masami Hiramatsu
2021-05-19  6:07   ` Sughosh Ganu
2021-05-19  6:34     ` Masami Hiramatsu
2021-05-28  8:50     ` Patrick DELAUNAY
2021-05-19  5:46 ` [PATCH v4 13/14] doc: qemu: arm64: Fix the documentation of capsule update Masami Hiramatsu
2021-05-19  5:46 ` [PATCH v4 14/14] configs: synquacer: Enable EFI capsule update support Masami Hiramatsu
2021-05-23  8:07 ` [PATCH v4 00/14] arm64: synquacer: Add SynQuacer/DeveloperBox support Ilias Apalodimas
2021-05-24  0:54   ` Masami Hiramatsu

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-all 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=162140309457.47256.11132864507511171368.stgit@localhost \
    --to=masami.hiramatsu@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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