Jump to content

How to : set the network adapter to en0 through DSDT edit


Krazubu
 Share

23 posts in this topic

Recommended Posts

Prerequisites :

 

- A supported network adapter

- A bootloader with DSDT override

- A working DSDT dump

- an IOReg from your system

- The required stuff to compile/decompile and edit your DSDT

 

1 - Locate your network device in the IOReg and find its device path :

 

 

+-o P0P9@1C,5  

| |   | | {

| |   | |   "IOPCIResourced" = Yes

| |   | |   "#address-cells" =

| |   | |   "IOName" = "pci-bridge"

| |   | |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")

| |   | |   "IOPCIExpressLinkCapabilities" = 101788689

| |   | |   "class-code" =

| |   | |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}

| |   | |   "revision-id" =

| |   | |   "IOInterruptSpecifiers" = (,)

| |   | |   "built-in" =

| |   | |   "acpi-device" = "IOACPIPlatformDevice is not serializable"

| |   | |   "device-id" =

| |   | |   "vendor-id" =

| |   | |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/P0P9@1c0005"

| |   | |   "ranges" =

00000c00000000000810000000000c000000000000000100000>

| |   | |   "name" = "pci-bridge"

| |   | |   "IOPCIExpressLinkStatus" = 12305

| |   | |   "reg" =

| |   | |   "compatible" =

| |   | |   "IODTPersist" =

| |   | |   "#size-cells" =

| |   | |   "IOPCIConfigured" = Yes

| |   | | }

| |   | | 

| |   | +-o IOPCI2PCIBridge  

| |   |   | {

| |   |   |   "IOProviderClass" = "IOPCIDevice"

| |   |   |   "IOProbeScore" = 18446744073709551516

| |   |   |   "CFBundleIdentifier" = "com.apple.iokit.IOPCIFamily"

| |   |   |   "IOMatchCategory" = "IODefaultMatchCategory"

| |   |   |   "Bridge IO Ranges" = (49152,51199,51456,53247)

| |   |   |   "IONameMatched" = "pci-bridge"

| |   |   |   "IOClass" = "IOPCI2PCIBridge"

| |   |   |   "IONameMatch" = "pci-bridge"

| |   |   |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}

| |   |   | }

| |   |   | 

| |   |   +-o Ethernet@0  

| |   | | {

| |   | |   "IOPCIResourced" = Yes

| |   | |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")

| |   | |   "IOName" = "ethernet"

| |   | |   "subsystem-id" =

| |   | |   "IOPCIExpressLinkCapabilities" = 502801

| |   | |   "class-code" =

| |   | |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}

| |   | |   "revision-id" =

| |   | |   "IOInterruptSpecifiers" = (,)

| |   | |   "assigned-addresses" =

00030000282000000000000dcfb0000000000000200>

| |   | |   "IOChildIndex" = 1

| |   | |   "built-in" =

| |   | |   "acpi-device" = "IOACPIPlatformDevice is not serializable"

| |   | |   "device-id" =

| |   | |   "vendor-id" =

| |   | |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/P0P9@1c0005/Ethernet@0"

| |   | |   "subsystem-vendor-id" =

| |   | |   "name" = "ethernet"

| |   | |   "IOPCIExpressLinkStatus" = 4113

| |   | |   "reg" =

00018000201000000000000000000000000000100003000020200000000000000000000000000000

00>

| |   | |   "compatible" =

| |   | | }

| |   |

| |   | +-o yukonosx  

| |   |   | {

| |   |   |   "Model" = "Yukon Gigabit Adapter 88E8056"

| |   |   |   "IOSelectedMedium" = "00000020"

| |   |   |   "CFBundleIdentifier" = "com.apple.iokit.AppleYukon"

| |   |   |   "IOVendor" = "Marvell"

| |   |   |   "InitialWaitForLinkUp" = 60000

| |   |   |   "IOMatchCategory" = "IODefaultMatchCategory"

| |   |   |   "Vendor" = "Marvell"

| |   |   |   "DescriptorPollTimer" = 250

| |   |   |   "WaitToCheckDelay" = 5000

| |   |   |   "IOFeatures" = 2

| |   |   |   "EED_Tickle_On" = 2000

| |   |   |   "LowPwrPeerMax" = 240

| |   |   |   "LowPwrPeerMin" = 60

| |   |   |   "IOMaxPacketSize" = 9018

| |   |   |   "IOMinPacketSize" = 64

| |   |   |   "IOUserClientClass" = "yukonosx_ioc_uc"

| |   |   |   "RxRingSize" = 256

| |   |   |   "IOActiveMedium" = "00500026"

| |   |   |   "IOModel" = "Yukon Gigabit Adapter 88E8056"

| |   |   |   "IOProbeScore" = 0

| |   |   |   "EnableLowPwr" = 1

| |   |   |   "TxRingSize" = 256

| |   |   |   "IOLinkSpeed" = 100000000

| |   |   |   "LowPwrClockDivide" = Yes

| |   |   |   "IOPowerManagement" = {"CurrentPowerState"=1}

| |   |   |   "IOPacketFilters" = {"IONetworkFilterGroup"=275,"IOEthernetWakeOnLANFilterGroup"=1}

| |   |   |   "IOMACAddress" =

| |   |   |   "EED_Tickle_Off" = 60000

| |   |   |   "IOProviderClass" = "IOPCIDevice"

| |   |   |   "InputQueueMax" = 100

| |   |   |   "WaitForLinkUp" = 6000

| |   |   |   "IOLinkStatus" = 3

| |   |   |   "IOPCIPrimaryMatch" = "0x436411AB"

| |   |   |   "IOClass" = "yukonosx"

| |   |   |   "LowPwrD1" = Yes

| |   |   | }

In the example above, the path is /PCI0@0/P0P9@1c0005/Ethernet@0

 

After looking in an IOReg from a macbook pro with a Marvell Yukon 88E8056, I noticed that the device wasn't displayed as Ethernet@0 but GIGE@0. Further digging in the DSDT showed that this GIGE device had some infos coded there.

Now, the goal is to replace the Ethernet@0 thing with GIGE@0 and associate this node with some values that we'll include in the DSDT. The OS will use this data to determine whether the device is built-in or not, like on a real mac.

 

2 - Open your DSDT and find the corresponding PCI port :

In the example, the PCI port is P0P9, its adress is (_ADR, 0x001c0005) which leads to the following section :

 

 

Device (P0P9)

{

Name (_ADR, 0x001C0005)

Method (_PRW, 0, NotSerialized)

{

Return (GPRW (0x09, 0x04))

}

 

Method (_PRT, 0, NotSerialized)

{

If (PICM)

{

Return (AR09)

}

 

Return (PR09)

}

 

}

 

This is where the network adapter is physically located. Now we're gonna add the missing data that OSX is looking for. 

 

3 - This is the official data about the network adapter extracted from a real mac :

 

 

Device (GIGE)

{

Name (_ADR, 0x00)

Name (_PRW, Package (0x02)

{

0x09, 

0x03

})

Method (EWOL, 1, NotSerialized)

{

If (LEqual (Arg0, 0x01))

{

Or (GP9, 0x01, GP9)

}

Else

{

And (GP9, 0x00, GP9)

}

 

If (LEqual (Arg0, GP9))

{

Return (0x00)

}

Else

{

Return (0x01)

}

}

}

 

4 - We know that Ethernet@0 is a subdevice of P0P9, so it has to be inside its section, which means before the last } which closes it,

so, copy and past the GIGE data there :

 

 

Device (P0P9)

{

Name (_ADR, 0x001C0005)

Method (_PRW, 0, NotSerialized)

{

Return (GPRW (0x09, 0x04))

}

 

Method (_PRT, 0, NotSerialized)

{

If (PICM)

{

Return (AR09)

}

 

Return (PR09)

}

 

Device (GIGE)

{

Name (_ADR, 0x00)

Name (_PRW, Package (0x02)

{

0x09, 

0x03

})

Method (EWOL, 1, NotSerialized)

{

If (LEqual (Arg0, 0x01))

{

Or (GP9, 0x01, GP9)

}

Else

{

And (GP9, 0x00, GP9)

}

 

If (LEqual (Arg0, GP9))

{

Return (0x00)

}

Else

{

Return (0x01)

}

}

}

 

}

 

Save and recompile your new DSDT, put it on the root of your disk so that the loader uses it.

If you succeeded, the network device became GIGE@0 and is correctly located in the device tree.

If you failed, you probably created a fantom GIGE@0 device wandering alone somewhere with few data inside.

 

 

This guide is for experimented people only, I don't give details about how to achieve things step by step, and I won't, so don't ask me more details, if you have the skills, you'll understand it.

Please test and report, this was tested on a system with a built-in Marvell 8056, so it was very close from the mac model (8055) and may not work as good with different adapters.

The benefit is that you can use the stock IONetworkingfamily.kext and enjoy the en0 flavor (time machine working, some apps that use en0 MAC to identify the computer, etc...). However if your device needs a custom device ID edit, you'll still have to mod the kext, so the point of doing this might be compromised.

 

Note : If your network adapter is a PCI device, moving it to an other port will break this mod. 

Note 2 : If your Network adapter was already configured as en1 or other before, you might have to delete it and re-add from the network preferences (quit the preferences and apply changes before you add it back).

 

Good luck.

Edited by Krazubu
Original content available @ the Project OSX forums.
  • Like 1
Link to comment
Share on other sites

Krazubu

 

Did not work for me (Asus P5k VM built in Gigabit 88E8056 ethernet) - 5 errors "Object does not exist (GP9_)" so does not compile to make aml - maybe I done something wrong!

 

Attached IOReg, DSDT Fixed, & terminal output. (note 6 warnings don't cause any problems in current DSDT, optimizations increase by 6 but no aml created)

 

post-170015-1229277114_thumb.png

 

dsdt_fixed.txt

 

Failed_Ethernet_fix_DSDT.rtf

Link to comment
Share on other sites

add GP9_, 1 to

 

OperationRegion (GPIO, SystemIO, 0x0800, 0x06)
				Field (GPIO, ByteAcc, NoLock, Preserve)
				{
					GO01,   8, 
					GO02,   8, 
					GO03,   8, 
					GO04,   8, 
					GO05,   8,
					GP9_,   1
				}

 

dont forget to the change the field limit (OperationRegion (GPIO, SystemIO, 0x0800, 0x06) ............)

 

 

EDIT :

 

@Krazubu

 

the network device is now gige@0

 

gige0_10.jpg

 

but it still in en7

 

en7_ti10.jpg

Link to comment
Share on other sites

@cparm - thanks very much that did the trick.

 

IOREG does not show anything different to previous (ie no GIGE@0) but did compile and enable removal of patched IONetworkingFamily.kext from Extra>Extensions and ethernet works fine. In system profiler shows ethernet en0.

 

Tried addition in both GIGE section & P0P9 section - no difference.

 

This what I have currently working:

 

Device (GIGE)

{

Name (_ADR, 0x00)

OperationRegion (GPIO, SystemIO, 0x0800, 0x06)

Field (GPIO, ByteAcc, NoLock, Preserve)

{

GO01, 8,

GO02, 8,

GO03, 8,

GO04, 8,

GO05, 8,

GP9_, 1

}

Name (_PRW, Package (0x02)

{

0x09,

0x03

})

Method (EWOL, 1, NotSerialized)

{

If (LEqual (Arg0, 0x01))

{

Or (GP9, 0x01, GP9)

}

Else

{

And (GP9, 0x00, GP9)

}

 

If (LEqual (Arg0, GP9))

{

Return (0x00)

}

Else

{

Return (0x01)

}

}

}

}

  • Like 1
Link to comment
Share on other sites

@DB1

I don't get your problem, the added data doesn't contain any GP9_ device, it's GP9 and it's not the same thing. So in the worst case the compiler would complain about GP9. However cparm is right, the object has to be added because it's absent from your DSDT, but I'd better add GP9 and not GP9_

It seems it's running fine for you now tho, then I'd say just don't touch it lol.

I already had the GP9 object in my DSDT, probably because I have a close NIC.

 

@cparm

It seems you did the stuff properly, but looking at your dev ID, you seem to have a realtek network adapter. Maybe that just doesn't work with it or needs different values in the DSDT. I don't know if there is any mac with a realtek NIC. If there is I'd need the DSDT and an IOReg from it to figure and extract this data.

 

 

Everything is running smooth here, ethernet is fixed to en0, and it survived to the update to 10.5.6 which installed a new IONetworkingFamily.kext

Link to comment
Share on other sites

@Krazubu

 

Problem was in my first post (i.e. did not have the text in red (second post) in original DSDT, therefore no GP9 object), I added it as given by @cparm and it works. Have since changed from GP9_ to GP9. Does not show as GIGE in IOReg (not an issue because it just works), is ethernet en0 in there and profiler.

 

Working fine with 10.5.6

 

Thanks both.

Link to comment
Share on other sites

@cparm

It seems you did the stuff properly, but looking at your dev ID, you seem to have a realtek network adapter. Maybe that just doesn't work with it or needs different values in the DSDT. I don't know if there is any mac with a realtek NIC. If there is I'd need the DSDT and an IOReg from it to figure and extract this data.

Everything is running smooth here, ethernet is fixed to en0, and it survived to the update to 10.5.6 which installed a new IONetworkingFamily.kext

 

here is my dsdt and ioreg dump

Link to comment
Share on other sites

P5K-E/WIFI-AP

 

Only thing changed was ioreg -lw0 reports GIGE@0 instead of ethernet@0, but adapter still doesn't show as 'built-in' in 'system preferences'

Nothing changed really with this patch, still need to edit the yukon2 kext for the device-id "LegacyYukon2.kext plist injector" like you noted in the beginning of this thread...

 

also needed to use the _GP9 edit otherwise IASL compiler error

 

answer must be somewhere in this DSDT stuff, thanks anyway :huh:

Link to comment
Share on other sites

  • 2 months later...
.

wow. Thanks Krazubu

 

I used google cached version of the first post and was able to apply the fix on ASUS P5Q-E with 88E8056 in the same location (P0P9@1C,5).

 

I had the same problem as DB1 and had to add _GP9 (thanks cparm). Didn't take the time to read the rest because I was too excited so I'll try taking the underscore out later. But it works as it is and is recognized as GIGE@0 in ioreg.

 

P5Q-E has two LAN ports, other one is 88E8001, using skge.kext. I was using that as internal en0 before.

 

Something really nice happened: Sticking this in the DSDT, disabling the 88E8001 and deleting skge.kext somehow got rid of all the 'Family Specific Matching Fails' messages I was seeing on bootup, for (I think) every single device on the motherboard. poof, gone, almost cut my boot time in half.

 

I was never able to get 88E8056 to work 100% as en0 with just a device-property string before (Platform UUID and other errors) and had to use more patches or the 88E8001. But now it works.

 

Another thing that puzzles me here is that you say the 88E8056 can work with vanilla IONetworkingFamily.kext - but how is that possible when there is no entry for it in the Yukon2 plist? Is that why you deleted your post?

post-188427-1237422861_thumb.png

Link to comment
Share on other sites

  • 1 month later...

Can anyone else re-post what have been written by the op in the first post? or its not worth it? The google cache version has been updated with the deleted post :S

 

I'd also like to get rid of the UUID.kext and the only way to do this would be to have the ethernet detected as built-in, afaik.

 

Thanks.

 

Something really nice happened: Sticking this in the DSDT, disabling the 88E8001 and deleting skge.kext somehow got rid of all the 'Family Specific Matching Fails' messages I was seeing on bootup, for (I think) every single device on the motherboard. poof, gone, almost cut my boot time in half.

@Beerkex'd: When you say you disabled the 88E8001 aka secondary onboard nic, did you do it through the bios or through some DSDT hacking?

Link to comment
Share on other sites

It's permanently disabled in the BIOS. I don't need two LAN ports and I've found the 88E8056 to be more compatible.

 

---

 

This fixes the famous UUID 35 error - using only a legacy kext and Time Machine fix via Device Properties string doesn't.

 

Now I can boot a retail install DVD with my Chameleon 2.0 boot CD with the 88E08056 injected via Device Properties and a patched AppleYukon2.kext in /extra, so it's recognized as en0 and internal from the get go, eliminating the issues I talked about above.

Link to comment
Share on other sites

I copied it before it disappeared in the void but then I lost it in a freak hibernate file accident.

 

Combine what you can find in this thread with what you can find in koalala's ACPIPatcher thread and you're more than halfway there.

 

Start by extracting and decompiling your DSDT so that you can examine it.

Link to comment
Share on other sites

  • 2 months later...
I stumbled over this thread in need to fix a UUID Error. Someone gave me a entry for the dsdt_fixed.txt. But i don't know what do adapt for my setup.

 

I don't understand your question. Just add this code to your DSDT.dsl and compile it.

This will not fix the UUID error.

Adding an ethernet entry in the boot.plist will reduce the number of times the error message is given, and SOMETIMES get rid of it.

 

The only way to completely get rid of the UUID error is UUID.kext

Maybe in the future Chameleon or BootThink will support UUID injection instead of using this kext.

Link to comment
Share on other sites

I need to adapt that DSDT Entry for MY setup. I thought figured out "where" my NIC is located (HUB0@1E) and made the following entry to the DSDT, but it doesn't work, the NIC is not listed as Built-In in Systemprofiler, hence no UUID is generated.

 

 

			Device (HUB0)
		{
			Name (_ADR, 0x001E0000)
			Method (_DSM, 4, NotSerialized)
			{
					   Store (Package (0x04)
						   {
							   "built-in", 
							   Buffer (0x01)
							   {
								   0x01
							   }, 

							   "device_type", 
							   Buffer (0x09)
							   {
								   "ethernet"
							   }
						   }, Local0)
					   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					   Return (Local0)
			}

 

 

Anyone knows what i am doing wrong? Mybe it should be Device (ethernet)? I have attached another Screenshot.

 

 

Thanks!

post-309031-1248993763_thumb.jpg

Link to comment
Share on other sites

I guess i got it right now:

 

			Device (HUB0)
		{
			Name (_ADR, 0x001E0000)
			Method (_STA, 0, NotSerialized)
			{
				Return (0x0F)
			}


//NIC RTL 8139 on PCI Slot start

			Device (LAN)
			{
					Name (_ADR, 0x01)
					Method (_DSM, 4, NotSerialized)
					{
					   Store (Package (0x04)
						   {
							 "built-in",
							 Buffer (0x01)
							 {
								 0x01
							 },
							 "device_type",
							 Buffer (0x09)
							 {
								"ethernet"
							 }
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
			  }

//NIC RTL 8139 on PCI Slot end


......
......
......

 

 

 

I am sure above entry MUST be right, but it doesn't work :whistle:

 

As far as i understand it, my Ethernet NIC has to be created as a "sub"device under HUB0? HUB0 is a PCI Bridge to which my PCI NIC is connected. My IORegistryexplorer output is in the prevous post.

ANY comments would be helpful, thanks guys.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
Yes, i added that Method. It appears as LAN, i just changed Device ethernet to LAN before posting. Only problem is that the built-in flag just is not set :(

FWIW I couldn't get my pci netgear ga311 to be flagged as built in either. Gave up an re-enabled the mobo lan, and set that as built in. Now have two network intefaces, but that seems the only way to go.

Link to comment
Share on other sites

  • 3 months later...

Hi All,

Thanks for posting all of this info. I haven't gotten this working yet. I found the original post on another site, but after compiling the modified dsdt my networking plist still says builtin <false>, and my networking hardware isnt displaying any differently. Any help would be greatly appreciated.

 

 

EDIT:

Now working, deleted networking.plist and rebooted. Thanks again to everyone on this thread!

Link to comment
Share on other sites

  • 2 years later...

Locate your adapter using ioregistry explorer (pex4 in my case) and add the code below.

U might also want to change "Realtek RTL8168E/8111E PCI-E Gigabit" to your adapter name.

I think this one works with all ami efi boards

			Device (GIGE)
			{
				Name (_ADR, Zero)
				Name (_PRW, Package (0x02)
				{
					0x09,
					0x03
				})
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x06)
						{
							"built-in",
							Buffer (One)
							{
								0x01
							},
							"device_type",
							Buffer (0x09)
							{
								"ethernet"
							},
							"name",
							Buffer (0x25)
							{
								"Realtek RTL8168E/8111E PCI-E Gigabit"
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}
			}

Link to comment
Share on other sites

 Share

×
×
  • Create New...