1 
2 /******************************************************************************
3  *
4  * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT  (Internal object only)
5  *
6  *****************************************************************************/
7 
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
13  * All rights reserved.
14  *
15  * 2. License
16  *
17  * 2.1. This is your license from Intel Corp. under its intellectual property
18  * rights.  You may have additional license terms from the party that provided
19  * you this software, covering your right to use that party's intellectual
20  * property rights.
21  *
22  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23  * copy of the source code appearing in this file ("Covered Code") an
24  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25  * base code distributed originally by Intel ("Original Intel Code") to copy,
26  * make derivatives, distribute, use and display any portion of the Covered
27  * Code in any form, with the right to sublicense such rights; and
28  *
29  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30  * license (with the right to sublicense), under only those claims of Intel
31  * patents that are infringed by the Original Intel Code, to make, use, sell,
32  * offer to sell, and import the Covered Code and derivative works thereof
33  * solely to the minimum extent necessary to exercise the above copyright
34  * license, and in no event shall the patent license extend to any additions
35  * to or modifications of the Original Intel Code.  No other license or right
36  * is granted directly or by implication, estoppel or otherwise;
37  *
38  * The above copyright and patent license is granted only if the following
39  * conditions are met:
40  *
41  * 3. Conditions
42  *
43  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44  * Redistribution of source code of any substantial portion of the Covered
45  * Code or modification with rights to further distribute source must include
46  * the above Copyright Notice, the above License, this list of Conditions,
47  * and the following Disclaimer and Export Compliance provision.  In addition,
48  * Licensee must cause all Covered Code to which Licensee contributes to
49  * contain a file documenting the changes Licensee made to create that Covered
50  * Code and the date of any change.  Licensee must include in that file the
51  * documentation of any changes made by any predecessor Licensee.  Licensee
52  * must include a prominent statement that the modification is derived,
53  * directly or indirectly, from Original Intel Code.
54  *
55  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56  * Redistribution of source code of any substantial portion of the Covered
57  * Code or modification without rights to further distribute source must
58  * include the following Disclaimer and Export Compliance provision in the
59  * documentation and/or other materials provided with distribution.  In
60  * addition, Licensee may not authorize further sublicense of source of any
61  * portion of the Covered Code, and must include terms to the effect that the
62  * license from Licensee to its licensee is limited to the intellectual
63  * property embodied in the software Licensee provides to its licensee, and
64  * not to intellectual property embodied in modifications its licensee may
65  * make.
66  *
67  * 3.3. Redistribution of Executable. Redistribution in executable form of any
68  * substantial portion of the Covered Code or modification must reproduce the
69  * above Copyright Notice, and the following Disclaimer and Export Compliance
70  * provision in the documentation and/or other materials provided with the
71  * distribution.
72  *
73  * 3.4. Intel retains all right, title, and interest in and to the Original
74  * Intel Code.
75  *
76  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77  * Intel shall be used in advertising or otherwise to promote the sale, use or
78  * other dealings in products derived from or relating to the Covered Code
79  * without prior written authorization from Intel.
80  *
81  * 4. Disclaimer and Export Compliance
82  *
83  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89  * PARTICULAR PURPOSE.
90  *
91  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98  * LIMITED REMEDY.
99  *
100  * 4.3. Licensee shall not export, either directly or indirectly, any of this
101  * software or system incorporating such software without first obtaining any
102  * required license or other approval from the U. S. Department of Commerce or
103  * any other agency or department of the United States Government.  In the
104  * event Licensee exports any such software from the United States or
105  * re-exports any such software from a foreign destination, Licensee shall
106  * ensure that the distribution and export/re-export of the software is in
107  * compliance with all laws, regulations, orders, or other restrictions of the
108  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109  * any of its subsidiaries will export/re-export any technical data, process,
110  * software, or service, directly or indirectly, to any country for which the
111  * United States government or any agency thereof requires an export license,
112  * other governmental approval, or letter of assurance, without first obtaining
113  * such license, approval or letter.
114  *
115  *****************************************************************************/
116 
117 #ifndef _ACOBJECT_H
118 #define _ACOBJECT_H
119 
120 /* acpisrc:StructDefs -- for acpisrc conversion */
121 
122 
123 /*
124  * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher
125  * to the interpreter, and to keep track of the various handlers such as
126  * address space handlers and notify handlers. The object is a constant
127  * size in order to allow it to be cached and reused.
128  *
129  * Note: The object is optimized to be aligned and will not work if it is
130  * byte-packed.
131  */
132 #if ACPI_MACHINE_WIDTH == 64
133 #pragma pack(8)
134 #else
135 #pragma pack(4)
136 #endif
137 
138 /*******************************************************************************
139  *
140  * Common Descriptors
141  *
142  ******************************************************************************/
143 
144 /*
145  * Common area for all objects.
146  *
147  * DescriptorType is used to differentiate between internal descriptors, and
148  * must be in the same place across all descriptors
149  *
150  * Note: The DescriptorType and Type fields must appear in the identical
151  * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT
152  * structures.
153  */
154 #define ACPI_OBJECT_COMMON_HEADER \
155     union acpi_operand_object       *NextObject;        /* Objects linked to parent NS node */\
156     UINT8                           DescriptorType;     /* To differentiate various internal objs */\
157     UINT8                           Type;               /* ACPI_OBJECT_TYPE */\
158     UINT16                          ReferenceCount;     /* For object deletion management */\
159     UINT8                           Flags;
160     /*
161      * Note: There are 3 bytes available here before the
162      * next natural alignment boundary (for both 32/64 cases)
163      */
164 
165 /* Values for Flag byte above */
166 
167 #define AOPOBJ_AML_CONSTANT         0x01    /* Integer is an AML constant */
168 #define AOPOBJ_STATIC_POINTER       0x02    /* Data is part of an ACPI table, don't delete */
169 #define AOPOBJ_DATA_VALID           0x04    /* Object is intialized and data is valid */
170 #define AOPOBJ_OBJECT_INITIALIZED   0x08    /* Region is initialized, _REG was run */
171 #define AOPOBJ_SETUP_COMPLETE       0x10    /* Region setup is complete */
172 #define AOPOBJ_INVALID              0x20    /* Host OS won't allow a Region address */
173 #define AOPOBJ_MODULE_LEVEL         0x40    /* Method is actually module-level code */
174 #define AOPOBJ_MODIFIED_NAMESPACE   0x80    /* Method modified the namespace */
175 
176 
177 /******************************************************************************
178  *
179  * Basic data types
180  *
181  *****************************************************************************/
182 
183 typedef struct acpi_object_common
184 {
185     ACPI_OBJECT_COMMON_HEADER
186 
187 } ACPI_OBJECT_COMMON;
188 
189 
190 typedef struct acpi_object_integer
191 {
192     ACPI_OBJECT_COMMON_HEADER
193     UINT8                           Fill[3];            /* Prevent warning on some compilers */
194     UINT64                          Value;
195 
196 } ACPI_OBJECT_INTEGER;
197 
198 
199 /*
200  * Note: The String and Buffer object must be identical through the Pointer
201  * and length elements.  There is code that depends on this.
202  *
203  * Fields common to both Strings and Buffers
204  */
205 #define ACPI_COMMON_BUFFER_INFO(_Type) \
206     _Type                           *Pointer; \
207     UINT32                          Length;
208 
209 
210 typedef struct acpi_object_string   /* Null terminated, ASCII characters only */
211 {
212     ACPI_OBJECT_COMMON_HEADER
213     ACPI_COMMON_BUFFER_INFO         (char)              /* String in AML stream or allocated string */
214 
215 } ACPI_OBJECT_STRING;
216 
217 
218 typedef struct acpi_object_buffer
219 {
220     ACPI_OBJECT_COMMON_HEADER
221     ACPI_COMMON_BUFFER_INFO         (UINT8)             /* Buffer in AML stream or allocated buffer */
222     UINT32                          AmlLength;
223     UINT8                           *AmlStart;
224     ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
225 
226 } ACPI_OBJECT_BUFFER;
227 
228 
229 typedef struct acpi_object_package
230 {
231     ACPI_OBJECT_COMMON_HEADER
232     ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
233     union acpi_operand_object       **Elements;         /* Array of pointers to AcpiObjects */
234     UINT8                           *AmlStart;
235     UINT32                          AmlLength;
236     UINT32                          Count;              /* # of elements in package */
237 
238 } ACPI_OBJECT_PACKAGE;
239 
240 
241 /******************************************************************************
242  *
243  * Complex data types
244  *
245  *****************************************************************************/
246 
247 typedef struct acpi_object_event
248 {
249     ACPI_OBJECT_COMMON_HEADER
250     ACPI_SEMAPHORE                  OsSemaphore;        /* Actual OS synchronization object */
251 
252 } ACPI_OBJECT_EVENT;
253 
254 
255 typedef struct acpi_object_mutex
256 {
257     ACPI_OBJECT_COMMON_HEADER
258     UINT8                           SyncLevel;          /* 0-15, specified in Mutex() call */
259     UINT16                          AcquisitionDepth;   /* Allow multiple Acquires, same thread */
260     ACPI_MUTEX                      OsMutex;            /* Actual OS synchronization object */
261     ACPI_THREAD_ID                  ThreadId;           /* Current owner of the mutex */
262     struct acpi_thread_state        *OwnerThread;       /* Current owner of the mutex */
263     union acpi_operand_object       *Prev;              /* Link for list of acquired mutexes */
264     union acpi_operand_object       *Next;              /* Link for list of acquired mutexes */
265     ACPI_NAMESPACE_NODE             *Node;              /* Containing namespace node */
266     UINT8                           OriginalSyncLevel;  /* Owner's original sync level (0-15) */
267 
268 } ACPI_OBJECT_MUTEX;
269 
270 
271 typedef struct acpi_object_region
272 {
273     ACPI_OBJECT_COMMON_HEADER
274     UINT8                           SpaceId;
275     ACPI_NAMESPACE_NODE             *Node;              /* Containing namespace node */
276     union acpi_operand_object       *Handler;           /* Handler for region access */
277     union acpi_operand_object       *Next;
278     ACPI_PHYSICAL_ADDRESS           Address;
279     UINT32                          Length;
280 
281 } ACPI_OBJECT_REGION;
282 
283 
284 typedef struct acpi_object_method
285 {
286     ACPI_OBJECT_COMMON_HEADER
287     UINT8                           MethodFlags;
288     UINT8                           ParamCount;
289     UINT8                           SyncLevel;
290     union acpi_operand_object       *Mutex;
291     UINT8                           *AmlStart;
292     union
293     {
294         ACPI_INTERNAL_METHOD            Implementation;
295         union acpi_operand_object       *Handler;
296     } Extra;
297 
298     UINT32                          AmlLength;
299     UINT8                           ThreadCount;
300     ACPI_OWNER_ID                   OwnerId;
301 
302 } ACPI_OBJECT_METHOD;
303 
304 
305 /******************************************************************************
306  *
307  * Objects that can be notified.  All share a common NotifyInfo area.
308  *
309  *****************************************************************************/
310 
311 /*
312  * Common fields for objects that support ASL notifications
313  */
314 #define ACPI_COMMON_NOTIFY_INFO \
315     union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
316     union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
317     union acpi_operand_object       *Handler;           /* Handler for Address space */
318 
319 
320 typedef struct acpi_object_notify_common    /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
321 {
322     ACPI_OBJECT_COMMON_HEADER
323     ACPI_COMMON_NOTIFY_INFO
324 
325 } ACPI_OBJECT_NOTIFY_COMMON;
326 
327 
328 typedef struct acpi_object_device
329 {
330     ACPI_OBJECT_COMMON_HEADER
331     ACPI_COMMON_NOTIFY_INFO
332     ACPI_GPE_BLOCK_INFO             *GpeBlock;
333 
334 } ACPI_OBJECT_DEVICE;
335 
336 
337 typedef struct acpi_object_power_resource
338 {
339     ACPI_OBJECT_COMMON_HEADER
340     ACPI_COMMON_NOTIFY_INFO
341     UINT32                          SystemLevel;
342     UINT32                          ResourceOrder;
343 
344 } ACPI_OBJECT_POWER_RESOURCE;
345 
346 
347 typedef struct acpi_object_processor
348 {
349     ACPI_OBJECT_COMMON_HEADER
350 
351     /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
352 
353     UINT8                           ProcId;
354     UINT8                           Length;
355     ACPI_COMMON_NOTIFY_INFO
356     ACPI_IO_ADDRESS                 Address;
357 
358 } ACPI_OBJECT_PROCESSOR;
359 
360 
361 typedef struct acpi_object_thermal_zone
362 {
363     ACPI_OBJECT_COMMON_HEADER
364     ACPI_COMMON_NOTIFY_INFO
365 
366 } ACPI_OBJECT_THERMAL_ZONE;
367 
368 
369 /******************************************************************************
370  *
371  * Fields.  All share a common header/info field.
372  *
373  *****************************************************************************/
374 
375 /*
376  * Common bitfield for the field objects
377  * "Field Datum"  -- a datum from the actual field object
378  * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
379  */
380 #define ACPI_COMMON_FIELD_INFO \
381     UINT8                           FieldFlags;         /* Access, update, and lock bits */\
382     UINT8                           Attribute;          /* From AccessAs keyword */\
383     UINT8                           AccessByteWidth;    /* Read/Write size in bytes */\
384     ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */\
385     UINT32                          BitLength;          /* Length of field in bits */\
386     UINT32                          BaseByteOffset;     /* Byte offset within containing object */\
387     UINT32                          Value;              /* Value to store into the Bank or Index register */\
388     UINT8                           StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
389     UINT8                           AccessBitWidth;     /* Read/Write size in bits (8-64) */
390 
391 
392 typedef struct acpi_object_field_common                 /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
393 {
394     ACPI_OBJECT_COMMON_HEADER
395     ACPI_COMMON_FIELD_INFO
396     union acpi_operand_object       *RegionObj;         /* Parent Operation Region object (REGION/BANK fields only) */
397 
398 } ACPI_OBJECT_FIELD_COMMON;
399 
400 
401 typedef struct acpi_object_region_field
402 {
403     ACPI_OBJECT_COMMON_HEADER
404     ACPI_COMMON_FIELD_INFO
405     union acpi_operand_object       *RegionObj;         /* Containing OpRegion object */
406 
407 } ACPI_OBJECT_REGION_FIELD;
408 
409 
410 typedef struct acpi_object_bank_field
411 {
412     ACPI_OBJECT_COMMON_HEADER
413     ACPI_COMMON_FIELD_INFO
414     union acpi_operand_object       *RegionObj;         /* Containing OpRegion object */
415     union acpi_operand_object       *BankObj;           /* BankSelect Register object */
416 
417 } ACPI_OBJECT_BANK_FIELD;
418 
419 
420 typedef struct acpi_object_index_field
421 {
422     ACPI_OBJECT_COMMON_HEADER
423     ACPI_COMMON_FIELD_INFO
424 
425     /*
426      * No "RegionObj" pointer needed since the Index and Data registers
427      * are each field definitions unto themselves.
428      */
429     union acpi_operand_object       *IndexObj;          /* Index register */
430     union acpi_operand_object       *DataObj;           /* Data register */
431 
432 } ACPI_OBJECT_INDEX_FIELD;
433 
434 
435 /* The BufferField is different in that it is part of a Buffer, not an OpRegion */
436 
437 typedef struct acpi_object_buffer_field
438 {
439     ACPI_OBJECT_COMMON_HEADER
440     ACPI_COMMON_FIELD_INFO
441     union acpi_operand_object       *BufferObj;         /* Containing Buffer object */
442 
443 } ACPI_OBJECT_BUFFER_FIELD;
444 
445 
446 /******************************************************************************
447  *
448  * Objects for handlers
449  *
450  *****************************************************************************/
451 
452 typedef struct acpi_object_notify_handler
453 {
454     ACPI_OBJECT_COMMON_HEADER
455     ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
456     ACPI_NOTIFY_HANDLER             Handler;
457     void                            *Context;
458 
459 } ACPI_OBJECT_NOTIFY_HANDLER;
460 
461 
462 typedef struct acpi_object_addr_handler
463 {
464     ACPI_OBJECT_COMMON_HEADER
465     UINT8                           SpaceId;
466     UINT8                           HandlerFlags;
467     ACPI_ADR_SPACE_HANDLER          Handler;
468     ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
469     void                            *Context;
470     ACPI_ADR_SPACE_SETUP            Setup;
471     union acpi_operand_object       *RegionList;        /* regions using this handler */
472     union acpi_operand_object       *Next;
473 
474 } ACPI_OBJECT_ADDR_HANDLER;
475 
476 /* Flags for address handler (HandlerFlags) */
477 
478 #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED  0x01
479 
480 
481 /******************************************************************************
482  *
483  * Special internal objects
484  *
485  *****************************************************************************/
486 
487 /*
488  * The Reference object is used for these opcodes:
489  * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp
490  * The Reference.Class differentiates these types.
491  */
492 typedef struct acpi_object_reference
493 {
494     ACPI_OBJECT_COMMON_HEADER
495      UINT8                           Class;              /* Reference Class */
496      UINT8                           TargetType;         /* Used for Index Op */
497      UINT8                           Reserved;
498      void                            *Object;            /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
499      ACPI_NAMESPACE_NODE             *Node;              /* RefOf or Namepath */
500      union acpi_operand_object       **Where;            /* Target of Index */
501      UINT32                          Value;              /* Used for Local/Arg/Index/DdbHandle */
502 
503 } ACPI_OBJECT_REFERENCE;
504 
505 /* Values for Reference.Class above */
506 
507 typedef enum
508 {
509     ACPI_REFCLASS_LOCAL             = 0,        /* Method local */
510     ACPI_REFCLASS_ARG               = 1,        /* Method argument */
511     ACPI_REFCLASS_REFOF             = 2,        /* Result of RefOf() TBD: Split to Ref/Node and Ref/OperandObj? */
512     ACPI_REFCLASS_INDEX             = 3,        /* Result of Index() */
513     ACPI_REFCLASS_TABLE             = 4,        /* DdbHandle - Load(), LoadTable() */
514     ACPI_REFCLASS_NAME              = 5,        /* Reference to a named object */
515     ACPI_REFCLASS_DEBUG             = 6,        /* Debug object */
516 
517     ACPI_REFCLASS_MAX               = 6
518 
519 } ACPI_REFERENCE_CLASSES;
520 
521 
522 /*
523  * Extra object is used as additional storage for types that
524  * have AML code in their declarations (TermArgs) that must be
525  * evaluated at run time.
526  *
527  * Currently: Region and FieldUnit types
528  */
529 typedef struct acpi_object_extra
530 {
531     ACPI_OBJECT_COMMON_HEADER
532     ACPI_NAMESPACE_NODE             *Method_REG;        /* _REG method for this region (if any) */
533     void                            *RegionContext;     /* Region-specific data */
534     UINT8                           *AmlStart;
535     UINT32                          AmlLength;
536 
537 } ACPI_OBJECT_EXTRA;
538 
539 
540 /* Additional data that can be attached to namespace nodes */
541 
542 typedef struct acpi_object_data
543 {
544     ACPI_OBJECT_COMMON_HEADER
545     ACPI_OBJECT_HANDLER             Handler;
546     void                            *Pointer;
547 
548 } ACPI_OBJECT_DATA;
549 
550 
551 /* Structure used when objects are cached for reuse */
552 
553 typedef struct acpi_object_cache_list
554 {
555     ACPI_OBJECT_COMMON_HEADER
556     union acpi_operand_object       *Next;              /* Link for object cache and internal lists*/
557 
558 } ACPI_OBJECT_CACHE_LIST;
559 
560 
561 /******************************************************************************
562  *
563  * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above
564  *
565  *****************************************************************************/
566 
567 typedef union acpi_operand_object
568 {
569     ACPI_OBJECT_COMMON                  Common;
570     ACPI_OBJECT_INTEGER                 Integer;
571     ACPI_OBJECT_STRING                  String;
572     ACPI_OBJECT_BUFFER                  Buffer;
573     ACPI_OBJECT_PACKAGE                 Package;
574     ACPI_OBJECT_EVENT                   Event;
575     ACPI_OBJECT_METHOD                  Method;
576     ACPI_OBJECT_MUTEX                   Mutex;
577     ACPI_OBJECT_REGION                  Region;
578     ACPI_OBJECT_NOTIFY_COMMON           CommonNotify;
579     ACPI_OBJECT_DEVICE                  Device;
580     ACPI_OBJECT_POWER_RESOURCE          PowerResource;
581     ACPI_OBJECT_PROCESSOR               Processor;
582     ACPI_OBJECT_THERMAL_ZONE            ThermalZone;
583     ACPI_OBJECT_FIELD_COMMON            CommonField;
584     ACPI_OBJECT_REGION_FIELD            Field;
585     ACPI_OBJECT_BUFFER_FIELD            BufferField;
586     ACPI_OBJECT_BANK_FIELD              BankField;
587     ACPI_OBJECT_INDEX_FIELD             IndexField;
588     ACPI_OBJECT_NOTIFY_HANDLER          Notify;
589     ACPI_OBJECT_ADDR_HANDLER            AddressSpace;
590     ACPI_OBJECT_REFERENCE               Reference;
591     ACPI_OBJECT_EXTRA                   Extra;
592     ACPI_OBJECT_DATA                    Data;
593     ACPI_OBJECT_CACHE_LIST              Cache;
594 
595     /*
596      * Add namespace node to union in order to simplify code that accepts both
597      * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share
598      * a common DescriptorType field in order to differentiate them.
599      */
600     ACPI_NAMESPACE_NODE                 Node;
601 
602 } ACPI_OPERAND_OBJECT;
603 
604 
605 /******************************************************************************
606  *
607  * ACPI_DESCRIPTOR - objects that share a common descriptor identifier
608  *
609  *****************************************************************************/
610 
611 /* Object descriptor types */
612 
613 #define ACPI_DESC_TYPE_CACHED           0x01        /* Used only when object is cached */
614 #define ACPI_DESC_TYPE_STATE            0x02
615 #define ACPI_DESC_TYPE_STATE_UPDATE     0x03
616 #define ACPI_DESC_TYPE_STATE_PACKAGE    0x04
617 #define ACPI_DESC_TYPE_STATE_CONTROL    0x05
618 #define ACPI_DESC_TYPE_STATE_RPSCOPE    0x06
619 #define ACPI_DESC_TYPE_STATE_PSCOPE     0x07
620 #define ACPI_DESC_TYPE_STATE_WSCOPE     0x08
621 #define ACPI_DESC_TYPE_STATE_RESULT     0x09
622 #define ACPI_DESC_TYPE_STATE_NOTIFY     0x0A
623 #define ACPI_DESC_TYPE_STATE_THREAD     0x0B
624 #define ACPI_DESC_TYPE_WALK             0x0C
625 #define ACPI_DESC_TYPE_PARSER           0x0D
626 #define ACPI_DESC_TYPE_OPERAND          0x0E
627 #define ACPI_DESC_TYPE_NAMED            0x0F
628 #define ACPI_DESC_TYPE_MAX              0x0F
629 
630 
631 typedef struct acpi_common_descriptor
632 {
633     void                            *CommonPointer;
634     UINT8                           DescriptorType; /* To differentiate various internal objs */
635 
636 } ACPI_COMMON_DESCRIPTOR;
637 
638 typedef union acpi_descriptor
639 {
640     ACPI_COMMON_DESCRIPTOR          Common;
641     ACPI_OPERAND_OBJECT             Object;
642     ACPI_NAMESPACE_NODE             Node;
643     ACPI_PARSE_OBJECT               Op;
644 
645 } ACPI_DESCRIPTOR;
646 
647 #pragma pack()
648 
649 #endif /* _ACOBJECT_H */
650