ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

acstruct.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Name: acstruct.h - Internal structs
00004  *
00005  *****************************************************************************/
00006 
00007 /******************************************************************************
00008  *
00009  * 1. Copyright Notice
00010  *
00011  * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
00012  * All rights reserved.
00013  *
00014  * 2. License
00015  *
00016  * 2.1. This is your license from Intel Corp. under its intellectual property
00017  * rights.  You may have additional license terms from the party that provided
00018  * you this software, covering your right to use that party's intellectual
00019  * property rights.
00020  *
00021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
00022  * copy of the source code appearing in this file ("Covered Code") an
00023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
00024  * base code distributed originally by Intel ("Original Intel Code") to copy,
00025  * make derivatives, distribute, use and display any portion of the Covered
00026  * Code in any form, with the right to sublicense such rights; and
00027  *
00028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
00029  * license (with the right to sublicense), under only those claims of Intel
00030  * patents that are infringed by the Original Intel Code, to make, use, sell,
00031  * offer to sell, and import the Covered Code and derivative works thereof
00032  * solely to the minimum extent necessary to exercise the above copyright
00033  * license, and in no event shall the patent license extend to any additions
00034  * to or modifications of the Original Intel Code.  No other license or right
00035  * is granted directly or by implication, estoppel or otherwise;
00036  *
00037  * The above copyright and patent license is granted only if the following
00038  * conditions are met:
00039  *
00040  * 3. Conditions
00041  *
00042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
00043  * Redistribution of source code of any substantial portion of the Covered
00044  * Code or modification with rights to further distribute source must include
00045  * the above Copyright Notice, the above License, this list of Conditions,
00046  * and the following Disclaimer and Export Compliance provision.  In addition,
00047  * Licensee must cause all Covered Code to which Licensee contributes to
00048  * contain a file documenting the changes Licensee made to create that Covered
00049  * Code and the date of any change.  Licensee must include in that file the
00050  * documentation of any changes made by any predecessor Licensee.  Licensee
00051  * must include a prominent statement that the modification is derived,
00052  * directly or indirectly, from Original Intel Code.
00053  *
00054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
00055  * Redistribution of source code of any substantial portion of the Covered
00056  * Code or modification without rights to further distribute source must
00057  * include the following Disclaimer and Export Compliance provision in the
00058  * documentation and/or other materials provided with distribution.  In
00059  * addition, Licensee may not authorize further sublicense of source of any
00060  * portion of the Covered Code, and must include terms to the effect that the
00061  * license from Licensee to its licensee is limited to the intellectual
00062  * property embodied in the software Licensee provides to its licensee, and
00063  * not to intellectual property embodied in modifications its licensee may
00064  * make.
00065  *
00066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
00067  * substantial portion of the Covered Code or modification must reproduce the
00068  * above Copyright Notice, and the following Disclaimer and Export Compliance
00069  * provision in the documentation and/or other materials provided with the
00070  * distribution.
00071  *
00072  * 3.4. Intel retains all right, title, and interest in and to the Original
00073  * Intel Code.
00074  *
00075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
00076  * Intel shall be used in advertising or otherwise to promote the sale, use or
00077  * other dealings in products derived from or relating to the Covered Code
00078  * without prior written authorization from Intel.
00079  *
00080  * 4. Disclaimer and Export Compliance
00081  *
00082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
00083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
00084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
00085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
00086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
00087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
00088  * PARTICULAR PURPOSE.
00089  *
00090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
00091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
00092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
00093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
00094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
00095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
00096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
00097  * LIMITED REMEDY.
00098  *
00099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
00100  * software or system incorporating such software without first obtaining any
00101  * required license or other approval from the U. S. Department of Commerce or
00102  * any other agency or department of the United States Government.  In the
00103  * event Licensee exports any such software from the United States or
00104  * re-exports any such software from a foreign destination, Licensee shall
00105  * ensure that the distribution and export/re-export of the software is in
00106  * compliance with all laws, regulations, orders, or other restrictions of the
00107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
00108  * any of its subsidiaries will export/re-export any technical data, process,
00109  * software, or service, directly or indirectly, to any country for which the
00110  * United States government or any agency thereof requires an export license,
00111  * other governmental approval, or letter of assurance, without first obtaining
00112  * such license, approval or letter.
00113  *
00114  *****************************************************************************/
00115 
00116 #ifndef __ACSTRUCT_H__
00117 #define __ACSTRUCT_H__
00118 
00119 /* acpisrc:StructDefs -- for acpisrc conversion */
00120 
00121 /*****************************************************************************
00122  *
00123  * Tree walking typedefs and structs
00124  *
00125  ****************************************************************************/
00126 
00127 
00128 /*
00129  * Walk state - current state of a parse tree walk.  Used for both a leisurely
00130  * stroll through the tree (for whatever reason), and for control method
00131  * execution.
00132  */
00133 #define ACPI_NEXT_OP_DOWNWARD       1
00134 #define ACPI_NEXT_OP_UPWARD         2
00135 
00136 /*
00137  * Groups of definitions for WalkType used for different implementations of
00138  * walkers (never simultaneously) - flags for interpreter:
00139  */
00140 #define ACPI_WALK_NON_METHOD        0
00141 #define ACPI_WALK_METHOD            0x01
00142 #define ACPI_WALK_METHOD_RESTART    0x02
00143 
00144 /* Flags for iASL compiler only */
00145 
00146 #define ACPI_WALK_CONST_REQUIRED    0x10
00147 #define ACPI_WALK_CONST_OPTIONAL    0x20
00148 
00149 
00150 typedef struct acpi_walk_state
00151 {
00152     struct acpi_walk_state          *Next;              /* Next WalkState in list */
00153     UINT8                           DescriptorType;     /* To differentiate various internal objs */
00154     UINT8                           WalkType;
00155     UINT16                          Opcode;             /* Current AML opcode */
00156     UINT8                           NextOpInfo;         /* Info about NextOp */
00157     UINT8                           NumOperands;        /* Stack pointer for Operands[] array */
00158     UINT8                           OperandIndex;       /* Index into operand stack, to be used by AcpiDsObjStackPush */
00159     ACPI_OWNER_ID                   OwnerId;            /* Owner of objects created during the walk */
00160     BOOLEAN                         LastPredicate;      /* Result of last predicate */
00161     UINT8                           CurrentResult;
00162     UINT8                           ReturnUsed;
00163     UINT8                           ScopeDepth;
00164     UINT8                           PassNumber;         /* Parse pass during table load */
00165     UINT8                           ResultSize;         /* Total elements for the result stack */
00166     UINT8                           ResultCount;        /* Current number of occupied elements of result stack */
00167     UINT32                          AmlOffset;
00168     UINT32                          ArgTypes;
00169     UINT32                          MethodBreakpoint;   /* For single stepping */
00170     UINT32                          UserBreakpoint;     /* User AML breakpoint */
00171     UINT32                          ParseFlags;
00172 
00173     ACPI_PARSE_STATE                ParserState;        /* Current state of parser */
00174     UINT32                          PrevArgTypes;
00175     UINT32                          ArgCount;           /* push for fixed or var args */
00176 
00177     struct acpi_namespace_node      Arguments[ACPI_METHOD_NUM_ARGS];        /* Control method arguments */
00178     struct acpi_namespace_node      LocalVariables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
00179     union acpi_operand_object       *Operands[ACPI_OBJ_NUM_OPERANDS + 1];   /* Operands passed to the interpreter (+1 for NULL terminator) */
00180     union acpi_operand_object       **Params;
00181 
00182     UINT8                           *AmlLastWhile;
00183     union acpi_operand_object       **CallerReturnDesc;
00184     ACPI_GENERIC_STATE              *ControlState;      /* List of control states (nested IFs) */
00185     struct acpi_namespace_node      *DeferredNode;      /* Used when executing deferred opcodes */
00186     union acpi_operand_object       *ImplicitReturnObj;
00187     struct acpi_namespace_node      *MethodCallNode;    /* Called method Node*/
00188     ACPI_PARSE_OBJECT               *MethodCallOp;      /* MethodCall Op if running a method */
00189     union acpi_operand_object       *MethodDesc;        /* Method descriptor if running a method */
00190     struct acpi_namespace_node      *MethodNode;        /* Method node if running a method. */
00191     ACPI_PARSE_OBJECT               *Op;                /* Current parser op */
00192     const ACPI_OPCODE_INFO          *OpInfo;            /* Info on current opcode */
00193     ACPI_PARSE_OBJECT               *Origin;            /* Start of walk [Obsolete] */
00194     union acpi_operand_object       *ResultObj;
00195     ACPI_GENERIC_STATE              *Results;           /* Stack of accumulated results */
00196     union acpi_operand_object       *ReturnDesc;        /* Return object, if any */
00197     ACPI_GENERIC_STATE              *ScopeInfo;         /* Stack of nested scopes */
00198     ACPI_PARSE_OBJECT               *PrevOp;            /* Last op that was processed */
00199     ACPI_PARSE_OBJECT               *NextOp;            /* next op to be processed */
00200     ACPI_THREAD_STATE               *Thread;
00201     ACPI_PARSE_DOWNWARDS            DescendingCallback;
00202     ACPI_PARSE_UPWARDS              AscendingCallback;
00203 
00204 } ACPI_WALK_STATE;
00205 
00206 
00207 /* Info used by AcpiNsInitializeObjects and AcpiDsInitializeObjects */
00208 
00209 typedef struct acpi_init_walk_info
00210 {
00211     UINT32                          TableIndex;
00212     UINT32                          ObjectCount;
00213     UINT32                          MethodCount;
00214     UINT32                          DeviceCount;
00215     UINT32                          OpRegionCount;
00216     UINT32                          FieldCount;
00217     UINT32                          BufferCount;
00218     UINT32                          PackageCount;
00219     UINT32                          OpRegionInit;
00220     UINT32                          FieldInit;
00221     UINT32                          BufferInit;
00222     UINT32                          PackageInit;
00223     ACPI_OWNER_ID                   OwnerId;
00224 
00225 } ACPI_INIT_WALK_INFO;
00226 
00227 
00228 typedef struct acpi_get_devices_info
00229 {
00230     ACPI_WALK_CALLBACK              UserFunction;
00231     void                            *Context;
00232     char                            *Hid;
00233 
00234 } ACPI_GET_DEVICES_INFO;
00235 
00236 
00237 typedef union acpi_aml_operands
00238 {
00239     ACPI_OPERAND_OBJECT             *Operands[7];
00240 
00241     struct
00242     {
00243         ACPI_OBJECT_INTEGER             *Type;
00244         ACPI_OBJECT_INTEGER             *Code;
00245         ACPI_OBJECT_INTEGER             *Argument;
00246 
00247     } Fatal;
00248 
00249     struct
00250     {
00251         ACPI_OPERAND_OBJECT             *Source;
00252         ACPI_OBJECT_INTEGER             *Index;
00253         ACPI_OPERAND_OBJECT             *Target;
00254 
00255     } Index;
00256 
00257     struct
00258     {
00259         ACPI_OPERAND_OBJECT             *Source;
00260         ACPI_OBJECT_INTEGER             *Index;
00261         ACPI_OBJECT_INTEGER             *Length;
00262         ACPI_OPERAND_OBJECT             *Target;
00263 
00264     } Mid;
00265 
00266 } ACPI_AML_OPERANDS;
00267 
00268 
00269 /*
00270  * Structure used to pass object evaluation parameters.
00271  * Purpose is to reduce CPU stack use.
00272  */
00273 typedef struct acpi_evaluate_info
00274 {
00275     ACPI_NAMESPACE_NODE             *PrefixNode;
00276     char                            *Pathname;
00277     ACPI_OPERAND_OBJECT             *ObjDesc;
00278     ACPI_OPERAND_OBJECT             **Parameters;
00279     ACPI_NAMESPACE_NODE             *ResolvedNode;
00280     ACPI_OPERAND_OBJECT             *ReturnObject;
00281     UINT8                           ParamCount;
00282     UINT8                           PassNumber;
00283     UINT8                           ReturnObjectType;
00284     UINT8                           Flags;
00285 
00286 } ACPI_EVALUATE_INFO;
00287 
00288 /* Values for Flags above */
00289 
00290 #define ACPI_IGNORE_RETURN_VALUE        1
00291 
00292 
00293 /* Info used by AcpiNsInitializeDevices */
00294 
00295 typedef struct acpi_device_walk_info
00296 {
00297     ACPI_TABLE_DESC                 *TableDesc;
00298     ACPI_EVALUATE_INFO              *EvaluateInfo;
00299     UINT32                          DeviceCount;
00300     UINT32                          Num_STA;
00301     UINT32                          Num_INI;
00302 
00303 } ACPI_DEVICE_WALK_INFO;
00304 
00305 
00306 /* TBD: [Restructure] Merge with struct above */
00307 
00308 typedef struct acpi_walk_info
00309 {
00310     UINT32                          DebugLevel;
00311     UINT32                          Count;
00312     ACPI_OWNER_ID                   OwnerId;
00313     UINT8                           DisplayType;
00314 
00315 } ACPI_WALK_INFO;
00316 
00317 /* Display Types */
00318 
00319 #define ACPI_DISPLAY_SUMMARY        (UINT8) 0
00320 #define ACPI_DISPLAY_OBJECTS        (UINT8) 1
00321 #define ACPI_DISPLAY_MASK           (UINT8) 1
00322 
00323 #define ACPI_DISPLAY_SHORT          (UINT8) 2
00324 
00325 
00326 #endif

Generated on Fri May 25 2012 04:25:34 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.