Page 1 of 1

ACPI objects format

Posted: Wed Jun 13, 2012 12:18 am
by melgmry0101b
Hi everyone,
I was going to support some more things in the ACPI , but i didn't find useful data about the ACPI objects , and the specifications assume that you are writing an AML interpreter , so i am wondering , from where did "kaworu" get this format :

Code: Select all

bytecode of the \_S5 object
-----------------------------------------
        | (optional) |    |    |    |
NameOP | \          | _  | S  | 5  | _
08     | 5A         | 5F | 53 | 35 | 5F

-----------------------------------------------------------------------------------------------------------
           |           |              | ( SLP_TYPa   ) | ( SLP_TYPb   ) | ( Reserved   ) | (Reserved    )
PackageOP | PkgLength | NumElements  | byteprefix Num | byteprefix Num | byteprefix Num | byteprefix Num
12        | 0A        | 04           | 0A         05  | 0A          05 | 0A         05  | 0A         05

----this-structure-was-also-seen----------------------
PackageOP | PkgLength | NumElements |
12        | 06        | 04          | 00 00 00 00
in this thread : http://forum.osdev.org/viewtopic.php?t=16990 ?
and is there anywhere that provides information about the ACPI objects and how to use them ?
--------------------
Thanks in advance.

Re: ACPI objects format

Posted: Wed Jun 13, 2012 6:21 am
by Cognition
It's in the AML Specification. Which is under chapter 20 of the ACPI specification 5.0. Generally if you're looking for ACPI support it's much quicker to simply use ACPICA you'll need a fair amount of support for various buses and what not, but it beats writing your own AML interpreter.

Re: ACPI objects format

Posted: Thu Jun 14, 2012 7:21 am
by jnc100
I strongly suggest you do not assume the layout found in the linked thread. There is nothing whatsoever to require the bytecode to be laid out in exactly that way. In addition, there may be more than one _S5 object in the namespace, but only one is active at a particular time due to, e.g. if...then...else clauses at the outermost scope (AML allows if statements outside of methods) or the _S5 object may be in an SSDT rather than the DSDT etc etc. Use a proper AML interpreter to do the work for you (write one/use ACPICA as mentioned above).

Regards,
John.