Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Ryan Harkin b7b7fb3dec EmbeddedPkg/Lan9118Dxe: add PCD for negotiation timeout
Add a PCD for the link negotiation timeout so the platform can over-ride
the default value.

The code previously did 2000 iterations of the loop with a 2us stall, so
the code has been changed subtly to set the number of iterations equal
to the PCD value divided by the stall time.

Since the stall time has not changed, the default PCD value is set at
4000 so the original behaviour is not changed.

The problems were discovered when the ARM Juno Development Platform used
the "EFI Network" option with then LAN9118 driver.  It 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]

Discussion on the edk2-devel mailing list [1] prompted Laszlo Ersek to
suggest the time taken for the NIC to negotiate was causing a problem.
He suggested the solution contained in this patch to provide a PCD
configurable by the platform.

The default PCD value does not work for Juno.  Setting the PCD to a
larger value works for Juno R0, R1 and R2.

[1] 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>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-02-10 17:56:43 +01:00
AppPkg AppPkg/.../Python: Clean up and document how to escape the -# option. 2016-01-06 01:00:19 +00:00
ArmPkg ArmPkg: Add isb when setting SCR 2016-02-03 18:42:21 +00:00
ArmPlatformPkg ArmPlatformPkg/Bds: Early Console Initialization 2016-02-09 18:23:57 +00:00
ArmVirtPkg ArmVirtPkg: implement ArmVirtQemuKernel 2016-02-05 17:10:17 +01:00
BaseTools BaseTools: Update BaseTools to pass VS2015 compiler 2016-01-29 04:54:37 +00:00
BeagleBoardPkg BeagleBoardPkg: Rectify file modes 2016-02-02 11:42:41 +00:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg:Removing EFI_RESOURCE_ATTRIBUTE_TESTED 2015-08-18 16:08:22 +00:00
CorebootPayloadPkg CorebootPayloadPkg PlatformHookLib: Fix GCC build failure 2015-11-30 21:11:29 +00:00
CryptoPkg CryptoPkg: Fix function qsort for non 32-bit machines 2016-01-26 08:51:13 +00:00
DuetPkg DuetPkg FSVariable: Minor update to the Data parameter for GetVariable() 2016-01-29 09:15:53 +00:00
EdkCompatibilityPkg EdkCompatibilityPkg: Fix wrong guid value of gEfiManagedNetworkProtocolGuid 2016-01-18 03:03:19 +00:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg/Lan9118Dxe: add PCD for negotiation timeout 2016-02-10 17:56:43 +01:00
EmulatorPkg EmulatorPkg: Convert all .uni files to utf-8 2015-12-15 04:51:49 +00:00
FatBinPkg FatBinPkg: Update EBC/IA32/X64/IPF binaries 2015-08-28 03:14:25 +00:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: Add NOOPT target in IntelFrameworkModulePkg.dsc 2016-01-19 04:05:12 +00:00
IntelFrameworkPkg IntelFrameworkPkg: Add NOOPT target in IntelFrameworkPkg.dsc 2016-01-19 04:05:29 +00:00
IntelFspPkg IntelFspPkg: Add NOOPT target in IntelFspPkg.dsc 2016-01-21 02:14:43 +00:00
IntelFspWrapperPkg IntelFspWrapperPkg: Add NOOPT target in IntelFspWrapperPkg.dsc 2016-01-21 02:15:02 +00:00
MdeModulePkg MdeModulePkg: Update DxeCore dispatcher to ignore PEI and SMM depex for FV. 2016-02-05 12:21:25 +08:00
MdePkg MdePkg:Add a new error status code EFI_HTTP_ERROR. 2016-02-03 11:48:33 +08:00
NetworkPkg NetworkPkg:Add a new error status code EFI_HTTP_ERROR 2016-02-03 11:48:36 +08:00
Nt32Pkg Nt32Pkg: Add NOOPT to NT32 build target 2016-01-27 09:46:24 +00:00
Omap35xxPkg Omap35xxPkg: Rectify file modes 2016-02-02 11:43:00 +00:00
OptionRomPkg OptionRomPkg: Remove redundant included header file defintion in Ax88772.h and Ax88772b.h files 2015-07-08 02:56:54 +00:00
OvmfPkg OvmfPkg: QemuBootOrderLib: recognize NVMe devices 2016-02-02 15:30:27 +00:00
PcAtChipsetPkg MdeModulePkg/PcRtc: Still create timezone variable when Daylight != 0 2016-02-03 16:13:18 +08:00
PerformancePkg PerformancePkg Dp_App: Use Image->FilePath to get name for SMM drivers 2016-01-19 09:19:28 +00:00
QuarkPlatformPkg QuarkPlatformPkg/Readme.md: Move images to tianocore wiki 2016-01-31 19:22:57 +00:00
QuarkSocPkg QuarkSocPkg: Remove X64 from SUPPORTED_ARCHITECTURES 2016-01-07 21:52:53 +00:00
SecurityPkg SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable 2016-02-02 01:02:31 +00:00
ShellBinPkg ShellBinPkg: Arm/AArch64 Shell binary update. 2016-02-09 16:34:14 +00:00
ShellPkg ShellPkg: Fix ASCII and UNICODE file pipes. 2016-02-08 15:59:04 -08:00
SourceLevelDebugPkg SourceLevelDebugPkg: DebugCommunicationLibUsb3: Update local variable type. 2016-01-25 03:33:45 +00:00
StdLib StdLib: Fix compilation errors caused by previous commit of daConsole.c 2016-01-10 21:23:51 +00:00
StdLibPrivateInternalFiles StdLib: Clarify and improve comments. 2016-01-06 00:31:42 +00:00
UefiCpuPkg UefiCpuPkg: Add NOOPT target in UefiCpuPkg.dsc 2016-01-19 04:08:09 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Vlv2TbltDevicePkg/Vlv2DeviceRefCodePkg: 2015-11-10 07:47:29 +00:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: Convert all .uni files to utf-8 2015-12-15 04:59:37 +00:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt
Edk2Setup.bat BaseTools: Update Edk2Setup.bat to support multiple workspaces 2015-10-08 09:29:36 +00:00
Maintainers.txt Maintainers.txt: Update maintainers for ShellBinPkg 2016-02-10 14:45:52 +00:00
edksetup.bat BaseTools: Add VS2015 tool chain in tools_def.template 2015-12-03 03:19:01 +00:00
edksetup.sh BaseTools: Update edksetup.sh to support multiple workspaces 2015-10-08 09:29:56 +00:00