Hi Laszlo,

Thank you for your prompt reply.
But it's not like that we do not want to boot from network device ever.
We have eight network devices, out of which one would be used for booting the 
kernel.
We do not know which one of the eight devices, would be connected to network 
when system is in use.
Moreover network configuration can be changed, when the system is running. i.e. 
we can disconnect one device and connect other and try to boot from it.
Therefore we need to initialize all the network devices.

However the network device initialization (Snp->Initialize) expects the link 
status of network device to be updated after phy auto negotiation.
For devices which are not connected to network, this will result in phy auto 
negotiation timeout after 5 seconds.
I want to reduce this delay.
Can we attempt phy auto negotiation for only those network devices, which we 
will be using for booting (or for any network activity for that matter)
In other words for only those devices, for which we will be calling 
Snp->Transmit and Snp->Receive functions?

Thanks & Regards,
Pankaj Bansal

-----Original Message-----
From: Laszlo Ersek [mailto:[email protected]] 
Sent: Friday, October 06, 2017 3:18 PM
To: Pankaj Bansal <[email protected]>
Cc: [email protected]
Subject: Re: [edk2] Boot delay due to network devices

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
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to