These patches are for the MarvellYukon driver which is currently part of OpenPlatformPkg.
The impetus was to get this driver to work on a SoftIron Overdrive 1000 board using the AMD Opteron-A (Seattle/Styx) SoC. On this platform, in my testing, edk2 allocates DMA buffers with 64-bit addresses. The Marvell Yukon driver as posted did not support 64-bit addresses, and simply truncated any DMA address to 32-bits. After consulting with Ard Biesheuvel and Leif Lindholm on IRC, it seemed the proper fix was to add support for 64-bit DMA. For this I went back to the original source of this driver (FreeBSD), and brought over the appropriate code.
A couple of patches are basic fixes, but the one titled "Don't re-use DMA buffers" changes how handling of DMA buffers works. This patch makes it work closer to how the FreeBSD implementation works and also adds some required DMA function calls. Its commit message is worth a read.
I don't have a Juno board to test this on, so while this does work on my Overdrive 1000, there's a chance I broke something for other users.
Changes from v1: * Update to the version of the driver committed in OpenPlatformPkg.
Changes from v2: * Base on what's currently upstream (Leif Lindholm took patches 1 and 2 from v2, reducing the patch count from 6 to 4). * Use functions for CopyMem() and SetMem() from EFI Boot Services (gBS->CopyMem(), etc.). * Add Signoff and Contributed-Under
Alan.
Alan Ott (4): Drivers/Net/MarvellYukon: Don't re-use DMA buffers Drivers/Net/MarvellYukon: Zero allocated memory for DMA receive buffers Drivers/Net/MarvellYukon: Add 64-bit DMA support Drivers/Net/MarvellYukon: Set Dual Address Cycle Attribute
Drivers/Net/MarvellYukonDxe/if_msk.c | 90 +++++++++++++++++++++++++-------- Drivers/Net/MarvellYukonDxe/if_mskreg.h | 13 +++++ 2 files changed, 83 insertions(+), 20 deletions(-)