Contribute
Register

Intel Network adapters on OS X: Small Tree drivers

the driver kext has not.

Like I said, you need an injector kext or an additional IOKitPersonality in this kext to create a reason for the native kext to load.

Refer to the other examples in the FakePCIID repo, and look at the Info.plist for your target kext for requirements (IOClass, IOProvider, etc).
 
In /S/L/E, I have these three files:
FakePCIID_Broadcom_WiFi.kext
FakePCIID_Intel_GbX.kext
FakePCIID.kext
The first two are injectors, are they not? I don't understand why you're saying I need an injector kext. The info.plist I've been editing is from the Intel_GbX injector.
In all the other example injectors, IOClass = FakePCIID. And IOProviderClass = IOPCIDevice. That's what I have too. Are you saying I should change IOClass to AppleIntelI210? If I do that, then the device does not attach to FakePCIID or the native driver.
 
In /S/L/E, I have these three files:
FakePCIID_Broadcom_WiFi.kext
FakePCIID_Intel_GbX.kext
FakePCIID.kext
The first two are injectors, are they not?

Correct.

I don't understand why you're saying I need an injector kext.

You need to provide a reason for IOKit to load the native kext for your device. Requires either "device-id" or "compatible" injection (depends on how the Info.plist is coded in the native kext) or requires you create an extra IOKitPersonality for your device such that the driver will load. That IOKitPersonality can be done in a separate "injector kext" or the FakePCIID "injector kext" you're trying to build. Refer to FakePCIID_AR9280_as_AR946x.kext/Contents/Info.plist as an example.
 
Okay I think I get it now. So the first personality matches the device, sets the fake properties, and attaches to FakePCIID.kext. Then the second personality tells it which other kext to attach? In this second personality, should it match with the real device-id or the fake injected one?

CFBundleIdentifier specifies the name of the driver to load
IOClass is an arbitrary label

I renamed my kext FakePCIID_Intel_i211.kext and here is the plist with the added personality. It's still not working. I have RM,subsystem-id as a string, because I'm not sure how to translate 0x0B to data type.
 

Attachments

  • Info.plist
    2.2 KB · Views: 337
Okay I think I get it now. So the first personality matches the device, sets the fake properties, and attaches to FakePCIID.kext. Then the second personality tells it which other kext to attach? In this second personality, should it match with the real device-id or the fake injected one?

The second personality allows the native driver to attach. It accounts for the missing device-id in the Info.plist of the native kext. It should match against the native device-id of the device, just like the FakePCIID personality does.

CFBundleIdentifier specifies the name of the driver to load
IOClass is an arbitrary label

Refer to the native kexts Info.plist for this data (and any other entries that are required).

Your Info.plist is wrong. RM,device-id must be 4-byte data, Intel byte order. Same for RM,subsystem-id. Refer to the existing examples. Make sure you turn on "raw data" in Xcode.
 
I think you mean "Show raw keys and values", and I have that enabled already.
RM,device-id is type 'data' <33150000>. What's wrong with that?
I know RM,subsystem-id is wrong, but how do I write that as 4-byte data? I got the value 0x0B from Intel's datasheet.
 
I think you mean "Show raw keys and values", and I have that enabled already.
RM,device-id is type 'data' <33150000>. What's wrong with that?

As long as that is the natively supported ID, 0x1533, fine.
But RM,subsystem-id as string is wrong.

I know RM,subsystem-id is wrong, but how do I write that as 4-byte data? I got the value 0x0B from Intel's datasheet.

It would be 0xb, as 4-byte Intel byte order is <0b000000>, of course.

Note also for your i311 injector that you must have all the data that is in the original kext in the IOKitPersonality. The driver will expect it to be there. Refer to the Info.plist in AppleIntelI210Ethernet.kext.

Also note that you can't arbitrarily change the class name (IOClass). It will be obvious if you compare your IOKitPersonality to the one in the native kext that you have it all wrong. Use copy/paste then change only the IOPCIPrimaryMatch to match your device.
 
Okay, so I've copied all the information from the native driver's IOKitPersonality, just changing the IOPCIPrimaryMatch. Now when I boot, I do see that the driver is attaching, and it appears in System Information, with the name "ethernet". But in System Prefs, it says the cable is disconnected. And it breaks my other i218 NIC and wifi, which were both working fine before. I also tried deleting the RM,subsystem-id key, and it makes no difference. So I guess this driver only matches on device-id.

ioreg:
Code:
+-o D087@0  <class IOPCIDevice, id 0x100000402, registered, matched, active, busy 0 (42 ms), retain 13>
  | {
  |   "acpi-device" = "IOACPIPlatformDevice is not serializable"
  |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/RP06@1c0005/D087@0"
  |   "assigned-addresses" = <10005682000000000000d0df0000000000000200180056810000000000c0000000000000200000001c005682000000000000d2df0000000000400000>
  |   "class-code" = <00000200>
  |   "subsystem-vendor-id" = <58140000>
  |   "vendor-id" = <86800000>
  |   "IOPCIExpressLinkCapabilities" = 4348945
  |   "IOName" = "ethernet"
  |   "IOPCIPMCSState" = 0
  |   "IOPCIPauseCompatible" = Yes
  |   "IOChildIndex" = 1
  |   "pcidebug" = "86:0:0"
  |   "IOPCIExpressLinkStatus" = 4113
  |   "pci-aspm-default" = 0
  |   "IOPCIExpressCapabilities" = 2
  |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
  |   "built-in" = <00>
  |   "IOPCIResourced" = Yes
  |   "IODeviceMemory" = (({"address"=3754950656,"length"=131072}),"IOSubMemoryDescriptor is not serializable",({"address"=3755081728,"length"=16384}))
  |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2,"CapabilityFlags"=2,"ChildProxyPowerState"=2,"MaxPowerState"=3}
  |   "acpi-pmcap-offset" = 64
  |   "name" = <"ethernet">
  |   "subsystem-id" = <00e00000>
  |   "RM,device-id" = <33150000>
  |   "compatible" = <"pci1458,e000","pci8086,1539","pciclass,020000","D087">
  |   "acpi-wake-type" = 2
  |   "IOReportLegendPublic" = Yes
  |   "reg" = <0000560000000000000000000000000000000000100056020000000000000000000000000000020018005601000000000000000000000000200000001c00560200000000000000000000000000400000>
  |   "IOReportLegend" = ({"IOReportGroupName"="Interrupt Statistics (by index)","IOReportChannels"=((5291294645182070784,5368709121,"               First Level Interrupt Handler Count"),(5291294645182070785,5368709121,"              Second Level Interrupt Handler Count"),(5291294645182070786,5368709121,"        First Level Interrupt Handler Time (MATUs)"),(5291294645182070787,5368709121,"   Second Level Interrupt Handler CPU Time (MATUs)"),(5291294645182070788,5368709121,"Second Level Interrupt Handler System Time (MATUs)")),"IOReportChannelInfo"={"IOReportChannelUnit"=0},"IOReportSubGroupName"="1"})
  |   "device-id" = <39150000>
  |   "revision-id" = <03000000>
  |   "IOInterruptSpecifiers" = (<1100000007000000>,<0900000000000100>)
  |   "IOPCIMSIMode" = Yes
  | }
  |
  +-o AppleIntelI210  <class AppleIntelI210, id 0x1000005ff, !registered, !matched, active, busy 0 (0 ms), retain 8>
  | +-o en3  <class IOEthernetInterface, id 0x10000063c, registered, matched, active, busy 0 (0 ms), retain 10>
  |   +-o IONetworkStack  <class IONetworkStack, id 0x10000051c, registered, matched, active, busy 0 (0 ms), retain 12>
  |     +-o IONetworkStackUserClient  <class IONetworkStackUserClient, id 0x1000005ea, !registered, !matched, active, busy 0, retain 5>
  +-o FakePCIID  <class FakePCIID, id 0x100000600, !registered, !matched, active, busy 0, retain 4>

system.log:
Code:
Sep  1 07:58:17 localhost kernel[0]: AppleIntelI210::start - Built Jun 16 2016 19:35:05
Sep  1 07:58:17 localhost kernel[0]: 0, 0  AppleIntelI210::setLinkStatus - not active
Sep  1 07:58:17 localhost kernel[0]: 0, 0  AppleIntelI210::start - device is not net bootable
 

Attachments

  • sys info.png
    sys info.png
    125.1 KB · Views: 356
Okay, so I've copied all the information from the native driver's IOKitPersonality, just changing the IOPCIPrimaryMatch. Now when I boot, I do see that the driver is attaching, and it appears in System Information, with the name "ethernet". But in System Prefs, it says the cable is disconnected. And it breaks my other i218 NIC and wifi, which were both working fine before. I also tried deleting the RM,subsystem-id key, and it makes no difference. So I guess this driver only matches on device-id.

ioreg:
Code:
+-o D087@0  <class IOPCIDevice, id 0x100000402, registered, matched, active, busy 0 (42 ms), retain 13>
  | {
  |   "acpi-device" = "IOACPIPlatformDevice is not serializable"
  |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/RP06@1c0005/D087@0"
  |   "assigned-addresses" = <10005682000000000000d0df0000000000000200180056810000000000c0000000000000200000001c005682000000000000d2df0000000000400000>
  |   "class-code" = <00000200>
  |   "subsystem-vendor-id" = <58140000>
  |   "vendor-id" = <86800000>
  |   "IOPCIExpressLinkCapabilities" = 4348945
  |   "IOName" = "ethernet"
  |   "IOPCIPMCSState" = 0
  |   "IOPCIPauseCompatible" = Yes
  |   "IOChildIndex" = 1
  |   "pcidebug" = "86:0:0"
  |   "IOPCIExpressLinkStatus" = 4113
  |   "pci-aspm-default" = 0
  |   "IOPCIExpressCapabilities" = 2
  |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
  |   "built-in" = <00>
  |   "IOPCIResourced" = Yes
  |   "IODeviceMemory" = (({"address"=3754950656,"length"=131072}),"IOSubMemoryDescriptor is not serializable",({"address"=3755081728,"length"=16384}))
  |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2,"CapabilityFlags"=2,"ChildProxyPowerState"=2,"MaxPowerState"=3}
  |   "acpi-pmcap-offset" = 64
  |   "name" = <"ethernet">
  |   "subsystem-id" = <00e00000>
  |   "RM,device-id" = <33150000>
  |   "compatible" = <"pci1458,e000","pci8086,1539","pciclass,020000","D087">
  |   "acpi-wake-type" = 2
  |   "IOReportLegendPublic" = Yes
  |   "reg" = <0000560000000000000000000000000000000000100056020000000000000000000000000000020018005601000000000000000000000000200000001c00560200000000000000000000000000400000>
  |   "IOReportLegend" = ({"IOReportGroupName"="Interrupt Statistics (by index)","IOReportChannels"=((5291294645182070784,5368709121,"               First Level Interrupt Handler Count"),(5291294645182070785,5368709121,"              Second Level Interrupt Handler Count"),(5291294645182070786,5368709121,"        First Level Interrupt Handler Time (MATUs)"),(5291294645182070787,5368709121,"   Second Level Interrupt Handler CPU Time (MATUs)"),(5291294645182070788,5368709121,"Second Level Interrupt Handler System Time (MATUs)")),"IOReportChannelInfo"={"IOReportChannelUnit"=0},"IOReportSubGroupName"="1"})
  |   "device-id" = <39150000>
  |   "revision-id" = <03000000>
  |   "IOInterruptSpecifiers" = (<1100000007000000>,<0900000000000100>)
  |   "IOPCIMSIMode" = Yes
  | }
  |
  +-o AppleIntelI210  <class AppleIntelI210, id 0x1000005ff, !registered, !matched, active, busy 0 (0 ms), retain 8>
  | +-o en3  <class IOEthernetInterface, id 0x10000063c, registered, matched, active, busy 0 (0 ms), retain 10>
  |   +-o IONetworkStack  <class IONetworkStack, id 0x10000051c, registered, matched, active, busy 0 (0 ms), retain 12>
  |     +-o IONetworkStackUserClient  <class IONetworkStackUserClient, id 0x1000005ea, !registered, !matched, active, busy 0, retain 5>
  +-o FakePCIID  <class FakePCIID, id 0x100000600, !registered, !matched, active, busy 0, retain 4>

system.log:
Code:
Sep  1 07:58:17 localhost kernel[0]: AppleIntelI210::start - Built Jun 16 2016 19:35:05
Sep  1 07:58:17 localhost kernel[0]: 0, 0  AppleIntelI210::setLinkStatus - not active
Sep  1 07:58:17 localhost kernel[0]: 0, 0  AppleIntelI210::start - device is not net bootable

It sounds like FakePCIID has done what we expect it to do, but that the device is not compatible.
 
my 4port gigabit card is branded HP NC364T.

According to lspci in Linux, these are the info:

vendor ID: 8086 | device ID: 10BC.
subsystem vendor ID: 103C | Subsystem ID: 704B.

I changed the subsystem info to 8086:000a via ethtool using Linux.

I verified the correct info by:

1. booting into Linux again and running lspci again
2. During bootup, the motherboard would show the different peripherals installed. It's showing 8086:000a there as well.
3. OS X's System Information is showing the correct info.

qP8VKcZ.png


But when I booted into OSX, the SmallTree driver won't load.

I tried:

1. installing the driver.pkg
2. copying SmallTreexxxx.kext into SLE

Any ideas? Thank you
 
Last edited:
Back
Top