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.
Alan.
Alan Ott (6): Drivers/Net/MarvellYukon: Put model_name under MDEPKG_NDEBUG ifndef Drivers/Net/MarvellYukon: Use EFI_SIZE_TO_PAGES() 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 | 104 ++++++++++++++++++++++++-------- Drivers/Net/MarvellYukonDxe/if_mskreg.h | 15 ++++- 2 files changed, 91 insertions(+), 28 deletions(-)