Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/acpi/IOACPITypes.h

Source at commit 1146 created 12 years 11 months ago.
By azimutz, Sync with trunk (r1145). Add nVidia dev id's, 0DF4 for "GeForce GT 450M" (issue 99) and 1251 for "GeForce GTX 560M" (thanks to oSxFr33k for testing).
1/*
2 * Copyright (c) 2003-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23#ifndef __IOKIT_IOACPITYPES_H
24#define __IOKIT_IOACPITYPES_H
25
26#include <IOKit/IOMessage.h>
27
28extern const IORegistryPlane * gIOACPIPlane;
29extern const OSSymbol * gIOACPIHardwareIDKey;
30extern const OSSymbol * gIOACPIUniqueIDKey;
31extern const OSSymbol * gIOACPIAddressKey;
32extern const OSSymbol * gIOACPIDeviceStatusKey;
33
34#pragma pack(1)
35
36struct IOACPIAddressSpaceDescriptor {
37 UInt32 resourceType;
38 UInt32 generalFlags;
39 UInt32 typeSpecificFlags;
40 UInt32 reserved1;
41 UInt64 granularity;
42 UInt64 minAddressRange;
43 UInt64 maxAddressRange;
44 UInt64 translationOffset;
45 UInt64 addressLength;
46 UInt64 reserved2;
47 UInt64 reserved3;
48 UInt64 reserved4;
49};
50
51enum {
52 kIOACPIMemoryRange = 0,
53 kIOACPIIORange = 1,
54 kIOACPIBusNumberRange = 2
55};
56
57typedef UInt32 IOACPIAddressSpaceID;
58
59enum {
60 kIOACPIAddressSpaceIDSystemMemory = 0,
61 kIOACPIAddressSpaceIDSystemIO = 1,
62 kIOACPIAddressSpaceIDPCIConfiguration = 2,
63 kIOACPIAddressSpaceIDEmbeddedController = 3,
64 kIOACPIAddressSpaceIDSMBus = 4
65};
66
67/*
68 * Address space operation
69 */
70enum {
71 kIOACPIAddressSpaceOpRead = 0,
72 kIOACPIAddressSpaceOpWrite = 1
73};
74
75/*
76 * 64-bit ACPI address
77 */
78union IOACPIAddress {
79 UInt64 addr64;
80 struct {
81 unsigned int offset :16;
82 unsigned int function :3;
83 unsigned int device :5;
84 unsigned int bus :8;
85 unsigned int segment :16;
86 unsigned int reserved :16;
87 } pci;
88};
89
90/*
91 * Address space handler
92 */
93typedef IOReturn (*IOACPIAddressSpaceHandler)( UInt32 operation,
94 IOACPIAddress address,
95 UInt64 * value,
96 UInt32 bitWidth,
97 UInt32 bitOffset,
98 void * context );
99
100/*
101 * ACPI fixed event types
102 */
103enum {
104 kIOACPIFixedEventPMTimer = 0,
105 kIOACPIFixedEventPowerButton = 2,
106 kIOACPIFixedEventSleepButton = 3,
107 kIOACPIFixedEventRealTimeClock = 4
108};
109
110#pragma pack()
111
112/*
113 * FIXME: Move to xnu/iokit to reserve the ACPI family code.
114 */
115#ifndef sub_iokit_acpi
116#define sub_iokit_acpi err_sub(10)
117#endif
118
119/*
120 * ACPI notify message sent to all clients and interested parties.
121 * The notify code can be read from the argument as an UInt32.
122 */
123#define kIOACPIMessageDeviceNotification iokit_family_msg(sub_iokit_acpi, 0x10)
124
125/*
126 * ACPI device power states
127 */
128enum {
129 kIOACPIDevicePowerStateD0 = 0,
130 kIOACPIDevicePowerStateD1 = 1,
131 kIOACPIDevicePowerStateD2 = 2,
132 kIOACPIDevicePowerStateD3 = 3,
133 kIOACPIDevicePowerStateCount = 4
134};
135
136#endif /* !__IOKIT_IOACPITYPES_H */
137

Archive Download this file

Revision: 1146