From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web10.8927.1590594571146143309 for ; Wed, 27 May 2020 08:49:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Na2WeZ4/; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590594570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tngw6dhNNa3EM0LtFxdAYkeSRE+b20FKUnC8qrQPUL4=; b=Na2WeZ4/iQJsE2u/NPONdI5/qaFU23NqOLNvxls1MfPC0IXrEwtsmC+24reZqZ9PW6XZQE NgWd52xioA52HLA0eijAVdytpmUfHFt+tpmoQcvLLvSs+cVhBaScgtH8UPF6aVVZ/dvXWY 2dJ7/bAO5YBaNXEkmGgzo4cNozu3S2A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-pAVpdsm0Or6XfDNQl3KrHQ-1; Wed, 27 May 2020 11:49:27 -0400 X-MC-Unique: pAVpdsm0Or6XfDNQl3KrHQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB1191005512; Wed, 27 May 2020 15:49:26 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-77.ams2.redhat.com [10.36.113.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id F34165D9E5; Wed, 27 May 2020 15:49:25 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 4/5] ArmPkg/PlatformBootManagerLib: don't connect all devices on each boot To: devel@edk2.groups.io, ard.biesheuvel@arm.com Cc: jon@solid-run.com References: <20200526161359.4810-1-ard.biesheuvel@arm.com> <20200526161359.4810-5-ard.biesheuvel@arm.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 27 May 2020 17:49:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200526161359.4810-5-ard.biesheuvel@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 05/26/20 18:13, Ard Biesheuvel wrote: > In order to avoid boot delays from devices such as network controllers > that may not even be involved in booting at all, drop the call to > EfiBootManagerConnectAll () from the boot path. It will be called by > UiApp, so when going through the menu, all devices will be connected > as usual, but for the default boot, it is really not necessary so > let's get rid of this. I would slightly extend the commit message: "It will be called by UiApp (or DeviceManagerUiLib, per commit 13406bdeb5c5)" Not strictly necessary, I just think mentioning it wouldn't be useless. > > Enumerating all possible boot options and creating Boot#### variables > for them is equally unnecessary in the default case, and also happens > automatically in UiApp, so drop that as well. EfiBootManagerRefreshAllBootOption() makes sure we have boot options for everything that we *do* connect. If the "set of controllers we connect" does not change independently of the "set of boot options we have", then I agree removing EfiBootManagerRefreshAllBootOption() as well makes sense. (This condition does not hold on the QEMU platforms.) So, Reviewed-by: Laszlo Ersek Thanks Laszlo > > Signed-off-by: Ard Biesheuvel > --- > ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > index b465f9ff388f..618072405a50 100644 > --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > @@ -753,11 +753,6 @@ PlatformBootManagerAfterConsole ( > } > } > > - // > - // Connect the rest of the devices. > - // > - EfiBootManagerConnectAll (); > - > // > // On ARM, there is currently no reason to use the phased capsule > // update approach where some capsules are dispatched before EndOfDxe > @@ -767,11 +762,6 @@ PlatformBootManagerAfterConsole ( > // > HandleCapsules (); > > - // > - // Enumerate all possible boot options. > - // > - EfiBootManagerRefreshAllBootOption (); > - > // > // Register UEFI Shell > // >