Message ID | 20201228122440.316403-2-ilias.apalodimas@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp9705786jai; Mon, 28 Dec 2020 04:25:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmRm6RmBhYpq0aD89E/hBsrBxouvqnsWUBoiF3V+Xax8tHJCnuZUWCOrz3lzIey7Qqqb2s X-Received: by 2002:a17:906:b08f:: with SMTP id x15mr41428658ejy.36.1609158302814; Mon, 28 Dec 2020 04:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609158302; cv=none; d=google.com; s=arc-20160816; b=cpQgVsa/ZWbndxYM3GTFpzakw0cEGvLrpNdeBUY8itfm4PZ6ezNw5uuFAY8XL5WFe3 Fd5LUNWd9vrSPdeIqrEPHXp12Hl7onGawvXQqshdOEjHGl15lnyO6za62HcXoK9HAI48 mK67BaA+E59si0qcj25+X4Em+pm84EmF/ZSbC+JOp7X3iIlVjZtFj4rJTiCHDgK+5WH/ W/z8DWBRdrrUWG5jKrdXD+m9qqa72AvBIVpUnbTK+XOiL70YDogW05gHATZUfQeW52eI gHOOp45oPuFkOrFSpgut6w01gL/tCkIpbmYbBCRneTkq3cINnl0QfIjOtJ0dmSu0avPp 09Rg== 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=Do2zLEyevFIxalQhp34urDEKDXIhK1evlWJtbyM1ivE=; b=uLyYZlvVS5wa7Hxw6t0ATeMXMLyvKNw9wU0y/9HKc0KpVvJ/eeBIl3yrDgMSi2Hjz9 UKqSAm8h5+uWgQlgefUWL9BBXAKFqkjDNaRXhFHqZxK1pZdsauJkbJSNisWqvvw4YHvr wga77T1xGG0T8jv1ou/8BAcFj+jSGc3g/wpQP3CpS+maXmkjiS9QMLxeXWDoiWHe1vEY o3A0EYvxkZyEAWAB85lPo7lMbHdc6GpHfxjweTDoARluDp7asxnWKNGOf2A0ZMF16g3K qxsGNxJi3QYNSW/zbjDxUZRE5C+09N35/9WD3usyS5Zz5rgvdv8Q4jcZomTDOtujZ9lU xzjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X5Yafv8G; 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: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id d14si17585841ejt.356.2020.12.28.04.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 04:25:02 -0800 (PST) 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=X5Yafv8G; 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 E11508241C; Mon, 28 Dec 2020 13:24:54 +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="X5Yafv8G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5E4178241C; Mon, 28 Dec 2020 13:24:50 +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,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 23E178232D for <u-boot@lists.denx.de>; Mon, 28 Dec 2020 13:24:46 +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=ilias.apalodimas@linaro.org Received: by mail-wr1-x432.google.com with SMTP id d26so11143362wrb.12 for <u-boot@lists.denx.de>; Mon, 28 Dec 2020 04:24:46 -0800 (PST) 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=Do2zLEyevFIxalQhp34urDEKDXIhK1evlWJtbyM1ivE=; b=X5Yafv8Gx09nYsg8Ng38+2NlVjbmM4cfc/HRjgcYw22Gnl8PSSsrHOZPL6KIJtDKwa 188tfJ73fgYMzX/Wz/KUzNy00GUOhWTkLLEqvmfBeueoojKhO1JU591cABMPXwrTlDa5 cgXFSgpdh+UGSygtniFlF1reHayODDonS64mYktneDzl25wGPlqd3lYHqTlZyj93cZhh BinOLT2aufIliR/sSsjynm9t1lCXWU6wC46d1vaIY2adq2gTqs07ONpufi3qxkkkyKwr 6+8a8aHgHEFR0JHNYPTaaD6PHic6zJp51fBw8vSD7rd4GDedvqIe503Au/RH1UodS/CQ AnyA== 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=Do2zLEyevFIxalQhp34urDEKDXIhK1evlWJtbyM1ivE=; b=cfm79nAAD/GBtd2smzaoBqQIp4JLv1QaQBocDLxFx/nfCaaok8CW2/WcwvyeOwaH3k X37esmgkU/smOsuJZb8YQGa6B4pU5Apu657FShYGPw6hkJc8gyWmC+Sa+yvX0ot91Lt9 KvUvggGSka1eBVW4AtPPVstCW/eRXHVcUE+3i9Xtx0m1OFOyilW5BR3N2qeL8JcS+WGK hjO8f7Ao9D+EQTW2d+v7T3GDtAcrwnoQTeitV6ykWcblwlmTVfQlOOhIK5/REQInoNOo DkzLxOUSd9OIstglTOs0Fafe5ztyakK8tzaKgv/uyTwSDAEtI40jB1VbGLUmP3dXDgxe b6qQ== X-Gm-Message-State: AOAM530N7eHo4zFwyrVL81hCj2Jsgdjf6YFsDB2jB2KDAFnMtjCleLHT Vyy+STXQaKe1L8cWzIEG8yosKg== X-Received: by 2002:adf:c14d:: with SMTP id w13mr49985747wre.383.1609158285767; Mon, 28 Dec 2020 04:24:45 -0800 (PST) Received: from localhost.localdomain (athedsl-4484548.home.otenet.gr. [94.71.57.204]) by smtp.gmail.com with ESMTPSA id w21sm18710321wmi.45.2020.12.28.04.24.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 04:24:45 -0800 (PST) From: Ilias Apalodimas <ilias.apalodimas@linaro.org> To: xypron.glpk@gmx.de Cc: takahiro.akashi@linaro.org, ard.biesheuvel@arm.com, Ilias Apalodimas <ilias.apalodimas@linaro.org>, Alexander Graf <agraf@csgraf.de>, u-boot@lists.denx.de Subject: [PATCH 1/6] efi_loader: remove unconditional initialization of file2 protocol for initrd Date: Mon, 28 Dec 2020 14:24:33 +0200 Message-Id: <20201228122440.316403-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.30.0.rc2 In-Reply-To: <20201228122440.316403-1-ilias.apalodimas@linaro.org> References: <20201228122440.316403-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
Change logic of EFI LoadFile2 protocol for initrd loading
|
expand
|
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index e206b60bb82c..d7f880921268 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -209,11 +209,6 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; #endif -#ifdef CONFIG_EFI_LOAD_FILE2_INITRD - ret = efi_initrd_register(); - if (ret != EFI_SUCCESS) - goto out; -#endif #ifdef CONFIG_NET ret = efi_net_register(); if (ret != EFI_SUCCESS)
Up to now we register EFI_LOAD_FILE2_PROTOCOL to load an initrd unconditionally. Although we correctly return various EFI return codes depending on the file status (i.e EFI_NO_MEDIA, EFI_NOT_FOUND etc), the kernel loader, only falls back to the cmdline interpreted initrd if the protocol is not registered. This creates a problem for EFI installers, since they won't be able to load their own initrd and start the installation. A following patch introduces a different logic where we search for an initrd path defined in an EFI variable named 'Initrd####'. If the bootmgr is used to launch the EFI payload, we'll will try to match the BootCurrent value and find the corresponding initrd (i.e Boot0000 -> Initrd0000 etc). If the file is found, we'll register the required protocol which the kernel's efi-stub can use and load our initrd. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> --- lib/efi_loader/efi_setup.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.30.0.rc2