public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Pankaj Bansal <pankaj.bansal@nxp.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Boot delay due to network devices
Date: Fri, 6 Oct 2017 11:47:54 +0200	[thread overview]
Message-ID: <65ceafe9-5cb2-6642-f3d0-71f37b020937@redhat.com> (raw)
In-Reply-To: <AM0PR0402MB3940BB147E44E48889BFCD56F1710@AM0PR0402MB3940.eurprd04.prod.outlook.com>

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


  reply	other threads:[~2017-10-06  9:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06  9:23 Boot delay due to network devices Pankaj Bansal
2017-10-06  9:47 ` Laszlo Ersek [this message]
2017-10-06 11:07   ` Pankaj Bansal
2017-10-06 13:09     ` Laszlo Ersek
2018-03-23 11:58       ` Wasim Khan
2018-03-23 12:22         ` Michael Brown
2018-03-23 13:01           ` Wasim Khan
2018-03-23 14:28             ` Laszlo Ersek
2018-03-23 14:02         ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65ceafe9-5cb2-6642-f3d0-71f37b020937@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox