diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/acpi | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acbuffer.h | 235 | ||||
-rw-r--r-- | include/acpi/acconfig.h | 249 | ||||
-rw-r--r-- | include/acpi/acexcep.h | 16 | ||||
-rw-r--r-- | include/acpi/acnames.h | 16 | ||||
-rw-r--r-- | include/acpi/acoutput.h | 6 | ||||
-rw-r--r-- | include/acpi/acpi.h | 20 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 135 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 4 | ||||
-rw-r--r-- | include/acpi/acpi_numa.h | 1 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 29 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 297 | ||||
-rw-r--r-- | include/acpi/acrestyp.h | 213 | ||||
-rw-r--r-- | include/acpi/actbl.h | 94 | ||||
-rw-r--r-- | include/acpi/actbl1.h | 79 | ||||
-rw-r--r-- | include/acpi/actbl2.h | 133 | ||||
-rw-r--r-- | include/acpi/actbl3.h | 557 | ||||
-rw-r--r-- | include/acpi/actypes.h | 82 | ||||
-rw-r--r-- | include/acpi/apei.h | 4 | ||||
-rw-r--r-- | include/acpi/platform/acenv.h | 4 | ||||
-rw-r--r-- | include/acpi/platform/acgcc.h | 2 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 6 | ||||
-rw-r--r-- | include/acpi/processor.h | 19 |
22 files changed, 242 insertions, 1959 deletions
diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h deleted file mode 100644 index a1e45cdd729..00000000000 --- a/include/acpi/acbuffer.h +++ /dev/null | |||
@@ -1,235 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: acbuffer.h - Support for buffers returned by ACPI predefined names | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #ifndef __ACBUFFER_H__ | ||
45 | #define __ACBUFFER_H__ | ||
46 | |||
47 | /* | ||
48 | * Contains buffer structures for these predefined names: | ||
49 | * _FDE, _GRT, _GTM, _PLD, _SRT | ||
50 | */ | ||
51 | |||
52 | /* | ||
53 | * Note: C bitfields are not used for this reason: | ||
54 | * | ||
55 | * "Bitfields are great and easy to read, but unfortunately the C language | ||
56 | * does not specify the layout of bitfields in memory, which means they are | ||
57 | * essentially useless for dealing with packed data in on-disk formats or | ||
58 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
59 | * this decision was a design error in C. Ritchie could have picked an order | ||
60 | * and stuck with it." Norman Ramsey. | ||
61 | * See http://stackoverflow.com/a/1053662/41661 | ||
62 | */ | ||
63 | |||
64 | /* _FDE return value */ | ||
65 | |||
66 | struct acpi_fde_info { | ||
67 | u32 floppy0; | ||
68 | u32 floppy1; | ||
69 | u32 floppy2; | ||
70 | u32 floppy3; | ||
71 | u32 tape; | ||
72 | }; | ||
73 | |||
74 | /* | ||
75 | * _GRT return value | ||
76 | * _SRT input value | ||
77 | */ | ||
78 | struct acpi_grt_info { | ||
79 | u16 year; | ||
80 | u8 month; | ||
81 | u8 day; | ||
82 | u8 hour; | ||
83 | u8 minute; | ||
84 | u8 second; | ||
85 | u8 valid; | ||
86 | u16 milliseconds; | ||
87 | u16 timezone; | ||
88 | u8 daylight; | ||
89 | u8 reserved[3]; | ||
90 | }; | ||
91 | |||
92 | /* _GTM return value */ | ||
93 | |||
94 | struct acpi_gtm_info { | ||
95 | u32 pio_speed0; | ||
96 | u32 dma_speed0; | ||
97 | u32 pio_speed1; | ||
98 | u32 dma_speed1; | ||
99 | u32 flags; | ||
100 | }; | ||
101 | |||
102 | /* | ||
103 | * Formatted _PLD return value. The minimum size is a package containing | ||
104 | * one buffer. | ||
105 | * Revision 1: Buffer is 16 bytes (128 bits) | ||
106 | * Revision 2: Buffer is 20 bytes (160 bits) | ||
107 | * | ||
108 | * Note: This structure is returned from the acpi_decode_pld_buffer | ||
109 | * interface. | ||
110 | */ | ||
111 | struct acpi_pld_info { | ||
112 | u8 revision; | ||
113 | u8 ignore_color; | ||
114 | u32 color; | ||
115 | u16 width; | ||
116 | u16 height; | ||
117 | u8 user_visible; | ||
118 | u8 dock; | ||
119 | u8 lid; | ||
120 | u8 panel; | ||
121 | u8 vertical_position; | ||
122 | u8 horizontal_position; | ||
123 | u8 shape; | ||
124 | u8 group_orientation; | ||
125 | u8 group_token; | ||
126 | u8 group_position; | ||
127 | u8 bay; | ||
128 | u8 ejectable; | ||
129 | u8 ospm_eject_required; | ||
130 | u8 cabinet_number; | ||
131 | u8 card_cage_number; | ||
132 | u8 reference; | ||
133 | u8 rotation; | ||
134 | u8 order; | ||
135 | u8 reserved; | ||
136 | u16 vertical_offset; | ||
137 | u16 horizontal_offset; | ||
138 | }; | ||
139 | |||
140 | /* | ||
141 | * Macros to: | ||
142 | * 1) Convert a _PLD buffer to internal struct acpi_pld_info format - ACPI_PLD_GET* | ||
143 | * (Used by acpi_decode_pld_buffer) | ||
144 | * 2) Construct a _PLD buffer - ACPI_PLD_SET* | ||
145 | * (Intended for BIOS use only) | ||
146 | */ | ||
147 | #define ACPI_PLD_REV1_BUFFER_SIZE 16 /* For Revision 1 of the buffer (From ACPI spec) */ | ||
148 | #define ACPI_PLD_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */ | ||
149 | |||
150 | /* First 32-bit dword, bits 0:32 */ | ||
151 | |||
152 | #define ACPI_PLD_GET_REVISION(dword) ACPI_GET_BITS (dword, 0, ACPI_7BIT_MASK) | ||
153 | #define ACPI_PLD_SET_REVISION(dword,value) ACPI_SET_BITS (dword, 0, ACPI_7BIT_MASK, value) /* Offset 0, Len 7 */ | ||
154 | |||
155 | #define ACPI_PLD_GET_IGNORE_COLOR(dword) ACPI_GET_BITS (dword, 7, ACPI_1BIT_MASK) | ||
156 | #define ACPI_PLD_SET_IGNORE_COLOR(dword,value) ACPI_SET_BITS (dword, 7, ACPI_1BIT_MASK, value) /* Offset 7, Len 1 */ | ||
157 | |||
158 | #define ACPI_PLD_GET_COLOR(dword) ACPI_GET_BITS (dword, 8, ACPI_24BIT_MASK) | ||
159 | #define ACPI_PLD_SET_COLOR(dword,value) ACPI_SET_BITS (dword, 8, ACPI_24BIT_MASK, value) /* Offset 8, Len 24 */ | ||
160 | |||
161 | /* Second 32-bit dword, bits 33:63 */ | ||
162 | |||
163 | #define ACPI_PLD_GET_WIDTH(dword) ACPI_GET_BITS (dword, 0, ACPI_16BIT_MASK) | ||
164 | #define ACPI_PLD_SET_WIDTH(dword,value) ACPI_SET_BITS (dword, 0, ACPI_16BIT_MASK, value) /* Offset 32+0=32, Len 16 */ | ||
165 | |||
166 | #define ACPI_PLD_GET_HEIGHT(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK) | ||
167 | #define ACPI_PLD_SET_HEIGHT(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 32+16=48, Len 16 */ | ||
168 | |||
169 | /* Third 32-bit dword, bits 64:95 */ | ||
170 | |||
171 | #define ACPI_PLD_GET_USER_VISIBLE(dword) ACPI_GET_BITS (dword, 0, ACPI_1BIT_MASK) | ||
172 | #define ACPI_PLD_SET_USER_VISIBLE(dword,value) ACPI_SET_BITS (dword, 0, ACPI_1BIT_MASK, value) /* Offset 64+0=64, Len 1 */ | ||
173 | |||
174 | #define ACPI_PLD_GET_DOCK(dword) ACPI_GET_BITS (dword, 1, ACPI_1BIT_MASK) | ||
175 | #define ACPI_PLD_SET_DOCK(dword,value) ACPI_SET_BITS (dword, 1, ACPI_1BIT_MASK, value) /* Offset 64+1=65, Len 1 */ | ||
176 | |||
177 | #define ACPI_PLD_GET_LID(dword) ACPI_GET_BITS (dword, 2, ACPI_1BIT_MASK) | ||
178 | #define ACPI_PLD_SET_LID(dword,value) ACPI_SET_BITS (dword, 2, ACPI_1BIT_MASK, value) /* Offset 64+2=66, Len 1 */ | ||
179 | |||
180 | #define ACPI_PLD_GET_PANEL(dword) ACPI_GET_BITS (dword, 3, ACPI_3BIT_MASK) | ||
181 | #define ACPI_PLD_SET_PANEL(dword,value) ACPI_SET_BITS (dword, 3, ACPI_3BIT_MASK, value) /* Offset 64+3=67, Len 3 */ | ||
182 | |||
183 | #define ACPI_PLD_GET_VERTICAL(dword) ACPI_GET_BITS (dword, 6, ACPI_2BIT_MASK) | ||
184 | #define ACPI_PLD_SET_VERTICAL(dword,value) ACPI_SET_BITS (dword, 6, ACPI_2BIT_MASK, value) /* Offset 64+6=70, Len 2 */ | ||
185 | |||
186 | #define ACPI_PLD_GET_HORIZONTAL(dword) ACPI_GET_BITS (dword, 8, ACPI_2BIT_MASK) | ||
187 | #define ACPI_PLD_SET_HORIZONTAL(dword,value) ACPI_SET_BITS (dword, 8, ACPI_2BIT_MASK, value) /* Offset 64+8=72, Len 2 */ | ||
188 | |||
189 | #define ACPI_PLD_GET_SHAPE(dword) ACPI_GET_BITS (dword, 10, ACPI_4BIT_MASK) | ||
190 | #define ACPI_PLD_SET_SHAPE(dword,value) ACPI_SET_BITS (dword, 10, ACPI_4BIT_MASK, value) /* Offset 64+10=74, Len 4 */ | ||
191 | |||
192 | #define ACPI_PLD_GET_ORIENTATION(dword) ACPI_GET_BITS (dword, 14, ACPI_1BIT_MASK) | ||
193 | #define ACPI_PLD_SET_ORIENTATION(dword,value) ACPI_SET_BITS (dword, 14, ACPI_1BIT_MASK, value) /* Offset 64+14=78, Len 1 */ | ||
194 | |||
195 | #define ACPI_PLD_GET_TOKEN(dword) ACPI_GET_BITS (dword, 15, ACPI_8BIT_MASK) | ||
196 | #define ACPI_PLD_SET_TOKEN(dword,value) ACPI_SET_BITS (dword, 15, ACPI_8BIT_MASK, value) /* Offset 64+15=79, Len 8 */ | ||
197 | |||
198 | #define ACPI_PLD_GET_POSITION(dword) ACPI_GET_BITS (dword, 23, ACPI_8BIT_MASK) | ||
199 | #define ACPI_PLD_SET_POSITION(dword,value) ACPI_SET_BITS (dword, 23, ACPI_8BIT_MASK, value) /* Offset 64+23=87, Len 8 */ | ||
200 | |||
201 | #define ACPI_PLD_GET_BAY(dword) ACPI_GET_BITS (dword, 31, ACPI_1BIT_MASK) | ||
202 | #define ACPI_PLD_SET_BAY(dword,value) ACPI_SET_BITS (dword, 31, ACPI_1BIT_MASK, value) /* Offset 64+31=95, Len 1 */ | ||
203 | |||
204 | /* Fourth 32-bit dword, bits 96:127 */ | ||
205 | |||
206 | #define ACPI_PLD_GET_EJECTABLE(dword) ACPI_GET_BITS (dword, 0, ACPI_1BIT_MASK) | ||
207 | #define ACPI_PLD_SET_EJECTABLE(dword,value) ACPI_SET_BITS (dword, 0, ACPI_1BIT_MASK, value) /* Offset 96+0=96, Len 1 */ | ||
208 | |||
209 | #define ACPI_PLD_GET_OSPM_EJECT(dword) ACPI_GET_BITS (dword, 1, ACPI_1BIT_MASK) | ||
210 | #define ACPI_PLD_SET_OSPM_EJECT(dword,value) ACPI_SET_BITS (dword, 1, ACPI_1BIT_MASK, value) /* Offset 96+1=97, Len 1 */ | ||
211 | |||
212 | #define ACPI_PLD_GET_CABINET(dword) ACPI_GET_BITS (dword, 2, ACPI_8BIT_MASK) | ||
213 | #define ACPI_PLD_SET_CABINET(dword,value) ACPI_SET_BITS (dword, 2, ACPI_8BIT_MASK, value) /* Offset 96+2=98, Len 8 */ | ||
214 | |||
215 | #define ACPI_PLD_GET_CARD_CAGE(dword) ACPI_GET_BITS (dword, 10, ACPI_8BIT_MASK) | ||
216 | #define ACPI_PLD_SET_CARD_CAGE(dword,value) ACPI_SET_BITS (dword, 10, ACPI_8BIT_MASK, value) /* Offset 96+10=106, Len 8 */ | ||
217 | |||
218 | #define ACPI_PLD_GET_REFERENCE(dword) ACPI_GET_BITS (dword, 18, ACPI_1BIT_MASK) | ||
219 | #define ACPI_PLD_SET_REFERENCE(dword,value) ACPI_SET_BITS (dword, 18, ACPI_1BIT_MASK, value) /* Offset 96+18=114, Len 1 */ | ||
220 | |||
221 | #define ACPI_PLD_GET_ROTATION(dword) ACPI_GET_BITS (dword, 19, ACPI_4BIT_MASK) | ||
222 | #define ACPI_PLD_SET_ROTATION(dword,value) ACPI_SET_BITS (dword, 19, ACPI_4BIT_MASK, value) /* Offset 96+19=115, Len 4 */ | ||
223 | |||
224 | #define ACPI_PLD_GET_ORDER(dword) ACPI_GET_BITS (dword, 23, ACPI_5BIT_MASK) | ||
225 | #define ACPI_PLD_SET_ORDER(dword,value) ACPI_SET_BITS (dword, 23, ACPI_5BIT_MASK, value) /* Offset 96+23=119, Len 5 */ | ||
226 | |||
227 | /* Fifth 32-bit dword, bits 128:159 (Revision 2 of _PLD only) */ | ||
228 | |||
229 | #define ACPI_PLD_GET_VERT_OFFSET(dword) ACPI_GET_BITS (dword, 0, ACPI_16BIT_MASK) | ||
230 | #define ACPI_PLD_SET_VERT_OFFSET(dword,value) ACPI_SET_BITS (dword, 0, ACPI_16BIT_MASK, value) /* Offset 128+0=128, Len 16 */ | ||
231 | |||
232 | #define ACPI_PLD_GET_HORIZ_OFFSET(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK) | ||
233 | #define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */ | ||
234 | |||
235 | #endif /* ACBUFFER_H */ | ||
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h deleted file mode 100644 index 0943457e0fa..00000000000 --- a/include/acpi/acconfig.h +++ /dev/null | |||
@@ -1,249 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: acconfig.h - Global configuration constants | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #ifndef _ACCONFIG_H | ||
45 | #define _ACCONFIG_H | ||
46 | |||
47 | /****************************************************************************** | ||
48 | * | ||
49 | * Configuration options | ||
50 | * | ||
51 | *****************************************************************************/ | ||
52 | |||
53 | /* | ||
54 | * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the | ||
55 | * ACPI subsystem. This includes the DEBUG_PRINT output | ||
56 | * statements. When disabled, all DEBUG_PRINT | ||
57 | * statements are compiled out. | ||
58 | * | ||
59 | * ACPI_APPLICATION - Use this switch if the subsystem is going to be run | ||
60 | * at the application level. | ||
61 | * | ||
62 | */ | ||
63 | |||
64 | /* | ||
65 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | ||
66 | * but there is a large base of ASL/AML code in existing machines that check | ||
67 | * for the string below. The use of this string usually guarantees that | ||
68 | * the ASL will execute down the most tested code path. Also, there is some | ||
69 | * code that will not execute the _OSI method unless _OS matches the string | ||
70 | * below. Therefore, change this string at your own risk. | ||
71 | */ | ||
72 | #define ACPI_OS_NAME "Microsoft Windows NT" | ||
73 | |||
74 | /* Maximum objects in the various object caches */ | ||
75 | |||
76 | #define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ | ||
77 | #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ | ||
78 | #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ | ||
79 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | ||
80 | #define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ | ||
81 | |||
82 | /* | ||
83 | * Should the subsystem abort the loading of an ACPI table if the | ||
84 | * table checksum is incorrect? | ||
85 | */ | ||
86 | #define ACPI_CHECKSUM_ABORT FALSE | ||
87 | |||
88 | /* | ||
89 | * Generate a version of ACPICA that only supports "reduced hardware" | ||
90 | * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized | ||
91 | * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware" | ||
92 | * model. In other words, no ACPI hardware is supported. | ||
93 | * | ||
94 | * If TRUE, this means no support for the following: | ||
95 | * PM Event and Control registers | ||
96 | * SCI interrupt (and handler) | ||
97 | * Fixed Events | ||
98 | * General Purpose Events (GPEs) | ||
99 | * Global Lock | ||
100 | * ACPI PM timer | ||
101 | * FACS table (Waking vectors and Global Lock) | ||
102 | */ | ||
103 | #define ACPI_REDUCED_HARDWARE FALSE | ||
104 | |||
105 | /****************************************************************************** | ||
106 | * | ||
107 | * Subsystem Constants | ||
108 | * | ||
109 | *****************************************************************************/ | ||
110 | |||
111 | /* Version of ACPI supported */ | ||
112 | |||
113 | #define ACPI_CA_SUPPORT_LEVEL 5 | ||
114 | |||
115 | /* Maximum count for a semaphore object */ | ||
116 | |||
117 | #define ACPI_MAX_SEMAPHORE_COUNT 256 | ||
118 | |||
119 | /* Maximum object reference count (detects object deletion issues) */ | ||
120 | |||
121 | #define ACPI_MAX_REFERENCE_COUNT 0x1000 | ||
122 | |||
123 | /* Default page size for use in mapping memory for operation regions */ | ||
124 | |||
125 | #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ | ||
126 | |||
127 | /* owner_id tracking. 8 entries allows for 255 owner_ids */ | ||
128 | |||
129 | #define ACPI_NUM_OWNERID_MASKS 8 | ||
130 | |||
131 | /* Size of the root table array is increased by this increment */ | ||
132 | |||
133 | #define ACPI_ROOT_TABLE_SIZE_INCREMENT 4 | ||
134 | |||
135 | /* Maximum number of While() loop iterations before forced abort */ | ||
136 | |||
137 | #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF | ||
138 | |||
139 | /* Maximum sleep allowed via Sleep() operator */ | ||
140 | |||
141 | #define ACPI_MAX_SLEEP 2000 /* Two seconds */ | ||
142 | |||
143 | /* Address Range lists are per-space_id (Memory and I/O only) */ | ||
144 | |||
145 | #define ACPI_ADDRESS_RANGE_MAX 2 | ||
146 | |||
147 | /****************************************************************************** | ||
148 | * | ||
149 | * ACPI Specification constants (Do not change unless the specification changes) | ||
150 | * | ||
151 | *****************************************************************************/ | ||
152 | |||
153 | /* Number of distinct GPE register blocks and register width */ | ||
154 | |||
155 | #define ACPI_MAX_GPE_BLOCKS 2 | ||
156 | #define ACPI_GPE_REGISTER_WIDTH 8 | ||
157 | |||
158 | /* Method info (in WALK_STATE), containing local variables and argumetns */ | ||
159 | |||
160 | #define ACPI_METHOD_NUM_LOCALS 8 | ||
161 | #define ACPI_METHOD_MAX_LOCAL 7 | ||
162 | |||
163 | #define ACPI_METHOD_NUM_ARGS 7 | ||
164 | #define ACPI_METHOD_MAX_ARG 6 | ||
165 | |||
166 | /* Length of _HID, _UID, _CID, and UUID values */ | ||
167 | |||
168 | #define ACPI_DEVICE_ID_LENGTH 0x09 | ||
169 | #define ACPI_MAX_CID_LENGTH 48 | ||
170 | #define ACPI_UUID_LENGTH 16 | ||
171 | |||
172 | /* | ||
173 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG | ||
174 | */ | ||
175 | #define ACPI_OBJ_NUM_OPERANDS 8 | ||
176 | #define ACPI_OBJ_MAX_OPERAND 7 | ||
177 | |||
178 | /* Number of elements in the Result Stack frame, can be an arbitrary value */ | ||
179 | |||
180 | #define ACPI_RESULTS_FRAME_OBJ_NUM 8 | ||
181 | |||
182 | /* | ||
183 | * Maximal number of elements the Result Stack can contain, | ||
184 | * it may be an arbitray value not exceeding the types of | ||
185 | * result_size and result_count (now u8). | ||
186 | */ | ||
187 | #define ACPI_RESULTS_OBJ_NUM_MAX 255 | ||
188 | |||
189 | /* Names within the namespace are 4 bytes long */ | ||
190 | |||
191 | #define ACPI_NAME_SIZE 4 | ||
192 | #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ | ||
193 | #define ACPI_PATH_SEPARATOR '.' | ||
194 | |||
195 | /* Sizes for ACPI table headers */ | ||
196 | |||
197 | #define ACPI_OEM_ID_SIZE 6 | ||
198 | #define ACPI_OEM_TABLE_ID_SIZE 8 | ||
199 | |||
200 | /* Constants used in searching for the RSDP in low memory */ | ||
201 | |||
202 | #define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ | ||
203 | #define ACPI_EBDA_PTR_LENGTH 2 | ||
204 | #define ACPI_EBDA_WINDOW_SIZE 1024 | ||
205 | #define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */ | ||
206 | #define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000 | ||
207 | #define ACPI_RSDP_SCAN_STEP 16 | ||
208 | |||
209 | /* Operation regions */ | ||
210 | |||
211 | #define ACPI_USER_REGION_BEGIN 0x80 | ||
212 | |||
213 | /* Maximum space_ids for Operation Regions */ | ||
214 | |||
215 | #define ACPI_MAX_ADDRESS_SPACE 255 | ||
216 | |||
217 | /* Array sizes. Used for range checking also */ | ||
218 | |||
219 | #define ACPI_MAX_MATCH_OPCODE 5 | ||
220 | |||
221 | /* RSDP checksums */ | ||
222 | |||
223 | #define ACPI_RSDP_CHECKSUM_LENGTH 20 | ||
224 | #define ACPI_RSDP_XCHECKSUM_LENGTH 36 | ||
225 | |||
226 | /* SMBus, GSBus and IPMI bidirectional buffer size */ | ||
227 | |||
228 | #define ACPI_SMBUS_BUFFER_SIZE 34 | ||
229 | #define ACPI_GSBUS_BUFFER_SIZE 34 | ||
230 | #define ACPI_IPMI_BUFFER_SIZE 66 | ||
231 | |||
232 | /* _sx_d and _sx_w control methods */ | ||
233 | |||
234 | #define ACPI_NUM_sx_d_METHODS 4 | ||
235 | #define ACPI_NUM_sx_w_METHODS 5 | ||
236 | |||
237 | /****************************************************************************** | ||
238 | * | ||
239 | * ACPI AML Debugger | ||
240 | * | ||
241 | *****************************************************************************/ | ||
242 | |||
243 | #define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ | ||
244 | #define ACPI_DB_LINE_BUFFER_SIZE 512 | ||
245 | |||
246 | #define ACPI_DEBUGGER_COMMAND_PROMPT '-' | ||
247 | #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' | ||
248 | |||
249 | #endif /* _ACCONFIG_H */ | ||
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 6c3890e0214..5b6c391efc8 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -52,13 +52,11 @@ | |||
52 | #define AE_CODE_ACPI_TABLES 0x2000 | 52 | #define AE_CODE_ACPI_TABLES 0x2000 |
53 | #define AE_CODE_AML 0x3000 | 53 | #define AE_CODE_AML 0x3000 |
54 | #define AE_CODE_CONTROL 0x4000 | 54 | #define AE_CODE_CONTROL 0x4000 |
55 | #define AE_CODE_MAX 0x4000 | ||
56 | #define AE_CODE_MASK 0xF000 | 55 | #define AE_CODE_MASK 0xF000 |
57 | 56 | ||
58 | #define ACPI_SUCCESS(a) (!(a)) | 57 | #define ACPI_SUCCESS(a) (!(a)) |
59 | #define ACPI_FAILURE(a) (a) | 58 | #define ACPI_FAILURE(a) (a) |
60 | 59 | ||
61 | #define ACPI_SKIP(a) (a == AE_CTRL_SKIP) | ||
62 | #define AE_OK (acpi_status) 0x0000 | 60 | #define AE_OK (acpi_status) 0x0000 |
63 | 61 | ||
64 | /* | 62 | /* |
@@ -91,9 +89,8 @@ | |||
91 | #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) | 89 | #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) |
92 | #define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) | 90 | #define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) |
93 | #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) | 91 | #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) |
94 | #define AE_NOT_CONFIGURED (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL) | ||
95 | 92 | ||
96 | #define AE_CODE_ENV_MAX 0x001C | 93 | #define AE_CODE_ENV_MAX 0x001B |
97 | 94 | ||
98 | /* | 95 | /* |
99 | * Programmer exceptions | 96 | * Programmer exceptions |
@@ -122,7 +119,7 @@ | |||
122 | #define AE_CODE_TBL_MAX 0x0005 | 119 | #define AE_CODE_TBL_MAX 0x0005 |
123 | 120 | ||
124 | /* | 121 | /* |
125 | * AML exceptions. These are caused by problems with | 122 | * AML exceptions. These are caused by problems with |
126 | * the actual AML byte stream | 123 | * the actual AML byte stream |
127 | */ | 124 | */ |
128 | #define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML) | 125 | #define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML) |
@@ -182,7 +179,7 @@ | |||
182 | 179 | ||
183 | /* Exception strings for acpi_format_exception */ | 180 | /* Exception strings for acpi_format_exception */ |
184 | 181 | ||
185 | #ifdef ACPI_DEFINE_EXCEPTION_TABLE | 182 | #ifdef DEFINE_ACPI_GLOBALS |
186 | 183 | ||
187 | /* | 184 | /* |
188 | * String versions of the exception codes above | 185 | * String versions of the exception codes above |
@@ -216,8 +213,7 @@ char const *acpi_gbl_exception_names_env[] = { | |||
216 | "AE_ABORT_METHOD", | 213 | "AE_ABORT_METHOD", |
217 | "AE_SAME_HANDLER", | 214 | "AE_SAME_HANDLER", |
218 | "AE_NO_HANDLER", | 215 | "AE_NO_HANDLER", |
219 | "AE_OWNER_ID_LIMIT", | 216 | "AE_OWNER_ID_LIMIT" |
220 | "AE_NOT_CONFIGURED" | ||
221 | }; | 217 | }; |
222 | 218 | ||
223 | char const *acpi_gbl_exception_names_pgm[] = { | 219 | char const *acpi_gbl_exception_names_pgm[] = { |
@@ -296,6 +292,6 @@ char const *acpi_gbl_exception_names_ctrl[] = { | |||
296 | "AE_CTRL_PARSE_PENDING" | 292 | "AE_CTRL_PARSE_PENDING" |
297 | }; | 293 | }; |
298 | 294 | ||
299 | #endif /* EXCEPTION_TABLE */ | 295 | #endif /* ACPI GLOBALS */ |
300 | 296 | ||
301 | #endif /* __ACEXCEP_H__ */ | 297 | #endif /* __ACEXCEP_H__ */ |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 7665df66328..fc1575fd459 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -46,11 +46,9 @@ | |||
46 | 46 | ||
47 | /* Method names - these methods can appear anywhere in the namespace */ | 47 | /* Method names - these methods can appear anywhere in the namespace */ |
48 | 48 | ||
49 | #define METHOD_NAME__SB_ "_SB_" | ||
50 | #define METHOD_NAME__HID "_HID" | 49 | #define METHOD_NAME__HID "_HID" |
51 | #define METHOD_NAME__CID "_CID" | 50 | #define METHOD_NAME__CID "_CID" |
52 | #define METHOD_NAME__UID "_UID" | 51 | #define METHOD_NAME__UID "_UID" |
53 | #define METHOD_NAME__SUB "_SUB" | ||
54 | #define METHOD_NAME__ADR "_ADR" | 52 | #define METHOD_NAME__ADR "_ADR" |
55 | #define METHOD_NAME__INI "_INI" | 53 | #define METHOD_NAME__INI "_INI" |
56 | #define METHOD_NAME__STA "_STA" | 54 | #define METHOD_NAME__STA "_STA" |
@@ -60,17 +58,16 @@ | |||
60 | #define METHOD_NAME__PRT "_PRT" | 58 | #define METHOD_NAME__PRT "_PRT" |
61 | #define METHOD_NAME__CRS "_CRS" | 59 | #define METHOD_NAME__CRS "_CRS" |
62 | #define METHOD_NAME__PRS "_PRS" | 60 | #define METHOD_NAME__PRS "_PRS" |
63 | #define METHOD_NAME__AEI "_AEI" | ||
64 | #define METHOD_NAME__PRW "_PRW" | 61 | #define METHOD_NAME__PRW "_PRW" |
65 | #define METHOD_NAME__SRS "_SRS" | 62 | #define METHOD_NAME__SRS "_SRS" |
66 | #define METHOD_NAME__CBA "_CBA" | ||
67 | #define METHOD_NAME__PLD "_PLD" | ||
68 | 63 | ||
69 | /* Method names - these methods must appear at the namespace root */ | 64 | /* Method names - these methods must appear at the namespace root */ |
70 | 65 | ||
71 | #define METHOD_PATHNAME__PTS "\\_PTS" | 66 | #define METHOD_NAME__BFS "\\_BFS" |
72 | #define METHOD_PATHNAME__SST "\\_SI._SST" | 67 | #define METHOD_NAME__GTS "\\_GTS" |
73 | #define METHOD_PATHNAME__WAK "\\_WAK" | 68 | #define METHOD_NAME__PTS "\\_PTS" |
69 | #define METHOD_NAME__SST "\\_SI._SST" | ||
70 | #define METHOD_NAME__WAK "\\_WAK" | ||
74 | 71 | ||
75 | /* Definitions of the predefined namespace names */ | 72 | /* Definitions of the predefined namespace names */ |
76 | 73 | ||
@@ -81,5 +78,6 @@ | |||
81 | #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ | 78 | #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ |
82 | 79 | ||
83 | #define ACPI_NS_ROOT_PATH "\\" | 80 | #define ACPI_NS_ROOT_PATH "\\" |
81 | #define ACPI_NS_SYSTEM_BUS "_SB_" | ||
84 | 82 | ||
85 | #endif /* __ACNAMES_H__ */ | 83 | #endif /* __ACNAMES_H__ */ |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 2457ac84965..d7bd661bfae 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -213,8 +213,6 @@ | |||
213 | #define ACPI_WARNING(plist) acpi_warning plist | 213 | #define ACPI_WARNING(plist) acpi_warning plist |
214 | #define ACPI_EXCEPTION(plist) acpi_exception plist | 214 | #define ACPI_EXCEPTION(plist) acpi_exception plist |
215 | #define ACPI_ERROR(plist) acpi_error plist | 215 | #define ACPI_ERROR(plist) acpi_error plist |
216 | #define ACPI_BIOS_WARNING(plist) acpi_bios_warning plist | ||
217 | #define ACPI_BIOS_ERROR(plist) acpi_bios_error plist | ||
218 | #define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i) | 216 | #define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i) |
219 | 217 | ||
220 | #else | 218 | #else |
@@ -225,8 +223,6 @@ | |||
225 | #define ACPI_WARNING(plist) | 223 | #define ACPI_WARNING(plist) |
226 | #define ACPI_EXCEPTION(plist) | 224 | #define ACPI_EXCEPTION(plist) |
227 | #define ACPI_ERROR(plist) | 225 | #define ACPI_ERROR(plist) |
228 | #define ACPI_BIOS_WARNING(plist) | ||
229 | #define ACPI_BIOS_ERROR(plist) | ||
230 | #define ACPI_DEBUG_OBJECT(obj,l,i) | 226 | #define ACPI_DEBUG_OBJECT(obj,l,i) |
231 | 227 | ||
232 | #endif /* ACPI_NO_ERROR_MESSAGES */ | 228 | #endif /* ACPI_NO_ERROR_MESSAGES */ |
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index c1ea8436961..de39915f6b7 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -53,14 +53,14 @@ | |||
53 | * | 53 | * |
54 | * Note: The order of these include files is important. | 54 | * Note: The order of these include files is important. |
55 | */ | 55 | */ |
56 | #include <acpi/platform/acenv.h> /* Environment-specific items */ | 56 | #include "platform/acenv.h" /* Environment-specific items */ |
57 | #include <acpi/acnames.h> /* Common ACPI names and strings */ | 57 | #include "acnames.h" /* Common ACPI names and strings */ |
58 | #include <acpi/actypes.h> /* ACPICA data types and structures */ | 58 | #include "actypes.h" /* ACPICA data types and structures */ |
59 | #include <acpi/acexcep.h> /* ACPICA exceptions */ | 59 | #include "acexcep.h" /* ACPICA exceptions */ |
60 | #include <acpi/actbl.h> /* ACPI table definitions */ | 60 | #include "actbl.h" /* ACPI table definitions */ |
61 | #include <acpi/acoutput.h> /* Error output and Debug macros */ | 61 | #include "acoutput.h" /* Error output and Debug macros */ |
62 | #include <acpi/acrestyp.h> /* Resource Descriptor structs */ | 62 | #include "acrestyp.h" /* Resource Descriptor structs */ |
63 | #include <acpi/acpiosxf.h> /* OSL interfaces (ACPICA-to-OS) */ | 63 | #include "acpiosxf.h" /* OSL interfaces (ACPICA-to-OS) */ |
64 | #include <acpi/acpixf.h> /* ACPI core subsystem external interfaces */ | 64 | #include "acpixf.h" /* ACPI core subsystem external interfaces */ |
65 | 65 | ||
66 | #endif /* __ACPI_H__ */ | 66 | #endif /* __ACPI_H__ */ |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 7ced5dc20dd..6cd5b6403a7 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -50,12 +50,7 @@ acpi_evaluate_reference(acpi_handle handle, | |||
50 | acpi_string pathname, | 50 | acpi_string pathname, |
51 | struct acpi_object_list *arguments, | 51 | struct acpi_object_list *arguments, |
52 | struct acpi_handle_list *list); | 52 | struct acpi_handle_list *list); |
53 | acpi_status | ||
54 | acpi_evaluate_hotplug_ost(acpi_handle handle, u32 source_event, | ||
55 | u32 status_code, struct acpi_buffer *status_buf); | ||
56 | 53 | ||
57 | acpi_status | ||
58 | acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); | ||
59 | #ifdef CONFIG_ACPI | 54 | #ifdef CONFIG_ACPI |
60 | 55 | ||
61 | #include <linux/proc_fs.h> | 56 | #include <linux/proc_fs.h> |
@@ -91,6 +86,9 @@ struct acpi_device; | |||
91 | typedef int (*acpi_op_add) (struct acpi_device * device); | 86 | typedef int (*acpi_op_add) (struct acpi_device * device); |
92 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); | 87 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); |
93 | typedef int (*acpi_op_start) (struct acpi_device * device); | 88 | typedef int (*acpi_op_start) (struct acpi_device * device); |
89 | typedef int (*acpi_op_suspend) (struct acpi_device * device, | ||
90 | pm_message_t state); | ||
91 | typedef int (*acpi_op_resume) (struct acpi_device * device); | ||
94 | typedef int (*acpi_op_bind) (struct acpi_device * device); | 92 | typedef int (*acpi_op_bind) (struct acpi_device * device); |
95 | typedef int (*acpi_op_unbind) (struct acpi_device * device); | 93 | typedef int (*acpi_op_unbind) (struct acpi_device * device); |
96 | typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event); | 94 | typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event); |
@@ -104,6 +102,8 @@ struct acpi_device_ops { | |||
104 | acpi_op_add add; | 102 | acpi_op_add add; |
105 | acpi_op_remove remove; | 103 | acpi_op_remove remove; |
106 | acpi_op_start start; | 104 | acpi_op_start start; |
105 | acpi_op_suspend suspend; | ||
106 | acpi_op_resume resume; | ||
107 | acpi_op_bind bind; | 107 | acpi_op_bind bind; |
108 | acpi_op_unbind unbind; | 108 | acpi_op_unbind unbind; |
109 | acpi_op_notify notify; | 109 | acpi_op_notify notify; |
@@ -144,10 +144,10 @@ struct acpi_device_flags { | |||
144 | u32 bus_address:1; | 144 | u32 bus_address:1; |
145 | u32 removable:1; | 145 | u32 removable:1; |
146 | u32 ejectable:1; | 146 | u32 ejectable:1; |
147 | u32 lockable:1; | ||
147 | u32 suprise_removal_ok:1; | 148 | u32 suprise_removal_ok:1; |
148 | u32 power_manageable:1; | 149 | u32 power_manageable:1; |
149 | u32 performance_manageable:1; | 150 | u32 performance_manageable:1; |
150 | u32 eject_pending:1; | ||
151 | u32 reserved:24; | 151 | u32 reserved:24; |
152 | }; | 152 | }; |
153 | 153 | ||
@@ -178,8 +178,6 @@ struct acpi_device_pnp { | |||
178 | struct list_head ids; /* _HID and _CIDs */ | 178 | struct list_head ids; /* _HID and _CIDs */ |
179 | acpi_device_name device_name; /* Driver-determined */ | 179 | acpi_device_name device_name; /* Driver-determined */ |
180 | acpi_device_class device_class; /* " */ | 180 | acpi_device_class device_class; /* " */ |
181 | union acpi_object *str_obj; /* unicode string for _STR method */ | ||
182 | unsigned long sun; /* _SUN */ | ||
183 | }; | 181 | }; |
184 | 182 | ||
185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) | 183 | #define acpi_device_bid(d) ((d)->pnp.bus_id) |
@@ -201,7 +199,6 @@ struct acpi_device_power_flags { | |||
201 | struct acpi_device_power_state { | 199 | struct acpi_device_power_state { |
202 | struct { | 200 | struct { |
203 | u8 valid:1; | 201 | u8 valid:1; |
204 | u8 os_accessible:1; | ||
205 | u8 explicit_set:1; /* _PSx present? */ | 202 | u8 explicit_set:1; /* _PSx present? */ |
206 | u8 reserved:6; | 203 | u8 reserved:6; |
207 | } flags; | 204 | } flags; |
@@ -255,16 +252,8 @@ struct acpi_device_wakeup { | |||
255 | int prepare_count; | 252 | int prepare_count; |
256 | }; | 253 | }; |
257 | 254 | ||
258 | struct acpi_device_physical_node { | ||
259 | u8 node_id; | ||
260 | struct list_head node; | ||
261 | struct device *dev; | ||
262 | }; | ||
263 | |||
264 | /* set maximum of physical nodes to 32 for expansibility */ | ||
265 | #define ACPI_MAX_PHYSICAL_NODE 32 | ||
266 | |||
267 | /* Device */ | 255 | /* Device */ |
256 | |||
268 | struct acpi_device { | 257 | struct acpi_device { |
269 | int device_type; | 258 | int device_type; |
270 | acpi_handle handle; /* no handle for fixed hardware */ | 259 | acpi_handle handle; /* no handle for fixed hardware */ |
@@ -285,10 +274,6 @@ struct acpi_device { | |||
285 | struct device dev; | 274 | struct device dev; |
286 | struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ | 275 | struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ |
287 | enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ | 276 | enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ |
288 | u8 physical_node_count; | ||
289 | struct list_head physical_node_list; | ||
290 | struct mutex physical_node_lock; | ||
291 | DECLARE_BITMAP(physical_node_id_bitmap, ACPI_MAX_PHYSICAL_NODE); | ||
292 | }; | 277 | }; |
293 | 278 | ||
294 | static inline void *acpi_driver_data(struct acpi_device *d) | 279 | static inline void *acpi_driver_data(struct acpi_device *d) |
@@ -315,11 +300,6 @@ struct acpi_bus_event { | |||
315 | u32 data; | 300 | u32 data; |
316 | }; | 301 | }; |
317 | 302 | ||
318 | struct acpi_eject_event { | ||
319 | acpi_handle handle; | ||
320 | u32 event; | ||
321 | }; | ||
322 | |||
323 | extern struct kobject *acpi_kobj; | 303 | extern struct kobject *acpi_kobj; |
324 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); | 304 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); |
325 | void acpi_bus_private_data_handler(acpi_handle, void *); | 305 | void acpi_bus_private_data_handler(acpi_handle, void *); |
@@ -340,12 +320,9 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle, | |||
340 | unsigned long long *sta); | 320 | unsigned long long *sta); |
341 | int acpi_bus_get_status(struct acpi_device *device); | 321 | int acpi_bus_get_status(struct acpi_device *device); |
342 | int acpi_bus_set_power(acpi_handle handle, int state); | 322 | int acpi_bus_set_power(acpi_handle handle, int state); |
343 | int acpi_device_set_power(struct acpi_device *device, int state); | ||
344 | int acpi_bus_update_power(acpi_handle handle, int *state_p); | 323 | int acpi_bus_update_power(acpi_handle handle, int *state_p); |
345 | bool acpi_bus_power_manageable(acpi_handle handle); | 324 | bool acpi_bus_power_manageable(acpi_handle handle); |
346 | bool acpi_bus_can_wakeup(acpi_handle handle); | 325 | bool acpi_bus_can_wakeup(acpi_handle handle); |
347 | int acpi_power_resource_register_device(struct device *dev, acpi_handle handle); | ||
348 | void acpi_power_resource_unregister_device(struct device *dev, acpi_handle handle); | ||
349 | #ifdef CONFIG_ACPI_PROC_EVENT | 326 | #ifdef CONFIG_ACPI_PROC_EVENT |
350 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); | 327 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); |
351 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); | 328 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); |
@@ -358,7 +335,6 @@ int acpi_bus_register_driver(struct acpi_driver *driver); | |||
358 | void acpi_bus_unregister_driver(struct acpi_driver *driver); | 335 | void acpi_bus_unregister_driver(struct acpi_driver *driver); |
359 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, | 336 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, |
360 | acpi_handle handle, int type); | 337 | acpi_handle handle, int type); |
361 | void acpi_bus_hot_remove_device(void *context); | ||
362 | int acpi_bus_trim(struct acpi_device *start, int rmdevice); | 338 | int acpi_bus_trim(struct acpi_device *start, int rmdevice); |
363 | int acpi_bus_start(struct acpi_device *device); | 339 | int acpi_bus_start(struct acpi_device *device); |
364 | acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); | 340 | acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); |
@@ -367,19 +343,6 @@ int acpi_match_device_ids(struct acpi_device *device, | |||
367 | int acpi_create_dir(struct acpi_device *); | 343 | int acpi_create_dir(struct acpi_device *); |
368 | void acpi_remove_dir(struct acpi_device *); | 344 | void acpi_remove_dir(struct acpi_device *); |
369 | 345 | ||
370 | |||
371 | /** | ||
372 | * module_acpi_driver(acpi_driver) - Helper macro for registering an ACPI driver | ||
373 | * @__acpi_driver: acpi_driver struct | ||
374 | * | ||
375 | * Helper macro for ACPI drivers which do not do anything special in module | ||
376 | * init/exit. This eliminates a lot of boilerplate. Each module may only | ||
377 | * use this macro once, and calling it replaces module_init() and module_exit() | ||
378 | */ | ||
379 | #define module_acpi_driver(__acpi_driver) \ | ||
380 | module_driver(__acpi_driver, acpi_bus_register_driver, \ | ||
381 | acpi_bus_unregister_driver) | ||
382 | |||
383 | /* | 346 | /* |
384 | * Bind physical devices with ACPI devices | 347 | * Bind physical devices with ACPI devices |
385 | */ | 348 | */ |
@@ -393,6 +356,7 @@ struct acpi_bus_type { | |||
393 | }; | 356 | }; |
394 | int register_acpi_bus_type(struct acpi_bus_type *); | 357 | int register_acpi_bus_type(struct acpi_bus_type *); |
395 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 358 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
359 | struct device *acpi_get_physical_device(acpi_handle); | ||
396 | 360 | ||
397 | struct acpi_pci_root { | 361 | struct acpi_pci_root { |
398 | struct list_head node; | 362 | struct list_head node; |
@@ -404,7 +368,6 @@ struct acpi_pci_root { | |||
404 | 368 | ||
405 | u32 osc_support_set; /* _OSC state of support bits */ | 369 | u32 osc_support_set; /* _OSC state of support bits */ |
406 | u32 osc_control_set; /* _OSC state of control bits */ | 370 | u32 osc_control_set; /* _OSC state of control bits */ |
407 | phys_addr_t mcfg_addr; | ||
408 | }; | 371 | }; |
409 | 372 | ||
410 | /* helper */ | 373 | /* helper */ |
@@ -412,105 +375,31 @@ acpi_handle acpi_get_child(acpi_handle, u64); | |||
412 | int acpi_is_root_bridge(acpi_handle); | 375 | int acpi_is_root_bridge(acpi_handle); |
413 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | 376 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); |
414 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | 377 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); |
415 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)ACPI_HANDLE(dev)) | 378 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) |
416 | 379 | ||
417 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | 380 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); |
418 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 381 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
419 | 382 | ||
420 | #ifdef CONFIG_PM | 383 | #ifdef CONFIG_PM |
421 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | 384 | int acpi_pm_device_sleep_state(struct device *, int *); |
422 | acpi_notify_handler handler, void *context); | ||
423 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | ||
424 | acpi_notify_handler handler); | ||
425 | int acpi_device_power_state(struct device *dev, struct acpi_device *adev, | ||
426 | u32 target_state, int d_max_in, int *d_min_p); | ||
427 | int acpi_pm_device_sleep_state(struct device *, int *, int); | ||
428 | #else | 385 | #else |
429 | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | 386 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p) |
430 | acpi_notify_handler handler, | ||
431 | void *context) | ||
432 | { | ||
433 | return AE_SUPPORT; | ||
434 | } | ||
435 | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | ||
436 | acpi_notify_handler handler) | ||
437 | { | ||
438 | return AE_SUPPORT; | ||
439 | } | ||
440 | static inline int __acpi_device_power_state(int m, int *p) | ||
441 | { | 387 | { |
442 | if (p) | 388 | if (p) |
443 | *p = ACPI_STATE_D0; | 389 | *p = ACPI_STATE_D0; |
444 | return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; | 390 | return ACPI_STATE_D3; |
445 | } | ||
446 | static inline int acpi_device_power_state(struct device *dev, | ||
447 | struct acpi_device *adev, | ||
448 | u32 target_state, int d_max_in, | ||
449 | int *d_min_p) | ||
450 | { | ||
451 | return __acpi_device_power_state(d_max_in, d_min_p); | ||
452 | } | ||
453 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) | ||
454 | { | ||
455 | return __acpi_device_power_state(m, p); | ||
456 | } | ||
457 | #endif | ||
458 | |||
459 | #ifdef CONFIG_PM_RUNTIME | ||
460 | int __acpi_device_run_wake(struct acpi_device *, bool); | ||
461 | int acpi_pm_device_run_wake(struct device *, bool); | ||
462 | #else | ||
463 | static inline int __acpi_device_run_wake(struct acpi_device *adev, bool en) | ||
464 | { | ||
465 | return -ENODEV; | ||
466 | } | ||
467 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | ||
468 | { | ||
469 | return -ENODEV; | ||
470 | } | 391 | } |
471 | #endif | 392 | #endif |
472 | 393 | ||
473 | #ifdef CONFIG_PM_SLEEP | 394 | #ifdef CONFIG_PM_SLEEP |
474 | int __acpi_device_sleep_wake(struct acpi_device *, u32, bool); | ||
475 | int acpi_pm_device_sleep_wake(struct device *, bool); | 395 | int acpi_pm_device_sleep_wake(struct device *, bool); |
476 | #else | 396 | #else |
477 | static inline int __acpi_device_sleep_wake(struct acpi_device *adev, | ||
478 | u32 target_state, bool enable) | ||
479 | { | ||
480 | return -ENODEV; | ||
481 | } | ||
482 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 397 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
483 | { | 398 | { |
484 | return -ENODEV; | 399 | return -ENODEV; |
485 | } | 400 | } |
486 | #endif | 401 | #endif |
487 | 402 | ||
488 | #ifdef CONFIG_ACPI_SLEEP | ||
489 | u32 acpi_target_system_state(void); | ||
490 | #else | ||
491 | static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; } | ||
492 | #endif | ||
493 | |||
494 | static inline bool acpi_device_power_manageable(struct acpi_device *adev) | ||
495 | { | ||
496 | return adev->flags.power_manageable; | ||
497 | } | ||
498 | |||
499 | static inline bool acpi_device_can_wakeup(struct acpi_device *adev) | ||
500 | { | ||
501 | return adev->wakeup.flags.valid; | ||
502 | } | ||
503 | |||
504 | static inline bool acpi_device_can_poweroff(struct acpi_device *adev) | ||
505 | { | ||
506 | return adev->power.states[ACPI_STATE_D3_COLD].flags.os_accessible; | ||
507 | } | ||
508 | |||
509 | #else /* CONFIG_ACPI */ | ||
510 | |||
511 | static inline int register_acpi_bus_type(void *bus) { return 0; } | ||
512 | static inline int unregister_acpi_bus_type(void *bus) { return 0; } | ||
513 | |||
514 | #endif /* CONFIG_ACPI */ | 403 | #endif /* CONFIG_ACPI */ |
515 | 404 | ||
516 | #endif /*__ACPI_BUS_H__*/ | 405 | #endif /*__ACPI_BUS_H__*/ |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 8b1d7a6a969..bb145e4b935 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -92,8 +92,8 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
92 | 92 | ||
93 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 93 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
94 | 94 | ||
95 | int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus); | 95 | int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus); |
96 | void acpi_pci_irq_del_prt(int segment, int bus); | 96 | void acpi_pci_irq_del_prt(struct pci_bus *bus); |
97 | 97 | ||
98 | /* ACPI PCI Device Binding (pci_bind.c) */ | 98 | /* ACPI PCI Device Binding (pci_bind.c) */ |
99 | 99 | ||
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index 451823cb883..17397267217 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h | |||
@@ -15,7 +15,6 @@ extern int pxm_to_node(int); | |||
15 | extern int node_to_pxm(int); | 15 | extern int node_to_pxm(int); |
16 | extern void __acpi_map_pxm_to_node(int, int); | 16 | extern void __acpi_map_pxm_to_node(int, int); |
17 | extern int acpi_map_pxm_to_node(int); | 17 | extern int acpi_map_pxm_to_node(int); |
18 | extern unsigned char acpi_srat_revision; | ||
19 | 18 | ||
20 | #endif /* CONFIG_ACPI_NUMA */ | 19 | #endif /* CONFIG_ACPI_NUMA */ |
21 | #endif /* __ACP_NUMA_H */ | 20 | #endif /* __ACP_NUMA_H */ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 43152742b46..4543b6f7586 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -1,13 +1,14 @@ | |||
1 | |||
1 | /****************************************************************************** | 2 | /****************************************************************************** |
2 | * | 3 | * |
3 | * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These | 4 | * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These |
4 | * interfaces must be implemented by OSL to interface the | 5 | * interfaces must be implemented by OSL to interface the |
5 | * ACPI components to the host operating system. | 6 | * ACPI components to the host operating system. |
6 | * | 7 | * |
7 | *****************************************************************************/ | 8 | *****************************************************************************/ |
8 | 9 | ||
9 | /* | 10 | /* |
10 | * Copyright (C) 2000 - 2012, Intel Corp. | 11 | * Copyright (C) 2000 - 2011, Intel Corp. |
11 | * All rights reserved. | 12 | * All rights reserved. |
12 | * | 13 | * |
13 | * Redistribution and use in source and binary forms, with or without | 14 | * Redistribution and use in source and binary forms, with or without |
@@ -46,8 +47,8 @@ | |||
46 | #ifndef __ACPIOSXF_H__ | 47 | #ifndef __ACPIOSXF_H__ |
47 | #define __ACPIOSXF_H__ | 48 | #define __ACPIOSXF_H__ |
48 | 49 | ||
49 | #include <acpi/platform/acenv.h> | 50 | #include "platform/acenv.h" |
50 | #include <acpi/actypes.h> | 51 | #include "actypes.h" |
51 | 52 | ||
52 | /* Types for acpi_os_execute */ | 53 | /* Types for acpi_os_execute */ |
53 | 54 | ||
@@ -94,11 +95,6 @@ acpi_status | |||
94 | acpi_os_table_override(struct acpi_table_header *existing_table, | 95 | acpi_os_table_override(struct acpi_table_header *existing_table, |
95 | struct acpi_table_header **new_table); | 96 | struct acpi_table_header **new_table); |
96 | 97 | ||
97 | acpi_status | ||
98 | acpi_os_physical_table_override(struct acpi_table_header *existing_table, | ||
99 | acpi_physical_address * new_address, | ||
100 | u32 *new_table_length); | ||
101 | |||
102 | /* | 98 | /* |
103 | * Spinlock primitives | 99 | * Spinlock primitives |
104 | */ | 100 | */ |
@@ -193,8 +189,6 @@ void acpi_os_fixed_event_count(u32 fixed_event_number); | |||
193 | /* | 189 | /* |
194 | * Threads and Scheduling | 190 | * Threads and Scheduling |
195 | */ | 191 | */ |
196 | extern struct workqueue_struct *kacpi_hotplug_wq; | ||
197 | |||
198 | acpi_thread_id acpi_os_get_thread_id(void); | 192 | acpi_thread_id acpi_os_get_thread_id(void); |
199 | 193 | ||
200 | acpi_status | 194 | acpi_status |
@@ -204,7 +198,7 @@ acpi_os_execute(acpi_execute_type type, | |||
204 | acpi_status | 198 | acpi_status |
205 | acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context); | 199 | acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context); |
206 | 200 | ||
207 | void acpi_os_wait_events_complete(void); | 201 | void acpi_os_wait_events_complete(void *context); |
208 | 202 | ||
209 | void acpi_os_sleep(u64 milliseconds); | 203 | void acpi_os_sleep(u64 milliseconds); |
210 | 204 | ||
@@ -221,10 +215,10 @@ acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width); | |||
221 | * Platform and hardware-independent physical memory interfaces | 215 | * Platform and hardware-independent physical memory interfaces |
222 | */ | 216 | */ |
223 | acpi_status | 217 | acpi_status |
224 | acpi_os_read_memory(acpi_physical_address address, u64 *value, u32 width); | 218 | acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width); |
225 | 219 | ||
226 | acpi_status | 220 | acpi_status |
227 | acpi_os_write_memory(acpi_physical_address address, u64 value, u32 width); | 221 | acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); |
228 | 222 | ||
229 | /* | 223 | /* |
230 | * Platform and hardware-independent PCI configuration space access | 224 | * Platform and hardware-independent PCI configuration space access |
@@ -242,6 +236,13 @@ acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, | |||
242 | /* | 236 | /* |
243 | * Miscellaneous | 237 | * Miscellaneous |
244 | */ | 238 | */ |
239 | acpi_status | ||
240 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | ||
241 | acpi_size length, char *name); | ||
242 | acpi_status | ||
243 | acpi_os_invalidate_address(u8 space_id, acpi_physical_address address, | ||
244 | acpi_size length); | ||
245 | |||
245 | u64 acpi_os_get_timer(void); | 246 | u64 acpi_os_get_timer(void); |
246 | 247 | ||
247 | acpi_status acpi_os_signal(u32 function, void *info); | 248 | acpi_status acpi_os_signal(u32 function, void *info); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 3d88395d4d6..f554a9313b4 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -1,3 +1,4 @@ | |||
1 | |||
1 | /****************************************************************************** | 2 | /****************************************************************************** |
2 | * | 3 | * |
3 | * Name: acpixf.h - External interfaces to the ACPI subsystem | 4 | * Name: acpixf.h - External interfaces to the ACPI subsystem |
@@ -5,7 +6,7 @@ | |||
5 | *****************************************************************************/ | 6 | *****************************************************************************/ |
6 | 7 | ||
7 | /* | 8 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 9 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 10 | * All rights reserved. |
10 | * | 11 | * |
11 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -46,12 +47,10 @@ | |||
46 | 47 | ||
47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
48 | 49 | ||
49 | #define ACPI_CA_VERSION 0x20121018 | 50 | #define ACPI_CA_VERSION 0x20110623 |
50 | 51 | ||
51 | #include <acpi/acconfig.h> | 52 | #include "actypes.h" |
52 | #include <acpi/actypes.h> | 53 | #include "actbl.h" |
53 | #include <acpi/actbl.h> | ||
54 | #include <acpi/acbuffer.h> | ||
55 | 54 | ||
56 | extern u8 acpi_gbl_permanent_mmap; | 55 | extern u8 acpi_gbl_permanent_mmap; |
57 | 56 | ||
@@ -67,42 +66,14 @@ extern u8 acpi_gbl_create_osi_method; | |||
67 | extern u8 acpi_gbl_use_default_register_widths; | 66 | extern u8 acpi_gbl_use_default_register_widths; |
68 | extern acpi_name acpi_gbl_trace_method_name; | 67 | extern acpi_name acpi_gbl_trace_method_name; |
69 | extern u32 acpi_gbl_trace_flags; | 68 | extern u32 acpi_gbl_trace_flags; |
70 | extern bool acpi_gbl_enable_aml_debug_object; | 69 | extern u32 acpi_gbl_enable_aml_debug_object; |
71 | extern u8 acpi_gbl_copy_dsdt_locally; | 70 | extern u8 acpi_gbl_copy_dsdt_locally; |
72 | extern u8 acpi_gbl_truncate_io_addresses; | 71 | extern u8 acpi_gbl_truncate_io_addresses; |
73 | extern u8 acpi_gbl_disable_auto_repair; | 72 | extern u8 acpi_gbl_disable_auto_repair; |
74 | 73 | ||
75 | /* | ||
76 | * Hardware-reduced prototypes. All interfaces that use these macros will | ||
77 | * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag | ||
78 | * is set to TRUE. | ||
79 | */ | ||
80 | #if (!ACPI_REDUCED_HARDWARE) | ||
81 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | ||
82 | prototype; | ||
83 | |||
84 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | ||
85 | prototype; | ||
86 | |||
87 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | ||
88 | prototype; | ||
89 | |||
90 | #else | ||
91 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | ||
92 | static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);} | ||
93 | |||
94 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | ||
95 | static ACPI_INLINE prototype {return(AE_OK);} | ||
96 | |||
97 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | ||
98 | static ACPI_INLINE prototype {} | ||
99 | |||
100 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
101 | |||
102 | extern u32 acpi_current_gpe_count; | 74 | extern u32 acpi_current_gpe_count; |
103 | extern struct acpi_table_fadt acpi_gbl_FADT; | 75 | extern struct acpi_table_fadt acpi_gbl_FADT; |
104 | extern u8 acpi_gbl_system_awake_and_running; | 76 | extern u8 acpi_gbl_system_awake_and_running; |
105 | extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ | ||
106 | 77 | ||
107 | extern u32 acpi_rsdt_forced; | 78 | extern u32 acpi_rsdt_forced; |
108 | /* | 79 | /* |
@@ -124,8 +95,9 @@ acpi_status acpi_terminate(void); | |||
124 | acpi_status acpi_subsystem_status(void); | 95 | acpi_status acpi_subsystem_status(void); |
125 | #endif | 96 | #endif |
126 | 97 | ||
127 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) | 98 | acpi_status acpi_enable(void); |
128 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) | 99 | |
100 | acpi_status acpi_disable(void); | ||
129 | 101 | ||
130 | #ifdef ACPI_FUTURE_USAGE | 102 | #ifdef ACPI_FUTURE_USAGE |
131 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); | 103 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); |
@@ -139,15 +111,6 @@ acpi_status acpi_install_interface(acpi_string interface_name); | |||
139 | 111 | ||
140 | acpi_status acpi_remove_interface(acpi_string interface_name); | 112 | acpi_status acpi_remove_interface(acpi_string interface_name); |
141 | 113 | ||
142 | u32 | ||
143 | acpi_check_address_range(acpi_adr_space_type space_id, | ||
144 | acpi_physical_address address, | ||
145 | acpi_size length, u8 warn); | ||
146 | |||
147 | acpi_status | ||
148 | acpi_decode_pld_buffer(u8 *in_buffer, | ||
149 | acpi_size length, struct acpi_pld_info **return_buffer); | ||
150 | |||
151 | /* | 114 | /* |
152 | * ACPI Memory management | 115 | * ACPI Memory management |
153 | */ | 116 | */ |
@@ -158,26 +121,22 @@ void *acpi_callocate(u32 size); | |||
158 | void acpi_free(void *address); | 121 | void acpi_free(void *address); |
159 | 122 | ||
160 | /* | 123 | /* |
161 | * ACPI table load/unload interfaces | ||
162 | */ | ||
163 | acpi_status acpi_load_table(struct acpi_table_header *table); | ||
164 | |||
165 | acpi_status acpi_unload_parent_table(acpi_handle object); | ||
166 | |||
167 | acpi_status acpi_load_tables(void); | ||
168 | |||
169 | /* | ||
170 | * ACPI table manipulation interfaces | 124 | * ACPI table manipulation interfaces |
171 | */ | 125 | */ |
172 | acpi_status acpi_reallocate_root_table(void); | 126 | acpi_status acpi_reallocate_root_table(void); |
173 | 127 | ||
174 | acpi_status acpi_find_root_pointer(acpi_size *rsdp_address); | 128 | acpi_status acpi_find_root_pointer(acpi_size *rsdp_address); |
175 | 129 | ||
130 | acpi_status acpi_load_tables(void); | ||
131 | |||
132 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr); | ||
133 | |||
176 | acpi_status acpi_unload_table_id(acpi_owner_id id); | 134 | acpi_status acpi_unload_table_id(acpi_owner_id id); |
177 | 135 | ||
178 | acpi_status | 136 | acpi_status |
179 | acpi_get_table_header(acpi_string signature, | 137 | acpi_get_table_header(acpi_string signature, |
180 | u32 instance, struct acpi_table_header *out_table_header); | 138 | u32 instance, |
139 | struct acpi_table_header *out_table_header); | ||
181 | 140 | ||
182 | acpi_status | 141 | acpi_status |
183 | acpi_get_table_with_size(acpi_string signature, | 142 | acpi_get_table_with_size(acpi_string signature, |
@@ -188,7 +147,8 @@ acpi_get_table(acpi_string signature, | |||
188 | u32 instance, struct acpi_table_header **out_table); | 147 | u32 instance, struct acpi_table_header **out_table); |
189 | 148 | ||
190 | acpi_status | 149 | acpi_status |
191 | acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table); | 150 | acpi_get_table_by_index(u32 table_index, |
151 | struct acpi_table_header **out_table); | ||
192 | 152 | ||
193 | acpi_status | 153 | acpi_status |
194 | acpi_install_table_handler(acpi_tbl_handler handler, void *context); | 154 | acpi_install_table_handler(acpi_tbl_handler handler, void *context); |
@@ -269,37 +229,21 @@ acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle); | |||
269 | acpi_status | 229 | acpi_status |
270 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | 230 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); |
271 | 231 | ||
272 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 232 | acpi_status |
273 | acpi_install_global_event_handler | 233 | acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler, |
274 | (acpi_gbl_event_handler handler, void *context)) | 234 | void *context); |
275 | 235 | ||
276 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 236 | acpi_status |
277 | acpi_install_fixed_event_handler(u32 | 237 | acpi_install_fixed_event_handler(u32 acpi_event, |
278 | acpi_event, | 238 | acpi_event_handler handler, void *context); |
279 | acpi_event_handler | 239 | |
280 | handler, | 240 | acpi_status |
281 | void | 241 | acpi_remove_fixed_event_handler(u32 acpi_event, acpi_event_handler handler); |
282 | *context)) | 242 | |
283 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 243 | acpi_status |
284 | acpi_remove_fixed_event_handler(u32 acpi_event, | 244 | acpi_install_notify_handler(acpi_handle device, |
285 | acpi_event_handler | 245 | u32 handler_type, |
286 | handler)) | 246 | acpi_notify_handler handler, void *context); |
287 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
288 | acpi_install_gpe_handler(acpi_handle | ||
289 | gpe_device, | ||
290 | u32 gpe_number, | ||
291 | u32 type, | ||
292 | acpi_gpe_handler | ||
293 | address, | ||
294 | void *context)) | ||
295 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
296 | acpi_remove_gpe_handler(acpi_handle gpe_device, | ||
297 | u32 gpe_number, | ||
298 | acpi_gpe_handler | ||
299 | address)) | ||
300 | acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, | ||
301 | acpi_notify_handler handler, | ||
302 | void *context); | ||
303 | 247 | ||
304 | acpi_status | 248 | acpi_status |
305 | acpi_remove_notify_handler(acpi_handle device, | 249 | acpi_remove_notify_handler(acpi_handle device, |
@@ -316,6 +260,15 @@ acpi_remove_address_space_handler(acpi_handle device, | |||
316 | acpi_adr_space_type space_id, | 260 | acpi_adr_space_type space_id, |
317 | acpi_adr_space_handler handler); | 261 | acpi_adr_space_handler handler); |
318 | 262 | ||
263 | acpi_status | ||
264 | acpi_install_gpe_handler(acpi_handle gpe_device, | ||
265 | u32 gpe_number, | ||
266 | u32 type, acpi_gpe_handler address, void *context); | ||
267 | |||
268 | acpi_status | ||
269 | acpi_remove_gpe_handler(acpi_handle gpe_device, | ||
270 | u32 gpe_number, acpi_gpe_handler address); | ||
271 | |||
319 | #ifdef ACPI_FUTURE_USAGE | 272 | #ifdef ACPI_FUTURE_USAGE |
320 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 273 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
321 | #endif | 274 | #endif |
@@ -323,94 +276,53 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | |||
323 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); | 276 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); |
324 | 277 | ||
325 | /* | 278 | /* |
326 | * Global Lock interfaces | 279 | * Event interfaces |
327 | */ | 280 | */ |
328 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 281 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); |
329 | acpi_acquire_global_lock(u16 timeout, | 282 | |
330 | u32 *handle)) | 283 | acpi_status acpi_release_global_lock(u32 handle); |
331 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 284 | |
332 | acpi_release_global_lock(u32 handle)) | 285 | acpi_status acpi_enable_event(u32 event, u32 flags); |
286 | |||
287 | acpi_status acpi_disable_event(u32 event, u32 flags); | ||
288 | |||
289 | acpi_status acpi_clear_event(u32 event); | ||
290 | |||
291 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); | ||
333 | 292 | ||
334 | /* | 293 | /* |
335 | * Interfaces to AML mutex objects | 294 | * GPE Interfaces |
336 | */ | 295 | */ |
296 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | ||
297 | |||
298 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); | ||
299 | |||
300 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); | ||
301 | |||
337 | acpi_status | 302 | acpi_status |
338 | acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout); | 303 | acpi_setup_gpe_for_wake(acpi_handle parent_device, |
304 | acpi_handle gpe_device, u32 gpe_number); | ||
339 | 305 | ||
340 | acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname); | 306 | acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action); |
341 | 307 | ||
342 | /* | 308 | acpi_status |
343 | * Fixed Event interfaces | 309 | acpi_get_gpe_status(acpi_handle gpe_device, |
344 | */ | 310 | u32 gpe_number, acpi_event_status *event_status); |
345 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
346 | acpi_enable_event(u32 event, u32 flags)) | ||
347 | 311 | ||
348 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 312 | acpi_status acpi_disable_all_gpes(void); |
349 | acpi_disable_event(u32 event, u32 flags)) | ||
350 | 313 | ||
351 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event)) | 314 | acpi_status acpi_enable_all_runtime_gpes(void); |
352 | 315 | ||
353 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 316 | acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device); |
354 | acpi_get_event_status(u32 event, | 317 | |
355 | acpi_event_status | 318 | acpi_status |
356 | *event_status)) | 319 | acpi_install_gpe_block(acpi_handle gpe_device, |
357 | /* | 320 | struct acpi_generic_address *gpe_block_address, |
358 | * General Purpose Event (GPE) Interfaces | 321 | u32 register_count, u32 interrupt_number); |
359 | */ | 322 | |
360 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void)) | 323 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); |
361 | 324 | ||
362 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 325 | acpi_status acpi_update_all_gpes(void); |
363 | acpi_enable_gpe(acpi_handle gpe_device, | ||
364 | u32 gpe_number)) | ||
365 | |||
366 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
367 | acpi_disable_gpe(acpi_handle gpe_device, | ||
368 | u32 gpe_number)) | ||
369 | |||
370 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
371 | acpi_clear_gpe(acpi_handle gpe_device, | ||
372 | u32 gpe_number)) | ||
373 | |||
374 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
375 | acpi_set_gpe(acpi_handle gpe_device, | ||
376 | u32 gpe_number, u8 action)) | ||
377 | |||
378 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
379 | acpi_finish_gpe(acpi_handle gpe_device, | ||
380 | u32 gpe_number)) | ||
381 | |||
382 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
383 | acpi_setup_gpe_for_wake(acpi_handle | ||
384 | parent_device, | ||
385 | acpi_handle gpe_device, | ||
386 | u32 gpe_number)) | ||
387 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
388 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, | ||
389 | u32 gpe_number, | ||
390 | u8 action)) | ||
391 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
392 | acpi_get_gpe_status(acpi_handle gpe_device, | ||
393 | u32 gpe_number, | ||
394 | acpi_event_status | ||
395 | *event_status)) | ||
396 | |||
397 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) | ||
398 | |||
399 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) | ||
400 | |||
401 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
402 | acpi_get_gpe_device(u32 gpe_index, | ||
403 | acpi_handle * gpe_device)) | ||
404 | |||
405 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
406 | acpi_install_gpe_block(acpi_handle gpe_device, | ||
407 | struct | ||
408 | acpi_generic_address | ||
409 | *gpe_block_address, | ||
410 | u32 register_count, | ||
411 | u32 interrupt_number)) | ||
412 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
413 | acpi_remove_gpe_block(acpi_handle gpe_device)) | ||
414 | 326 | ||
415 | /* | 327 | /* |
416 | * Resource interfaces | 328 | * Resource interfaces |
@@ -434,10 +346,6 @@ acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer); | |||
434 | #endif | 346 | #endif |
435 | 347 | ||
436 | acpi_status | 348 | acpi_status |
437 | acpi_get_event_resources(acpi_handle device_handle, | ||
438 | struct acpi_buffer *ret_buffer); | ||
439 | |||
440 | acpi_status | ||
441 | acpi_walk_resources(acpi_handle device, | 349 | acpi_walk_resources(acpi_handle device, |
442 | char *name, | 350 | char *name, |
443 | acpi_walk_resource_callback user_function, void *context); | 351 | acpi_walk_resource_callback user_function, void *context); |
@@ -452,41 +360,25 @@ acpi_status | |||
452 | acpi_resource_to_address64(struct acpi_resource *resource, | 360 | acpi_resource_to_address64(struct acpi_resource *resource, |
453 | struct acpi_resource_address64 *out); | 361 | struct acpi_resource_address64 *out); |
454 | 362 | ||
455 | acpi_status | ||
456 | acpi_buffer_to_resource(u8 *aml_buffer, | ||
457 | u16 aml_buffer_length, | ||
458 | struct acpi_resource **resource_ptr); | ||
459 | |||
460 | /* | 363 | /* |
461 | * Hardware (ACPI device) interfaces | 364 | * Hardware (ACPI device) interfaces |
462 | */ | 365 | */ |
463 | acpi_status acpi_reset(void); | 366 | acpi_status acpi_reset(void); |
464 | 367 | ||
465 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 368 | acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value); |
466 | acpi_read_bit_register(u32 register_id, | ||
467 | u32 *return_value)) | ||
468 | 369 | ||
469 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 370 | acpi_status acpi_write_bit_register(u32 register_id, u32 value); |
470 | acpi_write_bit_register(u32 register_id, | ||
471 | u32 value)) | ||
472 | 371 | ||
473 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 372 | acpi_status acpi_set_firmware_waking_vector(u32 physical_address); |
474 | acpi_set_firmware_waking_vector(u32 | ||
475 | physical_address)) | ||
476 | 373 | ||
477 | #if ACPI_MACHINE_WIDTH == 64 | 374 | #if ACPI_MACHINE_WIDTH == 64 |
478 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 375 | acpi_status acpi_set_firmware_waking_vector64(u64 physical_address); |
479 | acpi_set_firmware_waking_vector64(u64 | ||
480 | physical_address)) | ||
481 | #endif | 376 | #endif |
482 | 377 | ||
483 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); | 378 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); |
484 | 379 | ||
485 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); | 380 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); |
486 | 381 | ||
487 | /* | ||
488 | * Sleep/Wake interfaces | ||
489 | */ | ||
490 | acpi_status | 382 | acpi_status |
491 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); | 383 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); |
492 | 384 | ||
@@ -494,28 +386,13 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); | |||
494 | 386 | ||
495 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); | 387 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); |
496 | 388 | ||
497 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) | 389 | acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void); |
498 | 390 | ||
499 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); | 391 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); |
500 | 392 | ||
501 | acpi_status acpi_leave_sleep_state(u8 sleep_state); | 393 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
502 | 394 | ||
503 | /* | 395 | /* |
504 | * ACPI Timer interfaces | ||
505 | */ | ||
506 | #ifdef ACPI_FUTURE_USAGE | ||
507 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
508 | acpi_get_timer_resolution(u32 *resolution)) | ||
509 | |||
510 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks)) | ||
511 | |||
512 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
513 | acpi_get_timer_duration(u32 start_ticks, | ||
514 | u32 end_ticks, | ||
515 | u32 *time_elapsed)) | ||
516 | #endif /* ACPI_FUTURE_USAGE */ | ||
517 | |||
518 | /* | ||
519 | * Error/Warning output | 396 | * Error/Warning output |
520 | */ | 397 | */ |
521 | void ACPI_INTERNAL_VAR_XFACE | 398 | void ACPI_INTERNAL_VAR_XFACE |
@@ -535,14 +412,6 @@ void ACPI_INTERNAL_VAR_XFACE | |||
535 | acpi_info(const char *module_name, | 412 | acpi_info(const char *module_name, |
536 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | 413 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); |
537 | 414 | ||
538 | void ACPI_INTERNAL_VAR_XFACE | ||
539 | acpi_bios_error(const char *module_name, | ||
540 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
541 | |||
542 | void ACPI_INTERNAL_VAR_XFACE | ||
543 | acpi_bios_warning(const char *module_name, | ||
544 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
545 | |||
546 | /* | 415 | /* |
547 | * Debug output | 416 | * Debug output |
548 | */ | 417 | */ |
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 40349ae6546..0a66cc45dd6 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -48,7 +48,7 @@ | |||
48 | * Definitions for Resource Attributes | 48 | * Definitions for Resource Attributes |
49 | */ | 49 | */ |
50 | typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ | 50 | typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ |
51 | typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */ | 51 | typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */ |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Memory Attributes | 54 | * Memory Attributes |
@@ -61,14 +61,11 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 | |||
61 | #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02 | 61 | #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02 |
62 | #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03 | 62 | #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03 |
63 | 63 | ||
64 | /*! [Begin] no source code translation */ | ||
65 | /* | 64 | /* |
66 | * IO Attributes | 65 | * IO Attributes |
67 | * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh. | 66 | * The ISA IO ranges are: n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh. |
68 | * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh. | 67 | * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh. |
69 | */ | 68 | */ |
70 | /*! [End] no source code translation !*/ | ||
71 | |||
72 | #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 | 69 | #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 |
73 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 | 70 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 |
74 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) | 71 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) |
@@ -84,26 +81,16 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 | |||
84 | #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */ | 81 | #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */ |
85 | 82 | ||
86 | /* | 83 | /* |
87 | * Interrupt attributes - used in multiple descriptors | 84 | * IRQ Attributes |
88 | */ | 85 | */ |
89 | |||
90 | /* Triggering */ | ||
91 | |||
92 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00 | 86 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00 |
93 | #define ACPI_EDGE_SENSITIVE (u8) 0x01 | 87 | #define ACPI_EDGE_SENSITIVE (u8) 0x01 |
94 | 88 | ||
95 | /* Polarity */ | ||
96 | |||
97 | #define ACPI_ACTIVE_HIGH (u8) 0x00 | 89 | #define ACPI_ACTIVE_HIGH (u8) 0x00 |
98 | #define ACPI_ACTIVE_LOW (u8) 0x01 | 90 | #define ACPI_ACTIVE_LOW (u8) 0x01 |
99 | #define ACPI_ACTIVE_BOTH (u8) 0x02 | ||
100 | |||
101 | /* Sharing */ | ||
102 | 91 | ||
103 | #define ACPI_EXCLUSIVE (u8) 0x00 | 92 | #define ACPI_EXCLUSIVE (u8) 0x00 |
104 | #define ACPI_SHARED (u8) 0x01 | 93 | #define ACPI_SHARED (u8) 0x01 |
105 | #define ACPI_EXCLUSIVE_AND_WAKE (u8) 0x02 | ||
106 | #define ACPI_SHARED_AND_WAKE (u8) 0x03 | ||
107 | 94 | ||
108 | /* | 95 | /* |
109 | * DMA Attributes | 96 | * DMA Attributes |
@@ -140,8 +127,6 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 | |||
140 | #define ACPI_POS_DECODE (u8) 0x00 | 127 | #define ACPI_POS_DECODE (u8) 0x00 |
141 | #define ACPI_SUB_DECODE (u8) 0x01 | 128 | #define ACPI_SUB_DECODE (u8) 0x01 |
142 | 129 | ||
143 | /* Producer/Consumer */ | ||
144 | |||
145 | #define ACPI_PRODUCER (u8) 0x00 | 130 | #define ACPI_PRODUCER (u8) 0x00 |
146 | #define ACPI_CONSUMER (u8) 0x01 | 131 | #define ACPI_CONSUMER (u8) 0x01 |
147 | 132 | ||
@@ -207,21 +192,6 @@ struct acpi_resource_fixed_io { | |||
207 | u8 address_length; | 192 | u8 address_length; |
208 | }; | 193 | }; |
209 | 194 | ||
210 | struct acpi_resource_fixed_dma { | ||
211 | u16 request_lines; | ||
212 | u16 channels; | ||
213 | u8 width; | ||
214 | }; | ||
215 | |||
216 | /* Values for Width field above */ | ||
217 | |||
218 | #define ACPI_DMA_WIDTH8 0 | ||
219 | #define ACPI_DMA_WIDTH16 1 | ||
220 | #define ACPI_DMA_WIDTH32 2 | ||
221 | #define ACPI_DMA_WIDTH64 3 | ||
222 | #define ACPI_DMA_WIDTH128 4 | ||
223 | #define ACPI_DMA_WIDTH256 5 | ||
224 | |||
225 | struct acpi_resource_vendor { | 195 | struct acpi_resource_vendor { |
226 | u16 byte_length; | 196 | u16 byte_length; |
227 | u8 byte_data[1]; | 197 | u8 byte_data[1]; |
@@ -332,7 +302,7 @@ struct acpi_resource_address64 { | |||
332 | }; | 302 | }; |
333 | 303 | ||
334 | struct acpi_resource_extended_address64 { | 304 | struct acpi_resource_extended_address64 { |
335 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID; | 305 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD; |
336 | u64 granularity; | 306 | u64 granularity; |
337 | u64 minimum; | 307 | u64 minimum; |
338 | u64 maximum; | 308 | u64 maximum; |
@@ -359,166 +329,6 @@ struct acpi_resource_generic_register { | |||
359 | u64 address; | 329 | u64 address; |
360 | }; | 330 | }; |
361 | 331 | ||
362 | struct acpi_resource_gpio { | ||
363 | u8 revision_id; | ||
364 | u8 connection_type; | ||
365 | u8 producer_consumer; /* For values, see Producer/Consumer above */ | ||
366 | u8 pin_config; | ||
367 | u8 sharable; /* For values, see Interrupt Attributes above */ | ||
368 | u8 io_restriction; | ||
369 | u8 triggering; /* For values, see Interrupt Attributes above */ | ||
370 | u8 polarity; /* For values, see Interrupt Attributes above */ | ||
371 | u16 drive_strength; | ||
372 | u16 debounce_timeout; | ||
373 | u16 pin_table_length; | ||
374 | u16 vendor_length; | ||
375 | struct acpi_resource_source resource_source; | ||
376 | u16 *pin_table; | ||
377 | u8 *vendor_data; | ||
378 | }; | ||
379 | |||
380 | /* Values for GPIO connection_type field above */ | ||
381 | |||
382 | #define ACPI_RESOURCE_GPIO_TYPE_INT 0 | ||
383 | #define ACPI_RESOURCE_GPIO_TYPE_IO 1 | ||
384 | |||
385 | /* Values for pin_config field above */ | ||
386 | |||
387 | #define ACPI_PIN_CONFIG_DEFAULT 0 | ||
388 | #define ACPI_PIN_CONFIG_PULLUP 1 | ||
389 | #define ACPI_PIN_CONFIG_PULLDOWN 2 | ||
390 | #define ACPI_PIN_CONFIG_NOPULL 3 | ||
391 | |||
392 | /* Values for io_restriction field above */ | ||
393 | |||
394 | #define ACPI_IO_RESTRICT_NONE 0 | ||
395 | #define ACPI_IO_RESTRICT_INPUT 1 | ||
396 | #define ACPI_IO_RESTRICT_OUTPUT 2 | ||
397 | #define ACPI_IO_RESTRICT_NONE_PRESERVE 3 | ||
398 | |||
399 | /* Common structure for I2C, SPI, and UART serial descriptors */ | ||
400 | |||
401 | #define ACPI_RESOURCE_SERIAL_COMMON \ | ||
402 | u8 revision_id; \ | ||
403 | u8 type; \ | ||
404 | u8 producer_consumer; /* For values, see Producer/Consumer above */\ | ||
405 | u8 slave_mode; \ | ||
406 | u8 type_revision_id; \ | ||
407 | u16 type_data_length; \ | ||
408 | u16 vendor_length; \ | ||
409 | struct acpi_resource_source resource_source; \ | ||
410 | u8 *vendor_data; | ||
411 | |||
412 | struct acpi_resource_common_serialbus { | ||
413 | ACPI_RESOURCE_SERIAL_COMMON}; | ||
414 | |||
415 | /* Values for the Type field above */ | ||
416 | |||
417 | #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1 | ||
418 | #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2 | ||
419 | #define ACPI_RESOURCE_SERIAL_TYPE_UART 3 | ||
420 | |||
421 | /* Values for slave_mode field above */ | ||
422 | |||
423 | #define ACPI_CONTROLLER_INITIATED 0 | ||
424 | #define ACPI_DEVICE_INITIATED 1 | ||
425 | |||
426 | struct acpi_resource_i2c_serialbus { | ||
427 | ACPI_RESOURCE_SERIAL_COMMON u8 access_mode; | ||
428 | u16 slave_address; | ||
429 | u32 connection_speed; | ||
430 | }; | ||
431 | |||
432 | /* Values for access_mode field above */ | ||
433 | |||
434 | #define ACPI_I2C_7BIT_MODE 0 | ||
435 | #define ACPI_I2C_10BIT_MODE 1 | ||
436 | |||
437 | struct acpi_resource_spi_serialbus { | ||
438 | ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode; | ||
439 | u8 device_polarity; | ||
440 | u8 data_bit_length; | ||
441 | u8 clock_phase; | ||
442 | u8 clock_polarity; | ||
443 | u16 device_selection; | ||
444 | u32 connection_speed; | ||
445 | }; | ||
446 | |||
447 | /* Values for wire_mode field above */ | ||
448 | |||
449 | #define ACPI_SPI_4WIRE_MODE 0 | ||
450 | #define ACPI_SPI_3WIRE_MODE 1 | ||
451 | |||
452 | /* Values for device_polarity field above */ | ||
453 | |||
454 | #define ACPI_SPI_ACTIVE_LOW 0 | ||
455 | #define ACPI_SPI_ACTIVE_HIGH 1 | ||
456 | |||
457 | /* Values for clock_phase field above */ | ||
458 | |||
459 | #define ACPI_SPI_FIRST_PHASE 0 | ||
460 | #define ACPI_SPI_SECOND_PHASE 1 | ||
461 | |||
462 | /* Values for clock_polarity field above */ | ||
463 | |||
464 | #define ACPI_SPI_START_LOW 0 | ||
465 | #define ACPI_SPI_START_HIGH 1 | ||
466 | |||
467 | struct acpi_resource_uart_serialbus { | ||
468 | ACPI_RESOURCE_SERIAL_COMMON u8 endian; | ||
469 | u8 data_bits; | ||
470 | u8 stop_bits; | ||
471 | u8 flow_control; | ||
472 | u8 parity; | ||
473 | u8 lines_enabled; | ||
474 | u16 rx_fifo_size; | ||
475 | u16 tx_fifo_size; | ||
476 | u32 default_baud_rate; | ||
477 | }; | ||
478 | |||
479 | /* Values for Endian field above */ | ||
480 | |||
481 | #define ACPI_UART_LITTLE_ENDIAN 0 | ||
482 | #define ACPI_UART_BIG_ENDIAN 1 | ||
483 | |||
484 | /* Values for data_bits field above */ | ||
485 | |||
486 | #define ACPI_UART_5_DATA_BITS 0 | ||
487 | #define ACPI_UART_6_DATA_BITS 1 | ||
488 | #define ACPI_UART_7_DATA_BITS 2 | ||
489 | #define ACPI_UART_8_DATA_BITS 3 | ||
490 | #define ACPI_UART_9_DATA_BITS 4 | ||
491 | |||
492 | /* Values for stop_bits field above */ | ||
493 | |||
494 | #define ACPI_UART_NO_STOP_BITS 0 | ||
495 | #define ACPI_UART_1_STOP_BIT 1 | ||
496 | #define ACPI_UART_1P5_STOP_BITS 2 | ||
497 | #define ACPI_UART_2_STOP_BITS 3 | ||
498 | |||
499 | /* Values for flow_control field above */ | ||
500 | |||
501 | #define ACPI_UART_FLOW_CONTROL_NONE 0 | ||
502 | #define ACPI_UART_FLOW_CONTROL_HW 1 | ||
503 | #define ACPI_UART_FLOW_CONTROL_XON_XOFF 2 | ||
504 | |||
505 | /* Values for Parity field above */ | ||
506 | |||
507 | #define ACPI_UART_PARITY_NONE 0 | ||
508 | #define ACPI_UART_PARITY_EVEN 1 | ||
509 | #define ACPI_UART_PARITY_ODD 2 | ||
510 | #define ACPI_UART_PARITY_MARK 3 | ||
511 | #define ACPI_UART_PARITY_SPACE 4 | ||
512 | |||
513 | /* Values for lines_enabled bitfield above */ | ||
514 | |||
515 | #define ACPI_UART_CARRIER_DETECT (1<<2) | ||
516 | #define ACPI_UART_RING_INDICATOR (1<<3) | ||
517 | #define ACPI_UART_DATA_SET_READY (1<<4) | ||
518 | #define ACPI_UART_DATA_TERMINAL_READY (1<<5) | ||
519 | #define ACPI_UART_CLEAR_TO_SEND (1<<6) | ||
520 | #define ACPI_UART_REQUEST_TO_SEND (1<<7) | ||
521 | |||
522 | /* ACPI_RESOURCE_TYPEs */ | 332 | /* ACPI_RESOURCE_TYPEs */ |
523 | 333 | ||
524 | #define ACPI_RESOURCE_TYPE_IRQ 0 | 334 | #define ACPI_RESOURCE_TYPE_IRQ 0 |
@@ -538,10 +348,7 @@ struct acpi_resource_uart_serialbus { | |||
538 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ | 348 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ |
539 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 | 349 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 |
540 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 | 350 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 |
541 | #define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */ | 351 | #define ACPI_RESOURCE_TYPE_MAX 16 |
542 | #define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */ | ||
543 | #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */ | ||
544 | #define ACPI_RESOURCE_TYPE_MAX 19 | ||
545 | 352 | ||
546 | /* Master union for resource descriptors */ | 353 | /* Master union for resource descriptors */ |
547 | 354 | ||
@@ -551,7 +358,6 @@ union acpi_resource_data { | |||
551 | struct acpi_resource_start_dependent start_dpf; | 358 | struct acpi_resource_start_dependent start_dpf; |
552 | struct acpi_resource_io io; | 359 | struct acpi_resource_io io; |
553 | struct acpi_resource_fixed_io fixed_io; | 360 | struct acpi_resource_fixed_io fixed_io; |
554 | struct acpi_resource_fixed_dma fixed_dma; | ||
555 | struct acpi_resource_vendor vendor; | 361 | struct acpi_resource_vendor vendor; |
556 | struct acpi_resource_vendor_typed vendor_typed; | 362 | struct acpi_resource_vendor_typed vendor_typed; |
557 | struct acpi_resource_end_tag end_tag; | 363 | struct acpi_resource_end_tag end_tag; |
@@ -564,11 +370,6 @@ union acpi_resource_data { | |||
564 | struct acpi_resource_extended_address64 ext_address64; | 370 | struct acpi_resource_extended_address64 ext_address64; |
565 | struct acpi_resource_extended_irq extended_irq; | 371 | struct acpi_resource_extended_irq extended_irq; |
566 | struct acpi_resource_generic_register generic_reg; | 372 | struct acpi_resource_generic_register generic_reg; |
567 | struct acpi_resource_gpio gpio; | ||
568 | struct acpi_resource_i2c_serialbus i2c_serial_bus; | ||
569 | struct acpi_resource_spi_serialbus spi_serial_bus; | ||
570 | struct acpi_resource_uart_serialbus uart_serial_bus; | ||
571 | struct acpi_resource_common_serialbus common_serial_bus; | ||
572 | 373 | ||
573 | /* Common fields */ | 374 | /* Common fields */ |
574 | 375 | ||
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 4f94b1d812d..f1380287ed4 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -79,15 +79,9 @@ | |||
79 | #pragma pack(1) | 79 | #pragma pack(1) |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Note: C bitfields are not used for this reason: | 82 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
83 | * | 83 | * This is the only type that is even remotely portable. Anything else is not |
84 | * "Bitfields are great and easy to read, but unfortunately the C language | 84 | * portable, so do not use any other bitfield types. |
85 | * does not specify the layout of bitfields in memory, which means they are | ||
86 | * essentially useless for dealing with packed data in on-disk formats or | ||
87 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
88 | * this decision was a design error in C. Ritchie could have picked an order | ||
89 | * and stuck with it." Norman Ramsey. | ||
90 | * See http://stackoverflow.com/a/1053662/41661 | ||
91 | */ | 85 | */ |
92 | 86 | ||
93 | /******************************************************************************* | 87 | /******************************************************************************* |
@@ -100,7 +94,7 @@ | |||
100 | struct acpi_table_header { | 94 | struct acpi_table_header { |
101 | char signature[ACPI_NAME_SIZE]; /* ASCII table signature */ | 95 | char signature[ACPI_NAME_SIZE]; /* ASCII table signature */ |
102 | u32 length; /* Length of table in bytes, including this header */ | 96 | u32 length; /* Length of table in bytes, including this header */ |
103 | u8 revision; /* ACPI Specification minor version number */ | 97 | u8 revision; /* ACPI Specification minor version # */ |
104 | u8 checksum; /* To make sum of entire table == 0 */ | 98 | u8 checksum; /* To make sum of entire table == 0 */ |
105 | char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ | 99 | char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ |
106 | char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ | 100 | char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ |
@@ -114,7 +108,7 @@ struct acpi_table_header { | |||
114 | * GAS - Generic Address Structure (ACPI 2.0+) | 108 | * GAS - Generic Address Structure (ACPI 2.0+) |
115 | * | 109 | * |
116 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. | 110 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. |
117 | * If misaligned access is not supported by the hardware, accesses to the | 111 | * If misaliged access is not supported by the hardware, accesses to the |
118 | * 64-bit Address field must be performed with care. | 112 | * 64-bit Address field must be performed with care. |
119 | * | 113 | * |
120 | ******************************************************************************/ | 114 | ******************************************************************************/ |
@@ -216,18 +210,18 @@ struct acpi_table_fadt { | |||
216 | u8 preferred_profile; /* Conveys preferred power management profile to OSPM. */ | 210 | u8 preferred_profile; /* Conveys preferred power management profile to OSPM. */ |
217 | u16 sci_interrupt; /* System vector of SCI interrupt */ | 211 | u16 sci_interrupt; /* System vector of SCI interrupt */ |
218 | u32 smi_command; /* 32-bit Port address of SMI command port */ | 212 | u32 smi_command; /* 32-bit Port address of SMI command port */ |
219 | u8 acpi_enable; /* Value to write to SMI_CMD to enable ACPI */ | 213 | u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ |
220 | u8 acpi_disable; /* Value to write to SMI_CMD to disable ACPI */ | 214 | u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ |
221 | u8 s4_bios_request; /* Value to write to SMI_CMD to enter S4BIOS state */ | 215 | u8 S4bios_request; /* Value to write to SMI CMD to enter S4BIOS state */ |
222 | u8 pstate_control; /* Processor performance state control */ | 216 | u8 pstate_control; /* Processor performance state control */ |
223 | u32 pm1a_event_block; /* 32-bit port address of Power Mgt 1a Event Reg Blk */ | 217 | u32 pm1a_event_block; /* 32-bit Port address of Power Mgt 1a Event Reg Blk */ |
224 | u32 pm1b_event_block; /* 32-bit port address of Power Mgt 1b Event Reg Blk */ | 218 | u32 pm1b_event_block; /* 32-bit Port address of Power Mgt 1b Event Reg Blk */ |
225 | u32 pm1a_control_block; /* 32-bit port address of Power Mgt 1a Control Reg Blk */ | 219 | u32 pm1a_control_block; /* 32-bit Port address of Power Mgt 1a Control Reg Blk */ |
226 | u32 pm1b_control_block; /* 32-bit port address of Power Mgt 1b Control Reg Blk */ | 220 | u32 pm1b_control_block; /* 32-bit Port address of Power Mgt 1b Control Reg Blk */ |
227 | u32 pm2_control_block; /* 32-bit port address of Power Mgt 2 Control Reg Blk */ | 221 | u32 pm2_control_block; /* 32-bit Port address of Power Mgt 2 Control Reg Blk */ |
228 | u32 pm_timer_block; /* 32-bit port address of Power Mgt Timer Ctrl Reg Blk */ | 222 | u32 pm_timer_block; /* 32-bit Port address of Power Mgt Timer Ctrl Reg Blk */ |
229 | u32 gpe0_block; /* 32-bit port address of General Purpose Event 0 Reg Blk */ | 223 | u32 gpe0_block; /* 32-bit Port address of General Purpose Event 0 Reg Blk */ |
230 | u32 gpe1_block; /* 32-bit port address of General Purpose Event 1 Reg Blk */ | 224 | u32 gpe1_block; /* 32-bit Port address of General Purpose Event 1 Reg Blk */ |
231 | u8 pm1_event_length; /* Byte Length of ports at pm1x_event_block */ | 225 | u8 pm1_event_length; /* Byte Length of ports at pm1x_event_block */ |
232 | u8 pm1_control_length; /* Byte Length of ports at pm1x_control_block */ | 226 | u8 pm1_control_length; /* Byte Length of ports at pm1x_control_block */ |
233 | u8 pm2_control_length; /* Byte Length of ports at pm2_control_block */ | 227 | u8 pm2_control_length; /* Byte Length of ports at pm2_control_block */ |
@@ -235,12 +229,12 @@ struct acpi_table_fadt { | |||
235 | u8 gpe0_block_length; /* Byte Length of ports at gpe0_block */ | 229 | u8 gpe0_block_length; /* Byte Length of ports at gpe0_block */ |
236 | u8 gpe1_block_length; /* Byte Length of ports at gpe1_block */ | 230 | u8 gpe1_block_length; /* Byte Length of ports at gpe1_block */ |
237 | u8 gpe1_base; /* Offset in GPE number space where GPE1 events start */ | 231 | u8 gpe1_base; /* Offset in GPE number space where GPE1 events start */ |
238 | u8 cst_control; /* Support for the _CST object and C-States change notification */ | 232 | u8 cst_control; /* Support for the _CST object and C States change notification */ |
239 | u16 c2_latency; /* Worst case HW latency to enter/exit C2 state */ | 233 | u16 C2latency; /* Worst case HW latency to enter/exit C2 state */ |
240 | u16 c3_latency; /* Worst case HW latency to enter/exit C3 state */ | 234 | u16 C3latency; /* Worst case HW latency to enter/exit C3 state */ |
241 | u16 flush_size; /* Processor memory cache line width, in bytes */ | 235 | u16 flush_size; /* Processor's memory cache line width, in bytes */ |
242 | u16 flush_stride; /* Number of flush strides that need to be read */ | 236 | u16 flush_stride; /* Number of flush strides that need to be read */ |
243 | u8 duty_offset; /* Processor duty cycle index in processor P_CNT reg */ | 237 | u8 duty_offset; /* Processor duty cycle index in processor's P_CNT reg */ |
244 | u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */ | 238 | u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */ |
245 | u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ | 239 | u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ |
246 | u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ | 240 | u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ |
@@ -261,30 +255,27 @@ struct acpi_table_fadt { | |||
261 | struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ | 255 | struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ |
262 | struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ | 256 | struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ |
263 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ | 257 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ |
264 | struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register (ACPI 5.0) */ | ||
265 | struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register (ACPI 5.0) */ | ||
266 | }; | 258 | }; |
267 | 259 | ||
268 | /* Masks for FADT Boot Architecture Flags (boot_flags) [Vx]=Introduced in this FADT revision */ | 260 | /* Masks for FADT Boot Architecture Flags (boot_flags) */ |
269 | 261 | ||
270 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ | 262 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ |
271 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ | 263 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ |
272 | #define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */ | 264 | #define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */ |
273 | #define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ | 265 | #define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ |
274 | #define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ | 266 | #define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ |
275 | #define ACPI_FADT_NO_CMOS_RTC (1<<5) /* 05: [V5] No CMOS real-time clock present */ | ||
276 | 267 | ||
277 | #define FADT2_REVISION_ID 3 | 268 | #define FADT2_REVISION_ID 3 |
278 | 269 | ||
279 | /* Masks for FADT flags */ | 270 | /* Masks for FADT flags */ |
280 | 271 | ||
281 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The WBINVD instruction works properly */ | 272 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ |
282 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] WBINVD flushes but does not invalidate caches */ | 273 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ |
283 | #define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */ | 274 | #define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */ |
284 | #define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */ | 275 | #define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */ |
285 | #define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */ | 276 | #define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */ |
286 | #define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */ | 277 | #define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */ |
287 | #define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status is not in fixed register space */ | 278 | #define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status not in fixed register space */ |
288 | #define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */ | 279 | #define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */ |
289 | #define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */ | 280 | #define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */ |
290 | #define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */ | 281 | #define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */ |
@@ -297,36 +288,25 @@ struct acpi_table_fadt { | |||
297 | #define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: [V4] Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ | 288 | #define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: [V4] Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ |
298 | #define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */ | 289 | #define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */ |
299 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
300 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local xAPICs must use physical dest mode (ACPI 3.0) */ | 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
301 | #define ACPI_FADT_HW_REDUCED (1<<20) /* 20: [V5] ACPI hardware is not implemented (ACPI 5.0) */ | ||
302 | #define ACPI_FADT_LOW_POWER_S0 (1<<21) /* 21: [V5] S0 power savings are equal or better than S3 (ACPI 5.0) */ | ||
303 | 292 | ||
304 | /* Values for preferred_profile (Preferred Power Management Profiles) */ | 293 | /* Values for preferred_profile (Preferred Power Management Profiles) */ |
305 | 294 | ||
306 | enum acpi_preferred_pm_profiles { | 295 | enum acpi_prefered_pm_profiles { |
307 | PM_UNSPECIFIED = 0, | 296 | PM_UNSPECIFIED = 0, |
308 | PM_DESKTOP = 1, | 297 | PM_DESKTOP = 1, |
309 | PM_MOBILE = 2, | 298 | PM_MOBILE = 2, |
310 | PM_WORKSTATION = 3, | 299 | PM_WORKSTATION = 3, |
311 | PM_ENTERPRISE_SERVER = 4, | 300 | PM_ENTERPRISE_SERVER = 4, |
312 | PM_SOHO_SERVER = 5, | 301 | PM_SOHO_SERVER = 5, |
313 | PM_APPLIANCE_PC = 6, | 302 | PM_APPLIANCE_PC = 6 |
314 | PM_PERFORMANCE_SERVER = 7, | ||
315 | PM_TABLET = 8 | ||
316 | }; | 303 | }; |
317 | 304 | ||
318 | /* Values for sleep_status and sleep_control registers (V5 FADT) */ | ||
319 | |||
320 | #define ACPI_X_WAKE_STATUS 0x80 | ||
321 | #define ACPI_X_SLEEP_TYPE_MASK 0x1C | ||
322 | #define ACPI_X_SLEEP_TYPE_POSITION 0x02 | ||
323 | #define ACPI_X_SLEEP_ENABLE 0x20 | ||
324 | |||
325 | /* Reset to default packing */ | 305 | /* Reset to default packing */ |
326 | 306 | ||
327 | #pragma pack() | 307 | #pragma pack() |
328 | 308 | ||
329 | #define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f) | 309 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) |
330 | 310 | ||
331 | /* | 311 | /* |
332 | * Internal table-related structures | 312 | * Internal table-related structures |
@@ -341,7 +321,7 @@ union acpi_name_union { | |||
341 | struct acpi_table_desc { | 321 | struct acpi_table_desc { |
342 | acpi_physical_address address; | 322 | acpi_physical_address address; |
343 | struct acpi_table_header *pointer; | 323 | struct acpi_table_header *pointer; |
344 | u32 length; /* Length fixed at 32 bits (fixed in table header) */ | 324 | u32 length; /* Length fixed at 32 bits */ |
345 | union acpi_name_union signature; | 325 | union acpi_name_union signature; |
346 | acpi_owner_id owner_id; | 326 | acpi_owner_id owner_id; |
347 | u8 flags; | 327 | u8 flags; |
@@ -362,7 +342,6 @@ struct acpi_table_desc { | |||
362 | 342 | ||
363 | #include <acpi/actbl1.h> | 343 | #include <acpi/actbl1.h> |
364 | #include <acpi/actbl2.h> | 344 | #include <acpi/actbl2.h> |
365 | #include <acpi/actbl3.h> | ||
366 | 345 | ||
367 | /* | 346 | /* |
368 | * Sizes of the various flavors of FADT. We need to look closely | 347 | * Sizes of the various flavors of FADT. We need to look closely |
@@ -372,15 +351,12 @@ struct acpi_table_desc { | |||
372 | * FADT is the bottom line as to what the version really is. | 351 | * FADT is the bottom line as to what the version really is. |
373 | * | 352 | * |
374 | * For reference, the values below are as follows: | 353 | * For reference, the values below are as follows: |
375 | * FADT V1 size: 0x074 | 354 | * FADT V1 size: 0x74 |
376 | * FADT V2 size: 0x084 | 355 | * FADT V2 size: 0x84 |
377 | * FADT V3 size: 0x0F4 | 356 | * FADT V3+ size: 0xF4 |
378 | * FADT V4 size: 0x0F4 | ||
379 | * FADT V5 size: 0x10C | ||
380 | */ | 357 | */ |
381 | #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) | 358 | #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) |
382 | #define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) | 359 | #define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) |
383 | #define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control)) | 360 | #define ACPI_FADT_V3_SIZE (u32) (sizeof (struct acpi_table_fadt)) |
384 | #define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt)) | ||
385 | 361 | ||
386 | #endif /* __ACTBL_H__ */ | 362 | #endif /* __ACTBL_H__ */ |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 280fc45b59d..7504bc99b29 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -79,15 +79,9 @@ | |||
79 | #pragma pack(1) | 79 | #pragma pack(1) |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Note: C bitfields are not used for this reason: | 82 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
83 | * | 83 | * This is the only type that is even remotely portable. Anything else is not |
84 | * "Bitfields are great and easy to read, but unfortunately the C language | 84 | * portable, so do not use any other bitfield types. |
85 | * does not specify the layout of bitfields in memory, which means they are | ||
86 | * essentially useless for dealing with packed data in on-disk formats or | ||
87 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
88 | * this decision was a design error in C. Ritchie could have picked an order | ||
89 | * and stuck with it." Norman Ramsey. | ||
90 | * See http://stackoverflow.com/a/1053662/41661 | ||
91 | */ | 85 | */ |
92 | 86 | ||
93 | /******************************************************************************* | 87 | /******************************************************************************* |
@@ -234,8 +228,7 @@ enum acpi_einj_actions { | |||
234 | ACPI_EINJ_EXECUTE_OPERATION = 5, | 228 | ACPI_EINJ_EXECUTE_OPERATION = 5, |
235 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, | 229 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, |
236 | ACPI_EINJ_GET_COMMAND_STATUS = 7, | 230 | ACPI_EINJ_GET_COMMAND_STATUS = 7, |
237 | ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8, | 231 | ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */ |
238 | ACPI_EINJ_ACTION_RESERVED = 9, /* 9 and greater are reserved */ | ||
239 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ | 232 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ |
240 | }; | 233 | }; |
241 | 234 | ||
@@ -247,27 +240,7 @@ enum acpi_einj_instructions { | |||
247 | ACPI_EINJ_WRITE_REGISTER = 2, | 240 | ACPI_EINJ_WRITE_REGISTER = 2, |
248 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, | 241 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, |
249 | ACPI_EINJ_NOOP = 4, | 242 | ACPI_EINJ_NOOP = 4, |
250 | ACPI_EINJ_FLUSH_CACHELINE = 5, | 243 | ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ |
251 | ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */ | ||
252 | }; | ||
253 | |||
254 | struct acpi_einj_error_type_with_addr { | ||
255 | u32 error_type; | ||
256 | u32 vendor_struct_offset; | ||
257 | u32 flags; | ||
258 | u32 apic_id; | ||
259 | u64 address; | ||
260 | u64 range; | ||
261 | u32 pcie_id; | ||
262 | }; | ||
263 | |||
264 | struct acpi_einj_vendor { | ||
265 | u32 length; | ||
266 | u32 pcie_id; | ||
267 | u16 vendor_id; | ||
268 | u16 device_id; | ||
269 | u8 revision_id; | ||
270 | u8 reserved[3]; | ||
271 | }; | 244 | }; |
272 | 245 | ||
273 | /* EINJ Trigger Error Action Table */ | 246 | /* EINJ Trigger Error Action Table */ |
@@ -302,7 +275,6 @@ enum acpi_einj_command_status { | |||
302 | #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) | 275 | #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) |
303 | #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) | 276 | #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) |
304 | #define ACPI_EINJ_PLATFORM_FATAL (1<<11) | 277 | #define ACPI_EINJ_PLATFORM_FATAL (1<<11) |
305 | #define ACPI_EINJ_VENDOR_DEFINED (1<<31) | ||
306 | 278 | ||
307 | /******************************************************************************* | 279 | /******************************************************************************* |
308 | * | 280 | * |
@@ -495,9 +467,7 @@ enum acpi_hest_notify_types { | |||
495 | ACPI_HEST_NOTIFY_LOCAL = 2, | 467 | ACPI_HEST_NOTIFY_LOCAL = 2, |
496 | ACPI_HEST_NOTIFY_SCI = 3, | 468 | ACPI_HEST_NOTIFY_SCI = 3, |
497 | ACPI_HEST_NOTIFY_NMI = 4, | 469 | ACPI_HEST_NOTIFY_NMI = 4, |
498 | ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */ | 470 | ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */ |
499 | ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */ | ||
500 | ACPI_HEST_NOTIFY_RESERVED = 7 /* 7 and greater are reserved */ | ||
501 | }; | 471 | }; |
502 | 472 | ||
503 | /* Values for config_write_enable bitfield above */ | 473 | /* Values for config_write_enable bitfield above */ |
@@ -661,9 +631,7 @@ enum acpi_madt_type { | |||
661 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, | 631 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
662 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, | 632 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, |
663 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, | 633 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, |
664 | ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, | 634 | ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ |
665 | ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, | ||
666 | ACPI_MADT_TYPE_RESERVED = 13 /* 13 and greater are reserved */ | ||
667 | }; | 635 | }; |
668 | 636 | ||
669 | /* | 637 | /* |
@@ -684,7 +652,7 @@ struct acpi_madt_local_apic { | |||
684 | struct acpi_madt_io_apic { | 652 | struct acpi_madt_io_apic { |
685 | struct acpi_subtable_header header; | 653 | struct acpi_subtable_header header; |
686 | u8 id; /* I/O APIC ID */ | 654 | u8 id; /* I/O APIC ID */ |
687 | u8 reserved; /* reserved - must be zero */ | 655 | u8 reserved; /* Reserved - must be zero */ |
688 | u32 address; /* APIC physical address */ | 656 | u32 address; /* APIC physical address */ |
689 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ | 657 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
690 | }; | 658 | }; |
@@ -784,36 +752,11 @@ struct acpi_madt_local_x2apic_nmi { | |||
784 | u8 reserved[3]; | 752 | u8 reserved[3]; |
785 | }; | 753 | }; |
786 | 754 | ||
787 | /* 11: Generic Interrupt (ACPI 5.0) */ | ||
788 | |||
789 | struct acpi_madt_generic_interrupt { | ||
790 | struct acpi_subtable_header header; | ||
791 | u16 reserved; /* Reserved - must be zero */ | ||
792 | u32 gic_id; | ||
793 | u32 uid; | ||
794 | u32 flags; | ||
795 | u32 parking_version; | ||
796 | u32 performance_interrupt; | ||
797 | u64 parked_address; | ||
798 | u64 base_address; | ||
799 | }; | ||
800 | |||
801 | /* 12: Generic Distributor (ACPI 5.0) */ | ||
802 | |||
803 | struct acpi_madt_generic_distributor { | ||
804 | struct acpi_subtable_header header; | ||
805 | u16 reserved; /* reserved - must be zero */ | ||
806 | u32 gic_id; | ||
807 | u64 base_address; | ||
808 | u32 global_irq_base; | ||
809 | u32 reserved2; /* reserved - must be zero */ | ||
810 | }; | ||
811 | |||
812 | /* | 755 | /* |
813 | * Common flags fields for MADT subtables | 756 | * Common flags fields for MADT subtables |
814 | */ | 757 | */ |
815 | 758 | ||
816 | /* MADT Local APIC flags (lapic_flags) and GIC flags */ | 759 | /* MADT Local APIC flags (lapic_flags) */ |
817 | 760 | ||
818 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ | 761 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
819 | 762 | ||
@@ -849,7 +792,7 @@ struct acpi_table_msct { | |||
849 | u64 max_address; /* Max physical address in system */ | 792 | u64 max_address; /* Max physical address in system */ |
850 | }; | 793 | }; |
851 | 794 | ||
852 | /* subtable - Maximum Proximity Domain Information. Version 1 */ | 795 | /* Subtable - Maximum Proximity Domain Information. Version 1 */ |
853 | 796 | ||
854 | struct acpi_msct_proximity { | 797 | struct acpi_msct_proximity { |
855 | u8 revision; | 798 | u8 revision; |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 1b2b356486d..58bdd0545c5 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -63,12 +63,10 @@ | |||
63 | */ | 63 | */ |
64 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ | 64 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ |
65 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ | 65 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ |
66 | #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */ | ||
67 | #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */ | ||
68 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ | 66 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ |
69 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ | 67 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ |
70 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ | 68 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ |
71 | #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */ | 69 | #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */ |
72 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ | 70 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ |
73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ | 71 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
74 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ | 72 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ |
@@ -98,15 +96,9 @@ | |||
98 | #pragma pack(1) | 96 | #pragma pack(1) |
99 | 97 | ||
100 | /* | 98 | /* |
101 | * Note: C bitfields are not used for this reason: | 99 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
102 | * | 100 | * This is the only type that is even remotely portable. Anything else is not |
103 | * "Bitfields are great and easy to read, but unfortunately the C language | 101 | * portable, so do not use any other bitfield types. |
104 | * does not specify the layout of bitfields in memory, which means they are | ||
105 | * essentially useless for dealing with packed data in on-disk formats or | ||
106 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
107 | * this decision was a design error in C. Ritchie could have picked an order | ||
108 | * and stuck with it." Norman Ramsey. | ||
109 | * See http://stackoverflow.com/a/1053662/41661 | ||
110 | */ | 102 | */ |
111 | 103 | ||
112 | /******************************************************************************* | 104 | /******************************************************************************* |
@@ -240,115 +232,6 @@ struct acpi_table_boot { | |||
240 | 232 | ||
241 | /******************************************************************************* | 233 | /******************************************************************************* |
242 | * | 234 | * |
243 | * CSRT - Core System Resource Table | ||
244 | * Version 0 | ||
245 | * | ||
246 | * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011 | ||
247 | * | ||
248 | ******************************************************************************/ | ||
249 | |||
250 | struct acpi_table_csrt { | ||
251 | struct acpi_table_header header; /* Common ACPI table header */ | ||
252 | }; | ||
253 | |||
254 | /* Resource Group subtable */ | ||
255 | |||
256 | struct acpi_csrt_group { | ||
257 | u32 length; | ||
258 | u32 vendor_id; | ||
259 | u32 subvendor_id; | ||
260 | u16 device_id; | ||
261 | u16 subdevice_id; | ||
262 | u16 revision; | ||
263 | u16 reserved; | ||
264 | u32 info_length; | ||
265 | |||
266 | /* Shared data (length = info_length) immediately follows */ | ||
267 | }; | ||
268 | |||
269 | /* Resource Descriptor subtable */ | ||
270 | |||
271 | struct acpi_csrt_descriptor { | ||
272 | u32 length; | ||
273 | u16 type; | ||
274 | u16 subtype; | ||
275 | u32 uid; | ||
276 | |||
277 | /* Resource-specific information immediately follows */ | ||
278 | }; | ||
279 | |||
280 | /* Resource Types */ | ||
281 | |||
282 | #define ACPI_CSRT_TYPE_INTERRUPT 0x0001 | ||
283 | #define ACPI_CSRT_TYPE_TIMER 0x0002 | ||
284 | #define ACPI_CSRT_TYPE_DMA 0x0003 | ||
285 | |||
286 | /* Resource Subtypes */ | ||
287 | |||
288 | #define ACPI_CSRT_XRUPT_LINE 0x0000 | ||
289 | #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001 | ||
290 | #define ACPI_CSRT_TIMER 0x0000 | ||
291 | #define ACPI_CSRT_DMA_CHANNEL 0x0000 | ||
292 | #define ACPI_CSRT_DMA_CONTROLLER 0x0001 | ||
293 | |||
294 | /******************************************************************************* | ||
295 | * | ||
296 | * DBG2 - Debug Port Table 2 | ||
297 | * Version 0 (Both main table and subtables) | ||
298 | * | ||
299 | * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012. | ||
300 | * | ||
301 | ******************************************************************************/ | ||
302 | |||
303 | struct acpi_table_dbg2 { | ||
304 | struct acpi_table_header header; /* Common ACPI table header */ | ||
305 | u32 info_offset; | ||
306 | u32 info_count; | ||
307 | }; | ||
308 | |||
309 | /* Debug Device Information Subtable */ | ||
310 | |||
311 | struct acpi_dbg2_device { | ||
312 | u8 revision; | ||
313 | u16 length; | ||
314 | u8 register_count; /* Number of base_address registers */ | ||
315 | u16 namepath_length; | ||
316 | u16 namepath_offset; | ||
317 | u16 oem_data_length; | ||
318 | u16 oem_data_offset; | ||
319 | u16 port_type; | ||
320 | u16 port_subtype; | ||
321 | u16 reserved; | ||
322 | u16 base_address_offset; | ||
323 | u16 address_size_offset; | ||
324 | /* | ||
325 | * Data that follows: | ||
326 | * base_address (required) - Each in 12-byte Generic Address Structure format. | ||
327 | * address_size (required) - Array of u32 sizes corresponding to each base_address register. | ||
328 | * Namepath (required) - Null terminated string. Single dot if not supported. | ||
329 | * oem_data (optional) - Length is oem_data_length. | ||
330 | */ | ||
331 | }; | ||
332 | |||
333 | /* Types for port_type field above */ | ||
334 | |||
335 | #define ACPI_DBG2_SERIAL_PORT 0x8000 | ||
336 | #define ACPI_DBG2_1394_PORT 0x8001 | ||
337 | #define ACPI_DBG2_USB_PORT 0x8002 | ||
338 | #define ACPI_DBG2_NET_PORT 0x8003 | ||
339 | |||
340 | /* Subtypes for port_subtype field above */ | ||
341 | |||
342 | #define ACPI_DBG2_16550_COMPATIBLE 0x0000 | ||
343 | #define ACPI_DBG2_16550_SUBSET 0x0001 | ||
344 | |||
345 | #define ACPI_DBG2_1394_STANDARD 0x0000 | ||
346 | |||
347 | #define ACPI_DBG2_USB_XHCI 0x0000 | ||
348 | #define ACPI_DBG2_USB_EHCI 0x0001 | ||
349 | |||
350 | /******************************************************************************* | ||
351 | * | ||
352 | * DBGP - Debug Port table | 235 | * DBGP - Debug Port table |
353 | * Version 1 | 236 | * Version 1 |
354 | * | 237 | * |
@@ -451,8 +334,8 @@ struct acpi_dmar_reserved_memory { | |||
451 | struct acpi_dmar_header header; | 334 | struct acpi_dmar_header header; |
452 | u16 reserved; | 335 | u16 reserved; |
453 | u16 segment; | 336 | u16 segment; |
454 | u64 base_address; /* 4K aligned base address */ | 337 | u64 base_address; /* 4_k aligned base address */ |
455 | u64 end_address; /* 4K aligned limit address */ | 338 | u64 end_address; /* 4_k aligned limit address */ |
456 | }; | 339 | }; |
457 | 340 | ||
458 | /* Masks for Flags field above */ | 341 | /* Masks for Flags field above */ |
@@ -682,7 +565,7 @@ struct acpi_ivrs_hardware { | |||
682 | /* Masks for Info field above */ | 565 | /* Masks for Info field above */ |
683 | 566 | ||
684 | #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ | 567 | #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ |
685 | #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_ID */ | 568 | #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_iD */ |
686 | 569 | ||
687 | /* | 570 | /* |
688 | * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure. | 571 | * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure. |
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h deleted file mode 100644 index 6585141e4b9..00000000000 --- a/include/acpi/actbl3.h +++ /dev/null | |||
@@ -1,557 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: actbl3.h - ACPI Table Definitions | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #ifndef __ACTBL3_H__ | ||
45 | #define __ACTBL3_H__ | ||
46 | |||
47 | /******************************************************************************* | ||
48 | * | ||
49 | * Additional ACPI Tables (3) | ||
50 | * | ||
51 | * These tables are not consumed directly by the ACPICA subsystem, but are | ||
52 | * included here to support device drivers and the AML disassembler. | ||
53 | * | ||
54 | * The tables in this file are fully defined within the ACPI specification. | ||
55 | * | ||
56 | ******************************************************************************/ | ||
57 | |||
58 | /* | ||
59 | * Values for description table header signatures for tables defined in this | ||
60 | * file. Useful because they make it more difficult to inadvertently type in | ||
61 | * the wrong signature. | ||
62 | */ | ||
63 | #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ | ||
64 | #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ | ||
65 | #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ | ||
66 | #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ | ||
67 | #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ | ||
68 | #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ | ||
69 | #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ | ||
70 | #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ | ||
71 | |||
72 | #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ | ||
73 | #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ | ||
74 | |||
75 | /* Reserved table signatures */ | ||
76 | |||
77 | #define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */ | ||
78 | #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ | ||
79 | #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ | ||
80 | #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ | ||
81 | |||
82 | /* | ||
83 | * All tables must be byte-packed to match the ACPI specification, since | ||
84 | * the tables are provided by the system BIOS. | ||
85 | */ | ||
86 | #pragma pack(1) | ||
87 | |||
88 | /* | ||
89 | * Note: C bitfields are not used for this reason: | ||
90 | * | ||
91 | * "Bitfields are great and easy to read, but unfortunately the C language | ||
92 | * does not specify the layout of bitfields in memory, which means they are | ||
93 | * essentially useless for dealing with packed data in on-disk formats or | ||
94 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
95 | * this decision was a design error in C. Ritchie could have picked an order | ||
96 | * and stuck with it." Norman Ramsey. | ||
97 | * See http://stackoverflow.com/a/1053662/41661 | ||
98 | */ | ||
99 | |||
100 | /******************************************************************************* | ||
101 | * | ||
102 | * BGRT - Boot Graphics Resource Table (ACPI 5.0) | ||
103 | * Version 1 | ||
104 | * | ||
105 | ******************************************************************************/ | ||
106 | |||
107 | struct acpi_table_bgrt { | ||
108 | struct acpi_table_header header; /* Common ACPI table header */ | ||
109 | u16 version; | ||
110 | u8 status; | ||
111 | u8 image_type; | ||
112 | u64 image_address; | ||
113 | u32 image_offset_x; | ||
114 | u32 image_offset_y; | ||
115 | }; | ||
116 | |||
117 | /******************************************************************************* | ||
118 | * | ||
119 | * DRTM - Dynamic Root of Trust for Measurement table | ||
120 | * | ||
121 | ******************************************************************************/ | ||
122 | |||
123 | struct acpi_table_drtm { | ||
124 | struct acpi_table_header header; /* Common ACPI table header */ | ||
125 | u64 entry_base_address; | ||
126 | u64 entry_length; | ||
127 | u32 entry_address32; | ||
128 | u64 entry_address64; | ||
129 | u64 exit_address; | ||
130 | u64 log_area_address; | ||
131 | u32 log_area_length; | ||
132 | u64 arch_dependent_address; | ||
133 | u32 flags; | ||
134 | }; | ||
135 | |||
136 | /* 1) Validated Tables List */ | ||
137 | |||
138 | struct acpi_drtm_vtl_list { | ||
139 | u32 validated_table_list_count; | ||
140 | }; | ||
141 | |||
142 | /* 2) Resources List */ | ||
143 | |||
144 | struct acpi_drtm_resource_list { | ||
145 | u32 resource_list_count; | ||
146 | }; | ||
147 | |||
148 | /* 3) Platform-specific Identifiers List */ | ||
149 | |||
150 | struct acpi_drtm_id_list { | ||
151 | u32 id_list_count; | ||
152 | }; | ||
153 | |||
154 | /******************************************************************************* | ||
155 | * | ||
156 | * FPDT - Firmware Performance Data Table (ACPI 5.0) | ||
157 | * Version 1 | ||
158 | * | ||
159 | ******************************************************************************/ | ||
160 | |||
161 | struct acpi_table_fpdt { | ||
162 | struct acpi_table_header header; /* Common ACPI table header */ | ||
163 | }; | ||
164 | |||
165 | /* FPDT subtable header */ | ||
166 | |||
167 | struct acpi_fpdt_header { | ||
168 | u16 type; | ||
169 | u8 length; | ||
170 | u8 revision; | ||
171 | }; | ||
172 | |||
173 | /* Values for Type field above */ | ||
174 | |||
175 | enum acpi_fpdt_type { | ||
176 | ACPI_FPDT_TYPE_BOOT = 0, | ||
177 | ACPI_FPDT_TYPE_S3PERF = 1, | ||
178 | }; | ||
179 | |||
180 | /* | ||
181 | * FPDT subtables | ||
182 | */ | ||
183 | |||
184 | /* 0: Firmware Basic Boot Performance Record */ | ||
185 | |||
186 | struct acpi_fpdt_boot { | ||
187 | struct acpi_fpdt_header header; | ||
188 | u8 reserved[4]; | ||
189 | u64 reset_end; | ||
190 | u64 load_start; | ||
191 | u64 startup_start; | ||
192 | u64 exit_services_entry; | ||
193 | u64 exit_services_exit; | ||
194 | }; | ||
195 | |||
196 | /* 1: S3 Performance Table Pointer Record */ | ||
197 | |||
198 | struct acpi_fpdt_s3pt_ptr { | ||
199 | struct acpi_fpdt_header header; | ||
200 | u8 reserved[4]; | ||
201 | u64 address; | ||
202 | }; | ||
203 | |||
204 | /* | ||
205 | * S3PT - S3 Performance Table. This table is pointed to by the | ||
206 | * FPDT S3 Pointer Record above. | ||
207 | */ | ||
208 | struct acpi_table_s3pt { | ||
209 | u8 signature[4]; /* "S3PT" */ | ||
210 | u32 length; | ||
211 | }; | ||
212 | |||
213 | /* | ||
214 | * S3PT Subtables | ||
215 | */ | ||
216 | struct acpi_s3pt_header { | ||
217 | u16 type; | ||
218 | u8 length; | ||
219 | u8 revision; | ||
220 | }; | ||
221 | |||
222 | /* Values for Type field above */ | ||
223 | |||
224 | enum acpi_s3pt_type { | ||
225 | ACPI_S3PT_TYPE_RESUME = 0, | ||
226 | ACPI_S3PT_TYPE_SUSPEND = 1, | ||
227 | }; | ||
228 | |||
229 | struct acpi_s3pt_resume { | ||
230 | struct acpi_s3pt_header header; | ||
231 | u32 resume_count; | ||
232 | u64 full_resume; | ||
233 | u64 average_resume; | ||
234 | }; | ||
235 | |||
236 | struct acpi_s3pt_suspend { | ||
237 | struct acpi_s3pt_header header; | ||
238 | u64 suspend_start; | ||
239 | u64 suspend_end; | ||
240 | }; | ||
241 | |||
242 | /******************************************************************************* | ||
243 | * | ||
244 | * GTDT - Generic Timer Description Table (ACPI 5.0) | ||
245 | * Version 1 | ||
246 | * | ||
247 | ******************************************************************************/ | ||
248 | |||
249 | struct acpi_table_gtdt { | ||
250 | struct acpi_table_header header; /* Common ACPI table header */ | ||
251 | u64 address; | ||
252 | u32 flags; | ||
253 | u32 secure_pl1_interrupt; | ||
254 | u32 secure_pl1_flags; | ||
255 | u32 non_secure_pl1_interrupt; | ||
256 | u32 non_secure_pl1_flags; | ||
257 | u32 virtual_timer_interrupt; | ||
258 | u32 virtual_timer_flags; | ||
259 | u32 non_secure_pl2_interrupt; | ||
260 | u32 non_secure_pl2_flags; | ||
261 | }; | ||
262 | |||
263 | /* Values for Flags field above */ | ||
264 | |||
265 | #define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1 | ||
266 | |||
267 | /* Values for all "TimerFlags" fields above */ | ||
268 | |||
269 | #define ACPI_GTDT_INTERRUPT_MODE 1 | ||
270 | #define ACPI_GTDT_INTERRUPT_POLARITY 2 | ||
271 | |||
272 | /******************************************************************************* | ||
273 | * | ||
274 | * MPST - Memory Power State Table (ACPI 5.0) | ||
275 | * Version 1 | ||
276 | * | ||
277 | ******************************************************************************/ | ||
278 | |||
279 | #define ACPI_MPST_CHANNEL_INFO \ | ||
280 | u8 channel_id; \ | ||
281 | u8 reserved1[3]; \ | ||
282 | u16 power_node_count; \ | ||
283 | u16 reserved2; | ||
284 | |||
285 | /* Main table */ | ||
286 | |||
287 | struct acpi_table_mpst { | ||
288 | struct acpi_table_header header; /* Common ACPI table header */ | ||
289 | ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ | ||
290 | }; | ||
291 | |||
292 | /* Memory Platform Communication Channel Info */ | ||
293 | |||
294 | struct acpi_mpst_channel { | ||
295 | ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ | ||
296 | }; | ||
297 | |||
298 | /* Memory Power Node Structure */ | ||
299 | |||
300 | struct acpi_mpst_power_node { | ||
301 | u8 flags; | ||
302 | u8 reserved1; | ||
303 | u16 node_id; | ||
304 | u32 length; | ||
305 | u64 range_address; | ||
306 | u64 range_length; | ||
307 | u32 num_power_states; | ||
308 | u32 num_physical_components; | ||
309 | }; | ||
310 | |||
311 | /* Values for Flags field above */ | ||
312 | |||
313 | #define ACPI_MPST_ENABLED 1 | ||
314 | #define ACPI_MPST_POWER_MANAGED 2 | ||
315 | #define ACPI_MPST_HOT_PLUG_CAPABLE 4 | ||
316 | |||
317 | /* Memory Power State Structure (follows POWER_NODE above) */ | ||
318 | |||
319 | struct acpi_mpst_power_state { | ||
320 | u8 power_state; | ||
321 | u8 info_index; | ||
322 | }; | ||
323 | |||
324 | /* Physical Component ID Structure (follows POWER_STATE above) */ | ||
325 | |||
326 | struct acpi_mpst_component { | ||
327 | u16 component_id; | ||
328 | }; | ||
329 | |||
330 | /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ | ||
331 | |||
332 | struct acpi_mpst_data_hdr { | ||
333 | u16 characteristics_count; | ||
334 | u16 reserved; | ||
335 | }; | ||
336 | |||
337 | struct acpi_mpst_power_data { | ||
338 | u8 structure_id; | ||
339 | u8 flags; | ||
340 | u16 reserved1; | ||
341 | u32 average_power; | ||
342 | u32 power_saving; | ||
343 | u64 exit_latency; | ||
344 | u64 reserved2; | ||
345 | }; | ||
346 | |||
347 | /* Values for Flags field above */ | ||
348 | |||
349 | #define ACPI_MPST_PRESERVE 1 | ||
350 | #define ACPI_MPST_AUTOENTRY 2 | ||
351 | #define ACPI_MPST_AUTOEXIT 4 | ||
352 | |||
353 | /* Shared Memory Region (not part of an ACPI table) */ | ||
354 | |||
355 | struct acpi_mpst_shared { | ||
356 | u32 signature; | ||
357 | u16 pcc_command; | ||
358 | u16 pcc_status; | ||
359 | u32 command_register; | ||
360 | u32 status_register; | ||
361 | u32 power_state_id; | ||
362 | u32 power_node_id; | ||
363 | u64 energy_consumed; | ||
364 | u64 average_power; | ||
365 | }; | ||
366 | |||
367 | /******************************************************************************* | ||
368 | * | ||
369 | * PCCT - Platform Communications Channel Table (ACPI 5.0) | ||
370 | * Version 1 | ||
371 | * | ||
372 | ******************************************************************************/ | ||
373 | |||
374 | struct acpi_table_pcct { | ||
375 | struct acpi_table_header header; /* Common ACPI table header */ | ||
376 | u32 flags; | ||
377 | u32 latency; | ||
378 | u32 reserved; | ||
379 | }; | ||
380 | |||
381 | /* Values for Flags field above */ | ||
382 | |||
383 | #define ACPI_PCCT_DOORBELL 1 | ||
384 | |||
385 | /* | ||
386 | * PCCT subtables | ||
387 | */ | ||
388 | |||
389 | /* 0: Generic Communications Subspace */ | ||
390 | |||
391 | struct acpi_pcct_subspace { | ||
392 | struct acpi_subtable_header header; | ||
393 | u8 reserved[6]; | ||
394 | u64 base_address; | ||
395 | u64 length; | ||
396 | struct acpi_generic_address doorbell_register; | ||
397 | u64 preserve_mask; | ||
398 | u64 write_mask; | ||
399 | }; | ||
400 | |||
401 | /* | ||
402 | * PCC memory structures (not part of the ACPI table) | ||
403 | */ | ||
404 | |||
405 | /* Shared Memory Region */ | ||
406 | |||
407 | struct acpi_pcct_shared_memory { | ||
408 | u32 signature; | ||
409 | u16 command; | ||
410 | u16 status; | ||
411 | }; | ||
412 | |||
413 | /******************************************************************************* | ||
414 | * | ||
415 | * PMTT - Platform Memory Topology Table (ACPI 5.0) | ||
416 | * Version 1 | ||
417 | * | ||
418 | ******************************************************************************/ | ||
419 | |||
420 | struct acpi_table_pmtt { | ||
421 | struct acpi_table_header header; /* Common ACPI table header */ | ||
422 | u32 reserved; | ||
423 | }; | ||
424 | |||
425 | /* Common header for PMTT subtables that follow main table */ | ||
426 | |||
427 | struct acpi_pmtt_header { | ||
428 | u8 type; | ||
429 | u8 reserved1; | ||
430 | u16 length; | ||
431 | u16 flags; | ||
432 | u16 reserved2; | ||
433 | }; | ||
434 | |||
435 | /* Values for Type field above */ | ||
436 | |||
437 | #define ACPI_PMTT_TYPE_SOCKET 0 | ||
438 | #define ACPI_PMTT_TYPE_CONTROLLER 1 | ||
439 | #define ACPI_PMTT_TYPE_DIMM 2 | ||
440 | #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ | ||
441 | |||
442 | /* Values for Flags field above */ | ||
443 | |||
444 | #define ACPI_PMTT_TOP_LEVEL 0x0001 | ||
445 | #define ACPI_PMTT_PHYSICAL 0x0002 | ||
446 | #define ACPI_PMTT_MEMORY_TYPE 0x000C | ||
447 | |||
448 | /* | ||
449 | * PMTT subtables, correspond to Type in struct acpi_pmtt_header | ||
450 | */ | ||
451 | |||
452 | /* 0: Socket Structure */ | ||
453 | |||
454 | struct acpi_pmtt_socket { | ||
455 | struct acpi_pmtt_header header; | ||
456 | u16 socket_id; | ||
457 | u16 reserved; | ||
458 | }; | ||
459 | |||
460 | /* 1: Memory Controller subtable */ | ||
461 | |||
462 | struct acpi_pmtt_controller { | ||
463 | struct acpi_pmtt_header header; | ||
464 | u32 read_latency; | ||
465 | u32 write_latency; | ||
466 | u32 read_bandwidth; | ||
467 | u32 write_bandwidth; | ||
468 | u16 access_width; | ||
469 | u16 alignment; | ||
470 | u16 reserved; | ||
471 | u16 domain_count; | ||
472 | }; | ||
473 | |||
474 | /* 1a: Proximity Domain substructure */ | ||
475 | |||
476 | struct acpi_pmtt_domain { | ||
477 | u32 proximity_domain; | ||
478 | }; | ||
479 | |||
480 | /* 2: Physical Component Identifier (DIMM) */ | ||
481 | |||
482 | struct acpi_pmtt_physical_component { | ||
483 | struct acpi_pmtt_header header; | ||
484 | u16 component_id; | ||
485 | u16 reserved; | ||
486 | u32 memory_size; | ||
487 | u32 bios_handle; | ||
488 | }; | ||
489 | |||
490 | /******************************************************************************* | ||
491 | * | ||
492 | * RASF - RAS Feature Table (ACPI 5.0) | ||
493 | * Version 1 | ||
494 | * | ||
495 | ******************************************************************************/ | ||
496 | |||
497 | struct acpi_table_rasf { | ||
498 | struct acpi_table_header header; /* Common ACPI table header */ | ||
499 | u8 channel_id[12]; | ||
500 | }; | ||
501 | |||
502 | /* RASF Platform Communication Channel Shared Memory Region */ | ||
503 | |||
504 | struct acpi_rasf_shared_memory { | ||
505 | u32 signature; | ||
506 | u16 command; | ||
507 | u16 status; | ||
508 | u64 requested_address; | ||
509 | u64 requested_length; | ||
510 | u64 actual_address; | ||
511 | u64 actual_length; | ||
512 | u16 flags; | ||
513 | u8 speed; | ||
514 | }; | ||
515 | |||
516 | /* Masks for Flags and Speed fields above */ | ||
517 | |||
518 | #define ACPI_RASF_SCRUBBER_RUNNING 1 | ||
519 | #define ACPI_RASF_SPEED (7<<1) | ||
520 | |||
521 | /* Channel Commands */ | ||
522 | |||
523 | enum acpi_rasf_commands { | ||
524 | ACPI_RASF_GET_RAS_CAPABILITIES = 1, | ||
525 | ACPI_RASF_GET_PATROL_PARAMETERS = 2, | ||
526 | ACPI_RASF_START_PATROL_SCRUBBER = 3, | ||
527 | ACPI_RASF_STOP_PATROL_SCRUBBER = 4 | ||
528 | }; | ||
529 | |||
530 | /* Channel Command flags */ | ||
531 | |||
532 | #define ACPI_RASF_GENERATE_SCI (1<<15) | ||
533 | |||
534 | /* Status values */ | ||
535 | |||
536 | enum acpi_rasf_status { | ||
537 | ACPI_RASF_SUCCESS = 0, | ||
538 | ACPI_RASF_NOT_VALID = 1, | ||
539 | ACPI_RASF_NOT_SUPPORTED = 2, | ||
540 | ACPI_RASF_BUSY = 3, | ||
541 | ACPI_RASF_FAILED = 4, | ||
542 | ACPI_RASF_ABORTED = 5, | ||
543 | ACPI_RASF_INVALID_DATA = 6 | ||
544 | }; | ||
545 | |||
546 | /* Status flags */ | ||
547 | |||
548 | #define ACPI_RASF_COMMAND_COMPLETE (1) | ||
549 | #define ACPI_RASF_SCI_DOORBELL (1<<1) | ||
550 | #define ACPI_RASF_ERROR (1<<2) | ||
551 | #define ACPI_RASF_STATUS (0x1F<<3) | ||
552 | |||
553 | /* Reset to default packing */ | ||
554 | |||
555 | #pragma pack() | ||
556 | |||
557 | #endif /* __ACTBL3_H__ */ | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 4f43f1fba13..b67231bef63 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -173,7 +173,7 @@ typedef u64 acpi_physical_address; | |||
173 | * to indicate that special precautions must be taken to avoid alignment faults. | 173 | * to indicate that special precautions must be taken to avoid alignment faults. |
174 | * (IA64 or ia64 is currently used by existing compilers to indicate IPF.) | 174 | * (IA64 or ia64 is currently used by existing compilers to indicate IPF.) |
175 | * | 175 | * |
176 | * Note: EM64T and other X86-64 processors support misaligned transfers, | 176 | * Note: Em64_t and other X86-64 processors support misaligned transfers, |
177 | * so there is no need to define this flag. | 177 | * so there is no need to define this flag. |
178 | */ | 178 | */ |
179 | #if defined (__IA64__) || defined (__ia64__) | 179 | #if defined (__IA64__) || defined (__ia64__) |
@@ -453,14 +453,10 @@ typedef u64 acpi_integer; | |||
453 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) | 453 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |
454 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) | 454 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) |
455 | 455 | ||
456 | /* Optimizations for 4-character (32-bit) acpi_name manipulation */ | ||
457 | |||
458 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | 456 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
459 | #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b))) | 457 | #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b))) |
460 | #define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (u32, (dest)) = *ACPI_CAST_PTR (u32, (src))) | ||
461 | #else | 458 | #else |
462 | #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) | 459 | #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) |
463 | #define ACPI_MOVE_NAME(dest,src) (ACPI_STRNCPY (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) | ||
464 | #endif | 460 | #endif |
465 | 461 | ||
466 | /******************************************************************************* | 462 | /******************************************************************************* |
@@ -474,6 +470,7 @@ typedef u64 acpi_integer; | |||
474 | */ | 470 | */ |
475 | #define ACPI_FULL_INITIALIZATION 0x00 | 471 | #define ACPI_FULL_INITIALIZATION 0x00 |
476 | #define ACPI_NO_ADDRESS_SPACE_INIT 0x01 | 472 | #define ACPI_NO_ADDRESS_SPACE_INIT 0x01 |
473 | #define ACPI_NO_HARDWARE_INIT 0x02 | ||
477 | #define ACPI_NO_EVENT_INIT 0x04 | 474 | #define ACPI_NO_EVENT_INIT 0x04 |
478 | #define ACPI_NO_HANDLER_INIT 0x08 | 475 | #define ACPI_NO_HANDLER_INIT 0x08 |
479 | #define ACPI_NO_ACPI_ENABLE 0x10 | 476 | #define ACPI_NO_ACPI_ENABLE 0x10 |
@@ -503,10 +500,9 @@ typedef u64 acpi_integer; | |||
503 | #define ACPI_STATE_D0 (u8) 0 | 500 | #define ACPI_STATE_D0 (u8) 0 |
504 | #define ACPI_STATE_D1 (u8) 1 | 501 | #define ACPI_STATE_D1 (u8) 1 |
505 | #define ACPI_STATE_D2 (u8) 2 | 502 | #define ACPI_STATE_D2 (u8) 2 |
506 | #define ACPI_STATE_D3_HOT (u8) 3 | 503 | #define ACPI_STATE_D3 (u8) 3 |
507 | #define ACPI_STATE_D3 (u8) 4 | 504 | #define ACPI_STATE_D3_COLD (u8) 4 |
508 | #define ACPI_STATE_D3_COLD ACPI_STATE_D3 | 505 | #define ACPI_D_STATES_MAX ACPI_STATE_D3_COLD |
509 | #define ACPI_D_STATES_MAX ACPI_STATE_D3 | ||
510 | #define ACPI_D_STATE_COUNT 5 | 506 | #define ACPI_D_STATE_COUNT 5 |
511 | 507 | ||
512 | #define ACPI_STATE_C0 (u8) 0 | 508 | #define ACPI_STATE_C0 (u8) 0 |
@@ -537,9 +533,8 @@ typedef u64 acpi_integer; | |||
537 | #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 | 533 | #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 |
538 | #define ACPI_NOTIFY_RESERVED (u8) 0x0A | 534 | #define ACPI_NOTIFY_RESERVED (u8) 0x0A |
539 | #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B | 535 | #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B |
540 | #define ACPI_NOTIFY_SHUTDOWN_REQUEST (u8) 0x0C | ||
541 | 536 | ||
542 | #define ACPI_NOTIFY_MAX 0x0C | 537 | #define ACPI_NOTIFY_MAX 0x0B |
543 | 538 | ||
544 | /* | 539 | /* |
545 | * Types associated with ACPI names and objects. The first group of | 540 | * Types associated with ACPI names and objects. The first group of |
@@ -633,7 +628,7 @@ typedef u32 acpi_event_type; | |||
633 | #define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1 | 628 | #define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1 |
634 | 629 | ||
635 | /* | 630 | /* |
636 | * Event status - Per event | 631 | * Event Status - Per event |
637 | * ------------- | 632 | * ------------- |
638 | * The encoding of acpi_event_status is illustrated below. | 633 | * The encoding of acpi_event_status is illustrated below. |
639 | * Note that a set bit (1) indicates the property is TRUE | 634 | * Note that a set bit (1) indicates the property is TRUE |
@@ -703,13 +698,8 @@ typedef u32 acpi_event_status; | |||
703 | #define ACPI_DEVICE_NOTIFY 0x2 | 698 | #define ACPI_DEVICE_NOTIFY 0x2 |
704 | #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) | 699 | #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) |
705 | #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 | 700 | #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 |
706 | #define ACPI_NUM_NOTIFY_TYPES 2 | ||
707 | |||
708 | #define ACPI_MAX_SYS_NOTIFY 0x7F | ||
709 | #define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF | ||
710 | 701 | ||
711 | #define ACPI_SYSTEM_HANDLER_LIST 0 /* Used as index, must be SYSTEM_NOTIFY -1 */ | 702 | #define ACPI_MAX_SYS_NOTIFY 0x7f |
712 | #define ACPI_DEVICE_HANDLER_LIST 1 /* Used as index, must be DEVICE_NOTIFY -1 */ | ||
713 | 703 | ||
714 | /* Address Space (Operation Region) Types */ | 704 | /* Address Space (Operation Region) Types */ |
715 | 705 | ||
@@ -723,11 +713,8 @@ typedef u8 acpi_adr_space_type; | |||
723 | #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 | 713 | #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 |
724 | #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 | 714 | #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 |
725 | #define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 | 715 | #define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 |
726 | #define ACPI_ADR_SPACE_GPIO (acpi_adr_space_type) 8 | ||
727 | #define ACPI_ADR_SPACE_GSBUS (acpi_adr_space_type) 9 | ||
728 | #define ACPI_ADR_SPACE_PLATFORM_COMM (acpi_adr_space_type) 10 | ||
729 | 716 | ||
730 | #define ACPI_NUM_PREDEFINED_REGIONS 11 | 717 | #define ACPI_NUM_PREDEFINED_REGIONS 8 |
731 | 718 | ||
732 | /* | 719 | /* |
733 | * Special Address Spaces | 720 | * Special Address Spaces |
@@ -798,15 +785,6 @@ typedef u8 acpi_adr_space_type; | |||
798 | #define ACPI_ENABLE_EVENT 1 | 785 | #define ACPI_ENABLE_EVENT 1 |
799 | #define ACPI_DISABLE_EVENT 0 | 786 | #define ACPI_DISABLE_EVENT 0 |
800 | 787 | ||
801 | /* Sleep function dispatch */ | ||
802 | |||
803 | typedef acpi_status(*acpi_sleep_function) (u8 sleep_state); | ||
804 | |||
805 | struct acpi_sleep_functions { | ||
806 | acpi_sleep_function legacy_function; | ||
807 | acpi_sleep_function extended_function; | ||
808 | }; | ||
809 | |||
810 | /* | 788 | /* |
811 | * External ACPI object definition | 789 | * External ACPI object definition |
812 | */ | 790 | */ |
@@ -926,8 +904,7 @@ struct acpi_system_info { | |||
926 | /* | 904 | /* |
927 | * Types specific to the OS service interfaces | 905 | * Types specific to the OS service interfaces |
928 | */ | 906 | */ |
929 | typedef u32 | 907 | typedef u32(ACPI_SYSTEM_XFACE * acpi_osd_handler) (void *context); |
930 | (ACPI_SYSTEM_XFACE * acpi_osd_handler) (void *context); | ||
931 | 908 | ||
932 | typedef void | 909 | typedef void |
933 | (ACPI_SYSTEM_XFACE * acpi_osd_exec_callback) (void *context); | 910 | (ACPI_SYSTEM_XFACE * acpi_osd_exec_callback) (void *context); |
@@ -936,15 +913,14 @@ typedef void | |||
936 | * Various handlers and callback procedures | 913 | * Various handlers and callback procedures |
937 | */ | 914 | */ |
938 | typedef | 915 | typedef |
939 | void (*acpi_gbl_event_handler) (u32 event_type, | 916 | void (*ACPI_GBL_EVENT_HANDLER) (u32 event_type, |
940 | acpi_handle device, | 917 | acpi_handle device, |
941 | u32 event_number, void *context); | 918 | u32 event_number, void *context); |
942 | 919 | ||
943 | #define ACPI_EVENT_TYPE_GPE 0 | 920 | #define ACPI_EVENT_TYPE_GPE 0 |
944 | #define ACPI_EVENT_TYPE_FIXED 1 | 921 | #define ACPI_EVENT_TYPE_FIXED 1 |
945 | 922 | ||
946 | typedef | 923 | typedef u32(*acpi_event_handler) (void *context); |
947 | u32(*acpi_event_handler) (void *context); | ||
948 | 924 | ||
949 | typedef | 925 | typedef |
950 | u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context); | 926 | u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context); |
@@ -982,14 +958,6 @@ acpi_status(*acpi_adr_space_handler) (u32 function, | |||
982 | 958 | ||
983 | #define ACPI_DEFAULT_HANDLER NULL | 959 | #define ACPI_DEFAULT_HANDLER NULL |
984 | 960 | ||
985 | /* Special Context data for generic_serial_bus/general_purpose_io (ACPI 5.0) */ | ||
986 | |||
987 | struct acpi_connection_info { | ||
988 | u8 *connection; | ||
989 | u16 length; | ||
990 | u8 access_length; | ||
991 | }; | ||
992 | |||
993 | typedef | 961 | typedef |
994 | acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, | 962 | acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, |
995 | u32 function, | 963 | u32 function, |
@@ -1024,17 +992,17 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); | |||
1024 | 992 | ||
1025 | #define ACPI_UUID_LENGTH 16 | 993 | #define ACPI_UUID_LENGTH 16 |
1026 | 994 | ||
1027 | /* Structures used for device/processor HID, UID, CID, and SUB */ | 995 | /* Structures used for device/processor HID, UID, CID */ |
1028 | 996 | ||
1029 | struct acpi_pnp_device_id { | 997 | struct acpica_device_id { |
1030 | u32 length; /* Length of string + null */ | 998 | u32 length; /* Length of string + null */ |
1031 | char *string; | 999 | char *string; |
1032 | }; | 1000 | }; |
1033 | 1001 | ||
1034 | struct acpi_pnp_device_id_list { | 1002 | struct acpica_device_id_list { |
1035 | u32 count; /* Number of IDs in Ids array */ | 1003 | u32 count; /* Number of IDs in Ids array */ |
1036 | u32 list_size; /* Size of list, including ID strings */ | 1004 | u32 list_size; /* Size of list, including ID strings */ |
1037 | struct acpi_pnp_device_id ids[1]; /* ID array */ | 1005 | struct acpica_device_id ids[1]; /* ID array */ |
1038 | }; | 1006 | }; |
1039 | 1007 | ||
1040 | /* | 1008 | /* |
@@ -1052,10 +1020,9 @@ struct acpi_device_info { | |||
1052 | u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ | 1020 | u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ |
1053 | u32 current_status; /* _STA value */ | 1021 | u32 current_status; /* _STA value */ |
1054 | u64 address; /* _ADR value */ | 1022 | u64 address; /* _ADR value */ |
1055 | struct acpi_pnp_device_id hardware_id; /* _HID value */ | 1023 | struct acpica_device_id hardware_id; /* _HID value */ |
1056 | struct acpi_pnp_device_id unique_id; /* _UID value */ | 1024 | struct acpica_device_id unique_id; /* _UID value */ |
1057 | struct acpi_pnp_device_id subsystem_id; /* _SUB value */ | 1025 | struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */ |
1058 | struct acpi_pnp_device_id_list compatible_id_list; /* _CID list <must be last> */ | ||
1059 | }; | 1026 | }; |
1060 | 1027 | ||
1061 | /* Values for Flags field above (acpi_get_object_info) */ | 1028 | /* Values for Flags field above (acpi_get_object_info) */ |
@@ -1068,12 +1035,11 @@ struct acpi_device_info { | |||
1068 | #define ACPI_VALID_ADR 0x02 | 1035 | #define ACPI_VALID_ADR 0x02 |
1069 | #define ACPI_VALID_HID 0x04 | 1036 | #define ACPI_VALID_HID 0x04 |
1070 | #define ACPI_VALID_UID 0x08 | 1037 | #define ACPI_VALID_UID 0x08 |
1071 | #define ACPI_VALID_SUB 0x10 | 1038 | #define ACPI_VALID_CID 0x10 |
1072 | #define ACPI_VALID_CID 0x20 | 1039 | #define ACPI_VALID_SXDS 0x20 |
1073 | #define ACPI_VALID_SXDS 0x40 | 1040 | #define ACPI_VALID_SXWS 0x40 |
1074 | #define ACPI_VALID_SXWS 0x80 | ||
1075 | 1041 | ||
1076 | /* Flags for _STA return value (current_status above) */ | 1042 | /* Flags for _STA method */ |
1077 | 1043 | ||
1078 | #define ACPI_STA_DEVICE_PRESENT 0x01 | 1044 | #define ACPI_STA_DEVICE_PRESENT 0x01 |
1079 | #define ACPI_STA_DEVICE_ENABLED 0x02 | 1045 | #define ACPI_STA_DEVICE_ENABLED 0x02 |
diff --git a/include/acpi/apei.h b/include/acpi/apei.h index 04f349d8da7..51a527d24a8 100644 --- a/include/acpi/apei.h +++ b/include/acpi/apei.h | |||
@@ -16,10 +16,10 @@ | |||
16 | 16 | ||
17 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
18 | 18 | ||
19 | extern bool hest_disable; | 19 | extern int hest_disable; |
20 | extern int erst_disable; | 20 | extern int erst_disable; |
21 | #ifdef CONFIG_ACPI_APEI_GHES | 21 | #ifdef CONFIG_ACPI_APEI_GHES |
22 | extern bool ghes_disable; | 22 | extern int ghes_disable; |
23 | #else | 23 | #else |
24 | #define ghes_disable 1 | 24 | #define ghes_disable 1 |
25 | #endif | 25 | #endif |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 89cee88dd2a..5af3ed52ef9 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -138,7 +138,7 @@ | |||
138 | /*! [Begin] no source code translation */ | 138 | /*! [Begin] no source code translation */ |
139 | 139 | ||
140 | #if defined(_LINUX) || defined(__linux__) | 140 | #if defined(_LINUX) || defined(__linux__) |
141 | #include <acpi/platform/aclinux.h> | 141 | #include "aclinux.h" |
142 | 142 | ||
143 | #elif defined(_AED_EFI) | 143 | #elif defined(_AED_EFI) |
144 | #include "acefi.h" | 144 | #include "acefi.h" |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 72553b0c9f3..e228893591a 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 85d5d8f3845..f72403c4b51 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -55,8 +55,10 @@ | |||
55 | 55 | ||
56 | #include <linux/string.h> | 56 | #include <linux/string.h> |
57 | #include <linux/kernel.h> | 57 | #include <linux/kernel.h> |
58 | #include <linux/module.h> | ||
58 | #include <linux/ctype.h> | 59 | #include <linux/ctype.h> |
59 | #include <linux/sched.h> | 60 | #include <linux/sched.h> |
61 | #include <asm/system.h> | ||
60 | #include <linux/atomic.h> | 62 | #include <linux/atomic.h> |
61 | #include <asm/div64.h> | 63 | #include <asm/div64.h> |
62 | #include <asm/acpi.h> | 64 | #include <asm/acpi.h> |
@@ -106,7 +108,7 @@ | |||
106 | 108 | ||
107 | /* Linux uses GCC */ | 109 | /* Linux uses GCC */ |
108 | 110 | ||
109 | #include <acpi/platform/acgcc.h> | 111 | #include "acgcc.h" |
110 | 112 | ||
111 | 113 | ||
112 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 555d0337ad9..67055f18033 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/cpu.h> | 5 | #include <linux/cpu.h> |
6 | #include <linux/cpuidle.h> | ||
6 | #include <linux/thermal.h> | 7 | #include <linux/thermal.h> |
7 | #include <asm/acpi.h> | 8 | #include <asm/acpi.h> |
8 | 9 | ||
@@ -58,11 +59,16 @@ struct acpi_processor_cx { | |||
58 | u8 entry_method; | 59 | u8 entry_method; |
59 | u8 index; | 60 | u8 index; |
60 | u32 latency; | 61 | u32 latency; |
62 | u32 latency_ticks; | ||
63 | u32 power; | ||
64 | u32 usage; | ||
65 | u64 time; | ||
61 | u8 bm_sts_skip; | 66 | u8 bm_sts_skip; |
62 | char desc[ACPI_CX_DESC_LEN]; | 67 | char desc[ACPI_CX_DESC_LEN]; |
63 | }; | 68 | }; |
64 | 69 | ||
65 | struct acpi_processor_power { | 70 | struct acpi_processor_power { |
71 | struct cpuidle_device dev; | ||
66 | struct acpi_processor_cx *state; | 72 | struct acpi_processor_cx *state; |
67 | unsigned long bm_check_timestamp; | 73 | unsigned long bm_check_timestamp; |
68 | u32 default_state; | 74 | u32 default_state; |
@@ -189,7 +195,6 @@ struct acpi_processor_flags { | |||
189 | u8 has_cst:1; | 195 | u8 has_cst:1; |
190 | u8 power_setup_done:1; | 196 | u8 power_setup_done:1; |
191 | u8 bm_rld_set:1; | 197 | u8 bm_rld_set:1; |
192 | u8 need_hotplug_init:1; | ||
193 | }; | 198 | }; |
194 | 199 | ||
195 | struct acpi_processor { | 200 | struct acpi_processor { |
@@ -219,7 +224,6 @@ struct acpi_processor_errata { | |||
219 | } piix4; | 224 | } piix4; |
220 | }; | 225 | }; |
221 | 226 | ||
222 | extern void acpi_processor_load_module(struct acpi_processor *pr); | ||
223 | extern int acpi_processor_preregister_performance(struct | 227 | extern int acpi_processor_preregister_performance(struct |
224 | acpi_processor_performance | 228 | acpi_processor_performance |
225 | __percpu *performance); | 229 | __percpu *performance); |
@@ -322,12 +326,13 @@ extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, | |||
322 | extern const struct file_operations acpi_processor_throttling_fops; | 326 | extern const struct file_operations acpi_processor_throttling_fops; |
323 | extern void acpi_processor_throttling_init(void); | 327 | extern void acpi_processor_throttling_init(void); |
324 | /* in processor_idle.c */ | 328 | /* in processor_idle.c */ |
325 | int acpi_processor_power_init(struct acpi_processor *pr); | 329 | int acpi_processor_power_init(struct acpi_processor *pr, |
326 | int acpi_processor_power_exit(struct acpi_processor *pr); | 330 | struct acpi_device *device); |
327 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); | 331 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); |
328 | int acpi_processor_hotplug(struct acpi_processor *pr); | 332 | int acpi_processor_power_exit(struct acpi_processor *pr, |
329 | int acpi_processor_suspend(struct device *dev); | 333 | struct acpi_device *device); |
330 | int acpi_processor_resume(struct device *dev); | 334 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); |
335 | int acpi_processor_resume(struct acpi_device * device); | ||
331 | extern struct cpuidle_driver acpi_idle_driver; | 336 | extern struct cpuidle_driver acpi_idle_driver; |
332 | 337 | ||
333 | /* in processor_thermal.c */ | 338 | /* in processor_thermal.c */ |