ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

> DSDT

Differentiated System Description Table (DSDT) - DSDT is a part of the ACPI specification and it supplies configuration information about a base system. ACPI capable computers come with a preinstalled DSDT from the manufacturer. A common Linux/OS X problem is missing ACPI functionality (fans not running, laptop screens not shutting off, etc.)

This subforum is dedicated to patches/fixes able to be inserted/modified from an extracted dsdt.dsl, which is then compiled into a DSDT.aml for OS X to pick up and use (with a proper bootloader).

These fixes are not permanent, and do not damage your BIOS.

 
Start a new topic Add Reply
> How to set the network adapter to en0 with DSDT
Krazubu
post Feb 24 2009, 11:55 AM
Post #1
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 :
QUOTE
+-o P0P9@1C,5 <class IOPCIDevice, registered, matched, active, busy 0, retain 27>
| | | | {
| | | | "IOPCIResourced" = Yes
| | | | "#address-cells" = <03000000>
| | | | "IOName" = "pci-bridge"
| | | | "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| | | | "IOPCIExpressLinkCapabilities" = 101788689
| | | | "class-code" = <00040600>
| | | | "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}
| | | | "revision-id" = <02000000>
| | | | "IOInterruptSpecifiers" = (<1100000007000000>,<0300000000000100>)
| | | | "built-in" = <00>
| | | | "acpi-device" = "IOACPIPlatformDevice is not serializable"
| | | | "device-id" = <49280000>
| | | | "vendor-id" = <86800000>
| | | | "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/P0P9@1c0005"
| | | | "ranges" = <00000082000000000000d0fb00000082000000000000d0fb0000000000001000000000810000
00000c00000000000810000000000c000000000000000100000>
| | | | "name" = "pci-bridge"
| | | | "IOPCIExpressLinkStatus" = 12305
| | | | "reg" = <00e5000000000000000000000000000000000000>
| | | | "compatible" = <"pci8086,2849","pciclass,060400">
| | | | "IODTPersist" = <348adf2e7c8adf2e>
| | | | "#size-cells" = <02000000>
| | | | "IOPCIConfigured" = Yes
| | | | }
| | | |
| | | +-o IOPCI2PCIBridge <class IOPCI2PCIBridge, registered, matched, active, busy 0, retain 7>
| | | | {
| | | | "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 <class IOPCIDevice, registered, matched, active, busy 0, retain 27>
| | | | {
| | | | "IOPCIResourced" = Yes
| | | | "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| | | | "IOName" = "ethernet"
| | | | "subsystem-id" = <f8810000>
| | | | "IOPCIExpressLinkCapabilities" = 502801
| | | | "class-code" = <00000200>
| | | | "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}
| | | | "revision-id" = <12000000>
| | | | "IOInterruptSpecifiers" = (<1100000007000000>,<0600000000000100>)
| | | | "assigned-addresses" = <100002820000000000c0dffb0000000000400000180002810000000000c80000000000000001
00030000282000000000000dcfb0000000000000200>
| | | | "IOChildIndex" = 1
| | | | "built-in" = <00>
| | | | "acpi-device" = "IOACPIPlatformDevice is not serializable"
| | | | "device-id" = <64430000>
| | | | "vendor-id" = <ab110000>
| | | | "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/P0P9@1c0005/Ethernet@0"
| | | | "subsystem-vendor-id" = <43100000>
| | | | "name" = "ethernet"
| | | | "IOPCIExpressLinkStatus" = 4113
| | | | "reg" = <0000020000000000000000000000000000000000100002020000000000000000000000000040
00018000201000000000000000000000000000100003000020200000000000000000000000000000
00>
| | | | "compatible" = <"pci1043,81f8","pci11ab,4364","pciclass,020000">
| | | | }
| | | |
| | | +-o yukonosx <class yukonosx, registered, matched, active, busy 0, retain 7>
| | | | {
| | | | "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" = <001a925ea08e>
| | | | "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 :
QUOTE
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 :
QUOTE
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 :
QUOTE
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.
Slice
post Jun 30 2009, 06:26 AM
Post #2
I see you changed
QUOTE
Name (_PRW, Package (0x02)
{
0x09,
0x03 - was 0x04
})

It is PowerManagement
QUOTE
| | | "acpi-wake-system-state" = 0x3
| | | "acpi-wake-gpe" = 0x09

But I saw in real mac the most devices have "acpi-wake-gpe" = 0x18

Have you any explanation about this?
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
Krazubu
post Jun 30 2009, 09:45 AM
Post #3
Dunno that stuff was taken from a real mac too.
Slice
post Jun 30 2009, 01:37 PM
Post #4
MacBook5,1
CODE
            Device (GIGE)
            {
                Name (_ADR, 0x000A0000)
                Name (_PRW, Package (0x02)
                {
                    0x0B,
                    0x05
                })
                Scope (\_GPE)
                {
                    Method (_L0B, 0, NotSerialized)
                    {
                        Notify (\_SB.PCI0.GIGE, 0x02)
                    }
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0) {}
                    Else
                    {
                    }
                }

                OperationRegion (ACTL, SystemIO, 0x0800, 0x0200)
                Field (ACTL, ByteAcc, NoLock, Preserve)
                {
                    BANK,   32,
                            Offset (0xB4),
                        ,   23,
                    EPWD,   1,
                            Offset (0xC0),
                        ,   9,
                    DPWR,   1
                }

                Method (PWRD, 1, Serialized)
                {
                    If (OSDW ())
                    {
                        If (Arg0)
                        {
                            Store (BANK, Local0)
                            Store (One, BANK)
                            Store (One, DPWR)
                            Store (One, EPWD)
                            Store (Local0, BANK)
                        }
                        Else
                        {
                            Store (BANK, Local0)
                            Store (One, BANK)
                            Store (Zero, EPWD)
                            Store (Zero, DPWR)
                            Store (Local0, BANK)
                        }
                    }
                }
            }

I am sorry about _PRW. In the real mac all devices has own value of "acpi-wake-gpe".
I think it is priority of waking.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
Gringo Vermelho
post Jul 1 2009, 04:42 AM
Post #5
I'm using this in my DSDT.aml. I still have to add my 88E8056's device ID to AppleYukon2.kext though.

The main advantage for me in adding it to the DSDT is that it fixes the UUID error 35. Without it I get the UUID error 35 even when using a Time Machine fix Device Properties string, and then I have to use UUID.kext as well.

So even though I have to add the device ID to the driver this fix is still the better solution IMO.

Thanks Krazubu.

This post has been edited by Gringo Vermelho: Jul 1 2009, 04:43 AM
ASUS P8Z77-V Pro - EVGA GTX 660 - i5-3570K - 10.9.1 retail - Chameleon 2.2 svn r22xx
18seven
post Aug 2 2009, 08:26 PM
Post #6
Like Gringo Vermelho, still need alternative.kext and use this for UUID error 35 fix, a step in the right direction. Thanks Krazubu.

However, I also needed to satisfy GP9_, 1 (dropped it b4 other OperationRegion near top):

CODE
    OperationRegion (GPIO, SystemIO, 0x0800, 0x06)
    Field (GPIO, ByteAcc, NoLock, Preserve)
    {
        GO01, 8,
        GO02, 8,
        GO03, 8,
        GO04, 8,
        GO05, 8,
        GP9_, 1
    }
Gringo Vermelho
post Aug 16 2009, 08:32 PM
Post #7
You're right, I need that part too. In my DSDT the whole thing looks like this:

CODE
            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, Zero)
                    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, One))
                        {
                            Or (GP9, One, GP9)
                        }
                        Else
                        {
                            And (GP9, Zero, GP9)
                        }

                        If (LEqual (Arg0, GP9))
                        {
                            Return (Zero)
                        }
                        Else
                        {
                            Return (One)
                        }
                    }
                }
            }


This post has been edited by Gringo Vermelho: Aug 17 2009, 02:06 AM
ASUS P8Z77-V Pro - EVGA GTX 660 - i5-3570K - 10.9.1 retail - Chameleon 2.2 svn r22xx
Gringo Vermelho
post Sep 17 2009, 02:39 PM
Post #8
Following zhells tutorial I've successfully patched the device ID of my LPC device so that it works with vanilla AppleLPC.kext.
http://www.insanelymac.com/forum/index.php?showtopic=168014

It looks like this:
CODE
            Device (LPCB)
            {
                Name (_ADR, 0x001F0000)
                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x02)
                        {
                            "device-id",
                            Buffer (0x04)
                            {
                                0x18, 0x3A, 0x00, 0x00
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }

                Device (IELK)
                {(....)


I've been trying to do the same for the 88E8056, but I can't get it to work. I'm still at it.

If anyone gets this working, please let me know how you did it.
ASUS P8Z77-V Pro - EVGA GTX 660 - i5-3570K - 10.9.1 retail - Chameleon 2.2 svn r22xx
tea
post Sep 18 2009, 06:47 AM
Post #9
CODE
Name (_PRW, Package (0x02)
                    {
                        0x09,
                        0x03
                    })


acpi-wake-gpe = 0x09

This event number in _GPE scope.
Gringo Vermelho
post Sep 19 2009, 04:53 AM
Post #10
My Scope (_GPE)

CODE
    Scope (_GPE)
    {
        Method (_L17, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.LPCB.ASOC, 0x05)
            If (LEqual (\_SB.PCI0.LPCB.ASOC.AIGC, One))
            {
                \_SB.PCI0.LPCB.ASOC.GITE (0x0E060001)
                \_SB.PCI0.LPCB.ASOC.SICL (Or (0x8010, \_SB.PCI0.LPCB.ASOC.ASB1))
            }

            \_SB.PCI0.LPCB.ASOC.RCAS ()
        }
    }


Doesn't look like it has anything to do with anything, the ASOC device is some proprietary ASUS ACPI stuff that's accessed by the ASUS AI Life software in Windows. I was thinking about ripping all that stuff out of my DSDT.

Maybe I misunderstand you, or did you mean Scope (\_GPE) ?

CODE
        Scope (\_GPE)
        {
            Method (_L09, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.P0P2, 0x02)
                Notify (\_SB.PCI0.P0P3, 0x02)
                Notify (\_SB.PCI0.P0P5, 0x02)
                Notify (\_SB.PCI0.P0P6, 0x02)
                Notify (\_SB.PCI0.P0P7, 0x02)
                Notify (\_SB.PCI0.P0P8, 0x02)
                Notify (\_SB.PCI0.P0P9, 0x02)
                Notify (\_SB.PCI0.P0P4, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L0B, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.P0P1, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L08, 0, NotSerialized)
            {
                \_SB.PCI0.LPCB.SIOH ()
            }

            Method (_L1D, 0, NotSerialized)
            {
                \_SB.PCI0.LPCB.SIOH ()
            }

            Method (_L0F, 0, NotSerialized)
            {
                \_SB.PCI0.LPCB.SIOH ()
            }

            Method (_L0D, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.EUSB, 0x02)
                Notify (\_SB.PCI0.USBE, 0x02)
                Notify (\_SB.PCI0.GBEC, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L03, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.USB0, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L04, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.USB1, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L0C, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.USB2, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L20, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.USB3, 0x02)
                Notify (\_SB.PCI0.USB6, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L0E, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.USB4, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }

            Method (_L05, 0, NotSerialized)
            {
                Notify (\_SB.PCI0.USB5, 0x02)
                Notify (\_SB.PWRB, 0x02)
            }
        }




This post has been edited by Gringo Vermelho: Sep 19 2009, 05:06 AM
ASUS P8Z77-V Pro - EVGA GTX 660 - i5-3570K - 10.9.1 retail - Chameleon 2.2 svn r22xx
camillionario
post Jun 15 2013, 10:57 PM
Post #11
QUOTE (B166ER @ Feb 24 2009, 11:55 AM) *
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 :

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 :


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 :


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 :


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.


Thanks,,, work,,, I do not need to modify the bootplist (EthernetBuiltin=Yes) to operate Facetime. tongue.gif



many Thanks





This post has been edited by camillionario: Jun 16 2013, 11:41 AM

Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: