diff options
Diffstat (limited to 'include/acpi/acobject.h')
-rw-r--r-- | include/acpi/acobject.h | 390 |
1 files changed, 145 insertions, 245 deletions
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index e079b94e4fce..4a326ba6d482 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -45,7 +45,6 @@ | |||
45 | #ifndef _ACOBJECT_H | 45 | #ifndef _ACOBJECT_H |
46 | #define _ACOBJECT_H | 46 | #define _ACOBJECT_H |
47 | 47 | ||
48 | |||
49 | /* | 48 | /* |
50 | * The union acpi_operand_object is used to pass AML operands from the dispatcher | 49 | * The union acpi_operand_object is used to pass AML operands from the dispatcher |
51 | * to the interpreter, and to keep track of the various handlers such as | 50 | * to the interpreter, and to keep track of the various handlers such as |
@@ -81,7 +80,6 @@ | |||
81 | #define AOPOBJ_SETUP_COMPLETE 0x10 | 80 | #define AOPOBJ_SETUP_COMPLETE 0x10 |
82 | #define AOPOBJ_SINGLE_DATUM 0x20 | 81 | #define AOPOBJ_SINGLE_DATUM 0x20 |
83 | 82 | ||
84 | |||
85 | /* | 83 | /* |
86 | * Common bitfield for the field objects | 84 | * Common bitfield for the field objects |
87 | * "Field Datum" -- a datum from the actual field object | 85 | * "Field Datum" -- a datum from the actual field object |
@@ -96,8 +94,7 @@ | |||
96 | u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\ | 94 | u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\ |
97 | u8 access_bit_width; /* Read/Write size in bits (8-64) */\ | 95 | u8 access_bit_width; /* Read/Write size in bits (8-64) */\ |
98 | u32 value; /* Value to store into the Bank or Index register */\ | 96 | u32 value; /* Value to store into the Bank or Index register */\ |
99 | struct acpi_namespace_node *node; /* Link back to parent node */ | 97 | struct acpi_namespace_node *node; /* Link back to parent node */ |
100 | |||
101 | 98 | ||
102 | /* | 99 | /* |
103 | * Fields common to both Strings and Buffers | 100 | * Fields common to both Strings and Buffers |
@@ -105,15 +102,13 @@ | |||
105 | #define ACPI_COMMON_BUFFER_INFO \ | 102 | #define ACPI_COMMON_BUFFER_INFO \ |
106 | u32 length; | 103 | u32 length; |
107 | 104 | ||
108 | |||
109 | /* | 105 | /* |
110 | * Common fields for objects that support ASL notifications | 106 | * Common fields for objects that support ASL notifications |
111 | */ | 107 | */ |
112 | #define ACPI_COMMON_NOTIFY_INFO \ | 108 | #define ACPI_COMMON_NOTIFY_INFO \ |
113 | union acpi_operand_object *system_notify; /* Handler for system notifies */\ | 109 | union acpi_operand_object *system_notify; /* Handler for system notifies */\ |
114 | union acpi_operand_object *device_notify; /* Handler for driver notifies */\ | 110 | union acpi_operand_object *device_notify; /* Handler for driver notifies */\ |
115 | union acpi_operand_object *handler; /* Handler for Address space */ | 111 | union acpi_operand_object *handler; /* Handler for Address space */ |
116 | |||
117 | 112 | ||
118 | /****************************************************************************** | 113 | /****************************************************************************** |
119 | * | 114 | * |
@@ -121,161 +116,110 @@ | |||
121 | * | 116 | * |
122 | *****************************************************************************/ | 117 | *****************************************************************************/ |
123 | 118 | ||
124 | struct acpi_object_common | 119 | struct acpi_object_common { |
125 | { | 120 | ACPI_OBJECT_COMMON_HEADER}; |
126 | ACPI_OBJECT_COMMON_HEADER | ||
127 | }; | ||
128 | 121 | ||
129 | 122 | struct acpi_object_integer { | |
130 | struct acpi_object_integer | 123 | ACPI_OBJECT_COMMON_HEADER acpi_integer value; |
131 | { | ||
132 | ACPI_OBJECT_COMMON_HEADER | ||
133 | acpi_integer value; | ||
134 | }; | 124 | }; |
135 | 125 | ||
136 | |||
137 | /* | 126 | /* |
138 | * Note: The String and Buffer object must be identical through the Pointer | 127 | * Note: The String and Buffer object must be identical through the Pointer |
139 | * element. There is code that depends on this. | 128 | * element. There is code that depends on this. |
140 | */ | 129 | */ |
141 | struct acpi_object_string /* Null terminated, ASCII characters only */ | 130 | struct acpi_object_string { /* Null terminated, ASCII characters only */ |
142 | { | 131 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO char *pointer; /* String in AML stream or allocated string */ |
143 | ACPI_OBJECT_COMMON_HEADER | ||
144 | ACPI_COMMON_BUFFER_INFO | ||
145 | char *pointer; /* String in AML stream or allocated string */ | ||
146 | }; | 132 | }; |
147 | 133 | ||
148 | 134 | struct acpi_object_buffer { | |
149 | struct acpi_object_buffer | 135 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO u8 * pointer; /* Buffer in AML stream or allocated buffer */ |
150 | { | 136 | struct acpi_namespace_node *node; /* Link back to parent node */ |
151 | ACPI_OBJECT_COMMON_HEADER | 137 | u8 *aml_start; |
152 | ACPI_COMMON_BUFFER_INFO | 138 | u32 aml_length; |
153 | u8 *pointer; /* Buffer in AML stream or allocated buffer */ | ||
154 | struct acpi_namespace_node *node; /* Link back to parent node */ | ||
155 | u8 *aml_start; | ||
156 | u32 aml_length; | ||
157 | }; | 139 | }; |
158 | 140 | ||
159 | 141 | struct acpi_object_package { | |
160 | struct acpi_object_package | 142 | ACPI_OBJECT_COMMON_HEADER u32 count; /* # of elements in package */ |
161 | { | 143 | u32 aml_length; |
162 | ACPI_OBJECT_COMMON_HEADER | 144 | u8 *aml_start; |
163 | 145 | struct acpi_namespace_node *node; /* Link back to parent node */ | |
164 | u32 count; /* # of elements in package */ | 146 | union acpi_operand_object **elements; /* Array of pointers to acpi_objects */ |
165 | u32 aml_length; | ||
166 | u8 *aml_start; | ||
167 | struct acpi_namespace_node *node; /* Link back to parent node */ | ||
168 | union acpi_operand_object **elements; /* Array of pointers to acpi_objects */ | ||
169 | }; | 147 | }; |
170 | 148 | ||
171 | |||
172 | /****************************************************************************** | 149 | /****************************************************************************** |
173 | * | 150 | * |
174 | * Complex data types | 151 | * Complex data types |
175 | * | 152 | * |
176 | *****************************************************************************/ | 153 | *****************************************************************************/ |
177 | 154 | ||
178 | struct acpi_object_event | 155 | struct acpi_object_event { |
179 | { | 156 | ACPI_OBJECT_COMMON_HEADER void *semaphore; |
180 | ACPI_OBJECT_COMMON_HEADER | ||
181 | void *semaphore; | ||
182 | }; | 157 | }; |
183 | 158 | ||
184 | |||
185 | #define ACPI_INFINITE_CONCURRENCY 0xFF | 159 | #define ACPI_INFINITE_CONCURRENCY 0xFF |
186 | 160 | ||
187 | typedef | 161 | typedef |
188 | acpi_status (*ACPI_INTERNAL_METHOD) ( | 162 | acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state); |
189 | struct acpi_walk_state *walk_state); | 163 | |
190 | 164 | struct acpi_object_method { | |
191 | struct acpi_object_method | 165 | ACPI_OBJECT_COMMON_HEADER u8 method_flags; |
192 | { | 166 | u8 param_count; |
193 | ACPI_OBJECT_COMMON_HEADER | 167 | u32 aml_length; |
194 | u8 method_flags; | 168 | void *semaphore; |
195 | u8 param_count; | 169 | u8 *aml_start; |
196 | u32 aml_length; | 170 | ACPI_INTERNAL_METHOD implementation; |
197 | void *semaphore; | 171 | u8 concurrency; |
198 | u8 *aml_start; | 172 | u8 thread_count; |
199 | ACPI_INTERNAL_METHOD implementation; | 173 | acpi_owner_id owner_id; |
200 | u8 concurrency; | ||
201 | u8 thread_count; | ||
202 | acpi_owner_id owning_id; | ||
203 | }; | 174 | }; |
204 | 175 | ||
205 | 176 | struct acpi_object_mutex { | |
206 | struct acpi_object_mutex | 177 | ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ |
207 | { | 178 | u16 acquisition_depth; /* Allow multiple Acquires, same thread */ |
208 | ACPI_OBJECT_COMMON_HEADER | 179 | struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ |
209 | u8 sync_level; /* 0-15, specified in Mutex() call */ | 180 | void *semaphore; /* Actual OS synchronization object */ |
210 | u16 acquisition_depth; /* Allow multiple Acquires, same thread */ | 181 | union acpi_operand_object *prev; /* Link for list of acquired mutexes */ |
211 | struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ | 182 | union acpi_operand_object *next; /* Link for list of acquired mutexes */ |
212 | void *semaphore; /* Actual OS synchronization object */ | 183 | struct acpi_namespace_node *node; /* Containing namespace node */ |
213 | union acpi_operand_object *prev; /* Link for list of acquired mutexes */ | 184 | u8 original_sync_level; /* Owner's original sync level (0-15) */ |
214 | union acpi_operand_object *next; /* Link for list of acquired mutexes */ | ||
215 | struct acpi_namespace_node *node; /* Containing namespace node */ | ||
216 | u8 original_sync_level; /* Owner's original sync level (0-15) */ | ||
217 | }; | 185 | }; |
218 | 186 | ||
219 | 187 | struct acpi_object_region { | |
220 | struct acpi_object_region | 188 | ACPI_OBJECT_COMMON_HEADER u8 space_id; |
221 | { | 189 | union acpi_operand_object *handler; /* Handler for region access */ |
222 | ACPI_OBJECT_COMMON_HEADER | 190 | struct acpi_namespace_node *node; /* Containing namespace node */ |
223 | 191 | union acpi_operand_object *next; | |
224 | u8 space_id; | 192 | u32 length; |
225 | union acpi_operand_object *handler; /* Handler for region access */ | 193 | acpi_physical_address address; |
226 | struct acpi_namespace_node *node; /* Containing namespace node */ | ||
227 | union acpi_operand_object *next; | ||
228 | u32 length; | ||
229 | acpi_physical_address address; | ||
230 | }; | 194 | }; |
231 | 195 | ||
232 | |||
233 | /****************************************************************************** | 196 | /****************************************************************************** |
234 | * | 197 | * |
235 | * Objects that can be notified. All share a common notify_info area. | 198 | * Objects that can be notified. All share a common notify_info area. |
236 | * | 199 | * |
237 | *****************************************************************************/ | 200 | *****************************************************************************/ |
238 | 201 | ||
239 | struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ | 202 | struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ |
240 | { | 203 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; |
241 | ACPI_OBJECT_COMMON_HEADER | ||
242 | ACPI_COMMON_NOTIFY_INFO | ||
243 | }; | ||
244 | |||
245 | |||
246 | struct acpi_object_device | ||
247 | { | ||
248 | ACPI_OBJECT_COMMON_HEADER | ||
249 | ACPI_COMMON_NOTIFY_INFO | ||
250 | struct acpi_gpe_block_info *gpe_block; | ||
251 | }; | ||
252 | |||
253 | 204 | ||
254 | struct acpi_object_power_resource | 205 | struct acpi_object_device { |
255 | { | ||
256 | ACPI_OBJECT_COMMON_HEADER | 206 | ACPI_OBJECT_COMMON_HEADER |
257 | ACPI_COMMON_NOTIFY_INFO | 207 | ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block; |
258 | u32 system_level; | ||
259 | u32 resource_order; | ||
260 | }; | 208 | }; |
261 | 209 | ||
262 | 210 | struct acpi_object_power_resource { | |
263 | struct acpi_object_processor | 211 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level; |
264 | { | 212 | u32 resource_order; |
265 | ACPI_OBJECT_COMMON_HEADER | ||
266 | ACPI_COMMON_NOTIFY_INFO | ||
267 | u32 proc_id; | ||
268 | u32 length; | ||
269 | acpi_io_address address; | ||
270 | }; | 213 | }; |
271 | 214 | ||
272 | 215 | struct acpi_object_processor { | |
273 | struct acpi_object_thermal_zone | 216 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 proc_id; |
274 | { | 217 | u32 length; |
275 | ACPI_OBJECT_COMMON_HEADER | 218 | acpi_io_address address; |
276 | ACPI_COMMON_NOTIFY_INFO | ||
277 | }; | 219 | }; |
278 | 220 | ||
221 | struct acpi_object_thermal_zone { | ||
222 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; | ||
279 | 223 | ||
280 | /****************************************************************************** | 224 | /****************************************************************************** |
281 | * | 225 | * |
@@ -283,90 +227,63 @@ struct acpi_object_thermal_zone | |||
283 | * | 227 | * |
284 | *****************************************************************************/ | 228 | *****************************************************************************/ |
285 | 229 | ||
286 | struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ | 230 | struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ |
287 | { | 231 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing Operation Region object */ |
288 | ACPI_OBJECT_COMMON_HEADER | 232 | /* (REGION/BANK fields only) */ |
289 | ACPI_COMMON_FIELD_INFO | ||
290 | union acpi_operand_object *region_obj; /* Containing Operation Region object */ | ||
291 | /* (REGION/BANK fields only) */ | ||
292 | }; | 233 | }; |
293 | 234 | ||
294 | 235 | struct acpi_object_region_field { | |
295 | struct acpi_object_region_field | 236 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */ |
296 | { | ||
297 | ACPI_OBJECT_COMMON_HEADER | ||
298 | ACPI_COMMON_FIELD_INFO | ||
299 | union acpi_operand_object *region_obj; /* Containing op_region object */ | ||
300 | }; | 237 | }; |
301 | 238 | ||
302 | 239 | struct acpi_object_bank_field { | |
303 | struct acpi_object_bank_field | 240 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */ |
304 | { | 241 | union acpi_operand_object *bank_obj; /* bank_select Register object */ |
305 | ACPI_OBJECT_COMMON_HEADER | ||
306 | ACPI_COMMON_FIELD_INFO | ||
307 | union acpi_operand_object *region_obj; /* Containing op_region object */ | ||
308 | union acpi_operand_object *bank_obj; /* bank_select Register object */ | ||
309 | }; | 242 | }; |
310 | 243 | ||
311 | 244 | struct acpi_object_index_field { | |
312 | struct acpi_object_index_field | 245 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO |
313 | { | 246 | /* |
314 | ACPI_OBJECT_COMMON_HEADER | 247 | * No "region_obj" pointer needed since the Index and Data registers |
315 | ACPI_COMMON_FIELD_INFO | 248 | * are each field definitions unto themselves. |
316 | 249 | */ | |
317 | /* | 250 | union acpi_operand_object *index_obj; /* Index register */ |
318 | * No "region_obj" pointer needed since the Index and Data registers | 251 | union acpi_operand_object *data_obj; /* Data register */ |
319 | * are each field definitions unto themselves. | ||
320 | */ | ||
321 | union acpi_operand_object *index_obj; /* Index register */ | ||
322 | union acpi_operand_object *data_obj; /* Data register */ | ||
323 | }; | 252 | }; |
324 | 253 | ||
325 | |||
326 | /* The buffer_field is different in that it is part of a Buffer, not an op_region */ | 254 | /* The buffer_field is different in that it is part of a Buffer, not an op_region */ |
327 | 255 | ||
328 | struct acpi_object_buffer_field | 256 | struct acpi_object_buffer_field { |
329 | { | 257 | ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj; /* Containing Buffer object */ |
330 | ACPI_OBJECT_COMMON_HEADER | ||
331 | ACPI_COMMON_FIELD_INFO | ||
332 | union acpi_operand_object *buffer_obj; /* Containing Buffer object */ | ||
333 | }; | 258 | }; |
334 | 259 | ||
335 | |||
336 | /****************************************************************************** | 260 | /****************************************************************************** |
337 | * | 261 | * |
338 | * Objects for handlers | 262 | * Objects for handlers |
339 | * | 263 | * |
340 | *****************************************************************************/ | 264 | *****************************************************************************/ |
341 | 265 | ||
342 | struct acpi_object_notify_handler | 266 | struct acpi_object_notify_handler { |
343 | { | 267 | ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */ |
344 | ACPI_OBJECT_COMMON_HEADER | 268 | acpi_notify_handler handler; |
345 | struct acpi_namespace_node *node; /* Parent device */ | 269 | void *context; |
346 | acpi_notify_handler handler; | ||
347 | void *context; | ||
348 | }; | 270 | }; |
349 | 271 | ||
350 | |||
351 | /* Flags for address handler */ | 272 | /* Flags for address handler */ |
352 | 273 | ||
353 | #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1 | 274 | #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1 |
354 | 275 | ||
355 | 276 | struct acpi_object_addr_handler { | |
356 | struct acpi_object_addr_handler | 277 | ACPI_OBJECT_COMMON_HEADER u8 space_id; |
357 | { | 278 | u16 hflags; |
358 | ACPI_OBJECT_COMMON_HEADER | 279 | acpi_adr_space_handler handler; |
359 | u8 space_id; | 280 | struct acpi_namespace_node *node; /* Parent device */ |
360 | u16 hflags; | 281 | void *context; |
361 | acpi_adr_space_handler handler; | 282 | acpi_adr_space_setup setup; |
362 | struct acpi_namespace_node *node; /* Parent device */ | 283 | union acpi_operand_object *region_list; /* regions using this handler */ |
363 | void *context; | 284 | union acpi_operand_object *next; |
364 | acpi_adr_space_setup setup; | ||
365 | union acpi_operand_object *region_list; /* regions using this handler */ | ||
366 | union acpi_operand_object *next; | ||
367 | }; | 285 | }; |
368 | 286 | ||
369 | |||
370 | /****************************************************************************** | 287 | /****************************************************************************** |
371 | * | 288 | * |
372 | * Special internal objects | 289 | * Special internal objects |
@@ -377,18 +294,15 @@ struct acpi_object_addr_handler | |||
377 | * The Reference object type is used for these opcodes: | 294 | * The Reference object type is used for these opcodes: |
378 | * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op | 295 | * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op |
379 | */ | 296 | */ |
380 | struct acpi_object_reference | 297 | struct acpi_object_reference { |
381 | { | 298 | ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for index_op */ |
382 | ACPI_OBJECT_COMMON_HEADER | 299 | u16 opcode; |
383 | u8 target_type; /* Used for index_op */ | 300 | u32 offset; /* Used for arg_op, local_op, and index_op */ |
384 | u16 opcode; | 301 | void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ |
385 | u32 offset; /* Used for arg_op, local_op, and index_op */ | 302 | struct acpi_namespace_node *node; |
386 | void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ | 303 | union acpi_operand_object **where; |
387 | struct acpi_namespace_node *node; | ||
388 | union acpi_operand_object **where; | ||
389 | }; | 304 | }; |
390 | 305 | ||
391 | |||
392 | /* | 306 | /* |
393 | * Extra object is used as additional storage for types that | 307 | * Extra object is used as additional storage for types that |
394 | * have AML code in their declarations (term_args) that must be | 308 | * have AML code in their declarations (term_args) that must be |
@@ -396,73 +310,62 @@ struct acpi_object_reference | |||
396 | * | 310 | * |
397 | * Currently: Region and field_unit types | 311 | * Currently: Region and field_unit types |
398 | */ | 312 | */ |
399 | struct acpi_object_extra | 313 | struct acpi_object_extra { |
400 | { | 314 | ACPI_OBJECT_COMMON_HEADER u8 byte_fill1; |
401 | ACPI_OBJECT_COMMON_HEADER | 315 | u16 word_fill1; |
402 | u8 byte_fill1; | 316 | u32 aml_length; |
403 | u16 word_fill1; | 317 | u8 *aml_start; |
404 | u32 aml_length; | 318 | struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ |
405 | u8 *aml_start; | 319 | void *region_context; /* Region-specific data */ |
406 | struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ | ||
407 | void *region_context; /* Region-specific data */ | ||
408 | }; | 320 | }; |
409 | 321 | ||
410 | |||
411 | /* Additional data that can be attached to namespace nodes */ | 322 | /* Additional data that can be attached to namespace nodes */ |
412 | 323 | ||
413 | struct acpi_object_data | 324 | struct acpi_object_data { |
414 | { | 325 | ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler; |
415 | ACPI_OBJECT_COMMON_HEADER | 326 | void *pointer; |
416 | acpi_object_handler handler; | ||
417 | void *pointer; | ||
418 | }; | 327 | }; |
419 | 328 | ||
420 | |||
421 | /* Structure used when objects are cached for reuse */ | 329 | /* Structure used when objects are cached for reuse */ |
422 | 330 | ||
423 | struct acpi_object_cache_list | 331 | struct acpi_object_cache_list { |
424 | { | 332 | ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */ |
425 | ACPI_OBJECT_COMMON_HEADER | ||
426 | union acpi_operand_object *next; /* Link for object cache and internal lists*/ | ||
427 | }; | 333 | }; |
428 | 334 | ||
429 | |||
430 | /****************************************************************************** | 335 | /****************************************************************************** |
431 | * | 336 | * |
432 | * union acpi_operand_object Descriptor - a giant union of all of the above | 337 | * union acpi_operand_object Descriptor - a giant union of all of the above |
433 | * | 338 | * |
434 | *****************************************************************************/ | 339 | *****************************************************************************/ |
435 | 340 | ||
436 | union acpi_operand_object | 341 | union acpi_operand_object { |
437 | { | 342 | struct acpi_object_common common; |
438 | struct acpi_object_common common; | 343 | struct acpi_object_integer integer; |
439 | struct acpi_object_integer integer; | 344 | struct acpi_object_string string; |
440 | struct acpi_object_string string; | 345 | struct acpi_object_buffer buffer; |
441 | struct acpi_object_buffer buffer; | 346 | struct acpi_object_package package; |
442 | struct acpi_object_package package; | 347 | struct acpi_object_event event; |
443 | struct acpi_object_event event; | 348 | struct acpi_object_method method; |
444 | struct acpi_object_method method; | 349 | struct acpi_object_mutex mutex; |
445 | struct acpi_object_mutex mutex; | 350 | struct acpi_object_region region; |
446 | struct acpi_object_region region; | 351 | struct acpi_object_notify_common common_notify; |
447 | struct acpi_object_notify_common common_notify; | 352 | struct acpi_object_device device; |
448 | struct acpi_object_device device; | 353 | struct acpi_object_power_resource power_resource; |
449 | struct acpi_object_power_resource power_resource; | 354 | struct acpi_object_processor processor; |
450 | struct acpi_object_processor processor; | 355 | struct acpi_object_thermal_zone thermal_zone; |
451 | struct acpi_object_thermal_zone thermal_zone; | 356 | struct acpi_object_field_common common_field; |
452 | struct acpi_object_field_common common_field; | 357 | struct acpi_object_region_field field; |
453 | struct acpi_object_region_field field; | 358 | struct acpi_object_buffer_field buffer_field; |
454 | struct acpi_object_buffer_field buffer_field; | 359 | struct acpi_object_bank_field bank_field; |
455 | struct acpi_object_bank_field bank_field; | 360 | struct acpi_object_index_field index_field; |
456 | struct acpi_object_index_field index_field; | 361 | struct acpi_object_notify_handler notify; |
457 | struct acpi_object_notify_handler notify; | 362 | struct acpi_object_addr_handler address_space; |
458 | struct acpi_object_addr_handler address_space; | 363 | struct acpi_object_reference reference; |
459 | struct acpi_object_reference reference; | 364 | struct acpi_object_extra extra; |
460 | struct acpi_object_extra extra; | 365 | struct acpi_object_data data; |
461 | struct acpi_object_data data; | 366 | struct acpi_object_cache_list cache; |
462 | struct acpi_object_cache_list cache; | ||
463 | }; | 367 | }; |
464 | 368 | ||
465 | |||
466 | /****************************************************************************** | 369 | /****************************************************************************** |
467 | * | 370 | * |
468 | * union acpi_descriptor - objects that share a common descriptor identifier | 371 | * union acpi_descriptor - objects that share a common descriptor identifier |
@@ -471,7 +374,7 @@ union acpi_operand_object | |||
471 | 374 | ||
472 | /* Object descriptor types */ | 375 | /* Object descriptor types */ |
473 | 376 | ||
474 | #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ | 377 | #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ |
475 | #define ACPI_DESC_TYPE_STATE 0x02 | 378 | #define ACPI_DESC_TYPE_STATE 0x02 |
476 | #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 | 379 | #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 |
477 | #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 | 380 | #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 |
@@ -488,14 +391,11 @@ union acpi_operand_object | |||
488 | #define ACPI_DESC_TYPE_NAMED 0x0F | 391 | #define ACPI_DESC_TYPE_NAMED 0x0F |
489 | #define ACPI_DESC_TYPE_MAX 0x0F | 392 | #define ACPI_DESC_TYPE_MAX 0x0F |
490 | 393 | ||
491 | 394 | union acpi_descriptor { | |
492 | union acpi_descriptor | 395 | u8 descriptor_id; /* To differentiate various internal objs */ |
493 | { | 396 | union acpi_operand_object object; |
494 | u8 descriptor_id; /* To differentiate various internal objs */\ | 397 | struct acpi_namespace_node node; |
495 | union acpi_operand_object object; | 398 | union acpi_parse_object op; |
496 | struct acpi_namespace_node node; | ||
497 | union acpi_parse_object op; | ||
498 | }; | 399 | }; |
499 | 400 | ||
500 | 401 | #endif /* _ACOBJECT_H */ | |
501 | #endif /* _ACOBJECT_H */ | ||