Jump to content

DSDT fixes for Gigabyte boards


  • Please log in to reply
1905 replies to this topic

#601
tinush

tinush

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 262 posts
  • Location:Amsterdam

Yes, you can remove these, along with UAR1 and all junk used by it.


Thnx Master Chief for your answer

T.

#602
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
Another highly optimized DSDT, with a massive code reduction (25%) is now available (as example) in the P5K PRO Snow Leopard Thread.

Happy Hacking!

Here are lspci's.

Great – I was a little busy the other day, but I will have a look at it, later today.


At least with the GA-P35-DS3 (not the EP35-DS3!) you don't have a choice. You either enable AHCI for all ICH9-SATA ports or you don't.

Now imagine a smart boot loader, one selecting ACPI mode for your chipset... problem solved – you end up with a blistering fast boot process (no more ACPI nagging at boot time).

#603
Cathul

Cathul

    InsanelyMac Protégé

  • Members
  • PipPip
  • 69 posts
  • Gender:Male

Now imagine a smart boot loader, one selecting ACPI mode for your chipset... problem solved – you end up with a blistering fast boot process (no more ACPI nagging at boot time).

I don't see the problem. BIOS intializes AHCI for SATA ports. The bootloader takes over the responsibility after all ports have been initialized, not?
And with the beta BIOS with AHCI version 1.20something AHCI initialization wasn't such a problem anymore.

#604
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

I don't see the problem. BIOS intializes AHCI for SATA ports. The bootloader takes over the responsibility after all ports have been initialized, not?
And with the beta BIOS with AHCI version 1.20something AHCI initialization wasn't such a problem anymore.

I'm talking about skipping the BIOS initialization, which slows down the boot process considerably. Just ask William Parker :)

Note: I want firmware (BIOS) to load the kernel without any initialization whatsoever, because OS X can handle it... enter Google OS – I am pretty sure that its source code is being read a lot these days. People looking for clues...

#605
kdawg

kdawg

    InsanelyMac Legend

  • Donators
  • 508 posts
  • Gender:Male
  • Location:Boston, MA

Yes, you can remove these, along with UAR1 and all junk used by it.


My UAR1 serial port works. I think for people who might want to use their serial ports, as few as they may be, might want to keep this one. I haven't actually tried my serial port but it's natively recognized by OS X.

#606
Bansaku

Bansaku

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 160 posts
  • Gender:Male
  • Location:Edmonton
  • Interests:Lots
Question; is this guide relevant to Gigabyte boards in general or just the P35. I followed every step yet the DSDT will not compile at all. 41 errors all related to SB.PCI0. Maybe the new integrated controller in the new 1156 i5/i7 chips on P55 motherboards has something to do with it? I attached my dsdt.aml with hopes someone can help. :thanks_speechbubble:

Attached Files



#607
William Parker

William Parker

    InsanelyMac Protégé

  • Members
  • PipPip
  • 75 posts
@ Master Chief
Still going great guns eh? Pls keep it up.
Skipping Bios Initialization you say? Are you setting up a Motherboard Fab? If you're taking orders I'm in the queue.
But seriously I am looking keenly at Intel DP55KG which appears being capable of scratching my 7 year itch. Sort of civilized quiet boot, intel logo editable, no FDC on board, no PS2 either. Heard the LAN's a bummer though (82578 chip). Will need help for DSDT when I get the board, unless you teach us the magic of booting AHCI on P45 Gigabyte board without initializing the BIOS. The God forsaken ALC889A alone takes 10 seconds.
Loading Kernel from BIOS sounds more like UEFI boot where things are written to NVRAM. Is this on those lines? Boy would I give an arm & a leg for that.


I'm talking about skipping the BIOS initialization, which slows down the boot process considerably. Just ask William Parker :(

Note: I want firmware (BIOS) to load the kernel without any initialization whatsoever, because OS X can handle it... enter Google OS – I am pretty sure that its source code is being read a lot these days. People looking for clues...



#608
ddogg777

ddogg777

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
Amazing work MC and crew. Quick one liner, Anyone have luck with the ep45t-ds3r?
EDIT: Thought of another question, what are you guys using to edit the .dsl, DSDTSE?

#609
jinnggoff

jinnggoff

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 133 posts
  • Gender:Male
  • Location:hackintosh
Hi...
I had to modify my gigabyte mobo dsdt similar imac5, 1..
it can work perfectly ... including shutdown without openhalrestart.
but there is one problem that is annoying ... proccessor into heat when internet sharing is enabled by airport, where the problem does not exist when using the native motherboard dsdt.
anyone knows to solve this problem?

here is my custom dsdt
Attached File  dsdt.zip   6.64KB   20 downloads

#610
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
I like to remind GigaByte users to include something like this to Method _PTS:
If (LEqual (Arg0, 0x05))                               // S5 (shutdown).        {            Store (One, \_SB.PCI0.LPCB.AG3E)                   // Return to S5 after a power failure                                                               // Mimic "Start up automatically after power failure" checkbox on Energy Saver (Preferences).        }
Note: You may need to remove the If clause and just use the Store command.

And this code snippet under Device (LPCB)
OperationRegion (LPC0, PCI_Config, 0xA0, 0x60) // General PM Configuration 3 Register (ICH9R-316972.pdf / 13.8.1.3 / page 492).                Field (LPC0, AnyAcc, NoLock, Preserve)                {                        ,   10,                     XPME,   1,                                 // Bit 10 - BIOS_PCI_EXP_EN.                            Offset (0x04),                     // General PM Configuration 3 Register (ICH9R-316972.pdf / 13.8.1.3 - / page 492).                    AG3E,   1,                                 // Bit 0 – AFTERG3_EN.                            Offset (0x50),                     // Root Complex Base Address Register (ICH9R-316972.pdf / 13.1.35 / page 451).                    RCBA,   32                }
I hope that these comments are clear enough :)

p.s. And before you say: My board has a ICH10 on board... well. That is irrelevant to the matter.

#611
MacUser2525

MacUser2525

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,311 posts
  • Gender:Male
  • Location:Canada

I like to remind GigaByte users to include something like this to Method _PTS:

If (LEqual (Arg0, 0x05))                               // S5 (shutdown).        {            Store (One, \_SB.PCI0.LPCB.AG3E)                   // Return to S5 after a power failure                                                               // Mimic "Start up automatically after power failure" checkbox on Energy Saver (Preferences).        }
Note: You may need to remove the If clause and just use the Store command.


So with a _PTS like this.

Method (_PTS, 1, NotSerialized)
	   {
		   Or (Arg0, 0xF0, Local0)
		   Store (Local0, DBG1)
		   If (LEqual (Arg0, 0x05))
		   {
			   Store (ESMI, Local0)
			   And (Local0, 0xFB, Local0)
			   Store (Local0, ESMI)
		   }
   
		   Store (Arg0, \_SB.PCI0.LPCB.EC.ECSS)
		   G3HT ()
		   \_SB.PCI0.SBUS.DISB ()
	   }

You would change to.

Method (_PTS, 1, NotSerialized)
	   {
		   Or (Arg0, 0xF0, Local0)
		   Store (Local0, DBG1)
		   If (LEqual (Arg0, 0x05))
		   {
			   Store (One, \_SB.PCI0.LPCB.AG3E)
		   }
   
		   Store (Arg0, \_SB.PCI0.LPCB.EC.ECSS)
		   G3HT ()
		   \_SB.PCI0.SBUS.DISB ()
	   }

Getting rid of the ESMI.

And this code snippet under Device (LPCB)

OperationRegion (LPC0, PCI_Config, 0xA0, 0x60) // General PM Configuration 3 Register (ICH9R-316972.pdf / 13.8.1.3 / page 492).                Field (LPC0, AnyAcc, NoLock, Preserve)                {                        ,   10,                     XPME,   1,                                 // Bit 10 - BIOS_PCI_EXP_EN.                            Offset (0x04),                     // General PM Configuration 3 Register (ICH9R-316972.pdf / 13.8.1.3 - / page 492).                    AG3E,   1,                                 // Bit 0 �" AFTERG3_EN.                            Offset (0x50),                     // Root Complex Base Address Register (ICH9R-316972.pdf / 13.1.35 / page 451).                    RCBA,   32                }
I hope that these comments are clear enough :(

p.s. And before you say: My board has a ICH10 on board... well. That is irrelevant to the matter.


For this I have

Field (LPC0, AnyAcc, NoLock, Preserve)
				   {
						   ,   10, 
					   XPME,   1, 
							   Offset (0x04), 
					   AG3E,   1, 
							   Offset (0x50), 
					   RAEN,   1, 
						   ,   13, 
					   RCBA,   18
				   }

Which would be after your suggested change.

Field (LPC0, AnyAcc, NoLock, Preserve)
				   {
						   ,   10, 
					   XPME,   1, 
							   Offset (0x04), 
					   AG3E,   1, 
							   Offset (0x50), 
					   RCBA,   32
				   }

Or would the RAEN part still be in there and does this eliminate the need to have the box checked to "Start up automatically after power failure" as well?

#612
xboxdude

xboxdude

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
A heavily modified dsdt.dsl file for a GA-EP45-DS3 with a Q9550 (based on Master Chief's great work and Stickpins mods) here:

http://www.insanelym...p...5&start=26#

Speedstep, restart etc and includes Master Chiefs latest mods, Mac Pro 3,1 style.

#613
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

So with a _PTS like this.

... see post # 611
You would change to.

... see post # 611
Getting rid of the ESMI.

For this I have
... see post # 611
Which would be after your suggested change.
... see post # 611

Or would the RAEN part still be in there and does this eliminate the need to have the box checked to "Start up automatically after power failure" as well?

The idea is to add Store (One, \_SB.PCI0.LPCB.AG3E) inside the If (LEqual (Arg0, 0x05)) {}
And yes, this will take care of that checkbox for you.

#614
AudiSport

AudiSport

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
  • Gender:Male
Master Chief,
I added LPCB.AG3E to PTS as well as the LPC0 to LPCB but I am still getting a reboot when waking from sleep when "Start up automatically after power failure" is unchecked. I tried removing the ESMI stuff with no change and I moved LPCB.AG3E outside the if as well and still no change.

Attached is my dsdt.dsl.
Attached File  dsdt.dsl.zip   8.13KB   19 downloads

#615
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,843 posts
  • Gender:Male
  • Location:Stuttgart / Germany
MC :
OperationRegion (LPC0, PCI_Config, 0x[b][color="#008000"]A0[/color][/b], 0x[b][color="#008000"]60[/color][/b])[size=1] // General PM Configuration 3 Register (ICH9R-316972.pdf / 13.8.1.3 / page 492).[/size]                Field (LPC0, AnyAcc, NoLock, Preserve)                {                        [size=4][color="#FF0000"][b],[/b][/color][/size]   10,                     XPME,   1,                                 /[size=1]/ Bit 10 - BIOS_PCI_EXP_EN.[/size]                            Offset (0x04),                    [size=1] // General PM Configuration 3 Register (ICH9R-316972.pdf / 13.8.1.3 - / page 492).[/size]                    AG3E,   1,                                 [size=1]// Bit 0 – AFTERG3_EN.[/size]                            Offset (0x50),                    [size=1] // Root Complex Base Address Register (ICH9R-316972.pdf / 13.1.35 / page 451).[/size]                    RCBA,   32                }


Does your code qbove is a sniplet , means before the comma , is the old code ?
I ask because that code starts with an comma . If full code i am a bit confused about the comma (marked red in codebox).
Or comes before the comma, that Offset (0x20) (see my Codebox) ?

My "orig." LPC code part is much bigger - can i use that code only without mine before the comma ? (dont know if from orig. BIOS Ep35-DS3, or modded x times :) )

Also i am a bit confused about that different PCI_Config hex numbers : PCI_Config, 0xA0, 0x60 vs PCI_Config, 0x40, 0xC0) - does it matter (ICH9, ICH9R, ICH10,..) or my PCIConfig hex numbers simle wrong ?

OperationRegion (LPC0, PCI_Config, 0x[b]40[/b], 0x[b]C0[/b])[size=1]                Field (LPC0, AnyAcc, NoLock, Preserve)                {                            [b]Offset (0x20)[/b],                     PARC,   8,                     PBRC,   8,                     PCRC,   8,                     PDRC,   8,                             Offset (0x28),                     PERC,   8,                     PFRC,   8,                     PGRC,   8,                     PHRC,   8,                             Offset (0x40),                     IOD0,   8,                     IOD1,   8,                             Offset (0x60),                         ,   10,                     XPME,   1,                             Offset (0x64),                     AG3E,   1,                             Offset (0xB0),                     RAEN,   1,                         ,   13,                     RCBA,   18[/size]                }


#616
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 2,895 posts
  • Gender:Male
  • Location:UK
Hi mitch

My original DSDT didn't have an OperationRegion (LPC0... section.
(My current DSDT now has come a long way since my original DSDT)

I have added it exactly as MasterChief has described above. Leave the green numbers as Master Chief has them, as the General PM Configuration 3 Register is at location D31:F0:A4h (intel ICH9 & ICH10 datasheets). This ties in with your Device (LPCB) (used to be PX40) above which will read Name (_ADR, 0x001F0000) (Intel Bus 0:Device 31:Function 0 - LPC Controller)

#617
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

MC :

see post #
...

What I do is to skip the unused part by taking 0x40 from the old DSDT and add the value of Offset(0x60) giving me that 0xA0. Enter a new base address of 0xA0. And when you see something like this:
Field (LPC0, AnyAcc, NoLock, Preserve)
{
		, 10, 
XPME, 1, // Bit 10 - BIOS_PCI_EXP_EN.
...
The lack of a identifier (name) simply means that we skip – are not interested in – the first ten (10) bits. And XPME is bit ten (10) because we start from zero (0) instead of the usual one (1) and thus we skip bit: 0,1,2,3,4,5,6,7,8,9 here. And thus we assign XPME to bit ten (10).

And what blackosx said is correct ;)

#618
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Master Chief,
I added LPCB.AG3E to PTS as well as the LPC0 to LPCB but I am still getting a reboot when waking from sleep when "Start up automatically after power failure" is unchecked. I tried removing the ESMI stuff with no change and I moved LPCB.AG3E outside the if as well and still no change.

Attached is my dsdt.dsl.
Attached File  dsdt.dsl.zip   8.13KB   19 downloads

Add Store (One, \_SB.PCI0.LPCB.AG3E) to Method _WAK and see how the checkbox changes from unchecked to checked. If not then something is wrong.

You can also verify this by entering lspci -nn in a terminal window, to get the device-id (by looking for the ISA bridge) and then to enter lspci -d 8086:2916 -xxxvvv (using the device id) and see how register A5 changes from 38 into 39 and vise versa.

p.s. Looking at your DSDT... you still have work to do!

#619
AudiSport

AudiSport

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
  • Gender:Male

Add Store (One, \_SB.PCI0.LPCB.AG3E) to Method _WAK and see how the checkbox changes from unchecked to checked. If not then something is wrong.

Did that but still no change in behavior on waking from sleep when unchecked.

You can also verify this by entering lspci -nn in a terminal window, to get the device-id (by looking for the ISA bridge) and then to enter lspci -d 8086:2916 -xxxvvv (using the device id) and see how register A5 changes from 38 into 39 and vise versa.

I did lspci -d 8086:27b8 -xxxvvv and I do see the A5 register changing when I check and uncheck the preference.

p.s. Looking at your DSDT... you still have work to do!

I know and am slowly picking through the posts to figure out and understand what the changes do and how they will be different for my ICH7 board. I know some of my namespaces are different than yours but that is because I am targeting making my hack look like an iMac5,1 or iMac6,1 because they were the the last real Macs that had the ICH7 chipset. The USB naming seems to be the biggest difference. What areas are you referring to that you see need work?

Thanks!

#620
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Did that but still no change in behavior on waking from sleep when unchecked.

Let's see if I get this right. It works when you tick the checkbox, but it fails when you add it in your DSDT?

I know and am slowly picking through the posts to figure out and understand what the changes do and how they will be different for my ICH7 board. I know some of my namespaces are different than yours but that is because I am targeting making my hack look like an iMac5,1 or iMac6,1 because they were the the last real Macs that had the ICH7 chipset. The USB naming seems to be the biggest difference. What areas are you referring to that you see need work?

Thanks!

There's a whole lot of things to work on. Here are a few pointers: _STA, _S3D, _PRW, _PRT, MCDP -> MCID, PIRA, PIRB, PIRC, PIRD, PIRE, PIRF, PIRG, PIRG, SLDM, _CRS, SPKR, EXFG, ENFG

Yours:
Method (_PSW, 1, NotSerialized)
{
	If (Arg0)
	{
		Store (0x03, USBW)
	}
	Else
	{
		Store (Zero, USBW)
	}
}
Mine:
Method (_PSW, 1, NotSerialized)
{
	Multiply (0x03, Arg0, USBW)
}
Just look at my DSDT (or another GB one from this thread) and see what we changed. The result will be a much cleaner dsdt.dsl and a smaller dsdt.aml





3 user(s) are reading this topic

1 members, 2 guests, 0 anonymous users


© 2013 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy