Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Ryan Harkin a4626006bb EmbeddedPkg/Lan9118Dxe: use MemoryFence
When reviewing my LAN9118 driver PCD patch [1], Ard Biesheuvel noted
that most calls to gBS->Stall() in this driver seem to be used to
prevent timing issues between the device updating data and the host
reading the values.  And that replacing most of these calls with a
MemoryFence() would be more robust.

The only exceptions are the stalls that are enclosed inside retry loops:

 - in the AutoNegotiate() function.
   This stall is waiting for the link to negotiate, which may require
   stalling until it is ready.

 - in the Lan9118Initialize() function.
   These two stalls are waiting for devices and time out after a number
   of retries.

 - in the SoftReset() function.
   This stall is inside a loop where the comment states:
   "If time taken exceeds 100us, then there was an error condition"

In these instances, I kept the stall, but also added a MemoryFence().

[1] http://article.gmane.org/gmane.comp.bios.edk2.devel/7389

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:39 +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: use MemoryFence 2016-02-10 17:56:39 +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 Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
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