From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8C17D21EA15D8 for ; Fri, 6 Oct 2017 02:44:32 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 2926B7E38F; Fri, 6 Oct 2017 09:47:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2926B7E38F Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-219.rdu2.redhat.com [10.10.120.219]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78F4C5F924; Fri, 6 Oct 2017 09:47:55 +0000 (UTC) To: Pankaj Bansal References: From: Laszlo Ersek Cc: "edk2-devel@lists.01.org" Message-ID: <65ceafe9-5cb2-6642-f3d0-71f37b020937@redhat.com> Date: Fri, 6 Oct 2017 11:47:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 06 Oct 2017 09:47:56 +0000 (UTC) Subject: Re: Boot delay due to network devices X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2017 09:44:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/06/17 11:23, Pankaj Bansal wrote: > Hello edk2 team, > > We are getting boot time delay in edk2 in our armv8 based platform due to network devices. > We have implemented the network device drivers in our platform as SNP device drivers. > We have total of eight network interfaces (eight SNP protocols). > Out of eight only one or two network interfaces are connected to network at a time; rest are disconnected. > When we boot the system then all the devices are detected (Snp->Start) and initialized (Snp->Initialize). > During Snp->Initialize(), the phy auto negotiation is started and driver waits for auto negotiation to complete for maximum of 5 seconds. > For each network device that is not connected, the system spends 5 seconds before exiting out of Initialize. > > We don't want to use these network devices for boot, still the time is being spent to check their status. > Is there some way we can skip this delay due to phy auto negotiation during boot ? > If I move phy auto negotiation to Snp->Transmit and Snp->Receive, will this violate the SNP protocol guidelines ? Do not connect the devices that you don't intend to boot off of -- avoid calling gBS->ConnectController() on them. (Equivalently, don't call EfiBootManagerConnectXxx() functions from UefiBootManagerLib that result in such gBS->ConnectController() calls internally.) What devices are connected at boot is platform policy, implemented in the platform's PlatformBootManagerLib instance. In your PlatformBootManagerLib instance, you probably call EfiBootManagerConnectAll() somewhere. Replace it with various, more specific, EfiBootManagerConnectXxx() calls, as appropriate, from "MdeModulePkg/Include/Library/UefiBootManagerLib.h": - EfiBootManagerConnectDevicePath() - EfiBootManagerConnectAllDefaultConsoles() - EfiBootManagerConnectConsoleVariable() - EfiBootManagerConnectVideoController() Thanks Laszlo