From patchwork Wed Jun 17 02:55:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1310885 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=J8fgFpmo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mqVL2P7rz9sTH for ; Wed, 17 Jun 2020 12:57:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 371F981FF3; Wed, 17 Jun 2020 04:56:16 +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="J8fgFpmo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8564281FCA; Wed, 17 Jun 2020 04:56:01 +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-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 B2C4481F8C for ; Wed, 17 Jun 2020 04:55:56 +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-x444.google.com with SMTP id d66so417017pfd.6 for ; Tue, 16 Jun 2020 19:55:56 -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=PrnzGfjMoVdKjXqDZ569JIGq/NpBNu9Z0R7ts+eu2H0=; b=J8fgFpmoZck9qPR6u4tbqJNqsJW1T2Hd8FSA7F5Gow1i0QfiECp+zd87sxAN/EYjPY hfCgMqSlHbiI9uZXqUjMVdrOnTP4Y5XcJDOBQ95RfK9dxDH9VASP/EWO7LW+90kBMheu ilY27/425WuSnOCkZDVFAyn8HU0SVzIivR5YJc5X/1cSz7F0rvkOj925EMbWDrf/UhO2 Ml+Ypg2UzKGPwlW4twOu1K1OGJY65gu0FIAPbMGsIgJenTm1F0IRzi5IXgjX+8V+Bea1 qTk+gM8LvTVR0ptpBZFCUAdC/5qL+SpoO0ifco1V96+zbXYX+cuKKQEGY6Hh2FD3IWrY IPGQ== 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=PrnzGfjMoVdKjXqDZ569JIGq/NpBNu9Z0R7ts+eu2H0=; b=WK8kmRJIDSvrWgCMl2yE17LZ8p7QNQD5EYQFCTsrKfvxnHJuS/vxZCRZeEgnpmsykN OYHEPTxSCZuNanQNHZ2S9JEv/9GtYkd8T3Iq47UYtjwDtAUkLYWZ95kadhxFqPjx4ZpF bbvW1y+v3vNiUkq1beTYcEHp0uVTB9d75FPoVcNskQsh6JHYfGq3cuvgO+CjfggVNsGv nAGSaGbBOJan/A7+jtTYlHYKUVcia8Bu1UeGKbOff+DySglOdpvddjZUBBs9dOQ9XYv0 MU8gNg6wvkb7l30IF7f+DudeA3knHhmx0L1IBiKPwnbiKBgX2Md+v9RBqae3zBDTzYKi jVvA== X-Gm-Message-State: AOAM531BO/fH2LH8b0Kz70O8F/OmLonqse1Q2dBhd9otTYwBtNbdJYrI yJFZS5raeRO3BDQJSBzQp/Zwsw== X-Google-Smtp-Source: ABdhPJy0OpgLyA+hzJ6m8kvf8yir1uZxzcJEHHR6gNc+P1wAHeqYoo+5rAhcky3m8zFB4d8sqQpKCg== X-Received: by 2002:a63:7c5e:: with SMTP id l30mr4462616pgn.276.1592362554534; Tue, 16 Jun 2020 19:55:54 -0700 (PDT) Received: from localhost.localdomain (p6e421564.tkyea130.ap.so-net.ne.jp. [110.66.21.100]) by smtp.gmail.com with ESMTPSA id lt14sm3724918pjb.52.2020.06.16.19.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 19:55:53 -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 v2 06/17] efi_loader: add option to initialise EFI subsystem early Date: Wed, 17 Jun 2020 11:55:04 +0900 Message-Id: <20200617025515.23585-7-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617025515.23585-1-takahiro.akashi@linaro.org> References: <20200617025515.23585-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 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(+) diff --git a/common/board_r.c b/common/board_r.c index fa57fa9b6993..dcb8c6f79d2f 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; @@ -858,6 +861,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 aad37b715505..37034894870e 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -25,6 +25,10 @@ config EFI_LOADER if EFI_LOADER +config EFI_SETUP_EARLY + bool + default n + config EFI_GET_TIME bool "GetTime() runtime service" depends on DM_RTC