Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:41

0001 /******************************************************************************
0002  *
0003  * Name: aclocal.h - Internal data types used across the ACPI subsystem
0004  *
0005  *****************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights. You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code. No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision. In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change. Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee. Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution. In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government. In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************
0115  *
0116  * Alternatively, you may choose to be licensed under the terms of the
0117  * following license:
0118  *
0119  * Redistribution and use in source and binary forms, with or without
0120  * modification, are permitted provided that the following conditions
0121  * are met:
0122  * 1. Redistributions of source code must retain the above copyright
0123  *    notice, this list of conditions, and the following disclaimer,
0124  *    without modification.
0125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
0126  *    substantially similar to the "NO WARRANTY" disclaimer below
0127  *    ("Disclaimer") and any redistribution must be conditioned upon
0128  *    including a substantially similar Disclaimer requirement for further
0129  *    binary redistribution.
0130  * 3. Neither the names of the above-listed copyright holders nor the names
0131  *    of any contributors may be used to endorse or promote products derived
0132  *    from this software without specific prior written permission.
0133  *
0134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0145  *
0146  * Alternatively, you may choose to be licensed under the terms of the
0147  * GNU General Public License ("GPL") version 2 as published by the Free
0148  * Software Foundation.
0149  *
0150  *****************************************************************************/
0151 
0152 #ifndef __ACLOCAL_H__
0153 #define __ACLOCAL_H__
0154 
0155 
0156 /* acpisrc:StructDefs -- for acpisrc conversion */
0157 
0158 #define ACPI_SERIALIZED                 0xFF
0159 
0160 typedef UINT32                          ACPI_MUTEX_HANDLE;
0161 #define ACPI_GLOBAL_LOCK                (ACPI_SEMAPHORE) (-1)
0162 
0163 /* Total number of aml opcodes defined */
0164 
0165 #define AML_NUM_OPCODES                 0x83
0166 
0167 
0168 /* Forward declarations */
0169 
0170 struct acpi_walk_state;
0171 struct acpi_obj_mutex;
0172 union acpi_parse_object;
0173 
0174 
0175 /*****************************************************************************
0176  *
0177  * Mutex typedefs and structs
0178  *
0179  ****************************************************************************/
0180 
0181 
0182 /*
0183  * Predefined handles for the mutex objects used within the subsystem
0184  * All mutex objects are automatically created by AcpiUtMutexInitialize.
0185  *
0186  * The acquire/release ordering protocol is implied via this list. Mutexes
0187  * with a lower value must be acquired before mutexes with a higher value.
0188  *
0189  * NOTE: any changes here must be reflected in the AcpiGbl_MutexNames
0190  * table below also!
0191  */
0192 #define ACPI_MTX_INTERPRETER            0   /* AML Interpreter, main lock */
0193 #define ACPI_MTX_NAMESPACE              1   /* ACPI Namespace */
0194 #define ACPI_MTX_TABLES                 2   /* Data for ACPI tables */
0195 #define ACPI_MTX_EVENTS                 3   /* Data for ACPI events */
0196 #define ACPI_MTX_CACHES                 4   /* Internal caches, general purposes */
0197 #define ACPI_MTX_MEMORY                 5   /* Debug memory tracking lists */
0198 
0199 #define ACPI_MAX_MUTEX                  5
0200 #define ACPI_NUM_MUTEX                  (ACPI_MAX_MUTEX+1)
0201 
0202 
0203 /* Lock structure for reader/writer interfaces */
0204 
0205 typedef struct acpi_rw_lock
0206 {
0207     ACPI_MUTEX              WriterMutex;
0208     ACPI_MUTEX              ReaderMutex;
0209     UINT32                  NumReaders;
0210 
0211 } ACPI_RW_LOCK;
0212 
0213 
0214 /*
0215  * Predefined handles for spinlocks used within the subsystem.
0216  * These spinlocks are created by AcpiUtMutexInitialize
0217  */
0218 #define ACPI_LOCK_GPES                  0
0219 #define ACPI_LOCK_HARDWARE              1
0220 
0221 #define ACPI_MAX_LOCK                   1
0222 #define ACPI_NUM_LOCK                   (ACPI_MAX_LOCK+1)
0223 
0224 
0225 /* This Thread ID means that the mutex is not in use (unlocked) */
0226 
0227 #define ACPI_MUTEX_NOT_ACQUIRED         ((ACPI_THREAD_ID) -1)
0228 
0229 /* This Thread ID means an invalid thread ID */
0230 
0231 #ifdef ACPI_OS_INVALID_THREAD_ID
0232 #define ACPI_INVALID_THREAD_ID          ACPI_OS_INVALID_THREAD_ID
0233 #else
0234 #define ACPI_INVALID_THREAD_ID          ((ACPI_THREAD_ID) 0xFFFFFFFF)
0235 #endif
0236 
0237 /* Table for the global mutexes */
0238 
0239 typedef struct acpi_mutex_info
0240 {
0241     ACPI_MUTEX                      Mutex;
0242     UINT32                          UseCount;
0243     ACPI_THREAD_ID                  ThreadId;
0244 
0245 } ACPI_MUTEX_INFO;
0246 
0247 
0248 /* Lock flag parameter for various interfaces */
0249 
0250 #define ACPI_MTX_DO_NOT_LOCK            0
0251 #define ACPI_MTX_LOCK                   1
0252 
0253 
0254 /* Field access granularities */
0255 
0256 #define ACPI_FIELD_BYTE_GRANULARITY     1
0257 #define ACPI_FIELD_WORD_GRANULARITY     2
0258 #define ACPI_FIELD_DWORD_GRANULARITY    4
0259 #define ACPI_FIELD_QWORD_GRANULARITY    8
0260 
0261 
0262 #define ACPI_ENTRY_NOT_FOUND            NULL
0263 
0264 
0265 /*****************************************************************************
0266  *
0267  * Namespace typedefs and structs
0268  *
0269  ****************************************************************************/
0270 
0271 /* Operational modes of the AML interpreter/scanner */
0272 
0273 typedef enum
0274 {
0275     ACPI_IMODE_LOAD_PASS1           = 0x01,
0276     ACPI_IMODE_LOAD_PASS2           = 0x02,
0277     ACPI_IMODE_EXECUTE              = 0x03
0278 
0279 } ACPI_INTERPRETER_MODE;
0280 
0281 
0282 /*
0283  * The Namespace Node describes a named object that appears in the AML.
0284  * DescriptorType is used to differentiate between internal descriptors.
0285  *
0286  * The node is optimized for both 32-bit and 64-bit platforms:
0287  * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
0288  *
0289  * Note: The DescriptorType and Type fields must appear in the identical
0290  * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT
0291  * structures.
0292  */
0293 typedef struct acpi_namespace_node
0294 {
0295     union acpi_operand_object       *Object;        /* Interpreter object */
0296     UINT8                           DescriptorType; /* Differentiate object descriptor types */
0297     UINT8                           Type;           /* ACPI Type associated with this name */
0298     UINT16                          Flags;          /* Miscellaneous flags */
0299     ACPI_NAME_UNION                 Name;           /* ACPI Name, always 4 chars per ACPI spec */
0300     struct acpi_namespace_node      *Parent;        /* Parent node */
0301     struct acpi_namespace_node      *Child;         /* First child */
0302     struct acpi_namespace_node      *Peer;          /* First peer */
0303     ACPI_OWNER_ID                   OwnerId;        /* Node creator */
0304 
0305     /*
0306      * The following fields are used by the ASL compiler and disassembler only
0307      */
0308 #ifdef ACPI_LARGE_NAMESPACE_NODE
0309     union acpi_parse_object         *Op;
0310     void                            *MethodLocals;
0311     void                            *MethodArgs;
0312     UINT32                          Value;
0313     UINT32                          Length;
0314     UINT8                           ArgCount;
0315 
0316 #endif
0317 
0318 } ACPI_NAMESPACE_NODE;
0319 
0320 
0321 /* Namespace Node flags */
0322 
0323 #define ANOBJ_RESERVED                  0x01    /* Available for use */
0324 #define ANOBJ_TEMPORARY                 0x02    /* Node is create by a method and is temporary */
0325 #define ANOBJ_METHOD_ARG                0x04    /* Node is a method argument */
0326 #define ANOBJ_METHOD_LOCAL              0x08    /* Node is a method local */
0327 #define ANOBJ_SUBTREE_HAS_INI           0x10    /* Used to optimize device initialization */
0328 #define ANOBJ_EVALUATED                 0x20    /* Set on first evaluation of node */
0329 #define ANOBJ_ALLOCATED_BUFFER          0x40    /* Method AML buffer is dynamic (InstallMethod) */
0330 #define ANOBJ_NODE_EARLY_INIT           0x80    /* AcpiExec only: Node was create via init file (-fi) */
0331 
0332 #define ANOBJ_IS_EXTERNAL               0x08    /* iASL only: This object created via External() */
0333 #define ANOBJ_METHOD_NO_RETVAL          0x10    /* iASL only: Method has no return value */
0334 #define ANOBJ_METHOD_SOME_NO_RETVAL     0x20    /* iASL only: Method has at least one return value */
0335 #define ANOBJ_IS_REFERENCED             0x80    /* iASL only: Object was referenced */
0336 
0337 
0338 /* Internal ACPI table management - master table list */
0339 
0340 typedef struct acpi_table_list
0341 {
0342     ACPI_TABLE_DESC                 *Tables;            /* Table descriptor array */
0343     UINT32                          CurrentTableCount;  /* Tables currently in the array */
0344     UINT32                          MaxTableCount;      /* Max tables array will hold */
0345     UINT8                           Flags;
0346 
0347 } ACPI_TABLE_LIST;
0348 
0349 /* Flags for above */
0350 
0351 #define ACPI_ROOT_ORIGIN_UNKNOWN        (0)     /* ~ORIGIN_ALLOCATED */
0352 #define ACPI_ROOT_ORIGIN_ALLOCATED      (1)
0353 #define ACPI_ROOT_ALLOW_RESIZE          (2)
0354 
0355 
0356 /* List to manage incoming ACPI tables */
0357 
0358 typedef struct acpi_new_table_desc
0359 {
0360     ACPI_TABLE_HEADER               *Table;
0361     struct acpi_new_table_desc      *Next;
0362 
0363 } ACPI_NEW_TABLE_DESC;
0364 
0365 
0366 /* Predefined table indexes */
0367 
0368 #define ACPI_INVALID_TABLE_INDEX        (0xFFFFFFFF)
0369 
0370 
0371 typedef struct acpi_find_context
0372 {
0373     char                            *SearchFor;
0374     ACPI_HANDLE                     *List;
0375     UINT32                          *Count;
0376 
0377 } ACPI_FIND_CONTEXT;
0378 
0379 
0380 typedef struct acpi_ns_search_data
0381 {
0382     ACPI_NAMESPACE_NODE             *Node;
0383 
0384 } ACPI_NS_SEARCH_DATA;
0385 
0386 
0387 /* Object types used during package copies */
0388 
0389 #define ACPI_COPY_TYPE_SIMPLE           0
0390 #define ACPI_COPY_TYPE_PACKAGE          1
0391 
0392 
0393 /* Info structure used to convert external<->internal namestrings */
0394 
0395 typedef struct acpi_namestring_info
0396 {
0397     const char                      *ExternalName;
0398     const char                      *NextExternalChar;
0399     char                            *InternalName;
0400     UINT32                          Length;
0401     UINT32                          NumSegments;
0402     UINT32                          NumCarats;
0403     BOOLEAN                         FullyQualified;
0404 
0405 } ACPI_NAMESTRING_INFO;
0406 
0407 
0408 /* Field creation info */
0409 
0410 typedef struct acpi_create_field_info
0411 {
0412     ACPI_NAMESPACE_NODE             *RegionNode;
0413     ACPI_NAMESPACE_NODE             *FieldNode;
0414     ACPI_NAMESPACE_NODE             *RegisterNode;
0415     ACPI_NAMESPACE_NODE             *DataRegisterNode;
0416     ACPI_NAMESPACE_NODE             *ConnectionNode;
0417     UINT8                           *ResourceBuffer;
0418     UINT32                          BankValue;
0419     UINT32                          FieldBitPosition;
0420     UINT32                          FieldBitLength;
0421     UINT16                          ResourceLength;
0422     UINT16                          PinNumberIndex;
0423     UINT8                           FieldFlags;
0424     UINT8                           Attribute;
0425     UINT8                           FieldType;
0426     UINT8                           AccessLength;
0427 
0428 } ACPI_CREATE_FIELD_INFO;
0429 
0430 
0431 typedef
0432 ACPI_STATUS (*ACPI_INTERNAL_METHOD) (
0433     struct acpi_walk_state          *WalkState);
0434 
0435 
0436 /*
0437  * Bitmapped ACPI types. Used internally only
0438  */
0439 #define ACPI_BTYPE_ANY                  0x00000000
0440 #define ACPI_BTYPE_INTEGER              0x00000001
0441 #define ACPI_BTYPE_STRING               0x00000002
0442 #define ACPI_BTYPE_BUFFER               0x00000004
0443 #define ACPI_BTYPE_PACKAGE              0x00000008
0444 #define ACPI_BTYPE_FIELD_UNIT           0x00000010
0445 #define ACPI_BTYPE_DEVICE               0x00000020
0446 #define ACPI_BTYPE_EVENT                0x00000040
0447 #define ACPI_BTYPE_METHOD               0x00000080
0448 #define ACPI_BTYPE_MUTEX                0x00000100
0449 #define ACPI_BTYPE_REGION               0x00000200
0450 #define ACPI_BTYPE_POWER                0x00000400
0451 #define ACPI_BTYPE_PROCESSOR            0x00000800
0452 #define ACPI_BTYPE_THERMAL              0x00001000
0453 #define ACPI_BTYPE_BUFFER_FIELD         0x00002000
0454 #define ACPI_BTYPE_DDB_HANDLE           0x00004000
0455 #define ACPI_BTYPE_DEBUG_OBJECT         0x00008000
0456 #define ACPI_BTYPE_REFERENCE_OBJECT     0x00010000 /* From Index(), RefOf(), etc (Type6Opcodes) */
0457 #define ACPI_BTYPE_RESOURCE             0x00020000
0458 #define ACPI_BTYPE_NAMED_REFERENCE      0x00040000 /* Generic unresolved Name or Namepath */
0459 
0460 #define ACPI_BTYPE_COMPUTE_DATA         (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
0461 
0462 #define ACPI_BTYPE_DATA                 (ACPI_BTYPE_COMPUTE_DATA  | ACPI_BTYPE_PACKAGE)
0463 
0464     /* Used by Copy, DeRefOf, Store, Printf, Fprintf */
0465 
0466 #define ACPI_BTYPE_DATA_REFERENCE       (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE_OBJECT | ACPI_BTYPE_DDB_HANDLE)
0467 #define ACPI_BTYPE_DEVICE_OBJECTS       (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
0468 #define ACPI_BTYPE_OBJECTS_AND_REFS     0x0001FFFF  /* ARG or LOCAL */
0469 #define ACPI_BTYPE_ALL_OBJECTS          0x0000FFFF
0470 
0471 #pragma pack(1)
0472 
0473 /*
0474  * Information structure for ACPI predefined names.
0475  * Each entry in the table contains the following items:
0476  *
0477  * Name                 - The ACPI reserved name
0478  * ParamCount           - Number of arguments to the method
0479  * ExpectedReturnBtypes - Allowed type(s) for the return value
0480  */
0481 typedef struct acpi_name_info
0482 {
0483     char                        Name[ACPI_NAMESEG_SIZE];
0484     UINT16                      ArgumentList;
0485     UINT8                       ExpectedBtypes;
0486 
0487 } ACPI_NAME_INFO;
0488 
0489 /*
0490  * Secondary information structures for ACPI predefined objects that return
0491  * package objects. This structure appears as the next entry in the table
0492  * after the NAME_INFO structure above.
0493  *
0494  * The reason for this is to minimize the size of the predefined name table.
0495  */
0496 
0497 /*
0498  * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
0499  * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT,
0500  * ACPI_PTYPE2_FIX_VAR
0501  */
0502 typedef struct acpi_package_info
0503 {
0504     UINT8                       Type;
0505     UINT8                       ObjectType1;
0506     UINT8                       Count1;
0507     UINT8                       ObjectType2;
0508     UINT8                       Count2;
0509     UINT16                      Reserved;
0510 
0511 } ACPI_PACKAGE_INFO;
0512 
0513 /* Used for ACPI_PTYPE2_FIXED */
0514 
0515 typedef struct acpi_package_info2
0516 {
0517     UINT8                       Type;
0518     UINT8                       Count;
0519     UINT8                       ObjectType[4];
0520     UINT8                       Reserved;
0521 
0522 } ACPI_PACKAGE_INFO2;
0523 
0524 /* Used for ACPI_PTYPE1_OPTION */
0525 
0526 typedef struct acpi_package_info3
0527 {
0528     UINT8                       Type;
0529     UINT8                       Count;
0530     UINT8                       ObjectType[2];
0531     UINT8                       TailObjectType;
0532     UINT16                      Reserved;
0533 
0534 } ACPI_PACKAGE_INFO3;
0535 
0536 typedef struct acpi_package_info4
0537 {
0538     UINT8                       Type;
0539     UINT8                       ObjectType1;
0540     UINT8                       Count1;
0541     UINT8                       SubObjectTypes;
0542     UINT8                       PkgCount;
0543     UINT16                      Reserved;
0544 
0545 } ACPI_PACKAGE_INFO4;
0546 
0547 typedef union acpi_predefined_info
0548 {
0549     ACPI_NAME_INFO              Info;
0550     ACPI_PACKAGE_INFO           RetInfo;
0551     ACPI_PACKAGE_INFO2          RetInfo2;
0552     ACPI_PACKAGE_INFO3          RetInfo3;
0553     ACPI_PACKAGE_INFO4          RetInfo4;
0554 
0555 } ACPI_PREDEFINED_INFO;
0556 
0557 /* Reset to default packing */
0558 
0559 #pragma pack()
0560 
0561 
0562 /* Return object auto-repair info */
0563 
0564 typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) (
0565     struct acpi_namespace_node  *Scope,
0566     union acpi_operand_object   *OriginalObject,
0567     union acpi_operand_object   **ConvertedObject);
0568 
0569 typedef struct acpi_simple_repair_info
0570 {
0571     char                        Name[ACPI_NAMESEG_SIZE];
0572     UINT32                      UnexpectedBtypes;
0573     UINT32                      PackageIndex;
0574     ACPI_OBJECT_CONVERTER       ObjectConverter;
0575 
0576 } ACPI_SIMPLE_REPAIR_INFO;
0577 
0578 
0579 /*
0580  * Bitmapped return value types
0581  * Note: the actual data types must be contiguous, a loop in nspredef.c
0582  * depends on this.
0583  */
0584 #define ACPI_RTYPE_ANY                  0x00
0585 #define ACPI_RTYPE_NONE                 0x01
0586 #define ACPI_RTYPE_INTEGER              0x02
0587 #define ACPI_RTYPE_STRING               0x04
0588 #define ACPI_RTYPE_BUFFER               0x08
0589 #define ACPI_RTYPE_PACKAGE              0x10
0590 #define ACPI_RTYPE_REFERENCE            0x20
0591 #define ACPI_RTYPE_ALL                  0x3F
0592 
0593 #define ACPI_NUM_RTYPES                 5   /* Number of actual object types */
0594 
0595 
0596 /* Info for running the _REG methods */
0597 
0598 typedef struct acpi_reg_walk_info
0599 {
0600     UINT32                  Function;
0601     UINT32                  RegRunCount;
0602     ACPI_ADR_SPACE_TYPE     SpaceId;
0603 
0604 } ACPI_REG_WALK_INFO;
0605 
0606 
0607 /*****************************************************************************
0608  *
0609  * Event typedefs and structs
0610  *
0611  ****************************************************************************/
0612 
0613 /* Dispatch info for each host-installed SCI handler */
0614 
0615 typedef struct acpi_sci_handler_info
0616 {
0617     struct acpi_sci_handler_info    *Next;
0618     ACPI_SCI_HANDLER                Address;        /* Address of handler */
0619     void                            *Context;       /* Context to be passed to handler */
0620 
0621 } ACPI_SCI_HANDLER_INFO;
0622 
0623 /* Dispatch info for each GPE -- either a method or handler, cannot be both */
0624 
0625 typedef struct acpi_gpe_handler_info
0626 {
0627     ACPI_GPE_HANDLER                Address;        /* Address of handler, if any */
0628     void                            *Context;       /* Context to be passed to handler */
0629     ACPI_NAMESPACE_NODE             *MethodNode;    /* Method node for this GPE level (saved) */
0630     UINT8                           OriginalFlags;  /* Original (pre-handler) GPE info */
0631     BOOLEAN                         OriginallyEnabled; /* True if GPE was originally enabled */
0632 
0633 } ACPI_GPE_HANDLER_INFO;
0634 
0635 /* Notify info for implicit notify, multiple device objects */
0636 
0637 typedef struct acpi_gpe_notify_info
0638 {
0639     ACPI_NAMESPACE_NODE             *DeviceNode;    /* Device to be notified */
0640     struct acpi_gpe_notify_info     *Next;
0641 
0642 } ACPI_GPE_NOTIFY_INFO;
0643 
0644 /*
0645  * GPE dispatch info. At any time, the GPE can have at most one type
0646  * of dispatch - Method, Handler, or Implicit Notify.
0647  */
0648 typedef union acpi_gpe_dispatch_info
0649 {
0650     ACPI_NAMESPACE_NODE             *MethodNode;    /* Method node for this GPE level */
0651     ACPI_GPE_HANDLER_INFO           *Handler;       /* Installed GPE handler */
0652     ACPI_GPE_NOTIFY_INFO            *NotifyList;    /* List of _PRW devices for implicit notifies */
0653 
0654 } ACPI_GPE_DISPATCH_INFO;
0655 
0656 /*
0657  * Information about a GPE, one per each GPE in an array.
0658  * NOTE: Important to keep this struct as small as possible.
0659  */
0660 typedef struct acpi_gpe_event_info
0661 {
0662     union acpi_gpe_dispatch_info    Dispatch;           /* Either Method, Handler, or NotifyList */
0663     struct acpi_gpe_register_info   *RegisterInfo;      /* Backpointer to register info */
0664     UINT8                           Flags;              /* Misc info about this GPE */
0665     UINT8                           GpeNumber;          /* This GPE */
0666     UINT8                           RuntimeCount;       /* References to a run GPE */
0667     BOOLEAN                         DisableForDispatch; /* Masked during dispatching */
0668 
0669 } ACPI_GPE_EVENT_INFO;
0670 
0671 /* Information about a GPE register pair, one per each status/enable pair in an array */
0672 
0673 typedef struct acpi_gpe_register_info
0674 {
0675     ACPI_GENERIC_ADDRESS            StatusAddress;  /* Address of status reg */
0676     ACPI_GENERIC_ADDRESS            EnableAddress;  /* Address of enable reg */
0677     UINT16                          BaseGpeNumber;  /* Base GPE number for this register */
0678     UINT8                           EnableForWake;  /* GPEs to keep enabled when sleeping */
0679     UINT8                           EnableForRun;   /* GPEs to keep enabled when running */
0680     UINT8                           MaskForRun;     /* GPEs to keep masked when running */
0681     UINT8                           EnableMask;     /* Current mask of enabled GPEs */
0682 
0683 } ACPI_GPE_REGISTER_INFO;
0684 
0685 /*
0686  * Information about a GPE register block, one per each installed block --
0687  * GPE0, GPE1, and one per each installed GPE Block Device.
0688  */
0689 typedef struct acpi_gpe_block_info
0690 {
0691     ACPI_NAMESPACE_NODE             *Node;
0692     struct acpi_gpe_block_info      *Previous;
0693     struct acpi_gpe_block_info      *Next;
0694     struct acpi_gpe_xrupt_info      *XruptBlock;    /* Backpointer to interrupt block */
0695     ACPI_GPE_REGISTER_INFO          *RegisterInfo;  /* One per GPE register pair */
0696     ACPI_GPE_EVENT_INFO             *EventInfo;     /* One for each GPE */
0697     UINT64                          Address;        /* Base address of the block */
0698     UINT32                          RegisterCount;  /* Number of register pairs in block */
0699     UINT16                          GpeCount;       /* Number of individual GPEs in block */
0700     UINT16                          BlockBaseNumber;/* Base GPE number for this block */
0701     UINT8                           SpaceId;
0702     BOOLEAN                         Initialized;    /* TRUE if this block is initialized */
0703 
0704 } ACPI_GPE_BLOCK_INFO;
0705 
0706 /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */
0707 
0708 typedef struct acpi_gpe_xrupt_info
0709 {
0710     struct acpi_gpe_xrupt_info      *Previous;
0711     struct acpi_gpe_xrupt_info      *Next;
0712     ACPI_GPE_BLOCK_INFO             *GpeBlockListHead;  /* List of GPE blocks for this xrupt */
0713     UINT32                          InterruptNumber;    /* System interrupt number */
0714 
0715 } ACPI_GPE_XRUPT_INFO;
0716 
0717 typedef struct acpi_gpe_walk_info
0718 {
0719     ACPI_NAMESPACE_NODE             *GpeDevice;
0720     ACPI_GPE_BLOCK_INFO             *GpeBlock;
0721     UINT16                          Count;
0722     ACPI_OWNER_ID                   OwnerId;
0723     BOOLEAN                         ExecuteByOwnerId;
0724 
0725 } ACPI_GPE_WALK_INFO;
0726 
0727 typedef struct acpi_gpe_device_info
0728 {
0729     UINT32                          Index;
0730     UINT32                          NextBlockBaseIndex;
0731     ACPI_STATUS                     Status;
0732     ACPI_NAMESPACE_NODE             *GpeDevice;
0733 
0734 } ACPI_GPE_DEVICE_INFO;
0735 
0736 typedef ACPI_STATUS (*ACPI_GPE_CALLBACK) (
0737     ACPI_GPE_XRUPT_INFO             *GpeXruptInfo,
0738     ACPI_GPE_BLOCK_INFO             *GpeBlock,
0739     void                            *Context);
0740 
0741 
0742 /* Information about each particular fixed event */
0743 
0744 typedef struct acpi_fixed_event_handler
0745 {
0746     ACPI_EVENT_HANDLER              Handler;        /* Address of handler. */
0747     void                            *Context;       /* Context to be passed to handler */
0748 
0749 } ACPI_FIXED_EVENT_HANDLER;
0750 
0751 typedef struct acpi_fixed_event_info
0752 {
0753     UINT8                           StatusRegisterId;
0754     UINT8                           EnableRegisterId;
0755     UINT16                          StatusBitMask;
0756     UINT16                          EnableBitMask;
0757 
0758 } ACPI_FIXED_EVENT_INFO;
0759 
0760 /* Information used during field processing */
0761 
0762 typedef struct acpi_field_info
0763 {
0764     UINT8                           SkipField;
0765     UINT8                           FieldFlag;
0766     UINT32                          PkgLength;
0767 
0768 } ACPI_FIELD_INFO;
0769 
0770 /* Information about the interrupt ID and _EVT of a GED device */
0771 
0772 typedef struct acpi_ged_handler_info
0773 {
0774     struct acpi_ged_handler_info    *Next;
0775     UINT32                          IntId;      /* The interrupt ID that triggers the execution of the EvtMethod. */
0776     ACPI_NAMESPACE_NODE             *EvtMethod; /* The _EVT method to be executed when an interrupt with ID = IntID is received */
0777 
0778 } ACPI_GED_HANDLER_INFO;
0779 
0780 /*****************************************************************************
0781  *
0782  * Generic "state" object for stacks
0783  *
0784  ****************************************************************************/
0785 
0786 #define ACPI_CONTROL_NORMAL                  0xC0
0787 #define ACPI_CONTROL_CONDITIONAL_EXECUTING   0xC1
0788 #define ACPI_CONTROL_PREDICATE_EXECUTING     0xC2
0789 #define ACPI_CONTROL_PREDICATE_FALSE         0xC3
0790 #define ACPI_CONTROL_PREDICATE_TRUE          0xC4
0791 
0792 
0793 #define ACPI_STATE_COMMON \
0794     void                            *Next; \
0795     UINT8                           DescriptorType; /* To differentiate various internal objs */\
0796     UINT8                           Flags; \
0797     UINT16                          Value; \
0798     UINT16                          State
0799 
0800     /* There are 2 bytes available here until the next natural alignment boundary */
0801 
0802 typedef struct acpi_common_state
0803 {
0804     ACPI_STATE_COMMON;
0805 } ACPI_COMMON_STATE;
0806 
0807 
0808 /*
0809  * Update state - used to traverse complex objects such as packages
0810  */
0811 typedef struct acpi_update_state
0812 {
0813     ACPI_STATE_COMMON;
0814     union acpi_operand_object       *Object;
0815 
0816 } ACPI_UPDATE_STATE;
0817 
0818 
0819 /*
0820  * Pkg state - used to traverse nested package structures
0821  */
0822 typedef struct acpi_pkg_state
0823 {
0824     ACPI_STATE_COMMON;
0825     UINT32                          Index;
0826     union acpi_operand_object       *SourceObject;
0827     union acpi_operand_object       *DestObject;
0828     struct acpi_walk_state          *WalkState;
0829     void                            *ThisTargetObj;
0830     UINT32                          NumPackages;
0831 
0832 } ACPI_PKG_STATE;
0833 
0834 
0835 /*
0836  * Control state - one per if/else and while constructs.
0837  * Allows nesting of these constructs
0838  */
0839 typedef struct acpi_control_state
0840 {
0841     ACPI_STATE_COMMON;
0842     UINT16                          Opcode;
0843     union acpi_parse_object         *PredicateOp;
0844     UINT8                           *AmlPredicateStart;     /* Start of if/while predicate */
0845     UINT8                           *PackageEnd;            /* End of if/while block */
0846     UINT64                          LoopTimeout;            /* While() loop timeout */
0847 
0848 } ACPI_CONTROL_STATE;
0849 
0850 
0851 /*
0852  * Scope state - current scope during namespace lookups
0853  */
0854 typedef struct acpi_scope_state
0855 {
0856     ACPI_STATE_COMMON;
0857     ACPI_NAMESPACE_NODE             *Node;
0858 
0859 } ACPI_SCOPE_STATE;
0860 
0861 
0862 typedef struct acpi_pscope_state
0863 {
0864     ACPI_STATE_COMMON;
0865     UINT32                          ArgCount;               /* Number of fixed arguments */
0866     union acpi_parse_object         *Op;                    /* Current op being parsed */
0867     UINT8                           *ArgEnd;                /* Current argument end */
0868     UINT8                           *PkgEnd;                /* Current package end */
0869     UINT32                          ArgList;                /* Next argument to parse */
0870 
0871 } ACPI_PSCOPE_STATE;
0872 
0873 
0874 /*
0875  * Thread state - one per thread across multiple walk states. Multiple walk
0876  * states are created when there are nested control methods executing.
0877  */
0878 typedef struct acpi_thread_state
0879 {
0880     ACPI_STATE_COMMON;
0881     UINT8                           CurrentSyncLevel;       /* Mutex Sync (nested acquire) level */
0882     struct acpi_walk_state          *WalkStateList;         /* Head of list of WalkStates for this thread */
0883     union acpi_operand_object       *AcquiredMutexList;     /* List of all currently acquired mutexes */
0884     ACPI_THREAD_ID                  ThreadId;               /* Running thread ID */
0885 
0886 } ACPI_THREAD_STATE;
0887 
0888 
0889 /*
0890  * Result values - used to accumulate the results of nested
0891  * AML arguments
0892  */
0893 typedef struct acpi_result_values
0894 {
0895     ACPI_STATE_COMMON;
0896     union acpi_operand_object       *ObjDesc [ACPI_RESULTS_FRAME_OBJ_NUM];
0897 
0898 } ACPI_RESULT_VALUES;
0899 
0900 
0901 typedef
0902 ACPI_STATUS (*ACPI_PARSE_DOWNWARDS) (
0903     struct acpi_walk_state          *WalkState,
0904     union acpi_parse_object         **OutOp);
0905 
0906 typedef
0907 ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
0908     struct acpi_walk_state          *WalkState);
0909 
0910 
0911 /* Global handlers for AML Notifies */
0912 
0913 typedef struct acpi_global_notify_handler
0914 {
0915     ACPI_NOTIFY_HANDLER             Handler;
0916     void                            *Context;
0917 
0918 } ACPI_GLOBAL_NOTIFY_HANDLER;
0919 
0920 /*
0921  * Notify info - used to pass info to the deferred notify
0922  * handler/dispatcher.
0923  */
0924 typedef struct acpi_notify_info
0925 {
0926     ACPI_STATE_COMMON;
0927     UINT8                           HandlerListId;
0928     ACPI_NAMESPACE_NODE             *Node;
0929     union acpi_operand_object       *HandlerListHead;
0930     ACPI_GLOBAL_NOTIFY_HANDLER      *Global;
0931 
0932 } ACPI_NOTIFY_INFO;
0933 
0934 
0935 /* Generic state is union of structs above */
0936 
0937 typedef union acpi_generic_state
0938 {
0939     ACPI_COMMON_STATE               Common;
0940     ACPI_CONTROL_STATE              Control;
0941     ACPI_UPDATE_STATE               Update;
0942     ACPI_SCOPE_STATE                Scope;
0943     ACPI_PSCOPE_STATE               ParseScope;
0944     ACPI_PKG_STATE                  Pkg;
0945     ACPI_THREAD_STATE               Thread;
0946     ACPI_RESULT_VALUES              Results;
0947     ACPI_NOTIFY_INFO                Notify;
0948 
0949 } ACPI_GENERIC_STATE;
0950 
0951 
0952 /*****************************************************************************
0953  *
0954  * Interpreter typedefs and structs
0955  *
0956  ****************************************************************************/
0957 
0958 typedef
0959 ACPI_STATUS (*ACPI_EXECUTE_OP) (
0960     struct acpi_walk_state          *WalkState);
0961 
0962 /* Address Range info block */
0963 
0964 typedef struct acpi_address_range
0965 {
0966     struct acpi_address_range   *Next;
0967     ACPI_NAMESPACE_NODE         *RegionNode;
0968     ACPI_PHYSICAL_ADDRESS       StartAddress;
0969     ACPI_PHYSICAL_ADDRESS       EndAddress;
0970 
0971 } ACPI_ADDRESS_RANGE;
0972 
0973 
0974 /*****************************************************************************
0975  *
0976  * Parser typedefs and structs
0977  *
0978  ****************************************************************************/
0979 
0980 /*
0981  * AML opcode, name, and argument layout
0982  */
0983 typedef struct acpi_opcode_info
0984 {
0985 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
0986     char                            *Name;          /* Opcode name (disassembler/debug only) */
0987 #endif
0988     UINT32                          ParseArgs;      /* Grammar/Parse time arguments */
0989     UINT32                          RuntimeArgs;    /* Interpret time arguments */
0990     UINT16                          Flags;          /* Misc flags */
0991     UINT8                           ObjectType;     /* Corresponding internal object type */
0992     UINT8                           Class;          /* Opcode class */
0993     UINT8                           Type;           /* Opcode type */
0994 
0995 } ACPI_OPCODE_INFO;
0996 
0997 /* Structure for Resource Tag information */
0998 
0999 typedef struct acpi_tag_info
1000 {
1001     UINT32                          BitOffset;
1002     UINT32                          BitLength;
1003 
1004 } ACPI_TAG_INFO;
1005 
1006 /* Value associated with the parse object */
1007 
1008 typedef union acpi_parse_value
1009 {
1010     UINT64                          Integer;        /* Integer constant (Up to 64 bits) */
1011     UINT32                          Size;           /* bytelist or field size */
1012     char                            *String;        /* NULL terminated string */
1013     UINT8                           *Buffer;        /* buffer or string */
1014     char                            *Name;          /* NULL terminated string */
1015     union acpi_parse_object         *Arg;           /* arguments and contained ops */
1016     ACPI_TAG_INFO                   Tag;            /* Resource descriptor tag info  */
1017 
1018 } ACPI_PARSE_VALUE;
1019 
1020 
1021 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
1022 #define ACPI_DISASM_ONLY_MEMBERS(a)     a;
1023 #else
1024 #define ACPI_DISASM_ONLY_MEMBERS(a)
1025 #endif
1026 
1027 #if defined(ACPI_ASL_COMPILER)
1028 #define ACPI_CONVERTER_ONLY_MEMBERS(a)  a;
1029 #else
1030 #define ACPI_CONVERTER_ONLY_MEMBERS(a)
1031 #endif
1032 
1033 #define ACPI_PARSE_COMMON \
1034     union acpi_parse_object         *Parent;            /* Parent op */\
1035     UINT8                           DescriptorType;     /* To differentiate various internal objs */\
1036     UINT8                           Flags;              /* Type of Op */\
1037     UINT16                          AmlOpcode;          /* AML opcode */\
1038     UINT8                           *Aml;               /* Address of declaration in AML */\
1039     union acpi_parse_object         *Next;              /* Next op */\
1040     ACPI_NAMESPACE_NODE             *Node;              /* For use by interpreter */\
1041     ACPI_PARSE_VALUE                Value;              /* Value or args associated with the opcode */\
1042     UINT8                           ArgListLength;      /* Number of elements in the arg list */\
1043      ACPI_DISASM_ONLY_MEMBERS (\
1044     UINT16                          DisasmFlags;        /* Used during AML disassembly */\
1045     UINT8                           DisasmOpcode;       /* Subtype used for disassembly */\
1046     char                            *OperatorSymbol;    /* Used for C-style operator name strings */\
1047     char                            AmlOpName[16])      /* Op name (debug only) */\
1048      ACPI_CONVERTER_ONLY_MEMBERS (\
1049     char                            *InlineComment;     /* Inline comment */\
1050     char                            *EndNodeComment;    /* End of node comment */\
1051     char                            *NameComment;       /* Comment associated with the first parameter of the name node */\
1052     char                            *CloseBraceComment; /* Comments that come after } on the same as } */\
1053     ACPI_COMMENT_NODE               *CommentList;       /* comments that appears before this node */\
1054     ACPI_COMMENT_NODE               *EndBlkComment;     /* comments that at the end of a block but before ) or } */\
1055     char                            *CvFilename;        /* Filename associated with this node. Used for ASL/ASL+ converter */\
1056     char                            *CvParentFilename)  /* Parent filename associated with this node. Used for ASL/ASL+ converter */
1057 
1058 
1059 /* categories of comments */
1060 
1061 typedef enum
1062 {
1063     STANDARD_COMMENT = 1,
1064     INLINE_COMMENT,
1065     ENDNODE_COMMENT,
1066     OPENBRACE_COMMENT,
1067     CLOSE_BRACE_COMMENT,
1068     STD_DEFBLK_COMMENT,
1069     END_DEFBLK_COMMENT,
1070     FILENAME_COMMENT,
1071     PARENTFILENAME_COMMENT,
1072     ENDBLK_COMMENT,
1073     INCLUDE_COMMENT
1074 
1075 } ASL_COMMENT_TYPES;
1076 
1077 
1078 /* Internal opcodes for DisasmOpcode field above */
1079 
1080 #define ACPI_DASM_BUFFER                0x00        /* Buffer is a simple data buffer */
1081 #define ACPI_DASM_RESOURCE              0x01        /* Buffer is a Resource Descriptor */
1082 #define ACPI_DASM_STRING                0x02        /* Buffer is a ASCII string */
1083 #define ACPI_DASM_UNICODE               0x03        /* Buffer is a Unicode string */
1084 #define ACPI_DASM_PLD_METHOD            0x04        /* Buffer is a _PLD method bit-packed buffer */
1085 #define ACPI_DASM_UUID                  0x05        /* Buffer is a UUID/GUID */
1086 #define ACPI_DASM_EISAID                0x06        /* Integer is an EISAID */
1087 #define ACPI_DASM_MATCHOP               0x07        /* Parent opcode is a Match() operator */
1088 #define ACPI_DASM_LNOT_PREFIX           0x08        /* Start of a LNotEqual (etc.) pair of opcodes */
1089 #define ACPI_DASM_LNOT_SUFFIX           0x09        /* End  of a LNotEqual (etc.) pair of opcodes */
1090 #define ACPI_DASM_HID_STRING            0x0A        /* String is a _HID or _CID */
1091 #define ACPI_DASM_IGNORE_SINGLE         0x0B        /* Ignore the opcode but not it's children */
1092 #define ACPI_DASM_SWITCH                0x0C        /* While is a Switch */
1093 #define ACPI_DASM_SWITCH_PREDICATE      0x0D        /* Object is a predicate for a Switch or Case block */
1094 #define ACPI_DASM_CASE                  0x0E        /* If/Else is a Case in a Switch/Case block */
1095 #define ACPI_DASM_DEFAULT               0x0F        /* Else is a Default in a Switch/Case block */
1096 
1097 
1098 /*
1099  * List struct used in the -ca option
1100  */
1101 typedef struct acpi_comment_node
1102 {
1103   char                      *Comment;
1104   struct acpi_comment_node  *Next;
1105 
1106 } ACPI_COMMENT_NODE;
1107 
1108 
1109 typedef struct acpi_comment_addr_node
1110 {
1111   UINT8                                    *Addr;
1112   struct acpi_comment_addr_node            *Next;
1113 } ACPI_COMMENT_ADDR_NODE;
1114 
1115 /*
1116  * File node - used for "Include" operator file stack and
1117  * dependency tree for the -ca option
1118  */
1119 typedef struct acpi_file_node
1120 {
1121     void                    *File;
1122     char                    *Filename;
1123     char                    *FileStart;  /* Points to AML and indicates when the AML for this particular file starts. */
1124     char                    *FileEnd;    /* Points to AML and indicates when the AML for this particular file ends. */
1125     struct acpi_file_node   *Next;
1126     struct acpi_file_node   *Parent;
1127     BOOLEAN                 IncludeWritten;
1128     ACPI_COMMENT_NODE       *IncludeComment;
1129 
1130 } ACPI_FILE_NODE;
1131 
1132 
1133 /*
1134  * Generic operation (for example:  If, While, Store)
1135  */
1136 typedef struct acpi_parse_obj_common
1137 {
1138     ACPI_PARSE_COMMON
1139 } ACPI_PARSE_OBJ_COMMON;
1140 
1141 
1142 /*
1143  * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and OpRegions),
1144  * and bytelists.
1145  */
1146 typedef struct acpi_parse_obj_named
1147 {
1148     ACPI_PARSE_COMMON
1149     char                            *Path;
1150     UINT8                           *Data;          /* AML body or bytelist data */
1151     UINT32                          Length;         /* AML length */
1152     UINT32                          Name;           /* 4-byte name or zero if no name */
1153 
1154 } ACPI_PARSE_OBJ_NAMED;
1155 
1156 
1157 /* This version is used by the iASL compiler only */
1158 
1159 #define ACPI_MAX_PARSEOP_NAME       20
1160 
1161 typedef struct acpi_parse_obj_asl
1162 {
1163     ACPI_PARSE_COMMON
1164     union acpi_parse_object         *Child;
1165     union acpi_parse_object         *ParentMethod;
1166     char                            *Filename;
1167     BOOLEAN                         FileChanged;
1168     char                            *ParentFilename;
1169     char                            *ExternalName;
1170     char                            *Namepath;
1171     char                            NameSeg[4];
1172     UINT32                          ExtraValue;
1173     UINT32                          Column;
1174     UINT32                          LineNumber;
1175     UINT32                          LogicalLineNumber;
1176     UINT32                          LogicalByteOffset;
1177     UINT32                          EndLine;
1178     UINT32                          EndLogicalLine;
1179     UINT32                          AcpiBtype;
1180     UINT32                          AmlLength;
1181     UINT32                          AmlSubtreeLength;
1182     UINT32                          FinalAmlLength;
1183     UINT32                          FinalAmlOffset;
1184     UINT32                          CompileFlags;
1185     UINT16                          ParseOpcode;
1186     UINT8                           AmlOpcodeLength;
1187     UINT8                           AmlPkgLenBytes;
1188     UINT8                           Extra;
1189     char                            ParseOpName[ACPI_MAX_PARSEOP_NAME];
1190 
1191 } ACPI_PARSE_OBJ_ASL;
1192 
1193 typedef union acpi_parse_object
1194 {
1195     ACPI_PARSE_OBJ_COMMON           Common;
1196     ACPI_PARSE_OBJ_NAMED            Named;
1197     ACPI_PARSE_OBJ_ASL              Asl;
1198 
1199 } ACPI_PARSE_OBJECT;
1200 
1201 typedef struct asl_comment_state
1202 {
1203     UINT8                           CommentType;
1204     UINT32                          SpacesBefore;
1205     ACPI_PARSE_OBJECT               *LatestParseOp;
1206     ACPI_PARSE_OBJECT               *ParsingParenBraceNode;
1207     BOOLEAN                         CaptureComments;
1208 
1209 } ASL_COMMENT_STATE;
1210 
1211 
1212 /*
1213  * Parse state - one state per parser invocation and each control
1214  * method.
1215  */
1216 typedef struct acpi_parse_state
1217 {
1218     UINT8                           *AmlStart;      /* First AML byte */
1219     UINT8                           *Aml;           /* Next AML byte */
1220     UINT8                           *AmlEnd;        /* (last + 1) AML byte */
1221     UINT8                           *PkgStart;      /* Current package begin */
1222     UINT8                           *PkgEnd;        /* Current package end */
1223     union acpi_parse_object         *StartOp;       /* Root of parse tree */
1224     struct acpi_namespace_node      *StartNode;
1225     union acpi_generic_state        *Scope;         /* Current scope */
1226     union acpi_parse_object         *StartScope;
1227     UINT32                          AmlSize;
1228 
1229 } ACPI_PARSE_STATE;
1230 
1231 
1232 /* Parse object flags */
1233 
1234 #define ACPI_PARSEOP_GENERIC                0x01
1235 #define ACPI_PARSEOP_NAMED_OBJECT           0x02
1236 #define ACPI_PARSEOP_DEFERRED               0x04
1237 #define ACPI_PARSEOP_BYTELIST               0x08
1238 #define ACPI_PARSEOP_IN_STACK               0x10
1239 #define ACPI_PARSEOP_TARGET                 0x20
1240 #define ACPI_PARSEOP_IN_CACHE               0x80
1241 
1242 /* Parse object DisasmFlags */
1243 
1244 #define ACPI_PARSEOP_IGNORE                 0x0001
1245 #define ACPI_PARSEOP_PARAMETER_LIST         0x0002
1246 #define ACPI_PARSEOP_EMPTY_TERMLIST         0x0004
1247 #define ACPI_PARSEOP_PREDEFINED_CHECKED     0x0008
1248 #define ACPI_PARSEOP_CLOSING_PAREN          0x0010
1249 #define ACPI_PARSEOP_COMPOUND_ASSIGNMENT    0x0020
1250 #define ACPI_PARSEOP_ASSIGNMENT             0x0040
1251 #define ACPI_PARSEOP_ELSEIF                 0x0080
1252 #define ACPI_PARSEOP_LEGACY_ASL_ONLY        0x0100
1253 
1254 
1255 /*****************************************************************************
1256  *
1257  * Hardware (ACPI registers) and PNP
1258  *
1259  ****************************************************************************/
1260 
1261 typedef struct acpi_bit_register_info
1262 {
1263     UINT8                           ParentRegister;
1264     UINT8                           BitPosition;
1265     UINT16                          AccessBitMask;
1266 
1267 } ACPI_BIT_REGISTER_INFO;
1268 
1269 
1270 /*
1271  * Some ACPI registers have bits that must be ignored -- meaning that they
1272  * must be preserved.
1273  */
1274 #define ACPI_PM1_STATUS_PRESERVED_BITS          0x0800  /* Bit 11 */
1275 
1276 /* Write-only bits must be zeroed by software */
1277 
1278 #define ACPI_PM1_CONTROL_WRITEONLY_BITS         0x2004  /* Bits 13, 2 */
1279 
1280 /* For control registers, both ignored and reserved bits must be preserved */
1281 
1282 /*
1283  * For PM1 control, the SCI enable bit (bit 0, SCI_EN) is defined by the
1284  * ACPI specification to be a "preserved" bit - "OSPM always preserves this
1285  * bit position", section 4.7.3.2.1. However, on some machines the OS must
1286  * write a one to this bit after resume for the machine to work properly.
1287  * To enable this, we no longer attempt to preserve this bit. No machines
1288  * are known to fail if the bit is not preserved. (May 2009)
1289  */
1290 #define ACPI_PM1_CONTROL_IGNORED_BITS           0x0200  /* Bit 9 */
1291 #define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8  /* Bits 14-15, 3-8 */
1292 #define ACPI_PM1_CONTROL_PRESERVED_BITS \
1293          (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
1294 
1295 #define ACPI_PM2_CONTROL_PRESERVED_BITS         0xFFFFFFFE /* All except bit 0 */
1296 
1297 /*
1298  * Register IDs
1299  * These are the full ACPI registers
1300  */
1301 #define ACPI_REGISTER_PM1_STATUS                0x01
1302 #define ACPI_REGISTER_PM1_ENABLE                0x02
1303 #define ACPI_REGISTER_PM1_CONTROL               0x03
1304 #define ACPI_REGISTER_PM2_CONTROL               0x04
1305 #define ACPI_REGISTER_PM_TIMER                  0x05
1306 #define ACPI_REGISTER_PROCESSOR_BLOCK           0x06
1307 #define ACPI_REGISTER_SMI_COMMAND_BLOCK         0x07
1308 
1309 
1310 /* Masks used to access the BitRegisters */
1311 
1312 #define ACPI_BITMASK_TIMER_STATUS               0x0001
1313 #define ACPI_BITMASK_BUS_MASTER_STATUS          0x0010
1314 #define ACPI_BITMASK_GLOBAL_LOCK_STATUS         0x0020
1315 #define ACPI_BITMASK_POWER_BUTTON_STATUS        0x0100
1316 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS        0x0200
1317 #define ACPI_BITMASK_RT_CLOCK_STATUS            0x0400
1318 #define ACPI_BITMASK_PCIEXP_WAKE_STATUS         0x4000    /* ACPI 3.0 */
1319 #define ACPI_BITMASK_WAKE_STATUS                0x8000
1320 
1321 #define ACPI_BITMASK_ALL_FIXED_STATUS           (\
1322     ACPI_BITMASK_TIMER_STATUS          | \
1323     ACPI_BITMASK_BUS_MASTER_STATUS     | \
1324     ACPI_BITMASK_GLOBAL_LOCK_STATUS    | \
1325     ACPI_BITMASK_POWER_BUTTON_STATUS   | \
1326     ACPI_BITMASK_SLEEP_BUTTON_STATUS   | \
1327     ACPI_BITMASK_RT_CLOCK_STATUS       | \
1328     ACPI_BITMASK_PCIEXP_WAKE_STATUS    | \
1329     ACPI_BITMASK_WAKE_STATUS)
1330 
1331 #define ACPI_BITMASK_TIMER_ENABLE               0x0001
1332 #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE         0x0020
1333 #define ACPI_BITMASK_POWER_BUTTON_ENABLE        0x0100
1334 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE        0x0200
1335 #define ACPI_BITMASK_RT_CLOCK_ENABLE            0x0400
1336 #define ACPI_BITMASK_PCIEXP_WAKE_DISABLE        0x4000    /* ACPI 3.0 */
1337 
1338 #define ACPI_BITMASK_SCI_ENABLE                 0x0001
1339 #define ACPI_BITMASK_BUS_MASTER_RLD             0x0002
1340 #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE        0x0004
1341 #define ACPI_BITMASK_SLEEP_TYPE                 0x1C00
1342 #define ACPI_BITMASK_SLEEP_ENABLE               0x2000
1343 
1344 #define ACPI_BITMASK_ARB_DISABLE                0x0001
1345 
1346 
1347 /* Raw bit position of each BitRegister */
1348 
1349 #define ACPI_BITPOSITION_TIMER_STATUS           0x00
1350 #define ACPI_BITPOSITION_BUS_MASTER_STATUS      0x04
1351 #define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS     0x05
1352 #define ACPI_BITPOSITION_POWER_BUTTON_STATUS    0x08
1353 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS    0x09
1354 #define ACPI_BITPOSITION_RT_CLOCK_STATUS        0x0A
1355 #define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS     0x0E    /* ACPI 3.0 */
1356 #define ACPI_BITPOSITION_WAKE_STATUS            0x0F
1357 
1358 #define ACPI_BITPOSITION_TIMER_ENABLE           0x00
1359 #define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE     0x05
1360 #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE    0x08
1361 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE    0x09
1362 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE        0x0A
1363 #define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE    0x0E    /* ACPI 3.0 */
1364 
1365 #define ACPI_BITPOSITION_SCI_ENABLE             0x00
1366 #define ACPI_BITPOSITION_BUS_MASTER_RLD         0x01
1367 #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE    0x02
1368 #define ACPI_BITPOSITION_SLEEP_TYPE             0x0A
1369 #define ACPI_BITPOSITION_SLEEP_ENABLE           0x0D
1370 
1371 #define ACPI_BITPOSITION_ARB_DISABLE            0x00
1372 
1373 
1374 /* Structs and definitions for _OSI support and I/O port validation */
1375 
1376 #define ACPI_ALWAYS_ILLEGAL             0x00
1377 
1378 typedef struct acpi_interface_info
1379 {
1380     char                        *Name;
1381     struct acpi_interface_info  *Next;
1382     UINT8                       Flags;
1383     UINT8                       Value;
1384 
1385 } ACPI_INTERFACE_INFO;
1386 
1387 #define ACPI_OSI_INVALID                0x01
1388 #define ACPI_OSI_DYNAMIC                0x02
1389 #define ACPI_OSI_FEATURE                0x04
1390 #define ACPI_OSI_DEFAULT_INVALID        0x08
1391 #define ACPI_OSI_OPTIONAL_FEATURE       (ACPI_OSI_FEATURE | ACPI_OSI_DEFAULT_INVALID | ACPI_OSI_INVALID)
1392 
1393 typedef struct acpi_port_info
1394 {
1395     char                    *Name;
1396     UINT16                  Start;
1397     UINT16                  End;
1398     UINT8                   OsiDependency;
1399 
1400 } ACPI_PORT_INFO;
1401 
1402 
1403 /*****************************************************************************
1404  *
1405  * Resource descriptors
1406  *
1407  ****************************************************************************/
1408 
1409 /* ResourceType values */
1410 
1411 #define ACPI_ADDRESS_TYPE_MEMORY_RANGE          0
1412 #define ACPI_ADDRESS_TYPE_IO_RANGE              1
1413 #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE      2
1414 
1415 #define ACPI_ADDRESS_TYPE_PCC_NUMBER            0xA
1416 
1417 /* Resource descriptor types and masks */
1418 
1419 #define ACPI_RESOURCE_NAME_LARGE                0x80
1420 #define ACPI_RESOURCE_NAME_SMALL                0x00
1421 
1422 #define ACPI_RESOURCE_NAME_SMALL_MASK           0x78 /* Bits 6:3 contain the type */
1423 #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK    0x07 /* Bits 2:0 contain the length */
1424 #define ACPI_RESOURCE_NAME_LARGE_MASK           0x7F /* Bits 6:0 contain the type */
1425 
1426 
1427 /*
1428  * Small resource descriptor "names" as defined by the ACPI specification.
1429  * Note: Bits 2:0 are used for the descriptor length
1430  */
1431 #define ACPI_RESOURCE_NAME_IRQ                  0x20
1432 #define ACPI_RESOURCE_NAME_DMA                  0x28
1433 #define ACPI_RESOURCE_NAME_START_DEPENDENT      0x30
1434 #define ACPI_RESOURCE_NAME_END_DEPENDENT        0x38
1435 #define ACPI_RESOURCE_NAME_IO                   0x40
1436 #define ACPI_RESOURCE_NAME_FIXED_IO             0x48
1437 #define ACPI_RESOURCE_NAME_FIXED_DMA            0x50
1438 #define ACPI_RESOURCE_NAME_RESERVED_S2          0x58
1439 #define ACPI_RESOURCE_NAME_RESERVED_S3          0x60
1440 #define ACPI_RESOURCE_NAME_RESERVED_S4          0x68
1441 #define ACPI_RESOURCE_NAME_VENDOR_SMALL         0x70
1442 #define ACPI_RESOURCE_NAME_END_TAG              0x78
1443 
1444 /*
1445  * Large resource descriptor "names" as defined by the ACPI specification.
1446  * Note: includes the Large Descriptor bit in bit[7]
1447  */
1448 #define ACPI_RESOURCE_NAME_MEMORY24             0x81
1449 #define ACPI_RESOURCE_NAME_GENERIC_REGISTER     0x82
1450 #define ACPI_RESOURCE_NAME_RESERVED_L1          0x83
1451 #define ACPI_RESOURCE_NAME_VENDOR_LARGE         0x84
1452 #define ACPI_RESOURCE_NAME_MEMORY32             0x85
1453 #define ACPI_RESOURCE_NAME_FIXED_MEMORY32       0x86
1454 #define ACPI_RESOURCE_NAME_ADDRESS32            0x87
1455 #define ACPI_RESOURCE_NAME_ADDRESS16            0x88
1456 #define ACPI_RESOURCE_NAME_EXTENDED_IRQ         0x89
1457 #define ACPI_RESOURCE_NAME_ADDRESS64            0x8A
1458 #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64   0x8B
1459 #define ACPI_RESOURCE_NAME_GPIO                 0x8C
1460 #define ACPI_RESOURCE_NAME_PIN_FUNCTION         0x8D
1461 #define ACPI_RESOURCE_NAME_SERIAL_BUS           0x8E
1462 #define ACPI_RESOURCE_NAME_PIN_CONFIG           0x8F
1463 #define ACPI_RESOURCE_NAME_PIN_GROUP            0x90
1464 #define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION   0x91
1465 #define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG     0x92
1466 #define ACPI_RESOURCE_NAME_CLOCK_INPUT          0x93
1467 #define ACPI_RESOURCE_NAME_LARGE_MAX            0x94
1468 
1469 
1470 /*****************************************************************************
1471  *
1472  * Miscellaneous
1473  *
1474  ****************************************************************************/
1475 
1476 #define ACPI_ASCII_ZERO                 0x30
1477 
1478 
1479 /*****************************************************************************
1480  *
1481  * Disassembler
1482  *
1483  ****************************************************************************/
1484 
1485 typedef struct acpi_external_list
1486 {
1487     char                        *Path;
1488     char                        *InternalPath;
1489     struct acpi_external_list   *Next;
1490     UINT32                      Value;
1491     UINT16                      Length;
1492     UINT16                      Flags;
1493     UINT8                       Type;
1494 
1495 } ACPI_EXTERNAL_LIST;
1496 
1497 /* Values for Flags field above */
1498 
1499 #define ACPI_EXT_RESOLVED_REFERENCE         0x01    /* Object was resolved during cross ref */
1500 #define ACPI_EXT_ORIGIN_FROM_FILE           0x02    /* External came from a file */
1501 #define ACPI_EXT_INTERNAL_PATH_ALLOCATED    0x04    /* Deallocate internal path on completion */
1502 #define ACPI_EXT_EXTERNAL_EMITTED           0x08    /* External() statement has been emitted */
1503 #define ACPI_EXT_ORIGIN_FROM_OPCODE         0x10    /* External came from a External() opcode */
1504 #define ACPI_EXT_CONFLICTING_DECLARATION    0x20    /* External has a conflicting declaration within AML */
1505 
1506 
1507 typedef struct acpi_external_file
1508 {
1509     char                        *Path;
1510     struct acpi_external_file   *Next;
1511 
1512 } ACPI_EXTERNAL_FILE;
1513 
1514 
1515 typedef struct acpi_parse_object_list
1516 {
1517     ACPI_PARSE_OBJECT               *Op;
1518     struct acpi_parse_object_list   *Next;
1519 
1520 } ACPI_PARSE_OBJECT_LIST;
1521 
1522 /*****************************************************************************
1523  *
1524  * Debugger
1525  *
1526  ****************************************************************************/
1527 
1528 typedef struct acpi_db_method_info
1529 {
1530     ACPI_HANDLE                     Method;
1531     ACPI_HANDLE                     MainThreadGate;
1532     ACPI_HANDLE                     ThreadCompleteGate;
1533     ACPI_HANDLE                     InfoGate;
1534     ACPI_THREAD_ID                  *Threads;
1535     UINT32                          NumThreads;
1536     UINT32                          NumCreated;
1537     UINT32                          NumCompleted;
1538 
1539     char                            *Name;
1540     UINT32                          Flags;
1541     UINT32                          NumLoops;
1542     char                            Pathname[ACPI_DB_LINE_BUFFER_SIZE];
1543     char                            **Args;
1544     ACPI_OBJECT_TYPE                *Types;
1545 
1546     /*
1547      * Arguments to be passed to method for the commands Threads and
1548      * Background. Note, ACPI specifies a maximum of 7 arguments (0 - 6).
1549      *
1550      * For the Threads command, the Number of threads, ID of current
1551      * thread and Index of current thread inside all them created.
1552      */
1553     char                            InitArgs;
1554 #ifdef ACPI_DEBUGGER
1555     ACPI_OBJECT_TYPE                ArgTypes[ACPI_METHOD_NUM_ARGS];
1556 #endif
1557     char                            *Arguments[ACPI_METHOD_NUM_ARGS];
1558     char                            NumThreadsStr[11];
1559     char                            IdOfThreadStr[11];
1560     char                            IndexOfThreadStr[11];
1561 
1562 } ACPI_DB_METHOD_INFO;
1563 
1564 typedef struct acpi_integrity_info
1565 {
1566     UINT32                          Nodes;
1567     UINT32                          Objects;
1568 
1569 } ACPI_INTEGRITY_INFO;
1570 
1571 
1572 #define ACPI_DB_DISABLE_OUTPUT          0x00
1573 #define ACPI_DB_REDIRECTABLE_OUTPUT     0x01
1574 #define ACPI_DB_CONSOLE_OUTPUT          0x02
1575 #define ACPI_DB_DUPLICATE_OUTPUT        0x03
1576 
1577 
1578 typedef struct acpi_object_info
1579 {
1580     UINT32                  Types[ACPI_TOTAL_TYPES];
1581 
1582 } ACPI_OBJECT_INFO;
1583 
1584 
1585 /*****************************************************************************
1586  *
1587  * Debug
1588  *
1589  ****************************************************************************/
1590 
1591 /* Entry for a memory allocation (debug only) */
1592 
1593 #define ACPI_MEM_MALLOC                 0
1594 #define ACPI_MEM_CALLOC                 1
1595 #define ACPI_MAX_MODULE_NAME            16
1596 
1597 #define ACPI_COMMON_DEBUG_MEM_HEADER \
1598     struct acpi_debug_mem_block     *Previous; \
1599     struct acpi_debug_mem_block     *Next; \
1600     UINT32                          Size; \
1601     UINT32                          Component; \
1602     UINT32                          Line; \
1603     char                            Module[ACPI_MAX_MODULE_NAME]; \
1604     UINT8                           AllocType;
1605 
1606 typedef struct acpi_debug_mem_header
1607 {
1608     ACPI_COMMON_DEBUG_MEM_HEADER
1609 
1610 } ACPI_DEBUG_MEM_HEADER;
1611 
1612 typedef struct acpi_debug_mem_block
1613 {
1614     ACPI_COMMON_DEBUG_MEM_HEADER
1615     UINT64                          UserSpace;
1616 
1617 } ACPI_DEBUG_MEM_BLOCK;
1618 
1619 
1620 #define ACPI_MEM_LIST_GLOBAL            0
1621 #define ACPI_MEM_LIST_NSNODE            1
1622 #define ACPI_MEM_LIST_MAX               1
1623 #define ACPI_NUM_MEM_LISTS              2
1624 
1625 
1626 /*****************************************************************************
1627  *
1628  * Info/help support
1629  *
1630  ****************************************************************************/
1631 
1632 typedef struct ah_predefined_name
1633 {
1634     char            *Name;
1635     char            *Description;
1636 #ifndef ACPI_ASL_COMPILER
1637     char            *Action;
1638 #endif
1639 
1640 } AH_PREDEFINED_NAME;
1641 
1642 typedef struct ah_device_id
1643 {
1644     char            *Name;
1645     char            *Description;
1646 
1647 } AH_DEVICE_ID;
1648 
1649 typedef struct ah_uuid
1650 {
1651     char            *Description;
1652     char            *String;
1653 
1654 } AH_UUID;
1655 
1656 typedef struct ah_table
1657 {
1658     char                    *Signature;
1659     char                    *Description;
1660 
1661 } AH_TABLE;
1662 
1663 #endif /* __ACLOCAL_H__ */