Contribute
Register

Intel Network adapters on OS X: Small Tree drivers

Joined
Jul 27, 2014
Messages
114
Motherboard
Intel S2600CP2
CPU
2x E5-2650L v1
Graphics
RX570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
anyone with a i350 ports been able to use small tree drivers? if yes, how? thanks

edit:

I booted off a linux USB and I can see this info using lspci -nn -vvv

07.00.0 Ethernet Controller [0200]: Intel Corp i350 Gigabit Network Connection [8086:1521] (rev01)
Subsystem: Intel Corp i350 Gigabit Network Connection [8086:357e]
07.00.1 Ethernet Controller [0200]: Intel Corp i350 Gigabit Network Connection [8086:1521] (rev01)
Subsystem: Intel Corp i350 Gigabit Network Connection [8086:357e]
 
Last edited:
Joined
Jun 24, 2016
Messages
16
Motherboard
ASUS X299 SAGE/10G
CPU
Intel 7940x
Graphics
2x Vega 56
Hi, Could you share your smalltree kext? for some reason your solution doesn't work for me. (Intel I350)
Did you ever manage to get this working. Same here, stuck with I350. Tnx for your help
 
Joined
Jul 18, 2010
Messages
14
Motherboard
ASUS Rampage VI Extreme
CPU
i7-7800X
Graphics
Vega 64
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Hey guys! I got tired of this driver refusing to work and I came up with a third (fourth?) solution to the problem anyone with an 82576 dual port chip is having.

I was expecting it to work, but then I got an error that some other two bytes are invalid... of course, without an offset. Must have been these ones.

I don't have time for a calculator, and I didn't feel like writing this guy a PM about a post from 4 months ago. I can see why he wouldn't want to share the exact algorithm - there are probably way more stupid inconsequential places they could hide a code in the ROM image, and they seem to not like other people's dirty Ethernet cards tainting their scared drive written under divine right. That game of cat and mouse would end badly for us.

So, instead, I just got down and dirty with objdump and figured out how patch the executable.
Replace 0x664139c1488b75b87526 with 0x664139c1488b75b86690 in
/Library/Extensions/SmallTreeIntel82576.kext/Contents/MacOS/SmallTreeIntel82576
This only gets you past the EEPROM check. You could probably do the same for the PCI Subsystem ID check but why bother when FakePCIID and ethtool are already there and are so easy to use?

As to actually doing the patch, I tried Clover and it didn't... do... anything. Probably because it doesn't get probed by the bootloader, but the kernel, and it's obviously patching code in memory because it's done at every boot. Plus, if that DID work and it ever got unloaded, your only option would to be reboot. (Reboots take forever on my system because it has IPMI.) So I realized that xxd and sed are available even on the stock system without developer tools or anything installed.

So open the Terminal and try running:

xxd /Library/Extensions/SmallTreeIntel82576.kext/Contents/MacOS/SmallTreeIntel82576 /tmp/SmallTreeIntel82576.xxd
sed -i -e 's/66 4139 c148 8b75 26/66 4139 c148 8b66 90/' /tmp/SmallTreeIntel82576.xxd
xxd -r /tmp/SmallTreeIntel82576.xxd /tmp/SmallTreeIntel82576
sudo chown root:wheel /tmp/SmallTreeIntel82576
sudo chmod 755 /tmp/SmallTreeIntel82576
sudo mv /tmp/SmallTreeIntel82576 /Contents/MacOS/Library/Extensions/SmallTreeIntel82576.kext

Then try loading the kext again:
sudo kextload /Library/Extensions/SmallTreeIntel82576.kext
Remember that you still have to fake the Subsystem ID with either an EEPROM edit with ethtool under Linux or using FakePCIID.

Awesome, I got my Intel i350 t2v2 working with this binary patch......

Here is my patched kext
 

Attachments

  • SmallTreeIntel82576.kext.zip
    67.3 KB · Views: 154
Joined
Jul 27, 2014
Messages
114
Motherboard
Intel S2600CP2
CPU
2x E5-2650L v1
Graphics
RX570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
Thanks a lot!

Where's the best place to install the small tree + FakePCIID?

Inside Clover/EFI? SLE? Library/Extensions?

Thanks
 
Joined
Jul 27, 2014
Messages
114
Motherboard
Intel S2600CP2
CPU
2x E5-2650L v1
Graphics
RX570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
Another question please .What subsystem ID should I use for i350? Thanks again
 
Joined
Jul 27, 2014
Messages
114
Motherboard
Intel S2600CP2
CPU
2x E5-2650L v1
Graphics
RX570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
So, instead, I just got down and dirty with objdump and figured out how patch the executable.
Replace 0x664139c1488b75b87526 with 0x664139c1488b75b86690 in
/Library/Extensions/SmallTreeIntel82576.kext/Contents/MacOS/SmallTreeIntel82576
This only gets you past the EEPROM check. You could probably do the same for the PCI Subsystem ID check but why bother when FakePCIID and ethtool are already there and are so easy to use?

--snip--

So open the Terminal and try running:

xxd /Library/Extensions/SmallTreeIntel82576.kext/Contents/MacOS/SmallTreeIntel82576 /tmp/SmallTreeIntel82576.xxd
sed -i -e 's/66 4139 c148 8b75 26/66 4139 c148 8b66 90/' /tmp/SmallTreeIntel82576.xxd
xxd -r /tmp/SmallTreeIntel82576.xxd /tmp/SmallTreeIntel82576
sudo chown root:wheel /tmp/SmallTreeIntel82576
sudo chmod 755 /tmp/SmallTreeIntel82576
sudo mv /tmp/SmallTreeIntel82576 /Contents/MacOS/Library/Extensions/SmallTreeIntel82576.kext

Then try loading the kext again:
sudo kextload /Library/Extensions/SmallTreeIntel82576.kext
Remember that you still have to fake the Subsystem ID with either an EEPROM edit with ethtool under Linux or using FakePCIID.

So I tried the suggestions above but it seems the hex value has changed? in the sed command, I made a backup of the original .xxd file and when I ran diff on the edited file and the backup file, diff doesn't show anything.

Any ideas what I could be doing wrong? or perhaps the patched is not applicable to newer versions?

I've included a screenshot of the commands used.

thanks
 

Attachments

  • Screen Shot 2018-05-20 at 11.55.30 pm.png
    Screen Shot 2018-05-20 at 11.55.30 pm.png
    378.8 KB · Views: 262
Joined
Jul 18, 2010
Messages
14
Motherboard
ASUS Rampage VI Extreme
CPU
i7-7800X
Graphics
Vega 64
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
I just put it in /Volumes/EFI/EFI/CLOVER/kexts/Other.
The patch should have bypassed the subsystem id checking.
So the sole purpose of FakePCIID.kext is to inject your device id.

EDIT: i350's device id is already there, I even don't have FakePCIID.kext installed.

BTW, I also found the binary changed but when inspecting the xxd dump, I can only find one "75b87526". I changed it to "75b86690" and convert it back to binary, that is it, it works, at least for me. :crazy:

EDIT: The line of code in xxd dump should be in the around line 0x000013c0. I attached the command and the output after the patch for your reference.
Screen Shot 2018-05-20 at 11.06.09 PM.png
 
Last edited:
Joined
Jul 27, 2014
Messages
114
Motherboard
Intel S2600CP2
CPU
2x E5-2650L v1
Graphics
RX570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
I just put it in /Volumes/EFI/EFI/CLOVER/kexts/Other.
The patch should have bypassed the subsystem id checking.
So the sole purpose of FakePCIID.kext is to inject your device id.

According to the original reply by castrwilliam: "You could probably do the same for the PCI Subsystem ID check but why bother when FakePCIID and ethtool are already there and are so easy to use?"

seems to me he's saying the subsystem ID still needs to be changed. Unless of course you did that yourself in your patched version?

version?, EDIT: i350's device id is already there, I even don't have FakePCIID.kext installed.

did you mean subsystem id or device ID? According to Linux lspci, my i350 ports (built-in to the Intel board) has a vendor/device ID of "8086:1521" and subsystem ID of "8086:357e". Don't I need to change "357e" to "000a"?

Thanks a lot for the help!
 
Joined
Jul 18, 2010
Messages
14
Motherboard
ASUS Rampage VI Extreme
CPU
i7-7800X
Graphics
Vega 64
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
According to the original reply by castrwilliam: "You could probably do the same for the PCI Subsystem ID check but why bother when FakePCIID and ethtool are already there and are so easy to use?"

seems to me he's saying the subsystem ID still needs to be changed. Unless of course you did that yourself in your patched version?



did you mean subsystem id or device ID? According to Linux lspci, my i350 ports (built-in to the Intel board) has a vendor/device ID of "8086:1521" and subsystem ID of "8086:357e". Don't I need to change "357e" to "000a"?

Thanks a lot for the help!
Actually I tried ethtool and modded my card to "000a", with no success before I patched the kext binary.

And I mean device Id "0x15218086" in the SmallTreeIntel82576.kext, it is the i350, you are right, and you can see it when you inspect the Info.plist inside.

I am not sure whether the subsystem ID needs to be patched with ethtool or not, I already did it.
But I am sure i350's device id is there. You don't have to inject it.

Just try it out, no harm, it will load, or not. And share your findings. ;)
 
Joined
Jul 27, 2014
Messages
114
Motherboard
Intel S2600CP2
CPU
2x E5-2650L v1
Graphics
RX570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
  2. iOS
Anyone has a patched 82576.kext for Sierra and below? as expected, the binary dump is different from the high sierra one. thanks
 
Last edited:
Top