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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 76880C48BDF for ; Fri, 18 Jun 2021 13:53:17 +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 7CC4E6117A for ; Fri, 18 Jun 2021 13:53:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CC4E6117A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 643D482B64; Fri, 18 Jun 2021 15:53:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="vzRpymvD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 305DD8031F; Fri, 18 Jun 2021 15:53:07 +0200 (CEST) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EFB3A801A0 for ; Fri, 18 Jun 2021 15:53:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-io1-xd2b.google.com with SMTP id v3so1328379ioq.9 for ; Fri, 18 Jun 2021 06:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=U9CIPpcJtdDkREixPUiFnAcdc+dJGfQDmIQSIXoRd14=; b=vzRpymvDZCcNj4/b7U3TeFHbGfkCJ3Z/nHmwTltW7umlp59loIWF7IW3HaW4y4MeRc XudtQ3upXe4txZJSw5MuZlgT7ejJYPws3Kzuru87go8Yib0QsAEg5I8xx5KRt/0hEtUW cGCjL5BwJ11GBk2gHYhCb0dMA+5susKIugFQ0Gs4warZXda1WVms+OaMTstJJJc3X/6j zZdzA2dANQDtuwI2G6Tpf/D/DJN33Qz6WvZkgVouizexoLlncYDGNpUbVjKAQQybkeef wbAB8ZLG38SzYXfd+Ser/RoMYZvv6gp83U9vDICT0+J2ywyRAwsLsMwZBsq5ti2HWMkD qH7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=U9CIPpcJtdDkREixPUiFnAcdc+dJGfQDmIQSIXoRd14=; b=iN0xL7HbhFTnMsn29Labq15O5GRXdCFkRiRM+EiVyBJwKATStMH8EsXhHKZZjG6NbQ /CfTZQ8iAwOiVPlNku6zoBrjSO3eK8nUxIPUZdPfAbORl3lq3w1/29fzG6LqMDlFB/VF VBP7qT8vY4qXSBquN+pITOeRIOxXI1aRtVOgJ1/kJqaFI4uZiq7mePS7TWY0gyor3kqL 1lHcsWgJDpuJNhqDeU+FwvenXHYGoRnwDczXA/unW9xGCMxJK5QXoIjmoMW/nA+HL+ON 9HisGmgptJNEiOQVPuntnD6FOxwwNcDXYQbY+bZp7q/Xu6O5DCz4jRxzIO/Nog2Yrdg+ 4yug== X-Gm-Message-State: AOAM531OikV1DDA6R7LRbq/+/2F5GO+nJqvgGmEHGjTs+YFgEsOZnkix L8fEL3WFYFr0F4zOC09Q8mIul9B8/b0ttBB8k3WMIQ== X-Google-Smtp-Source: ABdhPJy/VGt7yWgqPENKuRkxX09uPP2o+ln7S1nlE3RvLYkZ85wYC97/ajjeYFhWAAOtACDCZF5T5HWHJ5h79q2cNBo= X-Received: by 2002:a05:6602:146:: with SMTP id v6mr7875853iot.117.1624024382758; Fri, 18 Jun 2021 06:53:02 -0700 (PDT) MIME-Version: 1.0 References: <20210618105115.257938-1-ilias.apalodimas@linaro.org> <20210618105115.257938-2-ilias.apalodimas@linaro.org> In-Reply-To: <20210618105115.257938-2-ilias.apalodimas@linaro.org> From: Masami Hiramatsu Date: Fri, 18 Jun 2021 22:52:51 +0900 Message-ID: Subject: Re: [PATCH 2/3 v2] efi_loader: Force a sinlge FMP instance per hardware store To: Ilias Apalodimas Cc: Heinrich Schuchardt , Takahiro Akashi , Michal Simek , Alexander Graf , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Ilias, 2021=E5=B9=B46=E6=9C=8818=E6=97=A5(=E9=87=91) 19:51 Ilias Apalodimas : > > Chapter 23 of the EFI spec (rev 2.9) says: > "A specific updatable hardware firmware store must be represented by > exactly one FMP instance". > This is not the case for us, since both of our FMP protocols can be > installed at the same time because they are controlled by a single > 'dfu_alt_info' env variable. > So make the config options depend on each other and allow the user to > install one of them at any given time. If we fix the meta-data provided > by the 'dfu_alt_info' in the future, to hint about the capsule type > (fit or raw) we can revise this and enable both FMPs to be installed, as > long as they target different firmware hardware stores > > Note that we are not using a Kconfig 'choice' on purpose, since we > want to allow both of those to be installed and tested in sandbox This sounds like changing the Kconfig, thus... [...] > --- a/lib/efi_loader/efi_capsule.c > +++ b/lib/efi_loader/efi_capsule.c > @@ -918,15 +918,15 @@ static void efi_capsule_scan_done(void) > } > > /** > - * arch_efi_load_capsule_drivers - initialize capsule drivers > + * efi_load_capsule_drivers - initialize capsule drivers > * > - * Architecture or board specific initialization routine > + * Generic FMP drivers backed by DFU > * > * Return: status code > */ > -efi_status_t __weak arch_efi_load_capsule_drivers(void) > +efi_status_t __weak efi_load_capsule_drivers(void) > { > - __maybe_unused efi_handle_t handle; > + __maybe_unused efi_handle_t handle =3D NULL; > efi_status_t ret =3D EFI_SUCCESS; > > if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_FIT)) { > @@ -975,10 +975,6 @@ efi_status_t efi_launch_capsules(void) > > index =3D get_last_capsule(); > > - /* Load capsule drivers */ > - ret =3D arch_efi_load_capsule_drivers(); > - if (ret !=3D EFI_SUCCESS) > - return ret; I think this part of the change should be included in the next patch. Thank you, > > /* > * Find capsules on disk. > -- > 2.32.0.rc0 > --=20 Masami Hiramatsu