From patchwork Mon Aug 3 05:43:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 247348 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp931610ilo; Sun, 2 Aug 2020 22:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOkWjgWMuc86hgDPjp/Z331oQQGA2csfEB/nCFovCBXX1KzBVWg2h6bmURxznOxIwuXXM2 X-Received: by 2002:a17:906:3f82:: with SMTP id b2mr15773784ejj.240.1596433523267; Sun, 02 Aug 2020 22:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596433523; cv=none; d=google.com; s=arc-20160816; b=e9rUVjwPHpePxm6E1e8SWAmAuhe6JWuQdVM6xWFOsGSFgS/asX4F/+X1PvbdAgBn4Z h6sRubBTH2VbL8ohruWd9ZLYHdE6iEV8o9UyHDuC7YXqzHlaZmEivClwEidEvS8OCwuq KdSwjqMUWskdr/zlzsDuUxec+sqHPbhfc8NwfR+qxzkhyupuOEoKByXPlefcFRXu9ocx ZEpFqEK4ptVTJAwra/Udbs0Uba4dsO0/Bfr7kGX6Ixs/9AVtTPSISLeWYlzfeuhM/SAy Kk/FVKQ/2f7us8VuUpAMbTyOyYIPIertW4SVYyqY8F1TJ1rLlKzWgv0Aa+ONEzwtDu9u xoog== 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=r56coo+sYUCS9/AioBClZSivZ52oQMOrg+yw8C3s1Nk=; b=NgzUL6WcC8Cz6/cbYbr7g6Q6T8VIJLAnYOicj3lRN48a8WzryrTMIiv7r9Bl9oj2Wr JZQs7zbDQm0xtM560yJoK0lUoH2PacffB61WcjCrizYQwUJ5uTy3Cb9V9r9a8LeyA0Ee 7hrpaz6gJ39AT3mGHtDCuhT6qzICMYpT/92Saphfxt8aa6sWheqIzOknRW+s0zF8B6TU oB0DHnLkeoBCy/YEa3lNExqDtyyYPjOLCVwcSA669bxa8BEDLV+vWwXnW8kCyn+c84jx Abmdq0GxdpUQzc0Jp/mf+yR60l6Mdzg+XmDDVbUl54PFKDlgLvI7/3cPE6k2bx6T35lh tlVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VQoznQqs; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id h13si4054874ejl.221.2020.08.02.22.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 22:45:23 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VQoznQqs; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 2718B81F24; Mon, 3 Aug 2020 07:44:43 +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="VQoznQqs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75AA781F67; Mon, 3 Aug 2020 07:44:41 +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,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) (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 AB26081D9E for ; Mon, 3 Aug 2020 07:44:37 +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=takahiro.akashi@linaro.org Received: by mail-pj1-x1043.google.com with SMTP id d4so887465pjx.5 for ; Sun, 02 Aug 2020 22:44:37 -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=r56coo+sYUCS9/AioBClZSivZ52oQMOrg+yw8C3s1Nk=; b=VQoznQqsEd7T9piVADGM7C9acYKGwAAROnGrszf09Xx/wevRPMjYxFOd2ki2OWoe56 i4a/aQqT6MWYCklpq7aUgiW06f6izMQk+RIeOz4cPybNckvLnaTwtRlEBbbLVlFL42RR Wzk9Xr1eX+WMD32w0/MS1ZRJdQDB7pCnQ3EnAgH40wcLMqBnCRFayh6AlzbelbzOtqWN HHaJXed043gxuF0Bd2fP06Ytb6glWIOmLhPF42fAXKW+5KSHruQz8yQ/j2+TgbTR1ClG FxD+eRXKyZ3havZpH4tLDkSrxqVoDshuHhgOeYQcbtPoFNfFb06YcvWafT4TXELLssIH dbhw== 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=r56coo+sYUCS9/AioBClZSivZ52oQMOrg+yw8C3s1Nk=; b=tBWWr6VmMq9Qm74iaJ8zb8h2m39UI8Jw6SQxMDuHOjiWFO05zmaxp0I9nj0i6ytXfB dsoav8fyzD04tVbMkTwccnA5BTAArjWPfeFbzKLAI1Q9H5Sxv5XxjFS6UAN9Qt6wYIO8 PmWqwWUJ5aAoHBN1SErVCR11RYAofbCKFtIe7F5L3q3srcGf2Gy1iHiN7HAA9/1+ibkK E7VTz5tF/N6HBFVNDM87KeIwM/MGyXiBpWy5/Zwn6wA9V2BZq3oNMAnBeA8rxFpPwyB5 gsNBGvue+cm49/nfhX3ZkAcfUAMvKN2WINyPf6+I8Wgp86wk4NB8Wnafy50qXpoMWA/+ fbmw== X-Gm-Message-State: AOAM532YXEsaTsZkjwAJr8GlpBGroiGpJ54VWR+QEJa6/8LTc5WngYuD aztej1fbX9T/Jm7Sgw+hTNFvMk/tVDgb7g== X-Received: by 2002:a17:902:b787:: with SMTP id e7mr8477505pls.227.1596433476246; Sun, 02 Aug 2020 22:44:36 -0700 (PDT) Received: from localhost.localdomain (p784a66b9.tkyea130.ap.so-net.ne.jp. [120.74.102.185]) by smtp.gmail.com with ESMTPSA id r25sm16952633pgv.88.2020.08.02.22.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 22:44:35 -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 v5 05/17] efi_loader: add option to initialise EFI subsystem early Date: Mon, 3 Aug 2020 14:43:43 +0900 Message-Id: <20200803054355.17356-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803054355.17356-1-takahiro.akashi@linaro.org> References: <20200803054355.17356-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.27.0 diff --git a/common/board_r.c b/common/board_r.c index 67dc25c7d282..9994ee34b585 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -68,6 +68,9 @@ #if defined(CONFIG_GPIO_HOG) #include #endif +#ifdef CONFIG_EFI_SETUP_EARLY +#include +#endif DECLARE_GLOBAL_DATA_PTR; @@ -844,6 +847,9 @@ static init_fnc_t init_sequence_r[] = { #endif #if defined(CONFIG_M68K) && defined(CONFIG_BLOCK_CACHE) blkcache_init, +#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 6017ffe9a600..8c21cbcaf18c 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