Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19FA0C19F28 for ; Sat, 30 Jul 2022 21:57:52 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38E6284586; Sat, 30 Jul 2022 23:54:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HeRu4/+X"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7F9DD844B4; Sat, 30 Jul 2022 23:53:49 +0200 (CEST) Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) (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 E6642844CF for ; Sat, 30 Jul 2022 23:53:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-10d845dcf92so9553853fac.12 for ; Sat, 30 Jul 2022 14:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=vE+vIPvILqy8wRz0qE12epQXJOm9sJR4oW7/IzeBY7M=; b=HeRu4/+XFp8FEbuv67Na6/3u9J2ZezJbWQQs7vftqVmbSWFUd/C+PNhTwmxQvLNbHy Ae+IBo1tnjFogpxDXBsg8h2B0yLPFzHtCDKrmdE3QDh5wHvf/AL45MO9egw6/5H/QF3Z u5JSL/3z8LK6Z1GH3aNR2BXOKCr3cMs+AESeQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=vE+vIPvILqy8wRz0qE12epQXJOm9sJR4oW7/IzeBY7M=; b=AGHxlspCxkkjo/dA5GNvZwYpxHxPsFdatjRV6RMjs63Cn/eCrmut71bTZg121imIOm D/ZrP8zBkD6G9chuNNa5G7KFkVECPw1sfElWFbCFbDbH/sR0SjSwRrfMAezVWanfsWGD WL17WGZNNc48nLSv3KEv4qJC4LBppDkR7fcN++7GuTK0xriw5Zd9NJHeqRyUbNK0EBLh 2dmKCw/kYx2X0ZsD1cvk6qY4V8OJL362hfppaE0g7SURJO/Fg9a9qWH2C4cSoi42x432 e6w8UpiOhoSMk1BIttpN3sQCLNH0J7rHXI5rrAHGJ7hj5NZUOcMie2VtfUxUuJirC8W/ hjxQ== X-Gm-Message-State: AJIora/btYdjLmYS46j041vkzXigM4Aiyviz73lhH34vWHybOxQ4r2cA tA0up91M04KGTThskPXbbezi9r46oz5fqVFO X-Google-Smtp-Source: AGRyM1umXR2ZftzvNS3D/Wv5YFbx6RtZ9sPNErmmcDM7UOvrMqQHRoqfwgGrJEf5TAOi1Y7cdz9Nfw== X-Received: by 2002:a05:6870:e751:b0:10e:6f8a:5ceb with SMTP id t17-20020a056870e75100b0010e6f8a5cebmr4632868oak.90.1659218012768; Sat, 30 Jul 2022 14:53:32 -0700 (PDT) Received: from sjg1.lan (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id 19-20020a544193000000b0032f75714af1sm1699656oiy.18.2022.07.30.14.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 14:53:32 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Bin Meng , Simon Glass Subject: [PATCH v2 26/35] bootstd: Always create the EFI bootmgr bootmeth Date: Sat, 30 Jul 2022 15:52:28 -0600 Message-Id: <20220730215237.818368-22-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog In-Reply-To: <20220730215237.818368-1-sjg@chromium.org> References: <20220730215237.818368-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Now that we can separate this out from the normal bootmeths, update the code to create it always. We cannot rely on the device tree to create this, since the EFI project is quite opposed to having anything in the device tree that helps U-Boot with its processing. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootstd-uclass.c | 7 +------ test/boot/bootflow.c | 22 +++++++--------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/boot/bootstd-uclass.c b/boot/bootstd-uclass.c index 3c6c32ae604..5107b6d4c7f 100644 --- a/boot/bootstd-uclass.c +++ b/boot/bootstd-uclass.c @@ -133,12 +133,7 @@ int dm_scan_other(bool pre_reloc_only) return 0; for (i = 0; i < n_ents; i++, drv++) { - /* - * Disable EFI Manager for now as no one uses it so it is - * confusing - */ - if (drv->id == UCLASS_BOOTMETH && - strcmp("efi_mgr_bootmeth", drv->name)) { + if (drv->id == UCLASS_BOOTMETH) { const char *name = drv->name; if (!strncmp("bootmeth_", name, 9)) diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index 07b0517718e..b2f77972d1f 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -324,34 +324,26 @@ BOOTSTD_TEST(bootflow_iter, UT_TESTF_DM | UT_TESTF_SCAN_FDT); /* Check using the system bootdev */ static int bootflow_system(struct unit_test_state *uts) { - struct udevice *bootstd, *dev; + struct udevice *dev; - /* Add the EFI bootmgr driver */ - ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd)); - ut_assertok(device_bind_driver(bootstd, "bootmeth_efi_mgr", "bootmgr", - &dev)); - ut_assertok(device_probe(dev)); + ut_assertok(uclass_get_device_by_name(UCLASS_BOOTMETH, "efi_mgr", + &dev)); sandbox_set_fake_efi_mgr_dev(dev, true); - /* Add the system bootdev that it uses */ - ut_assertok(device_bind_driver(bootstd, "system_bootdev", - "system-bootdev", &dev)); - - ut_assertok(bootstd_test_drop_bootdev_order(uts)); - /* We should get a single 'bootmgr' method right at the end */ bootstd_clear_glob(); console_record_reset_enable(); ut_assertok(run_command("bootflow scan -l", 0)); ut_assert_skip_to_line( - " 0 bootmgr ready (none) 0 "); + " 0 efi_mgr ready (none) 0 "); ut_assert_skip_to_line("No more bootdevs"); - ut_assert_skip_to_line("(2 bootflows, 2 valid)"); + ut_assert_skip_to_line("(6 bootflows, 6 valid)"); ut_assert_console_end(); return 0; } -BOOTSTD_TEST(bootflow_system, UT_TESTF_DM | UT_TESTF_SCAN_FDT); +BOOTSTD_TEST(bootflow_system, UT_TESTF_DM | UT_TESTF_SCAN_PDATA | + UT_TESTF_SCAN_FDT); /* Check disabling a bootmethod if it requests it */ static int bootflow_iter_disable(struct unit_test_state *uts) -- 2.37.1.455.g008518b4e5-goog