From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E45D8C48BDF for ; Fri, 18 Jun 2021 19:23:10 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4AEE61260 for ; Fri, 18 Jun 2021 19:23:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4AEE61260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A4B782BBD; Fri, 18 Jun 2021 21:23:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="bIpu+H0h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B41C82BC9; Fri, 18 Jun 2021 21:23:05 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 99FD682B74 for ; Fri, 18 Jun 2021 21:23:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624044178; bh=oecjl9VPHf0aH1PvvST1qocOHXjHNpQ/MR8Ls7suc9w=; h=X-UI-Sender-Class:Date:In-Reply-To:References:Subject:To:CC:From; b=bIpu+H0h/90+HNXt1cWe1SHOz/0fT0mVULC87tGRc1d4fyySqGrMVAZrME4MPxhPS h7hrnUbYMTczWXhb2JQzBtfgvwLuKQQuX5t2RXtANsfZ8BAcDiEyEvOYYwydZZPlCO c8NIoAik7XTVuNBCi11nDvnKUQXmiutMao+gcdWo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.165.159.37] ([46.114.7.37]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1fii-1l9tTF3tLE-011zYd; Fri, 18 Jun 2021 21:22:58 +0200 Date: Fri, 18 Jun 2021 21:22:54 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <20210618105115.257938-1-ilias.apalodimas@linaro.org> References: <20210618105115.257938-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 1/3 v2] efi: Fix to use null handle to create new handle for efi_fmp_raw To: Ilias Apalodimas CC: masami.hiramatsu@linaro.org, takahiro.akashi@linaro.org, Michal Simek , Alexander Graf , u-boot@lists.denx.de From: Heinrich Schuchardt Message-ID: X-Provags-ID: V03:K1:vI/weNlacjcAd59juKJj27yXE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FNsROpeRYLieLi5mP+quxwgCip9rrv4m8ziDDe0aSkvO+jjiUixs9tNF5g9t/ XCMyMt+o/OAjSwTODQYgUB0wySenI9jtSm/cpZjaqKc8cVqq4znuMXRk56tkZZ8WelNf28ZsJ Ve9Gg4ROEEACZ7hi2lkIk5bg2+5Y5KPr25UWjjnq8f0H94taA0+JswL1t003TjtFvJD5icCfV XkhXeOdPpGJAXGltUXXpPPLRAU9SZL8JYb9SR0bmvvOcBSawjjRCNMoILdC3XbPtp9nrlL1cL /MvPvSwz3ZSut2yvqD2zsn/7tFSXASGFbEP X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Am 18=2E Juni 2021 12:51:12 MESZ schrieb Ilias Apalodimas : >From: Masami Hiramatsu > >When running the efidebug capsule disk-update command, the efi_fmp_raw >protocol installation is failed with 2 (EFI_INVALID_PARAMETER) as >below=2E This is because the code passes efi_root instaed of handle=2E instead Is the problem that two protocols with the same GUID are installed on the = same handle? > >=3D> 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=3D1 > >To fix this issue, pass the handle variable as same as the efi_fmp_fit >installation=2E 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 >Signed-off-by: Ilias Apalodimas >--- >v1 is at https://lists=2Edenx=2Ede/pipermail/u-boot/2021-June/452097=2Eht= ml >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=2E Best regards Heinrich >- Only install the FMPs if CONFIG_EFI_HAVE_CAPSULE_SUPPORT is selected > lib/efi_loader/efi_capsule=2Ec | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/efi_loader/efi_capsule=2Ec >b/lib/efi_loader/efi_capsule=2Ec >index 9ead0d2c7816=2E=2E71d3d1e523ce 100644 >--- a/lib/efi_loader/efi_capsule=2Ec >+++ b/lib/efi_loader/efi_capsule=2Ec >@@ -939,7 +939,7 @@ efi_status_t __weak >arch_efi_load_capsule_drivers(void) > if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) { > handle =3D NULL; > ret =3D EFI_CALL(efi_install_multiple_protocol_interfaces( >- &efi_root, >+ &handle, > &efi_guid_firmware_management_protocol, > &efi_fmp_raw, NULL)); > }