acpi: add aml_reserved_field() term
[qemu/ar7.git] / hw / i386 / ssdt-mem.dsl
blob22ff5ddfc3e3f95aacc53223e48a33c8da93f425
1 /*
2  * Memory hotplug ACPI DSDT static objects definitions
3  *
4  * Copyright ProfitBricks GmbH 2012
5  * Copyright (C) 2013-2014 Red Hat Inc
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, see <http://www.gnu.org/licenses/>
19  */
21 /* This file is the basis for the ssdt_mem[] variable in src/acpi.c.
22  * It defines the contents of the memory device object.  At
23  * runtime, a dynamically generated SSDT will contain one copy of this
24  * AML snippet for every possible memory device in the system.  The
25  * objects will be placed in the \_SB_ namespace.
26  *
27  * In addition to the aml code generated from this file, the
28  * src/acpi.c file creates a MTFY method with an entry for each memdevice:
29  *     Method(MTFY, 2) {
30  *         If (LEqual(Arg0, 0x00)) { Notify(MP00, Arg1) }
31  *         If (LEqual(Arg0, 0x01)) { Notify(MP01, Arg1) }
32  *         ...
33  *     }
34  */
35 #include "hw/acpi/pc-hotplug.h"
37 ACPI_EXTRACT_ALL_CODE ssdm_mem_aml
39 DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1)
42     External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD, MethodObj)
43     External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD, MethodObj)
44     External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD, MethodObj)
45     External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD, MethodObj)
47     Scope(\_SB) {
48 /*  v------------------ DO NOT EDIT ------------------v */
49         ACPI_EXTRACT_DEVICE_START ssdt_mem_start
50         ACPI_EXTRACT_DEVICE_END ssdt_mem_end
51         ACPI_EXTRACT_DEVICE_STRING ssdt_mem_name
52         Device(MPAA) {
53             ACPI_EXTRACT_NAME_STRING ssdt_mem_id
54             Name(_UID, "0xAA")
55 /*  ^------------------ DO NOT EDIT ------------------^
56  * Don't change the above without also updating the C code.
57  */
58             Name(_HID, EISAID("PNP0C80"))
60             Method(_CRS, 0) {
61                 Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD(_UID))
62             }
64             Method(_STA, 0) {
65                 Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD(_UID))
66             }
68             Method(_PXM, 0) {
69                 Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD(_UID))
70             }
72             Method(_OST, 3) {
73                 \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD(_UID, Arg0, Arg1, Arg2)
74             }
75         }
76     }