Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 28f52b9fae9feba369ff0d773e0b0e610c0aa6f8
      
https://github.com/tianocore/edk2/commit/28f52b9fae9feba369ff0d773e0b0e610c0aa6f8
  Author: Mark Rutland <mark.rutl...@arm.com>
  Date:   2016-05-10 (Tue, 10 May 2016)

  Changed paths:
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c

  Log Message:
  -----------
  Revert "EmbeddedPkg/Lan9118Dxe: use MemoryFence"

Commit a4626006bbf86113 ("EmbeddedPkg/Lan9118Dxe: use MemoryFence")
replaced some stalls with memory fences, on the presumption that these
were erroneously being used to order memory accesses. However, this was
not the case.

LAN9118 devices require a timing delay between state-changing
reads/writes and subsequent reads, as updates to the register file are
asynchronous and the effects of state-changes are not immediately
visible to subsequent reads.

This delay cannot be ensured through the use of memory barriers, which
only enforce observable ordering, and not timing. Thus, converting these
stalls to memory fences was erroneous, and may result in stale values
being read.

This reverts commit a4626006bbf86113453aeb7920895e66cdd04737.

Cc: Leif Lindholm <leif.lindh...@linaro.org>
Cc: Ryan Harkin <ryan.har...@linaro.org>
Signed-off-by: Mark Rutland <mark.rutl...@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>


  Commit: 73683a2464e2f81b7b9dfb9b84b537290235bbe1
      
https://github.com/tianocore/edk2/commit/73683a2464e2f81b7b9dfb9b84b537290235bbe1
  Author: Mark Rutland <mark.rutl...@arm.com>
  Date:   2016-05-10 (Tue, 10 May 2016)

  Changed paths:
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeHw.h
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.h

  Log Message:
  -----------
  EmbeddedPkg/Lan9118Dxe: add LAN9118 MMIO wrappers

As described in the LAN9118 datasheet, delays are necessary after some
reads and writes in order to ensure subsequent reads do not see stale
data.

This patch adds helpers to provide these delays automatically, by
performing dummy reads of the BYTE_TEST register (as recommended in the
LAN9118 datasheet). This approach allows the device register file itself
to provide the required delay, avoiding issues with early write
acknowledgement, or re-ordering of MMIO accesses aganist other
instructions (e.g. the delay loop).

Cc: Leif Lindholm <leif.lindh...@linaro.org>
Cc: Ryan Harkin <ryan.har...@linaro.org>
Signed-off-by: Mark Rutland <mark.rutl...@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>


  Commit: e68449c9992fdb4d04c14b3db45393e358a618a6
      
https://github.com/tianocore/edk2/commit/e68449c9992fdb4d04c14b3db45393e358a618a6
  Author: Mark Rutland <mark.rutl...@arm.com>
  Date:   2016-05-10 (Tue, 10 May 2016)

  Changed paths:
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeHw.h
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c

  Log Message:
  -----------
  EmbeddedPkg/Lan9118Dxe: Use LAN9118 MMIO wrappers

Migrate the existing code to use the new LAN9118 MMIO wrappers, ensuring
that timing requirements are respected.

The newly redundant stalls will be removed in a subsequent patch.

Cc: Leif Lindholm <leif.lindh...@linaro.org>
Cc: Ryan Harkin <ryan.har...@linaro.org>
Signed-off-by: Mark Rutland <mark.rutl...@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>


  Commit: 505e7fd5d07a7e2b7856050057049399fbbe1186
      
https://github.com/tianocore/edk2/commit/505e7fd5d07a7e2b7856050057049399fbbe1186
  Author: Mark Rutland <mark.rutl...@arm.com>
  Date:   2016-05-10 (Tue, 10 May 2016)

  Changed paths:
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
    M EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c

  Log Message:
  -----------
  EmbeddedPkg/Lan9118Dxe: remove redundant stalls

Now that the LAN9118-specific MMIO accessors provide the required
delays, remove the redundant stalls.

Stalls in delay loops are kept, as these give time for work to happen
beyond synchronisation of the device register file.

Cc: Leif Lindholm <leif.lindh...@linaro.org>
Cc: Ryan Harkin <ryan.har...@linaro.org>
Signed-off-by: Mark Rutland <mark.rutl...@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>


Compare: https://github.com/tianocore/edk2/compare/d1ec2b2f78b7...505e7fd5d07a
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to