PIC
Before:
Code:
(...)
Device (PIC)
{
Name (_HID, EisaId ("PNP0000"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0020, // Range Minimum
0x0020, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IO (Decode16,
0x00A0, // Range Minimum
0x00A0, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IRQNoFlags ()
{2}
})
}(...)
After:
Code:
(...)
Device (PIC)
{
Name (_HID, EisaId ("PNP0000"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0020, // Range Minimum
0x0020, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IO (Decode16,
0x00A0, // Range Minimum
0x00A0, // Range Maximum
0x00, // Alignment
0x02, // Length
)
})
}(...)
Enabling SMBus
Before:
Code:
(...)
Device (SMB0)
{
Name (_ADR, 0x00030002)
OperationRegion (SMAD, PCI_Config, 0x20, 0x08)
Field (SMAD, DWordAcc, NoLock, Preserve)
{
SB1, 32,
SB2, 32
}
OperationRegion (SMCF, PCI_Config, 0x48, 0x10)
Field (SMCF, DWordAcc, NoLock, Preserve)
{
SMPM, 4,
SMT1, 28,
SMT2, 32
}(...)
After:
Code:
(...)
Device (SMB0)
{
Name (_ADR, 0x00030002)
Device (BUS0)
{
Name (_CID, "smbus")
Name (_ADR, Zero)
Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
}
}
OperationRegion (SMAD, PCI_Config, 0x20, 0x08)
Field (SMAD, DWordAcc, NoLock, Preserve)
{
SB1, 32,
SB2, 32
}
OperationRegion (SMCF, PCI_Config, 0x48, 0x10)
Field (SMCF, DWordAcc, NoLock, Preserve)
{
SMPM, 4,
SMT1, 28,
SMT2, 32
}(...)
Audio injection
Before:
Code:
(...)
Device (HDAC)
{
Name (_ADR, 0x00080000)
Name (SCID, Zero)
Name (SACW, Zero)
Method (_PS0, 0, NotSerialized)
{
If (SCID)
{
Store (Zero, PMDS)
Store (Zero, PMEN)
Store (SCID, CDID)
Store (SACW, AOCW)
}
}
Method (_PS3, 0, NotSerialized)
{
Store (AOCW, SACW)
Store (CDID, SCID)
Store (One, PMST)
Store (0x03, PMDS)
Store (One, PMEN)
}(...)
After:
Code:
(...)
Device (HDEF)
{
Name (_ADR, 0x00080000)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x08)
{
"subsystem-id",
Buffer (0x04)
{
0xF3, 0x16, 0x00, 0x00
},
"subsystem-vendor-id",
Buffer (0x04)
{
0x43, 0x10, 0x00, 0x00
},
"layout-id",
Buffer (0x04)
{
0x0C, 0x00, 0x00, 0x00
},
"PinConfigurations",
Buffer (Zero) {}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Name (SCID, Zero)
Name (SACW, Zero)
Method (_PS0, 0, NotSerialized)
{
If (SCID)
{
Store (Zero, PMDS)
Store (Zero, PMEN)
Store (SCID, CDID)
Store (SACW, AOCW)
}
}
Method (_PS3, 0, NotSerialized)
{
Store (AOCW, SACW)
Store (CDID, SCID)
Store (One, PMST)
Store (0x03, PMDS)
Store (One, PMEN)
}(...)
Cosmetic fix injecting graphics card information (without it in System Profiler it will be called "Unknown", new Chameleon version fixes the problem but it doesn't show RAM information properly, so I'd rather use the one from my archive and add this fix to DSDT):
Before:
Code:
(...)
Name (DONE, Zero)
Name (DOSF, One)
Name (BRNC, Zero)
Method (_INI, 0, NotSerialized)
{
GETD ()
}
Method (_DOS, 1, NotSerialized)
{
And (Arg0, 0x03, DOSF)
Store (ShiftRight (Arg0, 0x02), BRNC)
And (BRNC, One, BRNC)
}(...)
After:
Code:
(...)
Name (DONE, Zero)
Name (DOSF, One)
Name (BRNC, Zero)
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"@0,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@0,device_type",
Buffer (0x08)
{
"display"
},
"@0,name",
Buffer (0x0F)
{
"NVDA,Display-A"
},
"@1,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@1,device_type",
Buffer (0x08)
{
"display"
},
"@1,name",
Buffer (0x0F)
{
"NVDA,Display-B"
},
"device_type",
Buffer (0x0C)
{
"NVDA,Parent"
},
"model",
Buffer ()
{
"NVIDIA GeForce G102M"
},
"rom-revision",
Buffer ()
{
"62.79.78.00.06"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Method (_INI, 0, NotSerialized)
{
GETD ()
}
Method (_DOS, 1, NotSerialized)
{
And (Arg0, 0x03, DOSF)
Store (ShiftRight (Arg0, 0x02), BRNC)
And (BRNC, One, BRNC)
}(...)
Time Machine fix
Before:
Code:
(...)
Device (P0P6)
{
Name (_ADR, 0x00150000)
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0x11, 0x04))
}(...)
After:
Code:
(...)
Device (P0P6)
{
Name (_ADR, 0x00150000)
Device (LAN)
{
Name (_ADR, Zero)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x04)
{
"built-in",
Buffer (One)
{
0x01
},
"name",
Buffer (0x24)
{
"Realtek RTL8111/8168B PCI-E Gigabit"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0x11, 0x04))
}(...)
OS detection 2
Before:
Code:
(...)
Method (MSOS, 0, NotSerialized)
{
If (CondRefOf (_OSI, Local0))
{
If (_OSI ("Windows 2001"))
{
Store (OSXP, OSFG)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (OSXP, OSFG)
}
If (_OSI ("Windows 2001 SP2"))
{
Store (OSXP, OSFG)
}
If (_OSI ("Windows 2006"))
{
Store (OSVT, OSFG)
}
If (_OSI ("Linux"))
{
Store (OSEG, OSFG)
}
If (_OSI ("Windows 2009"))
{
Store (OSW7, OSFG)
}
Return (OSFG)
}(...)
After:
Code:
(...)
Method (MSOS, 0, NotSerialized)
{
If (CondRefOf (_OSI, Local0))
{
If (_OSI ("Windows 2001"))
{
Store (OSXP, OSFG)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (OSXP, OSFG)
}
If (_OSI ("Windows 2001 SP2"))
{
Store (OSXP, OSFG)
}
If (_OSI ("Windows 2006"))
{
Store (OSVT, OSFG)
}
If (_OSI ("Darwin"))
{
Store (OSVT, OSFG)
}
If (_OSI ("Linux"))
{
Store (OSEG, OSFG)
}
If (_OSI ("Windows 2009"))
{
Store (OSW7, OSFG)
}
Return (OSFG)
}(...)
LID sleep fix (enables sleep after closing lid):
Before:
Code:
(...)
Device (LID)
{
Name (_HID, EisaId ("PNP0C0D"))
Method (_LID, 0, NotSerialized)
{
Store (One, Local0)
^^PCI0.SBRG.EC0.DL9F ()
Store (^^PCI0.SBRG.EC0.RPIN (0x06), Local0)
^^PCI0.SBRG.EC0.DL9F ()
If (LEqual (Local0, Ones))
{
Store (One, Local0)
}
Return (Local0)
}
}(...)
After:
Code:
(...)
Device (LID)
{
Name (_HID, EisaId ("PNP0C0D"))
Name (LIDS, One)
Method (_LID, 0, NotSerialized)
{
Store (^^PCI0.SBRG.EC0.RPIN (0x06), LIDS)
XOr (LIDS, One, Local0)
If (Local0)
{
Notify (SLPB, 0x80)
}
Return (LIDS)
}
}(...)
WLAN injection
Before:
Code:
(...)
Device (P0P7)
{
Name (_ADR, 0x00160000)
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0x11, 0x04))
}
Method (_PRT, 0, NotSerialized)
{
If (PICM)
{
Return (AR07)
}
Return (PR07)
}
}(...)
After:
Code:
(...)
Device (P0P7)
{
Name (_ADR, 0x00160000)
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0x11, 0x04))
}
Device (ARPT)
{
Name (_ADR, Zero)
Name (_PRW, Package (0x02)
{
0x0B,
0x05
})
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x0C)
{
"AAPL,slot-name",
Buffer (0x08)
{
"AirPort"
},
"device-id",
Unicode ("*"),
"device_type",
Buffer (0x08)
{
"AirPort"
},
"model",
Buffer (0x34)
{
"Atheros 9285 8802.11 b/g/n Wireless Network Adapter"
},
"subsystem-id",
Buffer (0x04)
{
0x89, 0x10, 0x00, 0x00
},
"subsystem-vendor-id",
Buffer (0x04)
{
0x3B, 0x1A, 0x00, 0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Method (_PRT, 0, NotSerialized)
{
If (PICM)
{
Return (AR07)
}
Return (PR07)
}
}(...)
In my DSDT, I have also renamed the following names to look it more like in MacBook Pro's. I have to remind you that it isn't like: replace all from XX->XY. APIC isn't the same as PIC e.g.!:
PIC -> IPIC
DMAD -> DMAC
TMR -> TIMR
RTC0 -> RTC
COPR -> MATH
OMSC -> LDRC
SBRG -> LPCB
USB0 -> OHC1
USB2 -> EHC1
RHUB -> HUB1
Last edited by man_of_the_oak; 08-22-2011 at 04:49 PM.
|