ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

> DSDT

Differentiated System Description Table (DSDT) - DSDT is a part of the ACPI specification and it supplies configuration information about a base system. ACPI capable computers come with a preinstalled DSDT from the manufacturer. A common Linux/OS X problem is missing ACPI functionality (fans not running, laptop screens not shutting off, etc.)

This subforum is dedicated to patches/fixes able to be inserted/modified from an extracted dsdt.dsl, which is then compiled into a DSDT.aml for OS X to pick up and use (with a proper bootloader).

These fixes are not permanent, and do not damage your BIOS.

 
Start a new topic Add Reply
> Fixing Dsdt Errors For Hp Compaq
pyildirim
post Jul 18 2010, 05:01 PM
Post #1
WARNING: check post below this one for more up-to-date info.

HP Compaq DSDTs are known to be full of errors. Mine, for example, showed 67 compile errors. Ugly smile.gif And I saw a lot of people dealing with that, and probably leaving it alone after some time, thus giving up with OS X.

In fact, thing is quite simple. For some reason, MS's compiler allowed some pretty silly constructions to be compiled. Let me take an example:

First of all, delete
CODE
ACPI Error: Argument count mismatch for method \_TZ_.C381 1 0 (20100331/dmextern-387)

(or similar) on the first line. Then, compiler will give you (something similar, this is particulary for HP 8710p notebook):
CODE
$ iasl -ta -vi dsdt.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20100702 [Jul 2 2010]
Copyright © 2000 - 2010 Intel Corporation
Supports ACPI Specification Revision 4.0a

dsdt.dsl(758) : Error 4122 - Invalid combination of Length and Min/Max fixed
flags
dsdt.dsl(765) : Error 4118 - Length is not equal to fixed Min/Max window
dsdt.dsl(3604) : Error 4064 - Object does not exist (\_TZ.C16E)
dsdt.dsl(3665) : Error 4001 - String must be entirely alphanumeric (*pnp0c14)

dsdt.dsl(4211) : Warning 1088 - Not all control paths return a value (WMAB)
dsdt.dsl(4817) : Remark 5048 - Initializer list shorter than declared package
length
dsdt.dsl(5253) : Error 4064 - Object does not exist (\_TZ.C1F9)
dsdt.dsl(5254) : Error 4064 - Object does not exist (\_TZ.C1FA)
dsdt.dsl(5254) : Error 4064 - Object does not exist (\_TZ.C1FA)
dsdt.dsl(5255) : Error 4064 - Object does not exist (\_TZ.C1F9)
dsdt.dsl(5256) : Error 4064 - Object does not exist (\_TZ.TZ4)
dsdt.dsl(5352) : Error 4064 - Object does not exist (\_TZ.C1FE)
dsdt.dsl(5749) : Error 4065 - Object not found or not accessible from scope (
^^C22A)
dsdt.dsl(5750) : Error 4064 - Object does not exist (\_SB.C22B)
dsdt.dsl(5838) : Error 4064 - Object does not exist (\_SB.C233)
dsdt.dsl(8382) : Error 4064 - Object does not exist (C281)
dsdt.dsl(8843) : Error 4064 - Object does not exist (\_SB.C2B2)
dsdt.dsl(9280) : Warning 1105 - Possible operator timeout is ignored
dsdt.dsl(16338) : Error 4096 - parse error, expecting `','' or `')''
dsdt.dsl(16348) : Error 4096 - parse error
dsdt.dsl(16355) : Error 4096 - parse error
dsdt.dsl(16361) : Error 4064 - Object does not exist (C361)
dsdt.dsl(16367) : Error 4064 - Object does not exist (C389)
dsdt.dsl(16370) : Error 4064 - Object does not exist (C361)
dsdt.dsl(16386) : Error 4064 - Object does not exist (C389)
dsdt.dsl(16399) : Error 4064 - Object does not exist (C37F)
dsdt.dsl(16400) : Error 4064 - Object does not exist (C37F)
dsdt.dsl(16400) : Error 4064 - Object does not exist (C37F)
dsdt.dsl(16407) : Error 4064 - Object does not exist (\_TZ.TZ3)
dsdt.dsl(16440) : Error 4064 - Object does not exist (C36F)
dsdt.dsl(16445) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16450) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16458) : Error 4064 - Object does not exist (C36F)
dsdt.dsl(16463) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16468) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16476) : Error 4064 - Object does not exist (C36F)
dsdt.dsl(16481) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16486) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16494) : Error 4064 - Object does not exist (C36F)
dsdt.dsl(16499) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16504) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16512) : Error 4064 - Object does not exist (C36F)
dsdt.dsl(16517) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16522) : Error 4064 - Object does not exist (C370)
dsdt.dsl(16530) : Error 4064 - Object does not exist (\_TZ.C38A)
dsdt.dsl(16531) : Error 4064 - Object does not exist (\_TZ.C38B)
dsdt.dsl(16586) : Error 4064 - Object does not exist (C37C)
dsdt.dsl(16599) : Error 4064 - Object does not exist (C37C)
dsdt.dsl(16604) : Error 4064 - Object does not exist (C37E)
dsdt.dsl(16612) : Error 4064 - Object does not exist (C37C)
dsdt.dsl(16630) : Error 4064 - Object does not exist (C37E)
dsdt.dsl(16659) : Error 4096 - parse error, expecting `$'
ASL Input: dsdt.dsl - 17239 lines, 647235 bytes, 7247 keywords
Compilation complete. 49 Errors, 2 Warnings, 1 Remarks, 2404 Optimizations


Whoa! So many undefined objects? What the hell they were coding here? Fortunately, this is just an illusion. Take look at this:
CODE
dsdt.dsl(16338) : Error    4096 - parse error, expecting `','' or `')''


Let's see what's happening:
CODE
If (LEqual (Arg0, 0x00))
{
    C381 (Else
        {
            If (LLess (Arg0, 0x04))
            {
                C38C (Local0, Arg0)
            }
            Else
            {
                Notify (\_TZ.TZ4, 0x81)
            }
        })
}


This obvious crap should be replaced with:
CODE
If (LEqual (Arg0, 0x00))
{
    C381 ()
}
Else
{
    If (LLess (Arg0, 0x04))
    {
        C38C (Local0, Arg0)
    }
    Else
    {
        Notify (\_TZ.TZ4, 0x81)
    }
}

because C381 requires 0 parameters (you can see it near the header of your file). In the same fashion, change
CODE
\_TZ.C381 (If (LEqual (Local0, 0x03))
{
   C179 (0x87)
})

to
CODE
If (LEqual (Local0, 0x03))
{
   \_TZ.C381 (C179 (0x87))
}
,
as \_TZ.C381 requires 1 parameter. Now, invoking IASL gives this:
CODE
$ iasl -ta -vi dsdt.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20100702 [Jul 2 2010]
Copyright © 2000 - 2010 Intel Corporation
Supports ACPI Specification Revision 4.0a

dsdt.dsl(758) : Error 4122 - Invalid combination of Length and Min/Max fixed
flags
dsdt.dsl(765) : Error 4118 - Length is not equal to fixed Min/Max window
dsdt.dsl(3665) : Error 4001 - String must be entirely alphanumeric (*pnp0c14)

dsdt.dsl(4211) : Warning 1088 - Not all control paths return a value (WMAB)
dsdt.dsl(4817) : Remark 5048 - Initializer list shorter than declared package
length
dsdt.dsl(9280) : Warning 1105 - Possible operator timeout is ignored
ASL Input: dsdt.dsl - 17503 lines, 654984 bytes, 7693 keywords
Compilation complete. 3 Errors, 2 Warnings, 1 Remarks, 2701 Optimizations


No more undefined objects, and only 3 errors! These errors are easily solved (and they'll probably differ). At the end I got completely error-free DSDT (with a lot optimizations) working pretty fine with OS X.

I hope this will help you if you're using some of HP's computers/notebooks. Good luck!

This post has been edited by pyildirim: Aug 31 2010, 10:00 PM
pyildirim
post Aug 31 2010, 09:59 PM
Post #2
Just a small update: it seems that IASL and MSASL are generating different AMLs for the same code. So, if anyone has a DSDT compiled with MSASL (you'll see MSFT as compiler id in the comments section near the beggining of your DSDT), don't use IASL to decompile it. Use MSASL (found here: http://download.microsoft.com/download/2/c...ler-v4-0-0.msi). So:

  • Get your DSDT dump (binary), then decompile it with MSASL (using asl /u dsdt.aml).
  • Now compile it with IASL, which is still needed for proper OSX support (MSASL generates code which behaves correctly with Windows acpi.sys, but not with Mac OS X's built-in ACPI parser). If you have any errors, fix them.
  • Now, decompile your new AML (generated with IASL) with IASL (using iasl -d dsdt.aml). Why this? Well, IASL generates more user-friendly code than MSASL. Take the following example: im MSASL code you wont find something like Name (_HID, "PNP0c0b") , but Name (_HID, Package ( 0x..., )) where dots are hex values for PNP0c0b. This is not good, especially because Compaq DSDT's are using masked device names (not HPET ot EHCI but C025 or C112), so only way to find a device is to use it's address or ACPI name.


Hope that this will help you a little bit.

P.S. Tip for some other fixes: if you cannot find your PATA/SATA controller, they're located in your SSDT, namely HPQSAT and HPQPAT. You can simply c/p code in your DSDT and add DropSSDT=Yes to your Chameleon.

P.P.S. It seems that MSASL code fixed many compile errors mentioned above. Now you're stuck with some errors which are due MSASL's very weird way of generating method arguments. Ie. except
CODE
\_TZ.C225 (Local0)
you'll get
CODE
\_TZ.C255
Local0


This post has been edited by pyildirim: Aug 31 2010, 10:04 PM
XPbIM3
post Sep 17 2010, 11:39 AM
Post #3
Hi
what about "both cores" issue on your HP? are you running on both cores with no problems?
and USB, are you experiencing any EHCI errors?
P6TSE, i7 920 @4.2Ghz, GTS250, 10.6.4 x64
HP TC4400, C2D T7200 running on both cores ;)
XPbIM3
post Sep 17 2010, 10:33 PM
Post #4
HPQSAT.dsl, extracted from SSDT:
QUOTE
External (C0EC, MethodObj) // 6 Arguments



in DSDT:
QUOTE
Method (C0EC, 5, Serialized)



angry.gif
P6TSE, i7 920 @4.2Ghz, GTS250, 10.6.4 x64
HP TC4400, C2D T7200 running on both cores ;)
pyildirim
post Sep 20 2010, 10:23 AM
Post #5
QUOTE (XPbIM3 @ Sep 17 2010, 10:33 PM) *
HPQSAT.dsl, extracted from SSDT:



in DSDT:



angry.gif


Remove additional argument smile.gif Or just change it to match 6 arguments smile.gif
Compaq DSDTs are full of this crap ... so you'll have to analyze code a little bit smile.gif

USB and cores are working OK w/o patch (Core2Duo T9300, USB shown as native smile.gif )

This post has been edited by pyildirim: Sep 20 2010, 10:25 AM
XPbIM3
post Sep 20 2010, 11:12 AM
Post #6
QUOTE (pyildirim @ Sep 20 2010, 04:23 PM) *
Remove additional argument smile.gif Or just change it to match 6 arguments smile.gif
Compaq DSDTs are full of this crap ... so you'll have to analyze code a little bit smile.gif

USB and cores are working OK w/o patch (Core2Duo T9300, USB shown as native smile.gif )


Just removed the whole method. Aaccording to ACPI spec method _STM is responsible of IDE synchronization routies so I left IDE device section just "naked".
Still fighting for dual core...

P6TSE, i7 920 @4.2Ghz, GTS250, 10.6.4 x64
HP TC4400, C2D T7200 running on both cores ;)

Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: