From patchwork Fri Jun 18 10:51:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 463040 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp1348715jae; Fri, 18 Jun 2021 03:51:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyteQGkYCSNP5UdoBiIUdvXYGuH47Lbclzhkv7JYhogqm+j43hTxVEKUPyNylOG61HhC5fW X-Received: by 2002:a05:6402:40c3:: with SMTP id z3mr4061322edb.187.1624013511564; Fri, 18 Jun 2021 03:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624013511; cv=none; d=google.com; s=arc-20160816; b=Az+t5n8bpdFwhUhvm4xlmos0FNeQ7LD/D6h3VpOkR6wa57D3Hs3VcAdGTbEPNOF8qe 8Zt6fqwkX3dH7XUzBrEL0g5JhKsd2myk3I1xs4OibCg0qSGaQvdEZjHNXBjqo/Oa0K5S a08Uvxzvg9hJGxk8z5xcmoB6uuraUtjqqtrTkeTOFuKsqdht0ImNUm4snN7aW6LBGkAo fdxGII7M/3dy5HoA3RQg1GnGZkL0vLfH6G+XJvaXv7YLbyl5HRY612sIAm4N8J+4h814 RtlQUoPaoiLXxkpUEj3bcb5jIlTD+lzRkXeg/xj0sA7T8boJIBMLTg7L1FYmwk7hjhrG /aOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C5YzjFH5XqJyiwkWT5k8bn4Pe6aS+19cYoDDl7cbd9c=; b=YL6XwsD2c2DLFJhesFnlHEcHYw1RnA4FttW+ksROPSNTOgHhHtTMmEfOtYzdE9Oq+b b56YEs+pVPQ2CRUmlZsPgUMlHqxJIvexg+U8YV0524Z8rY+Fc6wy3+Dy02BDFmKf2M9B kldiInwsqOfB5XsAeoixPW/zVMiwzhIpUzpmX3MLVmacT5/YGa2DVk+Ga+vJkOlFQkJ3 VlshMqgkU7sFGocT51ogfvYT3f5JPgLSDudDc+pDCL+DOmqHb9qV1wwXwbzEt/oDEpNQ O2RkHnTWi4Z70yqvcB/FtWLs9tDdg6faslb7xNX33jPl4f6TIbXMFV+MT6qJgK2eJxOh X/Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oIZz+V75; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id t9si1112286edr.204.2021.06.18.03.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 03:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oIZz+V75; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AB4A082BBD; Fri, 18 Jun 2021 12:51:32 +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="oIZz+V75"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CDDA882B89; Fri, 18 Jun 2021 12:51:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 3509282B00 for ; Fri, 18 Jun 2021 12:51:23 +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=ilias.apalodimas@linaro.org Received: by mail-wr1-x42b.google.com with SMTP id r9so10257711wrz.10 for ; Fri, 18 Jun 2021 03:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C5YzjFH5XqJyiwkWT5k8bn4Pe6aS+19cYoDDl7cbd9c=; b=oIZz+V75k2EiMk8j5b7FHQjHROazuxd2v8aCWIuW0e6f09ywCAr1Cbdht0PyjVqeSm B9Xff9vG8kJKZanUb5fBAicqAEab1WqxdHQKzC80ewsBFBF8QzbkAtfnzsZg5UV2OJez RAf7XoNXtx+ch4AgEpAP8cTG5FjiKBTvPckGEtrfVSRCeD127EgkPcMSkZU64nEXJM/a rqEOVLOMatIi74mSjX1WvEsycSTDF6OXs07fjdLlVVPlf7h+YTNR/WcGUnuNL8kW6yNr ram3YkZhdmX01BhR/j78W1XcPFnVOyDki1zqYjxcukwN79JDmLKd2o4gObIm6XbivqVx XGDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C5YzjFH5XqJyiwkWT5k8bn4Pe6aS+19cYoDDl7cbd9c=; b=Luh7fKFJpL5Ntlq5vfje44rrfVM90OToAs7zNdJiqH82eJ6o2i+CisW5S96ul+0ch+ sAQORbbuvJeMB2QjJJCNmd6pIYwUNwvo9dyZr05wHHctWHDPSt+ULx9TKcXspQhUxqTP bfvXSCshVFiPe8a7B9Zq3p5asEHjIuk/Z2hiKRD4+ahHc50+MkDNDFXr0LcNjla8NEVZ wydcKph6x4cJDCegTMtoEhNdHlXpU+yMQ1660Mn6TLnuo6xhsIbgZ7unStJnPaq/XZfE CgrnaiB5UeVn6YqZnHgHp3iTjsLXXcxynA4/gnjS5aT/opcyQ2ObRwZqWWaaZh5N7D47 U19w== X-Gm-Message-State: AOAM533cT8lwSn1LSdT2oTvPRUw5LJQogwtKkPkqKSOpUptHYqIkpdql TPoFkuae8Re2ftHxjAZ1a7DyHw== X-Received: by 2002:adf:de12:: with SMTP id b18mr4824372wrm.322.1624013482828; Fri, 18 Jun 2021 03:51:22 -0700 (PDT) Received: from localhost.localdomain (athedsl-269684.home.otenet.gr. [85.73.101.18]) by smtp.gmail.com with ESMTPSA id o18sm11377758wmq.23.2021.06.18.03.51.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 03:51:22 -0700 (PDT) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: masami.hiramatsu@linaro.org, takahiro.akashi@linaro.org, Ilias Apalodimas , Michal Simek , Alexander Graf , u-boot@lists.denx.de Subject: [PATCH 3/3 v2] efi_loader: Always install FMPs Date: Fri, 18 Jun 2021 13:51:14 +0300 Message-Id: <20210618105115.257938-3-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.32.0.rc0 In-Reply-To: <20210618105115.257938-1-ilias.apalodimas@linaro.org> References: <20210618105115.257938-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 We only install FMPs if a CapsuleUpdate is requested. Since we now have an ESRT table which relies on FMPs to build the required information, it makes more sense to unconditionally install them. This will allow userspace applications (e.g fwupd) to make use of the ERST and provide us with files we can use to run CapsuleUpdate on-disk Signed-off-by: Ilias Apalodimas --- include/efi_loader.h | 1 + lib/efi_loader/efi_setup.c | 6 ++++++ 2 files changed, 7 insertions(+) -- 2.32.0.rc0 diff --git a/include/efi_loader.h b/include/efi_loader.h index 0a9c82a257e1..b81180cfda8b 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -972,4 +972,5 @@ efi_status_t efi_esrt_register(void); * - error code otherwise. */ efi_status_t efi_esrt_populate(void); +efi_status_t efi_load_capsule_drivers(void); #endif /* _EFI_LOADER_H */ diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 3c5cf9a4357e..2dc6ba8337a7 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -254,6 +254,12 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) { + ret = efi_load_capsule_drivers(); + if (ret != EFI_SUCCESS) + goto out; + } + #if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO) ret = efi_gop_register(); if (ret != EFI_SUCCESS)