Jump to content
VegasKarma

Master Chief's P5K PRO ACPI Warfare

908 posts in this topic

Recommended Posts

@masterlen:

 

Please add the following code snippet to Device (LPCB):

                Name (GCSA, 0x042F57) // Default Base Address (0x03FB47) + Offset (0x3410).
               OperationRegion (GCSR, SystemMemory, GCSA, One) // General Control and Status Register (ICH9R-316972.pdf / 10.1.75 / page 385)
               Field (GCSR, DWordAcc, NoLock, Preserve)
               {
                   FLRC,   32
               }

               Method (_INI, 0, NotSerialized)
               {
                   If (RAEN)
                   {
                       Store (Add (RCBA, 0x3410), GCSA)
                       Store (Or (FLRC, 0x1000), FLRC)
                   }
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x06)
                   {
                       "RAEN",
                       RAEN,
                       "RBCA",
                       RCBA,
                       "FLRC",
                       FLRC
                   }, Local0)

                   MCDP (Arg2, RefOf (Local0))
                   Return (Local0)
               }

This will add three new properties called: RAEN, RBCA and FLRC. Let me know what values you get.

 

And you need to have the following code snippet in Device LPCB:

                // Newly added for EC support.
               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)
                   RAEN,   1,                                 // Bit 1 - Enable
                       ,   13,                                // Reserved bits
                   RCBA,   18                                 // Bit 14:31 - Root Complex Base Address
               }

Simply copy the lines from the attached snippet.dsl.zip into you DSDT, compile it, run it, and let me know the values (use IORegistryExplorer or ioreg).

 

And as you may have noticed by now, I worked on this before. That's why we have RAEN and RCBA. And we are going to use the base address (RBCA) and add the offset to get to the register(s) we want/need to change. This way we can alter the ICHn chipsets. Let's start with a reggie_se – used to read and modify hardware registers and physical memory – read example:

 

sudo reggie_se -D PhysAddr -r -a 0x042F57 -B 32

 

The 0x042F57 here is just an example, which is my base address (0x03FB47) + the offset (0x3410) but we can use the above code snippets to change any of the IDCHn configuration registers. We just have to find out which one is responsible for our FireWire problem – hot pluggable after sleep only.

 

Writing a new value to the same register can be done with:

 

sudo reggie_se -D PhysAddr -w 0x6f7a0100 -a 0x042F57 -B 32

 

Simply replace 0x6f7a0100 with the value you want to write and 0x042F57 with the address to write to.

 

One of the advantages of using reggie_se is that you don't need to change your DSDT, compile it and then do a reboot just to test a simple change, but be careful with the address... as that might actually result in a panic, or worse!

snippet.dsl.zip

Share this post


Link to post
Share on other sites
Advertisement
FireWire update... (work in progress)

 

@masterlen: We both add a new post, at the same time, about the same subject. Funny.

 

 

Wow!!! even in the same minute! That's really funny!

Share this post


Link to post
Share on other sites
It tried to read a property called acpi-path but failed to locate it, which is normally something like: IOACPIPlane:/_SB/PCI0@0/SBUS@1f0003

 

And you might have a Device (SBUS) but with a different name. Search for: Name (_ADR, 0x001F0003) and if you find it, then change the name into SBUS and fix all callers. Just search for the old name.

 

If not, add it. Read this thread and look at the attachments (DSDT's) in post #3.

 

Oh, and please use: lspci -d 8086:2930 -xxxvvv next time, because that tells me a lot more.

 

Good luck!

 

Thanks Master Chief

I've got a few different Name (_ADR, 0x001F000x) devices but comparing to your Device (SBUS) section none of them would appear to be an SBUS device. Would this be the code that I need to add?

 

Device (SBUS) // Newly added Device.

{

Name (_ADR, 0x001F0003)

 

// pci8086,2930 -> pci8086,3a30

Method (_DSM, 4, NotSerialized)

{

Store (Package (0x04)

{

"name",

"pci8086,3a30",

 

"device-id",

Buffer (0x04)

{

0x30, 0x3a, 0x00, 0x00

}

}, Local0)

MCDP (Arg2, RefOf (Local0))

Return (Local0)

}

 

I have attached my DSDT and the lspci as you requested. Thanks for all the help.

e7200_DSDT.zip

Share this post


Link to post
Share on other sites
Simply copy the lines from the attached snippet.dsl.zip into you DSDT, compile it, run it, and let me know the values (use IORegistryExplorer or ioreg).

 

I tried do add this to DSDT by I get errors.

 

Here is my DSDT.dsl

dsdt.dsl.zip

Share this post


Link to post
Share on other sites
I tried do add this to DSDT by I get errors.

 

Here is my DSDT.dsl

And?

 

You mean you have an almost vanilla DSDT and want me to fix it? Go ask in the GigaByte thread for a DSDT that has been patched already, or start working on it because there is way too much junk in it. Nope, I won't even look at anything that isn't in par with my latest DSDT – in terms of device names and major cleanups.

Share this post


Link to post
Share on other sites

i have a problem with Asus board.... cannot make it boot after install, but let me explain this:

 

I had Intel DG33FB and working Snow 10.6.2 on it. I was frustrated with it, because i had have 2 keyboards on it... one with PS/2 to access bios ad one with USB to use in Snow. My guess was that IHC10 will help.

 

So i changed MoBo to Asus P5QL pro and - to my surprice - it booted straight in to Snow. So it works with Snow !

 

And, of course, because i'm so damn good with this computers, i had to re-run DSDT to be right for this MoBo ... and now i cannot even boot my USB-stick (10.6) or that Snow what i had on HD.

 

To make long story short ; I broke it when i did DSDT again ... :) I tested it with some laptop, booting from it and nothing happens.

 

I have now tried 3 different distro's (and about 10 different how-to's) for Leo to be able to upgrade to Snow (Kalyway = no install at all, iAtkos = same and iDeneb = installs fine, but kp at boot) with no luck.

 

Also, i have Asus BIOS 1004 - when i tried to flash it with modded bios it says this is not compatible. So i have not modded bios, but Snow worked already with this bios !!!!

 

Can anyone point me to right direction ... i have searched here and also in net, but no luck.

 

Kari

Share this post


Link to post
Share on other sites
...

I have now tried 3 different distro's (and about 10 different how-to's) for Leo to be able to upgrade to Snow (Kalyway = no install at all, iAtkos = same and iDeneb = installs fine, but kp at boot) with no luck.

...

Kari

 

Read this aka "Important note: NO SUPPORT FOR TORRENTS. ORIGINAL RETAIL DISC ONLY!!! – No links/attachments to/of copyrighted material allowed here."

 

Also, i have Asus BIOS 1004 - when i tried to flash it with modded bios it says this is not compatible. So i have not modded bios, but Snow worked already with this bios !!!!

I can't help you with BIOS modifications, but other people here might. BTW: What exactly was changed in the BIOS? Can't that be done in DSDT?

 

And if nothing else works, then you may have to extract the ACPI tables again (think acpidump) patch it with DSDT SE – or whatever works for you – and then start on additional fixes/patches. The good news is that I also have an Asus board, be it a different one, but you can still use my DSDT(s) to copy bits and pieces from it.

Share this post


Link to post
Share on other sites
Thanks Master Chief

I've got a few different Name (_ADR, 0x001F000x) devices but comparing to your Device (SBUS) section none of them would appear to be an SBUS device. Would this be the code that I need to add?

 

...

 

I have attached my DSDT and the lspci as you requested. Thanks for all the help.

e7200_DSDT.zip

I'll have a quick look at your DSDT right now... Right. Another vanilla DSDT. Great.

 

Can people here please read this topic first, and from the start, follow all the directions and then ask other people for help? This way we don't have to go over the same stuff over and over again! Sorry, but that's the way things are – I can't possibly fix everything for everyone. I'm not a machine :D

 

Thank you.

Share this post


Link to post
Share on other sites
Thank you DB1. Food for thought.

 

Now. I see that your (UHCn) USB ports are already set to "Capabilities: [50] PCIe advanced features <?>". Much to my surprise of course, because here that's not the case so – are you are sure that your PC didn't sleep before your did the lspci -xxxvvv?

 

Would you mind attaching your DSDT for me?

 

p.s. I am currently documenting the changes – adding pointers to the ICH9 datasheet – which I think can be used at a later stage, so that people who are new to lspci can learn to use it, and link the register output to the(ir) datasheet.

 

OK just to be certain I ran lspci -xxxvvv again after start this morning, put it to sleep and ran again.Before_After.zip Seems more differences in this one - not checked yet against what I posted yesterday.

Here's the dsdt.dsl:P5K_VM_3.1_dsdt.dsl.zip

Share this post


Link to post
Share on other sites
OK just to be certain I ran lspci -xxxvvv again after start this morning, put it to sleep and ran again.Before_After.zip Seems more differences in this one - not checked yet against what I posted yesterday.

Here's the dsdt.dsl:P5K_VM_3.1_dsdt.dsl.zip

Phew. I was starting to wonder, but this is looking great. Same sort of output as I got (sort of). And that means that this weird fact isn't limited to my P5K PRO and my DSDT, but your Asus P5K VM as well. I am still puzzled by this, but this confirmation should trigger more attention from other people. Well hopefully.

 

I need a tool to dump memory blocks... no idea what to use on OS X?!?

Share this post


Link to post
Share on other sites

I downloaded Boot123 and did notice one strange thing:

 

when i boot up and have usb-stick on frontport, it hangs when it tries to do something with uchi-controller.

 

Now, when i did wait for inital devices to register (keyboard/mouse) and after that i put usb on backport --->

 

it's installing snow from usb now ?

 

This usb has dsdt.aml for this machine and also chameleon and some kext needed for this machine..

 

i'll report back in 20 mins, hopefully from that machina.

 

Kari

 

 

ok, sorry .. took 27 mins, because i needed some coffee:) It worked, i'm typing this from Snow installed on that Asus P5QL pro mobo and everything seems to work

 

yyyyyyyyyyyyyyyyyyyyyhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.

 

and that's 1 point to me against Intel (?) .... they should fix BIOS so that Apple USB -keyboard works, so would not need to buy Asus MoBo with Intel chipset where it works.

 

Thanks for help all...

 

Kari

Share this post


Link to post
Share on other sites
I'll have a quick look at your DSDT right now... Right. Another vanilla DSDT. Great.

 

Can people here please read this topic first, and from the start, follow all the directions and then ask other people for help? This way we don't have to go over the same stuff over and over again! Sorry, but that's the way things are �" I can't possibly fix everything for everyone. I'm not a machine :D

 

Thank you.

 

Ouch, tuff love :) and I thought I was actually making progress. Thanks Chief I will get crackin.

Share this post


Link to post
Share on other sites
Hi!

I have Q9300 and P5K PRO, and using Master Chief dsdt v3.1, thanks for it.

But mac os x show processor speed as 3,8GHz.

Where is the trouble?

What boot loader are you using? Chameleon V2? Then you must have a file called smbios.plist and there you add/set SMmaximalclock (string) to 2500 (default Q9300 clock speed).

 

You can also set SMexternalclock (333), SMmemtype (19) and SMmemspeed (800).

 

Otherwise you need some sort of hacked smbios.kext – I don't use Chameleon myself, and BootThink might also use smbios.plist I simply don't now. Anyone?

Share this post


Link to post
Share on other sites

Another day... another update. Here's what we have now for our (six) UHCn devices:

Method (_PSW, 1, NotSerialized)
{
If (Arg0)
{
	Store (0x03, USBW)
}
Else
{
	Store (Zero, USBW)
}
}

Which I want to replace with:

Method (_PSW, 1, NotSerialized) // Power State Wake
{
Multiply (0x03, Arg0, USBW)
}

Another one liner. And for EHCI:

Device (EHCI) // Renamed from: EUSB - Extended with Power Management and Port Wake Capabilities.
{
Name (_ADR, 0x001D0007)
...
Method (_PSW, 1, NotSerialized)
{
	Multiply (0x01FF, Arg0, URE2) // Setting bits 0-8 based on Arg0 (the multiplier).
}
...

And for UHCI (second EHCI device):

Device (UHCI) // Renamed from: USBE - Extended with Power Management and Port Wake Capabilities.
{
Name (_ADR, 0x001A0007)
...
Method (_PSW, 1, NotSerialized)
{
	Multiply (0x7F, Arg0, URE2) // Setting bits 0-6 based on Arg0 (the multiplier).
}
...

Another 58 lines less (6 * 8 for the UCHn devices, plus 2 * 9 for the EHCI/UHCI devices - 8 for the new lines) compared to DSDT V3.1

 

Note: This should work, but I have yet to verify it myself.... which would be my next target for today and it works. Great ;)

 

Happy Hacking!

Share this post


Link to post
Share on other sites
Another day... another update. Here's what we have now for our (six) UHCn devices:
Method (_PSW, 1, NotSerialized)
{
If (Arg0)
{
	Store (0x03, USBW)
}
Else
{
	Store (Zero, USBW)
}
}

Which I want to replace with:

Method (_PSW, 1, NotSerialized) // Power State Wake
{
Multiply (0x03, Arg0, USBW)
}

Another one liner. And for EHCI:

Device (EHCI) // Renamed from: EUSB - Extended with Power Management and Port Wake Capabilities.
{
Name (_ADR, 0x001D0007)
...
Method (_PSW, 1, NotSerialized)
{
	Multiply (0x01FF, Arg0, URE2) // Setting bits 0-8 based on Arg0 (the multiplier).
}
...

And for UHCI (second EHCI device):

Device (UHCI) // Renamed from: USBE - Extended with Power Management and Port Wake Capabilities.
{
Name (_ADR, 0x001A0007)
...
Method (_PSW, 1, NotSerialized)
{
	Multiply (0x7F, Arg0, URE2) // Setting bits 0-6 based on Arg0 (the multiplier).
}
...

Another 58 lines less (6 * 8 for the UCHn devices, plus 2 * 9 for the EHCI/UHCI devices - 8 for the new lines) compared to DSDT V3.1

 

Note: This should work, but I have yet to verify it myself.... which would be my next target for today and it works. Great ;)

 

Happy Hacking!

 

Nice - these work for me & a slight improvement. The magic mouse works instant after wake where as before it was disconnected and a few seconds to reconnect. The previous set of fixes don't work for me, did you notice anything in my dsdt preventing?

 

Thanks

Share this post


Link to post
Share on other sites
Nice - these work for me & a slight improvement. The magic mouse works instant after wake where as before it was disconnected and a few seconds to reconnect.

Thank you for the confirmation.

 

BTW: The first thing that came to mind was sanding. I mean the Magic Mouse has some rather sharp edges doesn't it, or is it just me? Not exactly what I had in mind but hey, sanding might actually work.

 

The previous set of fixes don't work for me, did you notice anything in my dsdt preventing?

 

Thanks

Which set exactly? The _PIC / OSFL or the shutdown changes?

Share this post


Link to post
Share on other sites

The shutdown changes didn't work here: with the new _PTS it seemed to shutdown completely, then it restarted on its own ;)

I played a bit with that method and I found out that like this it works perfectly (shutdown and sleep are both faster, as you said):

	Method (_PTS, 1, NotSerialized) // Prepare To Sleep.
{
	Store (And (Arg0, 0x0F), Local0)
	\_SB.PCI0.LPCB.SPTS ()
	Store (Arg0, ASSB)

	If (LEqual (Arg0, 0x05))
	{
		Store (One, \_SB.PCI0.LPCB.AG3E)
		Store (0x07, SLPT)
		Store (One, SLPE)
	}

	\_SB.PCI0.SBUS.DISB ()
}

Here's my current dsdt ;)

Share this post


Link to post
Share on other sites
Thank you for the confirmation.

 

BTW: The first thing that came to mind was sanding. I mean the Magic Mouse has some rather sharp edges doesn't it, or is it just me? Not exactly what I had in mind but hey, sanding might actually work.

 

 

Which set exactly? The _PIC / OSFL or the shutdown changes?

 

Post 366 - shutdown. Initially did 366,367, 368 all in one go then had to back track to try to find where problem. Shutdown goes to power off then auto reboots, works more like a restart than a shutdown for me.

 

On P5K VM shutdown has not been / is not an issue, current problem area is restart partially solved by your kext as after a sleep no restart. It obviously something to do with the state change were detecting in lspci before/after sleep.

Share this post


Link to post
Share on other sites
The shutdown changes didn't work here: with the new _PTS it seemed to shutdown completely, then it restarted on its own :)

I played a bit with that method and I found out that like this it works perfectly (shutdown and sleep are both faster, as you said):

	Method (_PTS, 1, NotSerialized) // Prepare To Sleep.
{
	Store (And (Arg0, 0x0F), Local0)
	\_SB.PCI0.LPCB.SPTS ()
	Store (Arg0, ASSB)

	If (LEqual (Arg0, 0x05))
	{
		Store (One, \_SB.PCI0.LPCB.AG3E)
		Store (0x07, SLPT)
		Store (One, SLPE)
	}

	\_SB.PCI0.SBUS.DISB ()
}

Here's my current dsdt :D

That doesn't look right. You first trigger sleep state (S3) and then change that into shutdown. Which is what we used to do, simply because Asus did it this way, but I like to change it... because it makes no sense. And I don't seem to need it anymore. This is what I use now:

    Method (_PTS, 1, NotSerialized) // Prepare To Sleep.
   {
       If (LEqual (Arg0, 0x05))
       {
           Store (One, \_SB.PCI0.LPCB.AG3E)
           Store (0x07, SLPT)
           Store (One, SLPE)
       }
       Else
       {
           Store (And (Arg0, 0x0F), Local0)
           \_SB.PCI0.LPCB.SPTS ()
           Store (Arg0, ASSB)
       }

       \_SB.PCI0.SBUS.DISB ()
   }

I verified the Energy Settings setting: "Start up automatically after power failure" which has no influence on the sleep/shutdown process here – both on and off work. I also verified the BIOS settings under APM Configuration where I have everything set to [Disabled] except for the first one, being: "Restore on AC Power Loss" which I can set to (from the top of my head): Power On, Power Off or Last State. Either one works.

 

p.s. Please add a signature (My Control) because I don't know what hardware you are using, only after downloading the attached DSDT, which makes things a little more complicated for me. Thank you!

 

Post 366 - shutdown. Initially did 366,367, 368 all in one go then had to back track to try to find where problem. Shutdown goes to power off then auto reboots, works more like a restart than a shutdown for me.

 

On P5K VM shutdown has not been / is not an issue, current problem area is restart partially solved by your kext as after a sleep no restart. It obviously something to do with the state change were detecting in lspci before/after sleep.

I'll have a quick look at your DSDT, right now... The attached DSDT includes most of the patches, but little changes to Method _PTS. Please give it a try.

shutdown.zip

Share this post


Link to post
Share on other sites

I am going to try use this stripped down, over-simplified copy of Method _PTS:

	Method (_PTS, 1, NotSerialized) // Prepare To Sleep.
{
	If (LNotEqual (Arg0, 0x05))
	{
		\_SB.PCI0.LPCB.SPTS ()
		Store (Arg0, ASSB)
	}
}

Edit: Just did a quick sleep - wake - sleep - wake - shutdown - boot, without any problem whatsoever. And another one. Both sleep and shutdown work. Time to add back the missing pieces ;)

 

And this is it:

	Method (_PTS, 1, NotSerialized)		  // Prepare To Sleep.
{
	If (LEqual (Arg0, 0x05))			 // S5 (shutdown).
	{
		Store (One, \_SB.PCI0.LPCB.AG3E) // Return to S5 after power failure.
	}
	Else								 // S1, S3 or S4 (S2 is not supported).
	{
		\_SB.PCI0.SBUS.DISB ()
		\_SB.PCI0.LPCB.SPTS ()
		Store (Arg0, ASSB)
	}
}

Additional comments in DSDT V3.2

 

p.s. This is funny; The Asus support site has an option for MAC OS. I wonder what their response is when you select it... not-supported I guess :)

Share this post


Link to post
Share on other sites
I'll have a quick look at your DSDT, right now... The attached DSDT includes most of the patches, but little changes to Method _PTS. Please give it a try.

 

Thanks Chief shutdown behaving now with those modifications.

Share this post


Link to post
Share on other sites
I am going to try use this stripped down, over-simplified copy of Method _PTS:
	Method (_PTS, 1, NotSerialized) // Prepare To Sleep.
{
	If (LNotEqual (Arg0, 0x05))
	{
		\_SB.PCI0.LPCB.SPTS ()
		Store (Arg0, ASSB)
	}
}

Edit: Just did a quick sleep - wake - sleep - wake - shutdown - boot, without any problem whatsoever. And another one. Both sleep and shutdown work. Time to add back the missing pieces :(

 

And this is it:

	Method (_PTS, 1, NotSerialized)		  // Prepare To Sleep.
{
	If (LEqual (Arg0, 0x05))			 // S5 (shutdown).
	{
		Store (One, \_SB.PCI0.LPCB.AG3E) // Return to S5 after power failure.
	}
	Else								 // S1, S3 or S4 (S2 is not supported).
	{
		\_SB.PCI0.SBUS.DISB ()
		\_SB.PCI0.LPCB.SPTS ()
		Store (Arg0, ASSB)
	}
}

Additional comments in DSDT V3.2

 

p.s. This is funny; The Asus support site has an option for MAC OS. I wonder what their response is when you select it... not-supported I guess ;)

 

MC, have you figured out what ASSB is referencing? I remember a bit back you were trying to figure it out. It seems this is the key.

Share this post


Link to post
Share on other sites
Thanks Chief shutdown behaving now with those modifications.

Ok. Time for another update. Try this:

Method (_PTS, 1, NotSerialized) // Prepare To Sleep.
{
	\_SB.PCI0.LPCB.SPTS (Arg0)
	Store (Arg0, ASSB)

	If (LGreaterEqual (Arg0, 0x05))
	{
		Store (One, \_SB.PCI0.LPCB.AG3E)
	}

	\_SB.PCI0.SBUS.DISB ()
}

Next would be the one I am using. And while you're at it, remove this:

	Method (RRIO, 4, NotSerialized)
{
	Store ("RRIO", Debug)
}

Method (RDMA, 3, NotSerialized)
{
	Store ("rDMA", Debug)
}

And change this:

			Method (^BN00, 0, NotSerialized) // Can't we just return Zero?
		{
			Return (Zero)
		}

		Method (_BBN, 0, NotSerialized) // PCI bus number setup by the BIOS.
		{
			Return (BN00 ())
		}

into:

			Method (_BBN, 0, NotSerialized) // PCI bus number setup by the BIOS.
		{
			Return (Zero)
		}

These will also be gone in DSDT V3.2 along with 13K unused code.

 

MC, have you figured out what ASSB is referencing? I remember a bit back you were trying to figure it out. It seems this is the key.

Unfortunately not no (Asus is tight lip about it) but I do know that it is doing the same as what I did with:

Store (Sleep_State, SLPT)
Store (One, SLPE)

The other parts are most likely related to either fan control, power management, or both.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×