From patchwork Fri Oct 21 03:01:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 617110 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp685645pvb; Thu, 20 Oct 2022 20:02:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ToyGHoTVMtMFpkBA2phR9GABxMEQYtJYRf1ARp1bIKxFhP8BW7Pnq7cqqqiL9z/Q8ZKwq X-Received: by 2002:a17:906:844f:b0:78d:8bd1:ee8c with SMTP id e15-20020a170906844f00b0078d8bd1ee8cmr14140216ejy.262.1666321377454; Thu, 20 Oct 2022 20:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666321377; cv=none; d=google.com; s=arc-20160816; b=dhd4UukR4dbN4ake0fTsnPTdJyP/KeHPMChhsoCS9WAZN1xUCV/zThP+NE5vucO2ql mbyN42YFmLrz+pDaojAtCElSLVvdn0QA7KJrj505zJ6T9cH/Sgtptgob+6gjWK2ZwMap gp0tLvGhrAWKVtDUkXZRm3ggWnZ3QRVT/xMa/geGGxm2lOxemLrrAuXwPjwwrN2EKLJP DpNsio70QggLUNW8PAOnC4DXjKKle9MHnVoD7A2sstxGBXJ7apJeN2XKl/x1sXNs3edo 9x0PCvjNK2CWxF5VnynLCuWRSZzvyZ+mPxYBCCDz20SUlqp5bBXClbN8kfclec/V+z2a X3GA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=tJsEFb5hyEiEzCxL5pNr8vUfPNwt9TJqkdffSE5+yHM=; b=lEjiKpGftStkscphbXxIbXWzNqlH7m3pzJB/uYGh2cen8w8m7iU+7u4iF8YZMlKD9d Wqm2rlITvZ4w5luoQyDutkQB78O/uVRrBtyRiipOuV0anGhXKiqSUI+M/804Kqg4J3He wMwb0rnCvHZ0FmsMMeaAtLn+vgH2b0Yfat6irg4/vOtMXfhWM51wr/RPPmSbf/auxgjU r0BoOb5NpKfpuV5YTeUWfrqpsWlZwQE+VOCaEFG2Ks14qoupaLzapNOlR/jsQBW2aXbn LHwLa5TbO3O5W8dBi2/IvPVa/tK8yuIWKwoAVEDEy2dX3R4x7J5npMyMZf/13m5eL4q/ VfAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bmAqzgBJ; 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 xg14-20020a170907320e00b007781bc042a2si20695422ejb.646.2022.10.20.20.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 20:02:57 -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=bmAqzgBJ; 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 4BC3984E0E; Fri, 21 Oct 2022 05:02: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=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="bmAqzgBJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DEE984967; Fri, 21 Oct 2022 05:02:52 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (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 2A79984FC7 for ; Fri, 21 Oct 2022 05:02:49 +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-pg1-x52f.google.com with SMTP id f193so1401845pgc.0 for ; Thu, 20 Oct 2022 20:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tJsEFb5hyEiEzCxL5pNr8vUfPNwt9TJqkdffSE5+yHM=; b=bmAqzgBJASqAo3Cm1WTAFaS2E4M33wxFohL9h6Yqc48RvL+YtCyZ5nBY+EAyZlB1Eo uoK41c4ezoc4RYXD8CXIon2hu/vtc9wAI/2MnrZQ6RgX553jPmai9rDdeHX2DaXqrcM+ /ApQpHirrJL5sjD7ljKwa/pW8vQ2r0AThJQFmdDRGtUFbyfKH0vXnCo2kd0gxIp4OaRq //3XHz73JIForM+mKafe/udH7qceJrBDhOwyJ/LG1OI9KCmGauJgN/TRqWBaMgIm+utv HOMOmoOZHUYN83oQ5FWFD4CRMBVAHHz/iIDt8Y8nkxK4W06JGYyiMJJAT3gCCrRgH8Dc W7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tJsEFb5hyEiEzCxL5pNr8vUfPNwt9TJqkdffSE5+yHM=; b=eO0swfoFNe6oKoMYFNmcemE2esZdr+Djp9fMuSSRoBpSDvZ2V9UrbH11kwJsbZ/ZM+ 9Rr2K6gdr5A0Q3LdqEd8XAVer024z7CsxFAGPxYeWtpMUlhrGgCC3SHe068r3vSaF0D5 3mgEZh/hkOlvkzkvbpsUR/HwOpOIPMS+AOqmD55Cx+oi3DC4ZfX2uKEXlsEBm7cKHGcI N617GiYsRjxRkkGCQO76XXhL/fv9F78zAsAFcxVserqlVXXyc/1Ddget1PqNbsdAx38X DYSS10o9GMu2Ulx2ffUTxBwnq1GKW/6iJfmaUUXci7oF/LxMz2+Ef6ryg+aiaiN2yPue 3kZg== X-Gm-Message-State: ACrzQf3uzTKeVYypk1gZC04YQdxwKg4TDXAZX5eSCLwIdrkIecG2xUPt uT6plwFHf+7GZXjjJ8LgoUJCpw== X-Received: by 2002:a63:fc12:0:b0:45f:a6e3:7559 with SMTP id j18-20020a63fc12000000b0045fa6e37559mr14468599pgi.237.1666321367118; Thu, 20 Oct 2022 20:02:47 -0700 (PDT) Received: from laputa.. ([2400:4050:c3e1:100:2e60:1b12:4626:8165]) by smtp.gmail.com with ESMTPSA id b203-20020a621bd4000000b005625d5ae760sm117947pfb.11.2022.10.20.20.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 20:02:46 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, ilias.apalodimas@linaro.org Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH] efi_loader: remove CONFIG_EFI_SETUP_EARLY Date: Fri, 21 Oct 2022 12:01:57 +0900 Message-Id: <20221021030157.50600-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Since the commit a9bf024b2933 ("efi_loader: disk: a helper function to create efi_disk objects from udevice"), CONFIG_EFI_SETUP_EARLY option is by default on and will never be turned off. So just remove this option. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- common/board_r.c | 2 +- lib/efi_loader/Kconfig | 5 ----- lib/efi_loader/efi_setup.c | 43 ++++++++++---------------------------- 3 files changed, 12 insertions(+), 38 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 92ca2066ee3a..683c045b617c 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -692,7 +692,7 @@ static init_fnc_t init_sequence_r[] = { /* initialize higher level parts of CPU like time base and timers */ cpu_init_r, #endif -#ifdef CONFIG_EFI_SETUP_EARLY +#ifdef CONFIG_EFI_LOADER efi_init_early, #endif #ifdef CONFIG_CMD_NAND diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 41756ea53961..7b50f4b38545 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -42,10 +42,6 @@ config CMD_BOOTEFI_BOOTMGR via UEFI variables Boot####, BootOrder, and BootNext. This enables the 'bootefi bootmgr' command. -config EFI_SETUP_EARLY - bool - default y - choice prompt "Store for non-volatile UEFI variables" default EFI_VARIABLE_FILE_STORE @@ -161,7 +157,6 @@ config EFI_IGNORE_OSINDICATIONS config EFI_CAPSULE_ON_DISK_EARLY bool "Initiate capsule-on-disk at U-Boot boottime" depends on EFI_CAPSULE_ON_DISK - select EFI_SETUP_EARLY help Normally, without this option enabled, capsules will be executed only at the first time of invoking one of efi command. diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 9d7189336dc4..af66076bd3d0 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -175,16 +175,15 @@ static efi_status_t efi_init_os_indications(void) } /** - * __efi_init_early() - handle initialization at early stage + * efi_init_early() - handle initialization at early stage * - * This function is called in efi_init_obj_list() only if - * !CONFIG_EFI_SETUP_EARLY. + * expected to be called in board_init_r(). * * Return: status code */ -static efi_status_t __efi_init_early(void) +int efi_init_early(void) { - efi_status_t ret = EFI_SUCCESS; + efi_status_t ret; /* Allow unaligned memory access */ allow_unaligned(); @@ -200,29 +199,15 @@ static efi_status_t __efi_init_early(void) /* Initialize EFI driver uclass */ ret = efi_driver_init(); -out: - return ret; -} - -/** - * efi_init_early() - handle initialization at early stage - * - * external version of __efi_init_early(); expected to be called in - * board_init_r(). - * - * Return: status code - */ -int efi_init_early(void) -{ - efi_status_t ret; + if (ret != EFI_SUCCESS) + goto out; - ret = __efi_init_early(); - if (ret != EFI_SUCCESS) { - /* never re-init UEFI subsystem */ - efi_obj_list_initialized = ret; - return -1; - } return 0; +out: + /* never re-init UEFI subsystem */ + efi_obj_list_initialized = ret; + + return -1; } /** @@ -238,12 +223,6 @@ efi_status_t efi_init_obj_list(void) if (efi_obj_list_initialized != OBJ_LIST_NOT_INITIALIZED) return efi_obj_list_initialized; - if (!IS_ENABLED(CONFIG_EFI_SETUP_EARLY)) { - ret = __efi_init_early(); - if (ret != EFI_SUCCESS) - goto out; - } - /* Set up console modes */ efi_setup_console_size();