From patchwork Thu Oct 29 04:47:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 319344 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp141824ilc; Wed, 28 Oct 2020 21:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf4x2lJxb2rOfe4K0AqTXUu9B/Psfr3rOWkeDmXqK5eUdJZgHb5UY3pnEBIAf2xauVnRs4 X-Received: by 2002:aa7:d892:: with SMTP id u18mr2229416edq.305.1603947025971; Wed, 28 Oct 2020 21:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603947025; cv=none; d=google.com; s=arc-20160816; b=IQ4t8cpad6jmfTq1vDu6sAQ8U947it0WGaKichoHmf2bgVf2gXo5mVnz8yo5vtcwPH Emal4zMLHvkXtmyLOgqZz7TrP6Bl/K48jaUL2Xf4Q13xHG1htKL9W5xic4SPSwjQdeod 8n+aI7JeJq+/ul00Gy0cPXqo0Plp92tOXDTnzz73u/Wm9TBuUBknXJgkBua8i+oVpelG O+qJ4tW2dtvVGS16J/lheRjHHI51coTHUEj0WpG5aOyB/UHfIgWMWS8ruFp5JTMFVU+Z EzgsRXiBJI0h7fsHA26bolGL0qYwJFa25A91ORJ1FWU2BMJDncXgtFNNCnwUg9RzGUQI 2PjQ== 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=n5F2thosGyZvZniKXgGd9Rsns7gjUVAKncs8BSfblsY=; b=quuJ9RveHWda3zU9KGB7Y44wI4ZGVEuKT0AXfMPiyZpTOG9/84tx4/nkPNNnu0+FSV xhfKtF2Fq9BCeNlJ2GKr/b5/nJS61hm3BvtwVFuVBRSqVd5WUpk1G5IDG20jAscR2n8x 9NGeTKIG0rAnSaaHfHFo2APRbdIJ8SZeSEojzrZbkfnV0Ovg4WGeIu4KoYp54Sy7IW60 2OAXSyKsQYdxjFfzNtEorxRF0iVqvLE4Vv9t0v8iqwZKwq7P9apGRUZrVw2BKXX/X6z3 vRD6JOPrqzru6TJHWfm5Aw9TT7XDtjxwbXyETC0atgCVx8vxmT2LtoFpmaBz+a+y1dkT SnXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RfCofGR0; 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 m8si1235121edj.357.2020.10.28.21.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 21:50:25 -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=RfCofGR0; 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 61551824F1; Thu, 29 Oct 2020 05:49:57 +0100 (CET) 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="RfCofGR0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF3A7824F1; Thu, 29 Oct 2020 05:49:53 +0100 (CET) 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,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (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 6F3C5824AE for ; Thu, 29 Oct 2020 05:49:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pg1-x544.google.com with SMTP id z24so1354635pgk.3 for ; Wed, 28 Oct 2020 21:49:51 -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=n5F2thosGyZvZniKXgGd9Rsns7gjUVAKncs8BSfblsY=; b=RfCofGR0fB6KhhfMb0beY9kANMwDPdPS1h2GrtkyFfX+HsTQhup1Q5rM5HE8BtU8RU PtBlxcbBSto/JcUIsx1ZvwzKbl3H7nxSoZsvEyyFg7PPNRguCWrwfozjv6iDIl9CQpN/ PHGRgQnmJ0WOiQOltSyqKBDUjueXTeOnKnCXML5RkB9bOeNrWFJ2mylCkrumSnkrEKQ7 EEo9h0JsJ9YXZPmBiIyMtVATHUvGPP/I0GYf9OCC3UrXP37ixOT5kUpjPhlMmdPmV4J8 pGEPrLB3LABQmDlHdT/4mpzCTxc5/re0rsW7TvenshIS03dKzA2cTdfM+mhOo+wjX/yN TSag== 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=n5F2thosGyZvZniKXgGd9Rsns7gjUVAKncs8BSfblsY=; b=fjArOeaydjWny65ytxnX8jFsUPD62eHXSQq5TBsdGnf3yjWLud86x7yqDXTyto0pjy Vc2c0CJhTYOGqVbD9N166/MICHn5wHYQLxw6OkCZPdJUqLBF79Bfez6YRrrhsh1UD6C4 +YTUfOB/lfMNzE4SfNKVKYUDvz8m83q/WAqGTRIqCCc/r+aBe9dstiOfZVK27o5SvCNi +v8OU3O8Lvd/wi9Yyly7G86LYDcq5xmNGn5LogrGXTwQrSeSF5OKZvrH2YyK/z1mC2jb aItn0LlPb7gr4aOUrBlZc+bUL3cV13taBBK4YcLMbEnSWSP8EDg6bCAxvZQzAL5txZB/ VKYw== X-Gm-Message-State: AOAM531SY228VeBH+tMWuZc2G9yGAOh5i9JTWN8fjzjHyNM1GyGLJ6bk lTqRwPEU/BcELuQIKTe7oK1EZw== X-Received: by 2002:a62:1755:0:b029:163:d3e0:ca57 with SMTP id 82-20020a6217550000b0290163d3e0ca57mr2573985pfx.36.1603946990052; Wed, 28 Oct 2020 21:49:50 -0700 (PDT) Received: from localhost.localdomain (p784a66b9.tkyea130.ap.so-net.ne.jp. [120.74.102.185]) by smtp.gmail.com with ESMTPSA id t14sm830689pjy.46.2020.10.28.21.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 21:49:49 -0700 (PDT) From: AKASHI Takahiro To: lukma@denx.de, trini@konsulko.com, xypron.glpk@gmx.de, agraf@csgraf.de Cc: sughosh.ganu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v7 05/17] efi_loader: add option to initialise EFI subsystem early Date: Thu, 29 Oct 2020 13:47:45 +0900 Message-Id: <20201029044757.183262-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201029044757.183262-1-takahiro.akashi@linaro.org> References: <20201029044757.183262-1-takahiro.akashi@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.102.3 at phobos.denx.de X-Virus-Status: Clean If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation of UEFI subsystem will be done as part of U-Boot initialisation. Please note that this option won't be enabled explicitly by users, instead, should be enabled implicitly by other configuration options. Specifically, this feature will be utilised in implementing capsule-on-disk feature. Signed-off-by: AKASHI Takahiro --- common/board_r.c | 6 ++++++ lib/efi_loader/Kconfig | 4 ++++ 2 files changed, 10 insertions(+) -- 2.28.0 diff --git a/common/board_r.c b/common/board_r.c index b9217b2e27f0..2212d981e5ea 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -73,6 +73,9 @@ #if defined(CONFIG_GPIO_HOG) #include #endif +#ifdef CONFIG_EFI_SETUP_EARLY +#include +#endif DECLARE_GLOBAL_DATA_PTR; @@ -889,6 +892,9 @@ static init_fnc_t init_sequence_r[] = { #endif #if defined(CONFIG_PRAM) initr_mem, +#endif +#ifdef CONFIG_EFI_SETUP_EARLY + (init_fnc_t)efi_init_obj_list, #endif run_main_loop, }; diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index ab42f3ba75b1..075481428cdf 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -27,6 +27,10 @@ config EFI_LOADER if EFI_LOADER +config EFI_SETUP_EARLY + bool + default n + choice prompt "Store for non-volatile UEFI variables" default EFI_VARIABLE_FILE_STORE