Jump to content

Marvell (Aquantia) 10 Gb Ethernet support thread


d5aqoep
498 posts in this topic

Recommended Posts

Starting with macOS High Sierra 10.13.2 there is an included driver for Aquantia AQtion AQC-107s based 10GbE network cards.

Others like AQC-107, AQN-107, etc require a kext patch. Performance is identical between them all.

 

Compatible cards as long as they have AQC-107 chipset:

Syba 10 Gbe

https://www.amazon.com/Syba-Port-Gigabit-Ethernet-Network/dp/B07G2DV9K2


TP-Link TX-401 (New but untested)

https://www.amazon.com/gp/aw/d/B08D71PVXG/ref=cm_cr_arp_mb_bdcrb_top?ie=UTF8

 

ASUS XG-C100C (Older revision did not support WOL)

https://www.amazon.com/ASUS-XG-C100C-Network-Adapter-Single/dp/B072N84DG6/

 

Sonnet Presto Solo 10GBASE-T

https://www.amazon.com/Sonnet-10GBASE-T-Ethernet-Thunderbolt-Compatible/dp/B07CLGPP4X/

 

Synology E10G18-T1

https://www.amazon.com/Synology-10Gb-Ethernet-Adapter-E10G18-T1/dp/B07G9N9KJT/

 

Qnap QXG-10G1T

https://accessory.qnap.com/qxg-10g1tb.html

 

Qnap QXG-10G2T-107 (Dual 10 GBE ports) -> Who wants to try this for us? :wub:

https://accessory.qnap.com/qxg-10g2tb.html

 

GIGABYTE GC-AQC113C Vision 10G (Will need SSDT and OpenCore Quirk)

https://www.amazon.com/GIGABYTE-GC-AQC113C-10GbE-Network-Adaptor/dp/B09BZZJBDZ/

 

I have the Syba 10 Gbe card and while it worked out of the box without any patch in earlier macOS versions, since Catalina 10.15.4 and now with Big Sur 11.0, a kext patch is now required for every AQN-107, AQC-107 or AQC-107S based card. I have also used OEM Aquantia Action AQN-107 card which is also working flawlessly. The patch is also working on latest version of macOS Big Sur 11.x

Add this under config.plist Kernel -> Patch section If you are not comfortable to edit plist yourself, use OpenCore Configurator for GUI based approach.: Credits: @Mieze

Tested on OpenCore 6.0+ versions. It may work on Clover but try it yourself.

Kext to patch
com.apple.driver.AppleEthernetAquantiaAqtion

Find
41C70424 00000000 E9

Replace
41C70424 01000000 E9

comment
Marvell AQC107 10GBE Patch

Firmware for AQN107 & AQC107 cards

https://www.marvell.com/support/downloads.html#

 

Patch for Monterey by Mieze

 

Recent versions of OpenCore have Aquantia Quirk you can enable and 107 chipset based cards should work. For newer 113 chipset based cards, SSDT would be required. I have Asus Z690 ProArt Creator and it has 113 chipset. I disabled it and used Syba PCIe 107s card which works. But I am slowly drifting away from Hackintosh scene as it's highly likely that once Apple ends support for Intel based Macs in 3-4 years, everything will die down. Unless we replace our systems with ARM based SOCs and someone manages to do similar using Apple's ARM based macOS.

Edited by d5aqoep
  • Like 15
Link to comment
Share on other sites

Ohh boy!! I removed the ASUS XG-C100C from the attic and inserted into my Hackintosh running HS 10.13.2 and behold

 

It's getting detected correctly. But network settings shows as network cable unplugged

 

It is working correctly in Windows 10 with driver downloaded from ASUS site so there is no cable unplugged problem.

 

We are so near!!!!!

Link to comment
Share on other sites

At first glance it looks like the kext's code checks the device subsystem's id and vendor for Apple provided devices and this might be the reason why it refuses to work properly with your ASUS card but this needs further investigation as I only took a quick look at the code.

 

Mieze

  • Like 5
Link to comment
Share on other sites

Ohh boy!! I removed the ASUS XG-C100C from the attic and inserted into my Hackintosh running HS 10.13.2 and behold

 

It's getting detected correctly. But network settings shows as network cable unplugged

 

VGqXtru.pngIt is working correctly in Windows 10 with driver downloaded from ASUS site so there is no cable unplugged problem.

 

We are so near!!!!!

Did you see something like "Starting AXGE:" in kernel log?

Link to comment
Share on other sites

iMac:~ d5aqoep$ ifconfig -v
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 index 1
eflags=12000000<ECN_DISABLE,SENDLIST>
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
link quality: 100 (good)
state availability: 0 (true)
timestamp: disabled
qosmarking enabled: no mode: none
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 index 2
eflags=1000000<ECN_ENABLE>
state availability: 0 (true)
qosmarking enabled: no mode: none
stf0: flags=0<> mtu 1280 index 3
eflags=1000000<ECN_ENABLE>
state availability: 0 (true)
qosmarking enabled: no mode: none
XHC20: flags=0<> mtu 0 index 4
eflags=41000000<ECN_ENABLE,FASTLN_ON>
state availability: 0 (true)
qosmarking enabled: yes mode: none
XHC0: flags=0<> mtu 0 index 5
eflags=41000000<ECN_ENABLE,FASTLN_ON>
state availability: 0 (true)
qosmarking enabled: yes mode: none
XHC1: flags=0<> mtu 0 index 6
eflags=41000000<ECN_ENABLE,FASTLN_ON>
state availability: 0 (true)
qosmarking enabled: yes mode: none
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 index 7
eflags=41000180<TXSTART,RXPOLL,ECN_ENABLE,FASTLN_ON>
options=64<VLAN_MTU,TSO4,TSO6>
ether 02:03:93:5b:9c:01
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: inactive
type: Ethernet
state availability: 0 (true)
scheduler: FQ_CODEL
qosmarking enabled: yes mode: none
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 index 8
eflags=412008c0<ACCEPT_RTADV,TXSTART,ARPLL,NOACKPRI,ECN_ENABLE,FASTLN_ON>
ether 88:63:df:c9:6c:37
inet6 fe80::80f:7d5:6ddf:4732%en1 prefixlen 64 secured scopeid 0x8
inet 192.168.1.155 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
type: Wi-Fi
link quality: 100 (good)
state availability: 0 (true)
scheduler: FQ_CODEL (driver managed)
uplink rate: 233.10 Mbps [eff] / 273.78 Mbps
downlink rate: 233.10 Mbps [eff] / 273.78 Mbps [max]
qosmarking enabled: yes mode: none
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304 index 9
eflags=41000080<TXSTART,ECN_ENABLE,FASTLN_ON>
ether 0a:63:df:c9:6c:37
media: autoselect
status: inactive
type: Wi-Fi
state availability: 0 (true)
scheduler: FQ_CODEL (driver managed)
link rate: 10.00 Mbps
qosmarking enabled: yes mode: none
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484 index 10
eflags=413e0080<TXSTART,LOCALNET_PRIVATE,ND6ALT,RESTRICTED_RECV,AWDL,NOACKPRI,ECN_ENABLE,FASTLN_ON>
ether f2:b5:e9:d7:e2:a5
inet6 fe80::f0b5:e9ff:fed7:e2a5%awdl0 prefixlen 64 scopeid 0xa
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
type: Wi-Fi
state availability: 0 (true)
scheduler: FQ_CODEL (driver managed)
link rate: 10.00 Mbps
qosmarking enabled: yes mode: none
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000 index 11
eflags=1002080<TXSTART,NOAUTOIPV6LL,ECN_ENABLE>
inet6 fe80::6ca6:a9e7:2f00:befb%utun0 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
agent domain:ids501 type:clientchannel flags:0xc3 desc:"IDSNexusAgent ids501 : clientchannel"
state availability: 0 (true)
scheduler: FQ_CODEL
qosmarking enabled: no mode: none
Here is how it appears in System Profiler

 

PMeqFtA.png

 

I am unable to manually select speed and autoselect is the only option available.

 

KBT2cVH.png

Link to comment
Share on other sites

@d5aqoep: The interface is still down. Try to enable it. In Terminal type "sudo ifconfig en0 up" in order to enable it. Please report back what happens after that. Good luck!

 

Mieze

  • Like 1
Link to comment
Share on other sites

@d5aqoep: The interface is still down. Try to enable it. In Terminal type "sudo ifconfig en0 up" in order to enable it. Please report back what happens after that. Good luck!

 

Mieze

Nothing happened. Network cable still unplugged. It works correctly if I boot into Windows.

Link to comment
Share on other sites

Nothing happened. Network cable still unplugged. It works correctly if I boot into Windows.

What about the kernel logs? Are there any error messages which explain what happened?

 

Mieze

  • Like 1
Link to comment
Share on other sites

What about the kernel logs? Are there any error messages which explain what happened?

 

Mieze

 

Here it is

2017-12-14 21:14:48.207775+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) IO80211Controller::createIOReporters 0x95d71e0dd32e47a1

2017-12-14 21:14:48.208085+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) CCFlags: 0x0, CCLevel: 5 ConsoleFlags: 0x0, ConsoleLevel: -1

2017-12-14 21:14:48.209133+0530 0xea Default 0x0 0 0 kernel: (corecapture) No Service found 1000002c3

2017-12-14 21:14:48.209135+0530 0xea Default 0x0 0 0 kernel: (corecapture) configureInterests - nElements <= 0!

2017-12-14 21:14:48.209139+0530 0xea Default 0x0 0 0 kernel: (corecapture) Failed to configure interests

2017-12-14 21:14:48.209147+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) IO80211Controller::addSubscriptionForThisReporterFetchedOnTimer() Failed to addSubscription for group Chip subgroup Bytes Transferred driver 0x95d71e0dd32e47a1 - data underrun

2017-12-14 21:14:48.209151+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) IO80211ControllerMonitor::configureSubscriptions() failed to add subscription

2017-12-14 21:14:48.209264+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) CCFlags: 0x0, CCLevel: 5 ConsoleFlags: 0x0, ConsoleLevel: -1

2017-12-14 21:14:48.209310+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) CCFlags: 0x0, CCLevel: 5 ConsoleFlags: 0x0, ConsoleLevel: -1

2017-12-14 21:14:48.209334+0530 0xea Default 0x0 0 0 kernel: (IO80211Family) IO80211Controller::start _controller is 0x95d71e0dd32e47a1, provider is 0x95d71e0c566c9ca1

2017-12-14 21:14:48.216301+0530 0xdc Default 0x0 0 0 kernel: (AppleEthernetAquantiaAqtion) WARNING: using bogus hardcoded station address

2017-12-14 21:14:48.234582+0530 0xdc Default 0x0 0 0 kernel: (AppleEthernetAquantiaAqtion) AssertMacros: status, file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleEthernetAquantiaAqtion/AppleEthernetAquantiaAqtion-16.30.11/AppleEthernetAquantiaAqtion/if_axge.cpp, line: 5785, value: 0

2017-12-14 21:14:48.234654+0530 0xdc Default 0x0 0 0 kernel: (AppleEthernetAquantiaAqtion) AssertMacros: status, file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleEthernetAquantiaAqtion/AppleEthernetAquantiaAqtion-16.30.11/AppleEthernetAquantiaAqtion/if_axge_kdb.cpp, line: 71, value: 0

Link to comment
Share on other sites

@d5aqoep: Initialization of the chip fails but I'm still unsure why.

 

Try booting with kernel parameter "apple-axge-debug=0xff" and send me the kernel logs again.

 

Mieze

Forum is acting up a bit and not allowing me to edit my post but I have found out that the mac address which 10.13.2 is showing is not that of my ASUS XG-C100C card.

 

Windows shows totally different mac address.

 

We just need kext patch for clover to start up this card.

Link to comment
Share on other sites

Forum is acting up a bit and not allowing me to edit my post but I have found out that the mac address which 10.13.2 is showing is not that of my ASUS XG-C100C card.

 

Windows shows totally different mac address.

 

We just need kext patch for clover to start up this card.

I disassembled the code which tries to read the permanent MAC address from the chips register space and compared it with the sources of the linux driver. The address you've got is a default value which is used when getting the real MAC address fails. From my own driver projects I know that this is something which usually results from a DSDT problem making it impossible for the driver to access the hardware. Are you injecting a patched DSDT/SDDT? Does your Clover config file include the fix regions patch?

 

Mieze

  • Like 1
Link to comment
Share on other sites

I disassembled the code which tries to read the permanent MAC address from the chips register space and compared it with the sources of the linux driver. The address you've got is a default value which is used when getting the real MAC address fails. From my own driver projects I know that this is something which usually results from a DSDT problem making it impossible for the driver to access the hardware. Are you injecting a patched DSDT/SDDT? Does your Clover config file include the fix regions patch?

 

Mieze

 

I am not using any DSDT/SSDT patches. My EFI/Clover/ACPI/Patched folder is empty. I am unsure if my Clover config includes fix regions patch.

Link to comment
Share on other sites

I am not using any DSDT/SSDT patches. My EFI/Clover/ACPI/Patched folder is empty. I am unsure if my Clover config includes fix regions patch.

If not patched DSDT then no need to patch regions.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

the source code for the linux driver can be downloaded from ASUS. maybe this'll help?

 

http://dlcdnet.asus.com/pub/ASUS/wireless/XG-C100C/DR_XG_C100C_5005_Linux.zip

I used the source code from https://www.kernel.org

Any progress on this?

No, but please send me a complete ACPI dump of your machine and an IOReg dump (use IORegistryExplorer V3.0.2 to create it) with the card installed.

 

Mieze

Link to comment
Share on other sites

I used the source code from https://www.kernel.org

No, but please send me a complete ACPI dump of your machine and an IOReg dump (use IORegistryExplorer V3.0.2 to create it) with the card installed.

 

Mieze

Linux driver loops through BARs to map IO memory:  https://elixir.free-electrons.com/linux/v4.14.9/source/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c#L121

 

MacOS uses kIOPCIConfigBaseAddress0 (0x10) directly: 0x18ca calls mapDeviceMemoryWithRegister(kIOPCIConfigBaseAddress0),

 

 

 __ZN27AppleEthernetAquantiaAqtion14setup_slave_ioEv:        // AppleEthernetAquantiaAqtion::setup_slave_io()

0000000000001872         pushq      %rbp                                        ; CODE XREF=__ZN27AppleEthernetAquantiaAqtion5startEP9IOService+249

0000000000001873         movq       %rsp, %rbp

0000000000001876         pushq      %rbx

0000000000001877         pushq      %rax

0000000000001878         movq       %rdi, %rbx

000000000000187b         movq       0x140(%rbx), %rdi

0000000000001882         movq       (%rdi), %rax

0000000000001885         movl       $0x1, %esi

000000000000188a         callq      *0x8d8(%rax) // __ZN11IOPCIDevice18setBusMasterEnableEb

0000000000001890         movq       0x140(%rbx), %rdi

0000000000001897         movq       (%rdi), %rax

000000000000189a         movl       $0x1, %esi

000000000000189f         callq      *0x8c8(%rax)  // __ZN11IOPCIDevice15setMemoryEnableEb

00000000000018a5         movq       0x140(%rbx), %rdi

00000000000018ac         movq       (%rdi), %rax

00000000000018af         xorl       %esi, %esi

00000000000018b1         xorl       %edx, %edx

00000000000018b3         callq      *0x8d0(%rax) // __ZN11IOPCIDevice11setIOEnableEbb

00000000000018b9         movq       0x140(%rbx), %rdi

00000000000018c0         movq       (%rdi), %rax

00000000000018c3         movl       $0x10, %esi

00000000000018c8         xorl       %edx, %edx

00000000000018ca         callq      *0x908(%rax)   // __ZN11IOPCIDevice27mapDeviceMemoryWithRegisterEhj

00000000000018d0         movq       %rax, 0x150(%rbx)

00000000000018d7         testq      %rax, %rax

 

00000000000018da         je         loc_192f  // jump to failure or get virtual address from memory map and save to 0x658(%rbx)

 

 

The registers seem to be offset by 0x10, linux reads register 0x374  for MAC address.

https://elixir.free-electrons.com/linux/v4.14.9/source/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c#L396

 

MacOS reads 0x364,

 

  __ZN27AppleEthernetAquantiaAqtion10get_lladdrEv:        // AppleEthernetAquantiaAqtion::get_lladdr()

 

000000000000292c         pushq      %rbp

     ... ...

     loc_2a48:

0000000000002a48         movl       $0x364, %esi                                ; CODE XREF=__ZN27AppleEthernetAquantiaAqtion10get_lladdrEv+125

0000000000002a4d         addq       0x658(%rbx), %rsi

0000000000002a54         leaq       var_2C(%rbp), %r14

0000000000002a58         movq       %rbx, %rdi

0000000000002a5b         movq       %r14, %rdx

0000000000002a5e         call       __ZN27AppleEthernetAquantiaAqtion9reg_get32EPjS0_ ; AppleEthernetAquantiaAqtion::reg_get32(unsigned int*, unsigned int*)

0000000000002a63         movl       $0xa0, %esi

0000000000002a68         addl       (%r14), %esi

0000000000002a6b         movl       %esi, (%r14)

0000000000002a6e         leaq       var_20(%rbp), %rdx

0000000000002a72         movl       $0x8, %ecx

0000000000002a77         movq       %rbx, %rdi

0000000000002a7a         call       __ZN27AppleEthernetAquantiaAqtion7ram_getEjPhm ; AppleEthernetAquantiaAqtion::ram_get(unsigned int, unsigned char*, unsigned long)

0000000000002a7f         movl       %eax, %r14d

0000000000002a82         testl      %r14d, %r14d

 

Linux writes some random stuff https://elixir.free-electrons.com/linux/v4.14.9/source/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c#L385

before reads MAC address.

  • Like 1
Link to comment
Share on other sites

@d5aqoep and ydeng: Thanks for the IOReg dump. The BARs might be the right approach. According to the IOReg dump, the chip has 3 device memory areas pointing to a 64K space (function unknown), a 4K space which points most likely to the MSI-X vector space (irrelevant to macOS) and a 4M space. One of them, either the 64K or the 4M space must be the one pointing to the chip's control register space. Provided the order they appear in IOReg corresponds to the BARs order, the 64K space would be the first and the one Apple's driver is using but it could be the wrong BAR. We could make the driver use the correct BAR with a patch but in order to create it, we need to know the physical layout of the BARs (order and if they are 32bit or 64bit BARs).

 

Can someone post a dump of the chip's PCI config space (created with lspci under Linux or macOS or RW-everyting under Windows)?

 

Mieze

Link to comment
Share on other sites

Mieze, on 01 Jan 2018 - 12:42 AM, said:

@d5aqoep and ydeng: Thanks for the IOReg dump. The BARs might be the right approach. According to the IOReg dump, the chip has 3 device memory areas pointing to a 64K space (function unknown), a 4K space which points most likely to the MSI-X vector space (irrelevant to macOS) and a 4M space. One of them, either the 64K or the 4M space must be the one pointing to the chip's control register space. Provided the order they appear in IOReg corresponds to the BARs order, the 64K space would be the first and the one Apple's driver is using but it could be the wrong BAR. We could make the driver use the correct BAR with a patch but in order to create it, we need to know the physical layout of the BARs (order and if they are 32bit or 64bit BARs).

 

Can someone post a dump of the chip's PCI config space (created with lspci under Linux or macOS or RW-everyting under Windows)?

 

Mieze

Happy New Year everyone.

Here is the screenshot of RW-everything ad PCI dump one is raw and other is binary. If something else, let me know.

6obqT5H.png

rw-everythng.zip

Link to comment
Share on other sites

×
×
  • Create New...