Jump to content
VegasKarma

Master Chief's P5K PRO ACPI Warfare

908 posts in this topic

Recommended Posts

Advertisement
Here it is... its the one from your posted v3.0 with pss modifications only

Interesting. Another DSDT change that doesn't seem to work for you. I am starting to wonder why as I also don't need a single device-id change to my UHCn devices nor the ECHI/UCHI devices. Must be a different revision, or could that be explained by different BIOS version, or the USB BIOS settings? Let me know what settings you have.

 

p.s. What are the device numbers when you don't change them?

 

I presume that your CPU supports the multipliers (6,7,8 and 9) so that isn't a problem, and that DSDT v2.9 works for you? Even with your _PSS object? What if you use DSDT v2.9 with that new _PR scope and PNOT method?

Share this post


Link to post
Share on other sites

The P5K Pro has a Winbond W83627DHG Super IO chip on-board. You can locate this chip by looking at the two short PCI slots on your board. The chip is located right next to the lower port. Now. Why am I telling this? Because this chip also includes sensor information. And a whole lot of them:

 

1) Three temperature sensors.

2) Nine voltage sensors.

3) Five fan speed sensors.

 

And in addition to that: Alarms with beep warnings and fan control methods.

 

The address port of the Winbond chip is located at address 0x0295 and the data port at address 0x0296. And all possible sensor data is readily available from it. And this is also what the BIOS uses to display temperatures and fan speeds. Not to mention the Asus PC Probe to monitor essential data (that is also why we had so much more in our DSDT, which we ripped out by now). Interesting isn't it?

 

Nothing new for us Linux users. Of course not. After all. The Linux community has done an incredible job over the past few years. Providing key info for many people here. I only got interested after reading the FakeSMC.kext sources, which didn't reveal anything new to me, but the exact keys. Well more like thanks to the QEMU patch but anyway.

 

And my interest was raised when oldnapalm started to implement CPU core temperatures. So I thought why not have everything we need?

 

No. FakeSMC.kext isn't ready for us, since it only "emulates" known keys. The next step would be to add logic for our motherboard, so that programs like iStat Menus show all temperatures and fan speeds (voltages?).

Share this post


Link to post
Share on other sites

Hola

 

starting to grap info: On the working one "inserting device id" provides me this device id and in this order

 

0x3a35

0x3a34

0x3a36

0x3a37

0x3a38

0x3a39

 

this are the ones with your version 3.0 in this order

 

0x2937

0x2938

0x2939

0x2935

0x2934

0x2936

 

My Bios version is 1303 and my Board Revision 1.02G

 

USB Settings

 

USB Functions -> Enabled

USB 2.0 Controller -> Enabled

USB 2.0 Controller Mode -> High Speed

BIOS EHCI Hand Off -> Enabled

Port 64/60 Emulation -> Disabled

Legacy USB Support -> Auto

 

Thats it... why is the order of the device messed up?? Hope this helps if i have to check something else.. say it :D

 

I presume that your CPU supports the multipliers (6,7,8 and 9) so that isn't a problem, and that DSDT v2.9 works for you? Even with your _PSS object? What if you use DSDT v2.9 with that new _PR scope and PNOT method?/quote]

 

Speedstep working even with my _pss object ?! are they wrong?? testing @3gh

 

testing 2.9

 

Same result as unmodified v3.0

 

Same Device Id but a new order : 0x2935,0x2936 ..........,34,39,37.38

 

.. why is the order of the device messed up?? Hope this helps if i have to check something else.. said it :)

 

Hasta la vista

Share this post


Link to post
Share on other sites
Hola

 

starting to grap info: On the working one "inserting device id" provides me this device id and in this order

 

<snip />

 

Hasta la vista

Hola Amigo,

 

Can you please check the other parts of my comment, while I verify the provided info for you?

 

Edit: Me ducks. I somehow seem to have restored a previous com.apple.Boot.plist with the device-id changes in it. Investigating. Oh yeah. Don't ask me how I did it, but this is definitely my own fault. I cleaned the file up and now my UHCn devices are Expansion slots again. Great. Lets start hacking again.

 

High speed ports are still fine I see.

 

I am very sorry to have caused you and other people here this trouble, but I had no clue about it. Now I have and I will fix my error a.s.a.p.

 

Thank you for catching it!!!

Share this post


Link to post
Share on other sites
I am very sorry to have caused you and other people here this trouble, but I had no clue about it. Now I have and I will fix my error a.s.a.p.

 

Thank you for catching it!!!

 

Don't be sorry ... be happy

 

seems that only two well with you three has had this problem .. for all others it just worked fine B)

 

salu2

Share this post


Link to post
Share on other sites

And the winner is:

				Method (_DSM, 4, NotSerialized)
			{
				Return (MCID (Arg2, 0x34, 0x3a))
			}

Right. We now have a one-liner to set/change device ID's in Method _DSM. This new Method is called MCID and looks like this:

	// New Method V1.0 – By Master Chief.
Method (MCID, 3, NotSerialized)
{
	Name (BUF0, Buffer (0x04) { 0x00, 0x00, 0x00, 0x00 } )
	Store (Arg1, Index (BUF0, Zero))
	Store (Arg2, Index (BUF0,  One))

	Store (Package (0x02)
	{
		"device-id",
		BUF0 
	}, Local0)

	If (LEqual (Arg0, Zero))
	{
		Store (Buffer (One)
		{
			0x03
		}, RefOf (Local0))
	}

	Return (Local0)
}

Resulting in a much easier to read and cleaner copy of Method _DSM. My suggestion is to add my new Method right above or right under Method DTGP in your DSDT. Which should stay as is! Again don't change it!

 

This new Method has opened a door to future improvements and even more code reduction. You might not see what I mean right now, but time will tell.

 

Note: I am using my new Method to change the ID's of my UHCn devices.

 

p.s. I wrote about this on May 28 2009, 01:49 PM but nobody, including me, did anything with it. Until today that is!

 

Have fun!

 

Edit: Version 1.1 will be a slightly different – there will only be two arguments left i.e. Arg2 and one with the new device id (like 0x3a35 for example). That should hopefully make it even easier. We might eventually end up with only one argument, that is if I can figure out what _DSM's Arg2 really is (some package). But enough for today. Done!

Share this post


Link to post
Share on other sites
worked fine for me :) great.... have again a new device id order :)

Thank you for the confirmation!

 

And by "a new device id order" you mean to say that System Profiler keeps changing the order, right? That's just System Profiler. Never mind. You should however not see any changes in IORegistryExplorer. That would be a different story.

Share this post


Link to post
Share on other sites

The movie was a fiasco so here goes V1.1 of my new Method:

    // New Method V1.1 – By Master Chief.
   Method (MCID, 2, NotSerialized)
   {
       Name (BUF0, Buffer (0x04) { Zero, Zero, Zero, Zero } )
       Store (And (Arg1, 0xFF), Index (BUF0, Zero))
       Store (ShiftRight (And (Arg1, 0xFF00), 0x08), Index (BUF0, One))
       Store (Package (0x02)
       {
           "device-id",
           BUF0 
       }, Local0)

       If (LEqual (Arg0, Zero))
       {
           Store (Buffer (One)
           {
               0x03
           }, RefOf (Local0))
       }

       Return (Local0)
   }

Making this possible:

				Method (_DSM, 4, NotSerialized)
			{
				Return (MCID (Arg2, 0x3A34))
			}

Which is again one argument less, making it easier and a bit more logical I hope.

 

Have fun!

Share this post


Link to post
Share on other sites

Method DTGP won't be part of DSDT V3.1 anymore. It is gone! But let's have a quick look at it one more time:

    // New Method.
   Method (DTGP, 5, NotSerialized)
   {
       If (LEqual (Arg0, Buffer (0x10)
               {
                   /* 0000 */    0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 
                   /* 0008 */    0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
               }))
       {
           If (LEqual (Arg1, One))
           {
               If (LEqual (Arg2, Zero))
               {
                   Store (Buffer (One)
                       {
                           0x03
                       }, Arg4)
                   Return (One)
               }

               If (LEqual (Arg2, One))
               {
                   Return (One)
               }
           }
       }

       Store (Buffer (One)
           {
               0x00
           }, Arg4)
       Return (Zero)
   }

Saying bye bye to a 32 liner ghost (nobody really knew what it did). Enter my latest work:

    // New Method V1.0 By Master Chief.
   Method (MCDP, 2, NotSerialized)
   {
       If (LEqual (Arg0, Zero))
       {
           Store (Buffer (One)
           {
               0x03
           }, Arg1)

           Return (One)
       }

       Return (Zero)
   }

Only 14 lines. And two more because I don't like to glue the Returns so 12 if you compare it head to head. But this is not about reducing the number of lines, but to enable future improvements. Which are luring on the horizon already! But anyway. Let's have a look at the callers. Let's start with the old one:

DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

Five argument! Man. I am sure that you all know what those arguments are. Right? Not. Way too many arguments for my taste. Way too expensive (a developer thing). Enter the new one:

MCDP (Arg2, RefOf (Local0))

That's three arguments less. And now remember this one: "This development opened a door to future improvements and code reduction..." because I tell you this: This is only a teaser. Oh yeah. we are going to unleash the beast and squeeze a lot more out of it. Just a matter of time.

 

Let me tell you a short story: In 1985 I single handed developed a library, but nobody wanted to make use of it. And almost everyone said: Why do I need it? Well, until a year later, when I sold a massive 1.8 million copies of this library! And that very same library is still in use. Even today. And no this is not that big, I am very well aware of it thank you, not to mention that I am not selling anything anymore. But this is a great start for future improvements... and this is a free country, so you either use it... or ignore it. Whatever suits you best. I'm fine with it ;)

 

Happy Hacking!

Share this post


Link to post
Share on other sites
Method DTGP won't be part of DSDT V3.1 anymore. It is gone! But let's have a quick look at it one more time:
    // New Method.
   Method (DTGP, 5, NotSerialized)
   {
       If (LEqual (Arg0, Buffer (0x10)
               {
                   /* 0000 */    0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 
                   /* 0008 */    0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
               }))
       {
           If (LEqual (Arg1, One))
           {
               If (LEqual (Arg2, Zero))
               {
                   Store (Buffer (One)
                       {
                           0x03
                       }, Arg4)
                   Return (One)
               }

               If (LEqual (Arg2, One))
               {
                   Return (One)
               }
           }
       }

       Store (Buffer (One)
           {
               0x00
           }, Arg4)
       Return (Zero)
   }

Saying bye bye to a 32 liner ghost (nobody really knew what it did). Enter my latest work:

    // New Method V1.0 By Master Chief.
   Method (MCDP, 2, NotSerialized)
   {
       If (LEqual (Arg0, Zero))
       {
           Store (Buffer (One)
           {
               0x03
           }, Arg1)

           Return (One)
       }

       Return (Zero)
   }

Only 14 lines. And two more because I don't like to glue the Returns so 12 if you compare it head to head. But this is not about reducing the number of lines, but to enable future improvements. Which are luring on the horizon already! But anyway. Let's have a look at the callers. Let's start with the old one:

DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

Five argument! Man. I am sure that you all know what those arguments are. Right? Not. Way too many arguments for my taste. Way too expensive (a developer thing). Enter the new one:

MCDP (Arg2, RefOf (Local0))

That's three arguments less. And now remember this one: "This development opened a door to future improvements and code reduction..." because I tell you this: This is only a teaser. Oh yeah. we are going to unleash the beast and squeeze a lot more out of it. Just a matter of time.

 

Let me tell you a short story: In 1985 I single handed developed a library, but nobody wanted to make use of it. And almost everyone said: Why do I need it? Well, until a year later, when I sold a massive 1.8 million copies of this library! And that very same library is still in use. Even today. And no this is not that big, I am very well aware of it thank you, not to mention that I am not selling anything anymore. But this is a great start for future improvements... and this is a free country, so you either use it... or ignore it. Whatever suits you best. I'm fine with it :D

 

Happy Hacking!

 

Both new methods working fine for me on the P5K VM, great work (have still sleep issues). I'm sure there are many that appreciate your effort and expertise. -Thanks

Share this post


Link to post
Share on other sites
Both new methods working fine for me on the P5K VM, great work (have still sleep issues). I'm sure there are many that appreciate your effort and expertise. -Thanks

Thank you for the confirmation!

 

And I am currently working on a third update. Sort of an after dinner update for MCID (ripping six more lines). Getting ready for some serious work Done!

 

    // New Method V1.2 – By Master Chief.
   Method (MCID, 2, NotSerialized)
   {
       Name (BUF0, Buffer (0x04) { Zero, Zero, Zero, Zero } )
       Store (And (Arg1, 0xFF), Index (BUF0, Zero))
       Store (ShiftRight (And (Arg1, 0xFF00), 0x08), Index (BUF0, One))

       Store (Package (0x02)
       {
           "device-id",
           BUF0 
       }, Local0)

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

This is a rather small change. And a pretty obvious one to some, but here it is. That's it for today I think ;)

 

Edit: Ok. So I was looking at Method MCDP and asked myself: "What's with the returns?" I mean since we don't need them (are not used) and thus enter another small update:

    // New Method V1.1 By Master Chief.
   Method (MCDP, 2, NotSerialized)
   {
       If (LEqual (Arg0, Zero)) // Function index: 0
       {
           Store (Buffer (One)
           {
               0x03
           }, Arg1)
       }
   }

Next up _DSM's Arg2 (Arg0 in the above Method). I'm still puzzled by it. I mean it should be an integer (conform ACPI specs) but I can't seem to use Zero as Arg0. It might be a package or buffer after all. So much for specifications... thanks to Apple of course.

Share this post


Link to post
Share on other sites

Buenas noches

 

made all changes conform mcdp v1.1 and everything working as good as before.

 

salu2

Share this post


Link to post
Share on other sites
Buenas noches

 

made all changes conform mcdp v1.1 and everything working as good as before.

 

salu2

Perfecto!

 

Gracias por confirmación.

 

 

To all: I installed VMware Fusion v3 and now have a Snow Leopard 10.6.1 virtual machine running on my hack. Hopefully no more reboots for dsdt.aml testing – that is if I can figure out how to do it :rolleyes:

Share this post


Link to post
Share on other sites

Master Chief, thanks alot for you research, im porting MacPro3,1 to Gigabyte (p35(ich9r) and p45(ich10) chips) now...

For now it looks great, going to post it public after all.

Thanks alot and keep up the great research!

Share this post


Link to post
Share on other sites
Master Chief, thanks alot for you research, im porting MacPro3,1 to Gigabyte (p35(ich9r) and p45(ich10) chips) now...

For now it looks great, going to post it public after all.

Thanks alot and keep up the great research!

Thank you very much! And I hope to be able to share a few more updates in the near future.

Share this post


Link to post
Share on other sites

Hi master chief,

 

I try you 3.0 modification on my DSDT file and now with this new one I can't boot on Leopard,

I have a waiting for boot device ?

 

here are may two dsdt :

2.9 who work :

3.0 who doesn't wotk :

 

regards,

Barnum

 

PS : Is it possible to activate SATA hotplug ?

Share this post


Link to post
Share on other sites

Hi again Master chief,

                    Method (_QCD, 0, NotSerialized)
                   {
                       If (CDIN)
                       {
                           Notify (\_SB.PCI0.SATA.PRT2, 0x81)
                       }
                       Else
                       {
                           Notify (\_SB.PCI0.SATA.PRT2, 0x82)
                       }
                   }

What is used for ?

 

Barnum

Share this post


Link to post
Share on other sites
Master Chief, thanks alot for you research, im porting MacPro3,1 to Gigabyte (p35(ich9r) and p45(ich10) chips) now...

For now it looks great, going to post it public after all.

Thanks alot and keep up the great research!

 

Looking forward for Gigabyte P35. :angel:

Share this post


Link to post
Share on other sites
Looking forward for Gigabyte P35. ;)

Just in case you missed it: Join us here for DSDT hacks for GB boards.

 

Hi again Master chief,

 

Method (_QCD, 0, NotSerialized)

{

If (CDIN) {

Notify (\_SB.PCI0.SATA.PRT2, 0x81)

}

Else {

Notify (\_SB.PCI0.SATA.PRT2, 0x82)

}

}

What is used for ?

 

Barnum

_QCD is an ACPI event and when triggered this control Method is called. It checks a bit on the EC (Embedded Controller) to see if a CD is inserted. We don't have one (obviously) since this is an OEM (Apple) specific micro controller (mostly used in notebooks) but the ACPI events do fire. And the goal is to mimic some of the features in a future update so we had to start by adding this Device.

 

p.s. Please attach ZIP files as I won't open RAR files from anyone (a security precaution).

Share this post


Link to post
Share on other sites

when we have Notify (\_SB.PCI0.SATA.PRT2 :

we do something on sata port 3 ? or there is no relation between the PRT device we declare and the sata port ?

Share this post


Link to post
Share on other sites
when we have Notify (\_SB.PCI0.SATA.PRT2 :

we do something on sata port 3 ?

We trigger an event yes. And this is usually the lower right black SATA connector on your motherboard. This should thus point to the port where your CD/DVD drive is attached.

 

Are you having troubles with the HD on that port?

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.

×