Monday, July 11, 2011
Minimal DSDT Edits for Gigabyte Socket 1155 Motherboards
Posted by
MacManx86
on Monday, July 11, 2011
Labels: Core i3, Core i5, Core i7, DSDT, Gigabyte, H55, H67, Mac, MacManx86, OS X, OSx86, P55, P67, Sandy Bridge, snow leopard, Socket 1155, Z68
Labels: Core i3, Core i5, Core i7, DSDT, Gigabyte, H55, H67, Mac, MacManx86, OS X, OSx86, P55, P67, Sandy Bridge, snow leopard, Socket 1155, Z68
I started researching and testing what edits from my New Minimal DSDT Edits for Gigabyte Socket 1156 Motherboards were or weren't needed on the Socket 1155 boards. The good news is that the majority of the edits carry over, but some are not needed. For example, we don't need to inject anything for the USB ports to be fully recognized. But there are a couple of required Socket 1155 specific edits.
The following is a guide for editing the extracted DSDT. The first thing you will need to do is the required edits so that the DSDT will compile. They are:
1) "Reserved method must return a value"
Add to the end of _WAK
Return (Package (0x02)
{
0x00,
0x00
})
2) "Method local variable is not initialized"
In Scope (\_SI)
Change both:
Store (Local0, Local0)
To:
Store (0x00, Local0)
3) "Use of compiler reserved name"
Replace all _T_ with T_
4) "Effective AML package length is zero"
Change:
Name (RPMV, Package (0x00) {})
To:
Name (RPMV, Package (Zero) {})
5) "Result is not used, operator has no effect"
Change:
Or (0x03, PARM)
To:
Or (PARM, 0x03, PARM)
The first required edit is to include Method DTGP for passing configuration parameters to OS X. Next up is renaming device names to follow Apple's conventions. They are renaming all PX40 to LPCB, PX43 to SBUS, all AZAL to HDEF, Device (IDE1) to Device (SATA) and it's sub-device ports from Device (PRIM) to Device (PRT0) and Device (SECD) to Device (PRT1), deleting Device (IDE2) (unused) and finally renaming the USB device names, USBE to EHC1 and USE2 to EHC2
Now that we have all of the correct device names now we need to add some missing information. For the SMBus we need to add the following to Device (SBUS) as a nested sub-device:
Device (BUS0)
{
Name (_CID, "smbus")
Name (_ADR, 0x00)
Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"address",
0x57
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}
For ALC8xxHDA to work correctly we need to inject into Device (HDEF) codec information. Here is an example of what needs to be added for a board using and an ALC889 codec:
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x04)
{
"layout-id",
Buffer (0x04)
{
0x79, 0x03, 0x00, 0x00 // decimal 889
},
"PinConfigurations",
Buffer (Zero)
{
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
For other codecs you will need to change the layout-id to match your codec.
There is a problem with Audio break ups that can be corrected in the DSDT. The first is in Device (PIC) remove these two lines:
IRQNoFlags ()
{2}
The other fix for audio break ups is in Device (TMR) where we need to change:
Method (_CRS, 0, NotSerialized)
{
If (LGreaterEqual (OSFX, 0x03))
{
If (HPTF)
{
Return (ATT6)
}
Else
{
Return (ATT5)
}
}
Else
{
Return (ATT5)
}
}
To:
Method (_CRS, 0, NotSerialized)
{
Return (ATT6)
}
The next fix is to prevent kernel panics in AppleIntelCPUPowerManagement at boot time. This fix is easy; just change Method (_STA, 0, NotSerialized) to Return (0x0F) and to change Method (_CRS, 0, NotSerialized) to Return (ATT3).
The final edit is to allow you to use the power button to put the computer to sleep. In Device (PWRB) change Name (_HID, EisaId ("PNP0C0C")) to Name (_CID, EisaId ("PNP0C0C")).
If you don't want to bother with these edits, you can download pre-edited DSDTs from the tonymacx86.com DSDT Database.
10 comments:
is this DSDT file the newest? I downloaded GA-H61M-D2P's DSDT one week ago. Do I need to download it again now? thanks!
What is "change Method (_STA, 0, NotSerialized) to Return (0x0F) and to change Method (_CRS, 0, NotSerialized) to Return (ATT3)" mean??
Thanks, is it OK for H67, P67 and Z68? Thanks for the work :)
sorry to be a broken record, but what tool is the best to use, to make my own dsdt? i have a h67 gigabyte h67ma usb3, and that dsdt doesn't seem to work for me, i have the same bios F3, i mostly have it working now, using voodoo, EvOreboot, etc, thanks,
Hi MacMan,
Thanks for the very informative post!
Question though, for the audio's layout id, do I just replace the 889 hex with an 892 hex? If not, could you please guide me on how to know what to put in there? Thanks!
@jobski
Yes, that is what you need to do.
@MacMan: in the penultimate edits about Methods _STA and _CRS you forgot to specify that these refers to the HPET device (there are a lot of _STA and _CRS methods in the DSDT).
Do you have a fix for orange icon?
I have a Z68XP-UD3 bios F8 and have edited the dsdt file. All is working now except for orange icons.
ed
"The next fix is to prevent kernel panics in AppleIntelCPUPowerManagement at boot time. This fix is easy; just change Method (_STA, 0, NotSerialized) to Return (0x0F) and to change Method (_CRS, 0, NotSerialized) to Return (ATT3)"
Hello MacManx86,
and thks for your great job, it's clear as clear water, except for the part pasted above,
Where do I have to apply this ? In which section ?
ALL "Method (_STA, 0, NotSerialized)" values have to be edited to return (0x0F) ?
Same question for (_CRS, 0,,,,,) ??
Sorry for my noob question, and BIG THKS
How did you know what to change and how to change it? Is there documentation from the manufactures somewhere? It just seems like very low level stuff to "just know how".
Thanks
Post a Comment