a4616369c710f2b52b63d04e2c9b1d9d9cd63fde
[seabios.git] / src / ssdt-proc.dsl
1 /* This file is the basis for the ssdt table generated in src/acpi.c.
2  * It defines the contents of the per-cpu Processor() object.  At
3  * runtime, a dynamically generated SSDT will contain one copy of this
4  * AML snippet for every possible cpu in the system.  The objects will
5  * be placed in the \_SB_ namespace.
6  *
7  * In addition to the aml code generated from this file, the
8  * src/acpi.c file creates a NTFY method with an entry for each cpu:
9  *     Method(NTFY, 2) {
10  *         If (LEqual(Arg0, 0x00)) { Notify(CP00, Arg1) }
11  *         If (LEqual(Arg0, 0x01)) { Notify(CP01, Arg1) }
12  *         ...
13  *     }
14  * and a CPON array with the list of active and inactive cpus:
15  *     Name(CPON, Package() { One, One, ..., Zero, Zero, ... })
16  */
17 DefinitionBlock ("ssdt-proc.aml", "SSDT", 0x01, "BXPC", "BXSSDT", 0x1)
18 {
19     ACPI_EXTRACT_PROCESSOR_START ssdt_proc_start
20     ACPI_EXTRACT_PROCESSOR_END ssdt_proc_end
21     ACPI_EXTRACT_PROCESSOR_STRING ssdt_proc_name
22     Processor (CPAA, 0xAA, 0x0000b010, 0x06) {
23         ACPI_EXTRACT_NAME_BYTE_CONST ssdt_proc_id
24         Name (ID, 0xAA)
25 /*
26  * The src/acpi.c code requires the above ACP_EXTRACT tags so that it can update
27  * CPAA and 0xAA with the appropriate CPU id (see
28  * SD_OFFSET_CPUHEX/CPUID1/CPUID2).  Don't change the above without
29  * also updating the C code.
30  */
31         Name (_HID, "ACPI0007")
32         External(CPMA, MethodObj)
33         External(CPST, MethodObj)
34         External(CPEJ, MethodObj)
35         Method(_MAT, 0) {
36             Return(CPMA(ID))
37         }
38         Method (_STA, 0) {
39             Return(CPST(ID))
40         }
41         Method (_EJ0, 1, NotSerialized) {
42             CPEJ(ID, Arg0)
43         }
44     }
45 }