summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2016-02-05 17:51:55 +0000
committerRyan Harkin <ryan.harkin@linaro.org>2016-02-05 18:41:54 +0000
commit913608015f13e0f418bd6fa92e4d242974c62503 (patch)
tree3bf79b32597b372edb2d3a816a9d645a69ff0555
parent3e80fbf4bfe7554d70a3908ec7f5ed295b563396 (diff)
ArmPlatformPkg/IntelBds: Stall after BdsLibConnectAll()armlt-20160205-001
When Juno boots, all devices are not connected. The first boot creates the boot variables and sets their order, meaning that we get the following list on the first attempt: EFI Misc Device EFI Misc Device 1 EFI Internal Shell Intel BDS then attempts to boot from one of the devices and ends up in Shell. After exiting Shell, the Intel BDS console GUI comes up. Selecting the Boot Manager option shows more devices being connected and the list becomes longer: EFI Misc Device EFI Misc Device 1 EFI Internal Shell EFI Hard Drive EFI Network Subsequent boots will never attempt to boot from Hard Drive or Network because Shell will always succeed. Leif has a patch in his tree that solves this problem [1] by making the platform call BdsLibConnectAll(). So now, the first time boot order looks sane: EFI Misc Device EFI Misc Device 1 EFI Hard Drive EFI Network EFI Internal Shell However, then the board is booting, the "EFI Network" fails to boot the first time and so the board drops back to Shell again: Warning: LAN9118 Driver in stopped state Link timeout in auto-negotiation. Lan9118: Auto Negociation not supported. EhcExecTransfer: transfer failed with 2 EhcControlTransfer: error - Device Error, transfer - 2 Buffer: EFI Hard Drive Booting EFI Misc Device Booting EFI Misc Device 1 Booting EFI Hard Drive Booting EFI Network Warning: LAN9118 Driver not initialized Link timeout in auto-negotiation. Lan9118: Auto Negociation not supported. Booting EFI Internal Shell Exiting Shell drops the user back to the Intel BDS UI. Selecting "Continue" then succeeds in booting from the EFI Network: Booting EFI Misc Device Booting EFI Misc Device 1 Booting EFI Hard Drive Booting EFI Network ..MnpFreeTxBuf: Duplicated recycle report from SNP. MnpFreeTxBuf: Duplicated recycle report from SNP. [snip repeated errors] If I duplicate the call to BdsLibConnectAll(), then boot works as expected. On a first boot, the boot order is created correctly and EFI Network pulls down a file and boots it. Discussion on the edk2-devel mailing list [2] prompted Laszo Ersek to suggest replacing the 2nd call with a gBS->Stall() in case it was simply the time taken for the NIC to negotiate that was causing a problem. I set a Stall for 500000 microseconds (0.5 seconds) and this seems to work for Juno R0, R1 and R2. [1] https://git.linaro.org/uefi/linaro-edk2.git/commitdiff/bfbd0ef1a182e1baa120f66ad2c6838ef48ff48c [2] http://article.gmane.org/gmane.comp.bios.edk2.devel/7341 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rw-r--r--ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
index ceb4f076e2..581bd7cc5e 100644
--- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
+++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
@@ -359,6 +359,7 @@ PlatformBdsPolicyBehavior (
// is known
//
BdsLibConnectAll ();
+ gBS->Stall(500000); // microseconds
}
/**