acobject.h revision 167802
160786Sps
2221715Sdelphij/******************************************************************************
360786Sps *
460786Sps * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT  (Internal object only)
560786Sps *       $Revision: 1.143 $
660786Sps *
760786Sps *****************************************************************************/
860786Sps
960786Sps/******************************************************************************
1060786Sps *
1160786Sps * 1. Copyright Notice
1260786Sps *
1360786Sps * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
1460786Sps * All rights reserved.
1560786Sps *
1660786Sps * 2. License
1760786Sps *
1860786Sps * 2.1. This is your license from Intel Corp. under its intellectual property
1960786Sps * rights.  You may have additional license terms from the party that provided
2060786Sps * you this software, covering your right to use that party's intellectual
2160786Sps * property rights.
2260786Sps *
2360786Sps * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
2460786Sps * copy of the source code appearing in this file ("Covered Code") an
2560786Sps * irrevocable, perpetual, worldwide license under Intel's copyrights in the
2660786Sps * base code distributed originally by Intel ("Original Intel Code") to copy,
2760786Sps * make derivatives, distribute, use and display any portion of the Covered
2860786Sps * Code in any form, with the right to sublicense such rights; and
2960786Sps *
3060786Sps * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
3160786Sps * license (with the right to sublicense), under only those claims of Intel
3260786Sps * patents that are infringed by the Original Intel Code, to make, use, sell,
3360786Sps * offer to sell, and import the Covered Code and derivative works thereof
3460786Sps * solely to the minimum extent necessary to exercise the above copyright
3560786Sps * license, and in no event shall the patent license extend to any additions
3660786Sps * to or modifications of the Original Intel Code.  No other license or right
3760786Sps * is granted directly or by implication, estoppel or otherwise;
3860786Sps *
3960786Sps * The above copyright and patent license is granted only if the following
4060786Sps * conditions are met:
4160786Sps *
4260786Sps * 3. Conditions
4360786Sps *
4460786Sps * 3.1. Redistribution of Source with Rights to Further Distribute Source.
4560786Sps * Redistribution of source code of any substantial portion of the Covered
4660786Sps * Code or modification with rights to further distribute source must include
4760786Sps * the above Copyright Notice, the above License, this list of Conditions,
4860786Sps * and the following Disclaimer and Export Compliance provision.  In addition,
4960786Sps * Licensee must cause all Covered Code to which Licensee contributes to
5060786Sps * contain a file documenting the changes Licensee made to create that Covered
5160786Sps * Code and the date of any change.  Licensee must include in that file the
5260786Sps * documentation of any changes made by any predecessor Licensee.  Licensee
5360786Sps * must include a prominent statement that the modification is derived,
5460786Sps * directly or indirectly, from Original Intel Code.
5560786Sps *
5660786Sps * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
5760786Sps * Redistribution of source code of any substantial portion of the Covered
5860786Sps * Code or modification without rights to further distribute source must
5960786Sps * include the following Disclaimer and Export Compliance provision in the
6060786Sps * documentation and/or other materials provided with distribution.  In
6160786Sps * addition, Licensee may not authorize further sublicense of source of any
6260786Sps * portion of the Covered Code, and must include terms to the effect that the
6360786Sps * license from Licensee to its licensee is limited to the intellectual
6460786Sps * property embodied in the software Licensee provides to its licensee, and
6560786Sps * not to intellectual property embodied in modifications its licensee may
6660786Sps * make.
6760786Sps *
6860786Sps * 3.3. Redistribution of Executable. Redistribution in executable form of any
6960786Sps * substantial portion of the Covered Code or modification must reproduce the
7060786Sps * above Copyright Notice, and the following Disclaimer and Export Compliance
7160786Sps * provision in the documentation and/or other materials provided with the
7260786Sps * distribution.
7360786Sps *
7460786Sps * 3.4. Intel retains all right, title, and interest in and to the Original
7560786Sps * Intel Code.
7660786Sps *
7760786Sps * 3.5. Neither the name Intel nor any other trademark owned or controlled by
7860786Sps * Intel shall be used in advertising or otherwise to promote the sale, use or
7960786Sps * other dealings in products derived from or relating to the Covered Code
8060786Sps * without prior written authorization from Intel.
8160786Sps *
8260786Sps * 4. Disclaimer and Export Compliance
8360786Sps *
8460786Sps * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
8560786Sps * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
8660786Sps * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
8760786Sps * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
8860786Sps * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
8960786Sps * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
9060786Sps * PARTICULAR PURPOSE.
9160786Sps *
9260786Sps * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
9360786Sps * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
9460786Sps * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
9560786Sps * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
9660786Sps * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
9760786Sps * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
9860786Sps * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
9960786Sps * LIMITED REMEDY.
10060786Sps *
10160786Sps * 4.3. Licensee shall not export, either directly or indirectly, any of this
10260786Sps * software or system incorporating such software without first obtaining any
10360786Sps * required license or other approval from the U. S. Department of Commerce or
10460786Sps * any other agency or department of the United States Government.  In the
10560786Sps * event Licensee exports any such software from the United States or
10660786Sps * re-exports any such software from a foreign destination, Licensee shall
10760786Sps * ensure that the distribution and export/re-export of the software is in
10860786Sps * compliance with all laws, regulations, orders, or other restrictions of the
10960786Sps * U.S. Export Administration Regulations. Licensee agrees that neither it nor
11060786Sps * any of its subsidiaries will export/re-export any technical data, process,
11160786Sps * software, or service, directly or indirectly, to any country for which the
11260786Sps * United States government or any agency thereof requires an export license,
113161475Sdelphij * other governmental approval, or letter of assurance, without first obtaining
114161475Sdelphij * such license, approval or letter.
11560786Sps *
11660786Sps *****************************************************************************/
11760786Sps
11860786Sps#ifndef _ACOBJECT_H
119161475Sdelphij#define _ACOBJECT_H
12060786Sps
12160786Sps/* acpisrc:StructDefs -- for acpisrc conversion */
12260786Sps
12360786Sps
12460786Sps/*
12560786Sps * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher
12660786Sps * to the interpreter, and to keep track of the various handlers such as
12760786Sps * address space handlers and notify handlers. The object is a constant
12860786Sps * size in order to allow it to be cached and reused.
12960786Sps *
13060786Sps * Note: The object is optimized to be aligned and will not work if it is
13160786Sps * byte-packed.
13260786Sps */
13360786Sps#if ACPI_MACHINE_WIDTH == 64
13460786Sps#pragma pack(8)
13560786Sps#else
13660786Sps#pragma pack(4)
13760786Sps#endif
13860786Sps
13960786Sps/*******************************************************************************
14060786Sps *
14160786Sps * Common Descriptors
14260786Sps *
14360786Sps ******************************************************************************/
14460786Sps
14560786Sps/*
14660786Sps * Common area for all objects.
14760786Sps *
14860786Sps * DescriptorType is used to differentiate between internal descriptors, and
14960786Sps * must be in the same place across all descriptors
15060786Sps *
15160786Sps * Note: The DescriptorType and Type fields must appear in the identical
15260786Sps * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT
15360786Sps * structures.
15460786Sps */
15560786Sps#define ACPI_OBJECT_COMMON_HEADER \
15660786Sps    union acpi_operand_object       *NextObject;        /* Objects linked to parent NS node */\
157128345Stjr    UINT8                           DescriptorType;     /* To differentiate various internal objs */\
158128345Stjr    UINT8                           Type;               /* ACPI_OBJECT_TYPE */\
159128345Stjr    UINT16                          ReferenceCount;     /* For object deletion management */\
160128345Stjr    UINT8                           Flags;
161128345Stjr    /*
162128345Stjr     * Note: There are 3 bytes available here before the
16360786Sps     * next natural alignment boundary (for both 32/64 cases)
16460786Sps     */
16560786Sps
16660786Sps/* Values for Flag byte above */
16760786Sps
16860786Sps#define AOPOBJ_AML_CONSTANT         0x01
16960786Sps#define AOPOBJ_STATIC_POINTER       0x02
17060786Sps#define AOPOBJ_DATA_VALID           0x04
17160786Sps#define AOPOBJ_OBJECT_INITIALIZED   0x08
17260786Sps#define AOPOBJ_SETUP_COMPLETE       0x10
17360786Sps#define AOPOBJ_SINGLE_DATUM         0x20
17460786Sps#define AOPOBJ_INVALID              0x40 /* Used if host OS won't allow an OpRegion address */
17560786Sps
17660786Sps
17760786Sps/******************************************************************************
17860786Sps *
17989019Sps * Basic data types
18060786Sps *
18160786Sps *****************************************************************************/
18260786Sps
18360786Spstypedef struct acpi_object_common
18460786Sps{
18560786Sps    ACPI_OBJECT_COMMON_HEADER
18660786Sps
18760786Sps} ACPI_OBJECT_COMMON;
18860786Sps
18960786Sps
19060786Spstypedef struct acpi_object_integer
19160786Sps{
19260786Sps    ACPI_OBJECT_COMMON_HEADER
19360786Sps    UINT8                           Fill[3];            /* Prevent warning on some compilers */
19460786Sps    ACPI_INTEGER                    Value;
19560786Sps
19660786Sps} ACPI_OBJECT_INTEGER;
19760786Sps
19860786Sps
19960786Sps/*
20060786Sps * Note: The String and Buffer object must be identical through the Pointer
20160786Sps * and length elements.  There is code that depends on this.
20260786Sps *
20360786Sps * Fields common to both Strings and Buffers
20460786Sps */
20560786Sps#define ACPI_COMMON_BUFFER_INFO(_Type) \
20660786Sps    _Type                           *Pointer; \
20760786Sps    UINT32                          Length;
20860786Sps
20960786Sps
21060786Spstypedef struct acpi_object_string   /* Null terminated, ASCII characters only */
21160786Sps{
21260786Sps    ACPI_OBJECT_COMMON_HEADER
21360786Sps    ACPI_COMMON_BUFFER_INFO         (char)              /* String in AML stream or allocated string */
21460786Sps
21560786Sps} ACPI_OBJECT_STRING;
21660786Sps
21760786Sps
21860786Spstypedef struct acpi_object_buffer
21960786Sps{
22060786Sps    ACPI_OBJECT_COMMON_HEADER
22160786Sps    ACPI_COMMON_BUFFER_INFO         (UINT8)             /* Buffer in AML stream or allocated buffer */
22260786Sps    UINT32                          AmlLength;
22360786Sps    UINT8                           *AmlStart;
22460786Sps    ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
22560786Sps
22660786Sps} ACPI_OBJECT_BUFFER;
22760786Sps
22860786Sps
22960786Spstypedef struct acpi_object_package
23060786Sps{
23160786Sps    ACPI_OBJECT_COMMON_HEADER
23260786Sps    ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
23360786Sps    union acpi_operand_object       **Elements;         /* Array of pointers to AcpiObjects */
23460786Sps    UINT8                           *AmlStart;
23560786Sps    UINT32                          AmlLength;
23660786Sps    UINT32                          Count;              /* # of elements in package */
23760786Sps
23889019Sps} ACPI_OBJECT_PACKAGE;
23960786Sps
24060786Sps
24160786Sps/******************************************************************************
24260786Sps *
24360786Sps * Complex data types
24460786Sps *
24560786Sps *****************************************************************************/
24660786Sps
24760786Spstypedef struct acpi_object_event
24860786Sps{
24960786Sps    ACPI_OBJECT_COMMON_HEADER
25060786Sps    ACPI_SEMAPHORE                  OsSemaphore;        /* Actual OS synchronization object */
25160786Sps
25260786Sps} ACPI_OBJECT_EVENT;
25389019Sps
25460786Sps
25560786Spstypedef struct acpi_object_mutex
25660786Sps{
25760786Sps    ACPI_OBJECT_COMMON_HEADER
25863128Sps    UINT8                           SyncLevel;          /* 0-15, specified in Mutex() call */
25963128Sps    UINT16                          AcquisitionDepth;   /* Allow multiple Acquires, same thread */
26063128Sps    ACPI_MUTEX                      OsMutex;            /* Actual OS synchronization object */
26163128Sps    ACPI_THREAD_ID                  ThreadId;           /* Current owner of the mutex */
26263128Sps    struct acpi_thread_state        *OwnerThread;       /* Current owner of the mutex */
26363128Sps    union acpi_operand_object       *Prev;              /* Link for list of acquired mutexes */
26463128Sps    union acpi_operand_object       *Next;              /* Link for list of acquired mutexes */
26560786Sps    ACPI_NAMESPACE_NODE             *Node;              /* Containing namespace node */
26660786Sps    UINT8                           OriginalSyncLevel;  /* Owner's original sync level (0-15) */
26760786Sps
26860786Sps} ACPI_OBJECT_MUTEX;
26960786Sps
27060786Sps
27160786Spstypedef struct acpi_object_region
27260786Sps{
27360786Sps    ACPI_OBJECT_COMMON_HEADER
274161475Sdelphij    UINT8                           SpaceId;
275221715Sdelphij    ACPI_NAMESPACE_NODE             *Node;              /* Containing namespace node */
276161475Sdelphij    union acpi_operand_object       *Handler;           /* Handler for region access */
27760786Sps    union acpi_operand_object       *Next;
27860786Sps    ACPI_PHYSICAL_ADDRESS           Address;
27960786Sps    UINT32                          Length;
280173682Sdelphij
281173682Sdelphij} ACPI_OBJECT_REGION;
282173682Sdelphij
28360786Sps
28460786Spstypedef struct acpi_object_method
28560786Sps{
28660786Sps    ACPI_OBJECT_COMMON_HEADER
28760786Sps    UINT8                           MethodFlags;
28860786Sps    UINT8                           ParamCount;
289221715Sdelphij    UINT8                           SyncLevel;
290221715Sdelphij    union acpi_operand_object       *Mutex;
291221715Sdelphij    UINT8                           *AmlStart;
29260786Sps    ACPI_INTERNAL_METHOD            Implementation;
293221715Sdelphij    UINT32                          AmlLength;
29460786Sps    UINT8                           ThreadCount;
29560786Sps    ACPI_OWNER_ID                   OwnerId;
29660786Sps
29760786Sps} ACPI_OBJECT_METHOD;
29860786Sps
29960786Sps
30060786Sps/******************************************************************************
30160786Sps *
30260786Sps * Objects that can be notified.  All share a common NotifyInfo area.
30360786Sps *
30460786Sps *****************************************************************************/
30560786Sps
30660786Sps/*
30760786Sps * Common fields for objects that support ASL notifications
30860786Sps */
30960786Sps#define ACPI_COMMON_NOTIFY_INFO \
31060786Sps    union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
31160786Sps    union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
31260786Sps    union acpi_operand_object       *Handler;           /* Handler for Address space */
31360786Sps
31460786Sps
31560786Spstypedef struct acpi_object_notify_common    /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
31660786Sps{
31760786Sps    ACPI_OBJECT_COMMON_HEADER
31860786Sps    ACPI_COMMON_NOTIFY_INFO
31960786Sps
32060786Sps} ACPI_OBJECT_NOTIFY_COMMON;
32160786Sps
32260786Sps
32360786Spstypedef struct acpi_object_device
32460786Sps{
32560786Sps    ACPI_OBJECT_COMMON_HEADER
32660786Sps    ACPI_COMMON_NOTIFY_INFO
32760786Sps    ACPI_GPE_BLOCK_INFO             *GpeBlock;
32860786Sps
32960786Sps} ACPI_OBJECT_DEVICE;
33060786Sps
33160786Sps
33260786Spstypedef struct acpi_object_power_resource
33360786Sps{
33460786Sps    ACPI_OBJECT_COMMON_HEADER
33560786Sps    ACPI_COMMON_NOTIFY_INFO
33660786Sps    UINT32                          SystemLevel;
337221715Sdelphij    UINT32                          ResourceOrder;
338221715Sdelphij
339221715Sdelphij} ACPI_OBJECT_POWER_RESOURCE;
340
341
342typedef struct acpi_object_processor
343{
344    ACPI_OBJECT_COMMON_HEADER
345
346    /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
347
348    UINT8                           ProcId;
349    UINT8                           Length;
350    ACPI_COMMON_NOTIFY_INFO
351    ACPI_IO_ADDRESS                 Address;
352
353} ACPI_OBJECT_PROCESSOR;
354
355
356typedef struct acpi_object_thermal_zone
357{
358    ACPI_OBJECT_COMMON_HEADER
359    ACPI_COMMON_NOTIFY_INFO
360
361} ACPI_OBJECT_THERMAL_ZONE;
362
363
364/******************************************************************************
365 *
366 * Fields.  All share a common header/info field.
367 *
368 *****************************************************************************/
369
370/*
371 * Common bitfield for the field objects
372 * "Field Datum"  -- a datum from the actual field object
373 * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
374 */
375#define ACPI_COMMON_FIELD_INFO \
376    UINT8                           FieldFlags;         /* Access, update, and lock bits */\
377    UINT8                           Attribute;          /* From AccessAs keyword */\
378    UINT8                           AccessByteWidth;    /* Read/Write size in bytes */\
379    ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */\
380    UINT32                          BitLength;          /* Length of field in bits */\
381    UINT32                          BaseByteOffset;     /* Byte offset within containing object */\
382    UINT32                          Value;              /* Value to store into the Bank or Index register */\
383    UINT8                           StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
384    UINT8                           AccessBitWidth;     /* Read/Write size in bits (8-64) */
385
386
387typedef struct acpi_object_field_common                 /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
388{
389    ACPI_OBJECT_COMMON_HEADER
390    ACPI_COMMON_FIELD_INFO
391    union acpi_operand_object       *RegionObj;         /* Parent Operation Region object (REGION/BANK fields only) */
392
393} ACPI_OBJECT_FIELD_COMMON;
394
395
396typedef struct acpi_object_region_field
397{
398    ACPI_OBJECT_COMMON_HEADER
399    ACPI_COMMON_FIELD_INFO
400    union acpi_operand_object       *RegionObj;         /* Containing OpRegion object */
401
402} ACPI_OBJECT_REGION_FIELD;
403
404
405typedef struct acpi_object_bank_field
406{
407    ACPI_OBJECT_COMMON_HEADER
408    ACPI_COMMON_FIELD_INFO
409    union acpi_operand_object       *RegionObj;         /* Containing OpRegion object */
410    union acpi_operand_object       *BankObj;           /* BankSelect Register object */
411
412} ACPI_OBJECT_BANK_FIELD;
413
414
415typedef struct acpi_object_index_field
416{
417    ACPI_OBJECT_COMMON_HEADER
418    ACPI_COMMON_FIELD_INFO
419
420    /*
421     * No "RegionObj" pointer needed since the Index and Data registers
422     * are each field definitions unto themselves.
423     */
424    union acpi_operand_object       *IndexObj;          /* Index register */
425    union acpi_operand_object       *DataObj;           /* Data register */
426
427} ACPI_OBJECT_INDEX_FIELD;
428
429
430/* The BufferField is different in that it is part of a Buffer, not an OpRegion */
431
432typedef struct acpi_object_buffer_field
433{
434    ACPI_OBJECT_COMMON_HEADER
435    ACPI_COMMON_FIELD_INFO
436    union acpi_operand_object       *BufferObj;         /* Containing Buffer object */
437
438} ACPI_OBJECT_BUFFER_FIELD;
439
440
441/******************************************************************************
442 *
443 * Objects for handlers
444 *
445 *****************************************************************************/
446
447typedef struct acpi_object_notify_handler
448{
449    ACPI_OBJECT_COMMON_HEADER
450    ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
451    ACPI_NOTIFY_HANDLER             Handler;
452    void                            *Context;
453
454} ACPI_OBJECT_NOTIFY_HANDLER;
455
456
457typedef struct acpi_object_addr_handler
458{
459    ACPI_OBJECT_COMMON_HEADER
460    UINT8                           SpaceId;
461    UINT8                           HandlerFlags;
462    ACPI_ADR_SPACE_HANDLER          Handler;
463    ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
464    void                            *Context;
465    ACPI_ADR_SPACE_SETUP            Setup;
466    union acpi_operand_object       *RegionList;        /* regions using this handler */
467    union acpi_operand_object       *Next;
468
469} ACPI_OBJECT_ADDR_HANDLER;
470
471/* Flags for address handler (HandlerFlags) */
472
473#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED  0x01
474
475
476/******************************************************************************
477 *
478 * Special internal objects
479 *
480 *****************************************************************************/
481
482/*
483 * The Reference object type is used for these opcodes:
484 * Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp
485 */
486typedef struct acpi_object_reference
487{
488    ACPI_OBJECT_COMMON_HEADER
489    UINT8                           TargetType;         /* Used for IndexOp */
490    UINT16                          Opcode;
491    void                            *Object;            /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT  */
492    ACPI_NAMESPACE_NODE             *Node;
493    union acpi_operand_object       **Where;
494    UINT32                          Offset;             /* Used for ArgOp, LocalOp, and IndexOp */
495
496} ACPI_OBJECT_REFERENCE;
497
498
499/*
500 * Extra object is used as additional storage for types that
501 * have AML code in their declarations (TermArgs) that must be
502 * evaluated at run time.
503 *
504 * Currently: Region and FieldUnit types
505 */
506typedef struct acpi_object_extra
507{
508    ACPI_OBJECT_COMMON_HEADER
509    ACPI_NAMESPACE_NODE             *Method_REG;        /* _REG method for this region (if any) */
510    void                            *RegionContext;     /* Region-specific data */
511    UINT8                           *AmlStart;
512    UINT32                          AmlLength;
513
514} ACPI_OBJECT_EXTRA;
515
516
517/* Additional data that can be attached to namespace nodes */
518
519typedef struct acpi_object_data
520{
521    ACPI_OBJECT_COMMON_HEADER
522    ACPI_OBJECT_HANDLER             Handler;
523    void                            *Pointer;
524
525} ACPI_OBJECT_DATA;
526
527
528/* Structure used when objects are cached for reuse */
529
530typedef struct acpi_object_cache_list
531{
532    ACPI_OBJECT_COMMON_HEADER
533    union acpi_operand_object       *Next;              /* Link for object cache and internal lists*/
534
535} ACPI_OBJECT_CACHE_LIST;
536
537
538/******************************************************************************
539 *
540 * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above
541 *
542 *****************************************************************************/
543
544typedef union acpi_operand_object
545{
546    ACPI_OBJECT_COMMON                  Common;
547    ACPI_OBJECT_INTEGER                 Integer;
548    ACPI_OBJECT_STRING                  String;
549    ACPI_OBJECT_BUFFER                  Buffer;
550    ACPI_OBJECT_PACKAGE                 Package;
551    ACPI_OBJECT_EVENT                   Event;
552    ACPI_OBJECT_METHOD                  Method;
553    ACPI_OBJECT_MUTEX                   Mutex;
554    ACPI_OBJECT_REGION                  Region;
555    ACPI_OBJECT_NOTIFY_COMMON           CommonNotify;
556    ACPI_OBJECT_DEVICE                  Device;
557    ACPI_OBJECT_POWER_RESOURCE          PowerResource;
558    ACPI_OBJECT_PROCESSOR               Processor;
559    ACPI_OBJECT_THERMAL_ZONE            ThermalZone;
560    ACPI_OBJECT_FIELD_COMMON            CommonField;
561    ACPI_OBJECT_REGION_FIELD            Field;
562    ACPI_OBJECT_BUFFER_FIELD            BufferField;
563    ACPI_OBJECT_BANK_FIELD              BankField;
564    ACPI_OBJECT_INDEX_FIELD             IndexField;
565    ACPI_OBJECT_NOTIFY_HANDLER          Notify;
566    ACPI_OBJECT_ADDR_HANDLER            AddressSpace;
567    ACPI_OBJECT_REFERENCE               Reference;
568    ACPI_OBJECT_EXTRA                   Extra;
569    ACPI_OBJECT_DATA                    Data;
570    ACPI_OBJECT_CACHE_LIST              Cache;
571
572} ACPI_OPERAND_OBJECT;
573
574
575/******************************************************************************
576 *
577 * ACPI_DESCRIPTOR - objects that share a common descriptor identifier
578 *
579 *****************************************************************************/
580
581/* Object descriptor types */
582
583#define ACPI_DESC_TYPE_CACHED           0x01        /* Used only when object is cached */
584#define ACPI_DESC_TYPE_STATE            0x02
585#define ACPI_DESC_TYPE_STATE_UPDATE     0x03
586#define ACPI_DESC_TYPE_STATE_PACKAGE    0x04
587#define ACPI_DESC_TYPE_STATE_CONTROL    0x05
588#define ACPI_DESC_TYPE_STATE_RPSCOPE    0x06
589#define ACPI_DESC_TYPE_STATE_PSCOPE     0x07
590#define ACPI_DESC_TYPE_STATE_WSCOPE     0x08
591#define ACPI_DESC_TYPE_STATE_RESULT     0x09
592#define ACPI_DESC_TYPE_STATE_NOTIFY     0x0A
593#define ACPI_DESC_TYPE_STATE_THREAD     0x0B
594#define ACPI_DESC_TYPE_WALK             0x0C
595#define ACPI_DESC_TYPE_PARSER           0x0D
596#define ACPI_DESC_TYPE_OPERAND          0x0E
597#define ACPI_DESC_TYPE_NAMED            0x0F
598#define ACPI_DESC_TYPE_MAX              0x0F
599
600
601typedef struct acpi_common_descriptor
602{
603    void                            *CommonPointer;
604    UINT8                           DescriptorType; /* To differentiate various internal objs */
605
606} ACPI_COMMON_DESCRIPTOR;
607
608typedef union acpi_descriptor
609{
610    ACPI_COMMON_DESCRIPTOR          Common;
611    ACPI_OPERAND_OBJECT             Object;
612    ACPI_NAMESPACE_NODE             Node;
613    ACPI_PARSE_OBJECT               Op;
614
615} ACPI_DESCRIPTOR;
616
617#pragma pack()
618
619#endif /* _ACOBJECT_H */
620