From patchwork Mon Sep 7 05:34:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 249192 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3414666ilg; Sun, 6 Sep 2020 22:37:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWgolodMGpVcPlsCCdsocC9MxFsShxLnMx16kCnrdNb73ZSba0p+9dPGGDohWYse6xmrwD X-Received: by 2002:a17:906:a251:: with SMTP id bi17mr19289588ejb.526.1599457024496; Sun, 06 Sep 2020 22:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599457024; cv=none; d=google.com; s=arc-20160816; b=p2xiME8rz9no3XQe3zY68DPHsPw+6bOUgXn+u04gIA+ur/xI79RYIyc5HJn9biuVny U+PxR4nvmfxpRVB6HwljfgJIOfeVLwD8/E1fBPB2prK/X5RQFAsV1BzAL6qmvFzUr5zo P2IjwKPy4bC8Ac4XwPbSQ4faRSj3o/R6jvpSj9tOXEU2FFZ/M5C9jZmozXGNCLjR1Z8k Eh7kui3KrvCCYouNqpTyGIByjXE09cBo4FIyIqwtGbczzmxZuA3iQl/yOO3SX5J0GaXn Y1dMAd+VBah1ZoDiNIGJYhMBCVCKpJi9f9gyH5dYS3U84YE3hSpLI2ZdCsDjduY8CG5K Z+AQ== 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=RLp5/bu3pTVrD3QOKMVF0Ts93sSOEwfySaNe5LHxTEA=; b=ILcTihAGsVb7qgTN8uGdvcCNcYgLNL3kTAtq+cRDVxNBUKYrvjf6H5SSWKk73SCMu3 7sS3+6kmhKjq7Si87vSerJlh1EKc730srhkbgNwKaTTTXuVKsFlsrRxQIckxxblvkKpR o5LkEiuUlPBKNhyMew8HLvJcayd8u3+cMiOVIwqYQXXmyVwLaZSZQzeITFaj3fQXLeJ1 kklJDUXPc3AboctR9omgvAAmmO566vG3+oTBj1Tza03q1uIl9BkbRwcnH7i+0d7e1YEE ybPFsMgWHIE54rhzjj+eK8YkQRQdFWmJ1T4sK31R6SlP56Rsffs7H6ZfaFkOi4UcBbGe gYBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XSC1ZvKo; 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 fi13si6603556ejb.490.2020.09.06.22.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 22:37:04 -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=XSC1ZvKo; 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 C9D39824E5; Mon, 7 Sep 2020 07:36:17 +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="XSC1ZvKo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A2C67824B0; Mon, 7 Sep 2020 07:35:57 +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-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 5A549824B0 for ; Mon, 7 Sep 2020 07:35:54 +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-pf1-x442.google.com with SMTP id o20so8031773pfp.11 for ; Sun, 06 Sep 2020 22:35:54 -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=RLp5/bu3pTVrD3QOKMVF0Ts93sSOEwfySaNe5LHxTEA=; b=XSC1ZvKoU/07o4VRQtGS/TUmfClUmdY6RGKYsux85b2J921Fz5ZxSrJLTQglvuTOx7 IIJCLJUT0iAM+yF1AsQ4wid5BJR+l/VIB85JbP8nM68pM0sjRXQ6C4smOcR8phJi7ws9 rsqjZSVpRLYPg15rKIzwJKt4t8Xx9u9f7d4+Iir0RNwvvi1H538ZVLput5W1wnbjkCAi cqW6YeImBKPDNarkpRW0HmUi/G9a9GkwRvMwjq6H+oIEJFt5XLo7Q/G4ST70ttIiJx/d C5oQFk7Q1DkGfiVEyKZaMuPdsQ+HGDcYl8zPT/DQSmR8ohcJtj0FK00dB0Kr8crQAjFw i9XQ== 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=RLp5/bu3pTVrD3QOKMVF0Ts93sSOEwfySaNe5LHxTEA=; b=EB5a/GgAGfYpg1Vn7BajnyOEon0mJikD3BvDn0IBg/36TdSnLa6weRvcuQEPLV9ffa YaVglYe4kfP5+oXOlDN+qeCZh6HAiPDP7zVh7lTmVIBmu8M+xY8ItUwzNpYb/49/Q9i6 bQ8CXgsR48WDDzHKjhHEKzIV63TmHuhUKl8ir8dnefDkqIcw8ytuuLJ+XQh/XYQro5xj 8+nxYqsCC/gnKBur+rZq2yGXnT9ksOsiB9gJMjLkGryZf2iqm9WV63SXX682O4cK7+MA 9BYHEjimfdVkp0elVsQRy0TIrLRNBtPZJQkVnjGG6tHDToHk7LQzWPphln33imUwimTH CRAA== X-Gm-Message-State: AOAM533iDBMPTao/AnMTXNcZ63nXd9ncB9G6wDBcB9h8LX4tRBLXZdBB aHsOiTp73/hNK8NqYpzRW3fulA== X-Received: by 2002:aa7:9084:0:b029:13c:1611:658c with SMTP id i4-20020aa790840000b029013c1611658cmr17717324pfa.9.1599456952875; Sun, 06 Sep 2020 22:35:52 -0700 (PDT) Received: from localhost.localdomain (p784a66b9.tkyea130.ap.so-net.ne.jp. [120.74.102.185]) by smtp.gmail.com with ESMTPSA id w6sm10783939pgr.82.2020.09.06.22.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 22:35:52 -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 v6 05/17] efi_loader: add option to initialise EFI subsystem early Date: Mon, 7 Sep 2020 14:34:14 +0900 Message-Id: <20200907053426.1675646-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200907053426.1675646-1-takahiro.akashi@linaro.org> References: <20200907053426.1675646-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 9b2fec701a55..0391a1b6acb7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -72,6 +72,9 @@ #if defined(CONFIG_GPIO_HOG) #include #endif +#ifdef CONFIG_EFI_SETUP_EARLY +#include +#endif DECLARE_GLOBAL_DATA_PTR; @@ -877,6 +880,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 bad1a29ba804..cbd8fe8c0ad2 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