All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: masami.hiramatsu@linaro.org, takahiro.akashi@linaro.org,
	Michal Simek <michal.simek@xilinx.com>,
	Alexander Graf <agraf@csgraf.de>,
	u-boot@lists.denx.de
Subject: Re: [PATCH 1/3 v2] efi: Fix to use null handle to create new handle for efi_fmp_raw
Date: Fri, 18 Jun 2021 21:22:54 +0200	[thread overview]
Message-ID: <DA230EC4-BC19-4185-91D9-336F1B7203C7@gmx.de> (raw)
In-Reply-To: <20210618105115.257938-1-ilias.apalodimas@linaro.org>

Am 18. Juni 2021 12:51:12 MESZ schrieb Ilias Apalodimas <ilias.apalodimas@linaro.org>:
>From: Masami Hiramatsu <masami.hiramatsu@linaro.org>
>
>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.

instead

Is the problem that two protocols with the same GUID are installed on the same 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.


You can not install twice protocols with the same GUID one one handle
 What do you mean by same variable?

>
>Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
>Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>---
>v1 is at https://lists.denx.de/pipermail/u-boot/2021-June/452097.html
>changes since v1:
>- split patches
>- pick up Masami's patch fixing the efi_root issue
>- Don't use 'choice' on Kconfig sicne we need both of the FMPs
>installed for sandbox testing
>  instead just make them mutually exclusive with 'depends on'

I can't see ''depends on" in this patch.

Best regards

Heinrich


>- Only install the FMPs if CONFIG_EFI_HAVE_CAPSULE_SUPPORT is selected
> 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 9ead0d2c7816..71d3d1e523ce 100644
>--- a/lib/efi_loader/efi_capsule.c
>+++ b/lib/efi_loader/efi_capsule.c
>@@ -939,7 +939,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-06-18 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 10:51 [PATCH 1/3 v2] efi: Fix to use null handle to create new handle for efi_fmp_raw Ilias Apalodimas
2021-06-18 10:51 ` [PATCH 2/3 v2] efi_loader: Force a sinlge FMP instance per hardware store Ilias Apalodimas
2021-06-18 13:52   ` Masami Hiramatsu
2021-06-18 14:01     ` Ilias Apalodimas
2021-06-18 10:51 ` [PATCH 3/3 v2] efi_loader: Always install FMPs Ilias Apalodimas
2021-06-18 19:22 ` Heinrich Schuchardt [this message]
2021-06-19  4:23   ` [PATCH 1/3 v2] efi: Fix to use null handle to create new handle for efi_fmp_raw Masami Hiramatsu
2021-06-22  4:46   ` Ilias Apalodimas

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=DA230EC4-BC19-4185-91D9-336F1B7203C7@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=agraf@csgraf.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=masami.hiramatsu@linaro.org \
    --cc=michal.simek@xilinx.com \
    --cc=takahiro.akashi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.