blob: 407d61ead19ab1552bc9512e6814aea649df4750 [file] [log] [blame]
Michael S. Tsirkinc736f0a2011-10-04 15:26:19 +02001/* This file is the basis for the ssdt table generated in src/acpi.c.
Kevin O'Connore2074bf2010-08-03 21:30:03 -04002 * 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 *
Kevin O'Connore2074bf2010-08-03 21:30:03 -04007 * 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 */
Michael S. Tsirkin2e55b032011-10-26 23:28:02 +020017
18ACPI_EXTRACT_ALL_CODE ssdp_proc_aml
19
Kevin O'Connore2074bf2010-08-03 21:30:03 -040020DefinitionBlock ("ssdt-proc.aml", "SSDT", 0x01, "BXPC", "BXSSDT", 0x1)
Kevin O'Connore2074bf2010-08-03 21:30:03 -040021{
Michael S. Tsirkinc736f0a2011-10-04 15:26:19 +020022 ACPI_EXTRACT_PROCESSOR_START ssdt_proc_start
23 ACPI_EXTRACT_PROCESSOR_END ssdt_proc_end
24 ACPI_EXTRACT_PROCESSOR_STRING ssdt_proc_name
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050025 Processor(CPAA, 0xAA, 0x0000b010, 0x06) {
Michael S. Tsirkinc736f0a2011-10-04 15:26:19 +020026 ACPI_EXTRACT_NAME_BYTE_CONST ssdt_proc_id
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050027 Name(ID, 0xAA)
Michael S. Tsirkinc736f0a2011-10-04 15:26:19 +020028/*
29 * The src/acpi.c code requires the above ACP_EXTRACT tags so that it can update
Kevin O'Connore2074bf2010-08-03 21:30:03 -040030 * CPAA and 0xAA with the appropriate CPU id (see
31 * SD_OFFSET_CPUHEX/CPUID1/CPUID2). Don't change the above without
32 * also updating the C code.
33 */
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050034 Name(_HID, "ACPI0007")
Kevin O'Connore2074bf2010-08-03 21:30:03 -040035 External(CPMA, MethodObj)
36 External(CPST, MethodObj)
37 External(CPEJ, MethodObj)
38 Method(_MAT, 0) {
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050039 Return (CPMA(ID))
Kevin O'Connore2074bf2010-08-03 21:30:03 -040040 }
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050041 Method(_STA, 0) {
42 Return (CPST(ID))
Kevin O'Connore2074bf2010-08-03 21:30:03 -040043 }
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050044 Method(_EJ0, 1, NotSerialized) {
Kevin O'Connore2074bf2010-08-03 21:30:03 -040045 CPEJ(ID, Arg0)
46 }
47 }
48}