HP Compaq DSDTs are known to be full of errors. Mine, for example, showed 67 compile errors. Ugly
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
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)
}
})
}
{
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)
}
}
{
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)
})
{
C179 (0x87)
})
to
CODE
If (LEqual (Local0, 0x03))
{
\_TZ.C381 (C179 (0x87))
}
,{
\_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
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!
