1 /* $NetBSD: acpireg.h,v 1.5 2005/12/11 12:21:02 christos Exp $ */
4 * Copyright 2001 Wasabi Systems, Inc.
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed for the NetBSD Project by
20 * Wasabi Systems, Inc.
21 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22 * or promote products derived from this software without specific prior
25 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
39 * This file defines various ACPI event messages, etc.
43 * 5.6.3: Device Object Notifications
46 /* Device Object Notification Types */
47 #define ACPI_NOTIFY_BusCheck 0x00
48 #define ACPI_NOTIFY_DeviceCheck 0x01
49 #define ACPI_NOTIFY_DeviceWake 0x02
50 #define ACPI_NOTIFY_EjectRequest 0x03
51 #define ACPI_NOTIFY_DeviceCheckLight 0x04
52 #define ACPI_NOTIFY_FrquencyMismatch 0x05
53 #define ACPI_NOTIFY_BusModeMismatch 0x06
54 #define ACPI_NOTIFY_PowerFault 0x07
55 /* 0x08 - 0x7f reserved */
57 /* Control Method Battery Device Notification Types */
58 #define ACPI_NOTIFY_BatteryStatusChanged 0x80
59 #define ACPI_NOTIFY_BatteryInformationChanged 0x81
61 /* Power Source Object Notification Types */
62 #define ACPI_NOTIFY_PowerSourceStatusChanged 0x80
64 /* Thermal Zone Object Notication Types */
65 #define ACPI_NOTIFY_ThermalZoneStatusChanged 0x80
66 #define ACPI_NOTIFY_ThermalZoneTripPointsChanged 0x81
67 #define ACPI_NOTIFY_DeviceListsChanged 0x82
69 /* Control Method Power Button Notification Types */
70 #define ACPI_NOTIFY_S0PowerButtonPressed 0x80
72 /* Control Method Sleep Button Notification Types */
73 #define ACPI_NOTIFY_S0SleepButtonPressed 0x80
75 /* Control Method Lid Notification Types */
76 #define ACPI_NOTIFY_LidStatusChanged 0x80
78 /* Processor Device Notification Values */
79 #define ACPI_NOTIFY_PerformancePresentCapabilitiesChanged 0x80
80 #define ACPI_NOTIFY_CStatesChanged 0x81
85 * 6.1: Device Identification Objects
87 * _ADR Object that evaluates to a device's address on
90 * _CID Object that evaluates to a device's Plug and Play
93 * _DDN Object that associates a logical software name
94 * (for example, COM1) with a device.
96 * _HID Object that evaluates to a device's Plug and Play
99 * _SUN Objcet that evaluates to the slot-unique ID number
102 * _STR Object that contains a Unicode identifier for a device.
104 * _UID Object that specifies a device's unique persistent ID,
105 * or a control method that generates it.
109 * 6.1.1: _ADR (Address)
111 * EISA EISA slot numnber 0-f
113 * Floppy Bus Drive select values used for programming
114 * the floppy controller to access the
115 * specified INT13 unit number. The _ADR
116 * objects should be sorted based on drive
117 * select encoding from 0-3.
119 * IDE controller 0 - primary channel, 1 - secondary channel
121 * IDE channel 0 - master drive, 1 - slave drive
123 * PCI High word - Device #, Low word - Function #
124 * 0xffff == all functions on a device
126 * PCMCIA Socket #; 0 == first socket
128 * PC Card Socket #; 0 == first socket
130 * SMBus Lowest slave address
132 * USB Root Hub Only one child of the host controller, must
135 * USB ports port number
137 #define ACPI_ADR_PCI_DEV(x) (((x) >> 16) & 0xffff)
138 #define ACPI_ADR_PCI_FUNC(x) ((x) & 0xffff)
139 #define ACPI_ADR_PCI_ALLFUNCS 0xffff
142 * 6.1.2: _CID (Compatible ID)
146 * 6.1.3: _DDN (Device Name)
150 * 6.1.4: _HID (Hardware ID)
154 * 6.1.5: _STR (String)
158 * 6.1.6: _SUN (Slot User Number)
162 * 6.1.7: _UID (Unique ID)
166 * 6.2: Device Configuration Objects
168 * _CRS Object that specifies a device's *current* resource
169 * settings, or a control method that generates such
172 * _DIS Control method that disables a device.
174 * _DMA Object that specifies a device's *current* resources
175 * for DMA transactions.
177 * _FIX Object used to provide correlation between the
178 * fixed-hardware register blocks defined in the FADT
179 * and the devices that implement these fixed-hardware
182 * _HPP Object that specifies the cache-line size, latency
183 * timer, SERR enable, and PERR enable values to be
184 * used when configuring a PCI device inserted into
185 * a hot-plug slot or initial configuration of a PCI
186 * device at system boot.
188 * _MAT Object that evaluates to a buffer of MADT APIC
191 * _PRS An object that specifies a device's *possible*
192 * resource settings, or a control method that
193 * generates such an object.
195 * _PRT Object that specifies the PCI interrupt routing
198 * _PXM Object that specifies a proximity domain for a device.
200 * _SRS Control method that sets a device's settings.
204 * 6.2.1: _CRS (Current Resource Settings)
208 * 6.2.2: _DIS (Disable)
212 * 6.2.3: _DMA (Direct Memory AccesS)
216 * 6.2.4: _FIX (Fixed Register Resource Provider)
220 * 6.2.5: _HPP (Hot Plug Parameters)
224 * 6.2.6: _MAT (Multiple APIC Table Entry)
228 * 6.2.7: _PRS (Possible Resource Settings)
232 * 6.2.8: _PRT (PCI Routing Table)
236 * 6.2.9: _PXM (Proximity)
240 * 6.2.10: _SRS (Set Resource Settings)
244 * 6.3: Device Insertion and Removal Objects
246 * _EDL Object that evaluates to a package of namespace
247 * references of device objects that depend on
248 * the device containing _EDL. Whenever the named
249 * devices is ejected, OSPM ejects all dependent
252 * _EJD Object that evaluates to the name of a device object
253 * on which a device depends. Whenever the named
254 * device is ejected, the dependent device must receive
255 * an ejection notification.
257 * _EJx Control method that ejects a device.
259 * _LCK Control method that locks or unlocks a device.
261 * _RMV Object that indicates that the given device is
264 * _STA Control method that returns a device's status.
268 * 6.3.1: _EDL (Eject Device List)
272 * 6.3.2: _EJD (Ejection Dependent Device)
276 * 6.3.3: _EJx (Eject)
278 * x Indicates sleeping state at which device
287 * 6.3.5: _RMV (Remove)
291 * 6.3.6: _STA (Status) for device insertion/removal
293 #define ACPI_STA_DEV_PRESENT 0x00000001 /* device present */
294 #define ACPI_STA_DEV_ENABLED 0x00000002 /* enabled (decoding res.) */
295 #define ACPI_STA_DEV_SHOW 0x00000004 /* show device in UI */
296 #define ACPI_STA_DEV_OK 0x00000008 /* functioning properly */
297 #define ACPI_STA_DEV_BATT 0x00000010 /* battery present */
300 * 6.4: Resource Data Types for ACPI
302 * Used by the _CRS, _PRS, and _SRS methods.
306 * 7.1.4: _STA (Status) for power resource current state
308 #define ACPI_STA_POW_OFF 0 /* power resource off */
309 #define ACPI_STA_POW_ON 1 /* power resource on */
312 * ACPI driver components
315 #define ACPI_BUS_COMPONENT 0x00010000
316 #define ACPI_ACAD_COMPONENT 0x00020000
317 #define ACPI_BAT_COMPONENT 0x00040000
318 #define ACPI_BUTTON_COMPONENT 0x00080000
319 #define ACPI_EC_COMPONENT 0x00100000
320 #define ACPI_LID_COMPONENT 0x00200000
321 #define ACPI_RESOURCE_COMPONENT 0x00400000
322 #define ACPI_TZ_COMPONENT 0x00800000