acinterp.h revision 204773
167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Name: acinterp.h - Interpreter subcomponent prototypes and defines 467754Smsmith * 567754Smsmith *****************************************************************************/ 667754Smsmith 767754Smsmith/****************************************************************************** 867754Smsmith * 967754Smsmith * 1. Copyright Notice 1067754Smsmith * 11202771Sjkim * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. 1270243Smsmith * All rights reserved. 1367754Smsmith * 1467754Smsmith * 2. License 1567754Smsmith * 1667754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property 1767754Smsmith * rights. You may have additional license terms from the party that provided 1867754Smsmith * you this software, covering your right to use that party's intellectual 1967754Smsmith * property rights. 2067754Smsmith * 2167754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2267754Smsmith * copy of the source code appearing in this file ("Covered Code") an 2367754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2467754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy, 2567754Smsmith * make derivatives, distribute, use and display any portion of the Covered 2667754Smsmith * Code in any form, with the right to sublicense such rights; and 2767754Smsmith * 2867754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 2967754Smsmith * license (with the right to sublicense), under only those claims of Intel 3067754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell, 3167754Smsmith * offer to sell, and import the Covered Code and derivative works thereof 3267754Smsmith * solely to the minimum extent necessary to exercise the above copyright 3367754Smsmith * license, and in no event shall the patent license extend to any additions 3467754Smsmith * to or modifications of the Original Intel Code. No other license or right 3567754Smsmith * is granted directly or by implication, estoppel or otherwise; 3667754Smsmith * 3767754Smsmith * The above copyright and patent license is granted only if the following 3867754Smsmith * conditions are met: 3967754Smsmith * 4067754Smsmith * 3. Conditions 4167754Smsmith * 4267754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4367754Smsmith * Redistribution of source code of any substantial portion of the Covered 4467754Smsmith * Code or modification with rights to further distribute source must include 4567754Smsmith * the above Copyright Notice, the above License, this list of Conditions, 4667754Smsmith * and the following Disclaimer and Export Compliance provision. In addition, 4767754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to 4867754Smsmith * contain a file documenting the changes Licensee made to create that Covered 4967754Smsmith * Code and the date of any change. Licensee must include in that file the 5067754Smsmith * documentation of any changes made by any predecessor Licensee. Licensee 5167754Smsmith * must include a prominent statement that the modification is derived, 5267754Smsmith * directly or indirectly, from Original Intel Code. 5367754Smsmith * 5467754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5567754Smsmith * Redistribution of source code of any substantial portion of the Covered 5667754Smsmith * Code or modification without rights to further distribute source must 5767754Smsmith * include the following Disclaimer and Export Compliance provision in the 5867754Smsmith * documentation and/or other materials provided with distribution. In 5967754Smsmith * addition, Licensee may not authorize further sublicense of source of any 6067754Smsmith * portion of the Covered Code, and must include terms to the effect that the 6167754Smsmith * license from Licensee to its licensee is limited to the intellectual 6267754Smsmith * property embodied in the software Licensee provides to its licensee, and 6367754Smsmith * not to intellectual property embodied in modifications its licensee may 6467754Smsmith * make. 6567754Smsmith * 6667754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any 6767754Smsmith * substantial portion of the Covered Code or modification must reproduce the 6867754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance 6967754Smsmith * provision in the documentation and/or other materials provided with the 7067754Smsmith * distribution. 7167754Smsmith * 7267754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original 7367754Smsmith * Intel Code. 7467754Smsmith * 7567754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by 7667754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or 7767754Smsmith * other dealings in products derived from or relating to the Covered Code 7867754Smsmith * without prior written authorization from Intel. 7967754Smsmith * 8067754Smsmith * 4. Disclaimer and Export Compliance 8167754Smsmith * 8267754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8367754Smsmith * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8467754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8567754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8667754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8767754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8867754Smsmith * PARTICULAR PURPOSE. 8967754Smsmith * 9067754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9167754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9267754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 9367754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9467754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9567754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9667754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9767754Smsmith * LIMITED REMEDY. 9867754Smsmith * 9967754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this 10067754Smsmith * software or system incorporating such software without first obtaining any 10167754Smsmith * required license or other approval from the U. S. Department of Commerce or 10267754Smsmith * any other agency or department of the United States Government. In the 10367754Smsmith * event Licensee exports any such software from the United States or 10467754Smsmith * re-exports any such software from a foreign destination, Licensee shall 10567754Smsmith * ensure that the distribution and export/re-export of the software is in 10667754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the 10767754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10867754Smsmith * any of its subsidiaries will export/re-export any technical data, process, 10967754Smsmith * software, or service, directly or indirectly, to any country for which the 11067754Smsmith * United States government or any agency thereof requires an export license, 11167754Smsmith * other governmental approval, or letter of assurance, without first obtaining 11267754Smsmith * such license, approval or letter. 11367754Smsmith * 11467754Smsmith *****************************************************************************/ 11567754Smsmith 11667754Smsmith#ifndef __ACINTERP_H__ 11767754Smsmith#define __ACINTERP_H__ 11867754Smsmith 11967754Smsmith 120167802Sjkim#define ACPI_WALK_OPERANDS (&(WalkState->Operands [WalkState->NumOperands -1])) 12167754Smsmith 122167802Sjkim/* Macros for tables used for debug output */ 12367754Smsmith 124167802Sjkim#define ACPI_EXD_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_OPERAND_OBJECT,f) 125167802Sjkim#define ACPI_EXD_NSOFFSET(f) (UINT8) ACPI_OFFSET (ACPI_NAMESPACE_NODE,f) 126167802Sjkim#define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (ACPI_EXDUMP_INFO)) 127167802Sjkim 12867754Smsmith/* 129167802Sjkim * If possible, pack the following structures to byte alignment, since we 130167802Sjkim * don't care about performance for debug output. Two cases where we cannot 131167802Sjkim * pack the structures: 132167802Sjkim * 133167802Sjkim * 1) Hardware does not support misaligned memory transfers 134167802Sjkim * 2) Compiler does not support pointers within packed structures 135167802Sjkim */ 136167802Sjkim#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) 137167802Sjkim#pragma pack(1) 138167802Sjkim#endif 139167802Sjkim 140167802Sjkimtypedef const struct acpi_exdump_info 141167802Sjkim{ 142167802Sjkim UINT8 Opcode; 143167802Sjkim UINT8 Offset; 144167802Sjkim char *Name; 145167802Sjkim 146167802Sjkim} ACPI_EXDUMP_INFO; 147167802Sjkim 148167802Sjkim/* Values for the Opcode field above */ 149167802Sjkim 150167802Sjkim#define ACPI_EXD_INIT 0 151167802Sjkim#define ACPI_EXD_TYPE 1 152167802Sjkim#define ACPI_EXD_UINT8 2 153167802Sjkim#define ACPI_EXD_UINT16 3 154167802Sjkim#define ACPI_EXD_UINT32 4 155167802Sjkim#define ACPI_EXD_UINT64 5 156167802Sjkim#define ACPI_EXD_LITERAL 6 157167802Sjkim#define ACPI_EXD_POINTER 7 158167802Sjkim#define ACPI_EXD_ADDRESS 8 159167802Sjkim#define ACPI_EXD_STRING 9 160167802Sjkim#define ACPI_EXD_BUFFER 10 161167802Sjkim#define ACPI_EXD_PACKAGE 11 162167802Sjkim#define ACPI_EXD_FIELD 12 163167802Sjkim#define ACPI_EXD_REFERENCE 13 164167802Sjkim 165167802Sjkim/* restore default alignment */ 166167802Sjkim 167167802Sjkim#pragma pack() 168167802Sjkim 169167802Sjkim 170167802Sjkim/* 17191116Smsmith * exconvrt - object conversion 17267754Smsmith */ 17371867SmsmithACPI_STATUS 17477424SmsmithAcpiExConvertToInteger ( 17580062Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 17680062Smsmith ACPI_OPERAND_OBJECT **ResultDesc, 177138287Smarks UINT32 Flags); 17867754Smsmith 17967754SmsmithACPI_STATUS 18077424SmsmithAcpiExConvertToBuffer ( 18180062Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 182138287Smarks ACPI_OPERAND_OBJECT **ResultDesc); 18371867Smsmith 18471867SmsmithACPI_STATUS 18577424SmsmithAcpiExConvertToString ( 18680062Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 18780062Smsmith ACPI_OPERAND_OBJECT **ResultDesc, 188138287Smarks UINT32 Type); 18971867Smsmith 190138287Smarks/* Types for ->String conversion */ 191138287Smarks 192138287Smarks#define ACPI_EXPLICIT_BYTE_COPY 0x00000000 193138287Smarks#define ACPI_EXPLICIT_CONVERT_HEX 0x00000001 194138287Smarks#define ACPI_IMPLICIT_CONVERT_HEX 0x00000002 195138287Smarks#define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003 196138287Smarks 19771867SmsmithACPI_STATUS 19877424SmsmithAcpiExConvertToTargetType ( 19991116Smsmith ACPI_OBJECT_TYPE DestinationType, 20091116Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 20191116Smsmith ACPI_OPERAND_OBJECT **ResultDesc, 20271867Smsmith ACPI_WALK_STATE *WalkState); 20371867Smsmith 20471867Smsmith 20571867Smsmith/* 206204773Sjkim * exdebug - AML debug object 207204773Sjkim */ 208204773Sjkimvoid 209204773SjkimAcpiExDoDebugObject ( 210204773Sjkim ACPI_OPERAND_OBJECT *SourceDesc, 211204773Sjkim UINT32 Level, 212204773Sjkim UINT32 Index); 213204773Sjkim 214204773Sjkim 215204773Sjkim/* 21691116Smsmith * exfield - ACPI AML (p-code) execution - field manipulation 21771867Smsmith */ 21871867SmsmithACPI_STATUS 219131440SmarksAcpiExCommonBufferSetup ( 220131440Smarks ACPI_OPERAND_OBJECT *ObjDesc, 221131440Smarks UINT32 BufferLength, 222131440Smarks UINT32 *DatumCount); 223131440Smarks 224131440SmarksACPI_STATUS 22587031SmsmithAcpiExWriteWithUpdateRule ( 22677424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 227202771Sjkim UINT64 Mask, 228202771Sjkim UINT64 FieldValue, 22987031Smsmith UINT32 FieldDatumByteOffset); 23077424Smsmith 23187031Smsmithvoid 23287031SmsmithAcpiExGetBufferDatum( 233202771Sjkim UINT64 *Datum, 23477424Smsmith void *Buffer, 235117521Snjl UINT32 BufferLength, 23687031Smsmith UINT32 ByteGranularity, 237117521Snjl UINT32 BufferOffset); 23877424Smsmith 23987031Smsmithvoid 24087031SmsmithAcpiExSetBufferDatum ( 241202771Sjkim UINT64 MergedDatum, 24277424Smsmith void *Buffer, 243117521Snjl UINT32 BufferLength, 24487031Smsmith UINT32 ByteGranularity, 245117521Snjl UINT32 BufferOffset); 24677424Smsmith 24777424SmsmithACPI_STATUS 24877424SmsmithAcpiExReadDataFromField ( 24999146Siwasaki ACPI_WALK_STATE *WalkState, 25077424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 25177424Smsmith ACPI_OPERAND_OBJECT **RetBufferDesc); 25277424Smsmith 25377424SmsmithACPI_STATUS 25477424SmsmithAcpiExWriteDataToField ( 25577424Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 256107325Siwasaki ACPI_OPERAND_OBJECT *ObjDesc, 257107325Siwasaki ACPI_OPERAND_OBJECT **ResultDesc); 25877424Smsmith 259151937Sjkim 26067754Smsmith/* 261151937Sjkim * exfldio - low level field I/O 26267754Smsmith */ 26367754SmsmithACPI_STATUS 264151937SjkimAcpiExExtractFromField ( 265151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 266151937Sjkim void *Buffer, 267151937Sjkim UINT32 BufferLength); 26880062Smsmith 26980062SmsmithACPI_STATUS 270151937SjkimAcpiExInsertIntoField ( 271151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 272151937Sjkim void *Buffer, 273151937Sjkim UINT32 BufferLength); 27480062Smsmith 27580062SmsmithACPI_STATUS 276151937SjkimAcpiExAccessRegion ( 277151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 278151937Sjkim UINT32 FieldDatumByteOffset, 279202771Sjkim UINT64 *Value, 280151937Sjkim UINT32 ReadWrite); 28167754Smsmith 28299679Siwasaki 283151937Sjkim/* 284151937Sjkim * exmisc - misc support routines 285151937Sjkim */ 28667754SmsmithACPI_STATUS 28785756SmsmithAcpiExGetObjectReference ( 28885756Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 28985756Smsmith ACPI_OPERAND_OBJECT **ReturnDesc, 29067754Smsmith ACPI_WALK_STATE *WalkState); 29167754Smsmith 29267754SmsmithACPI_STATUS 29391116SmsmithAcpiExConcatTemplate ( 29491116Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 29591116Smsmith ACPI_OPERAND_OBJECT *ObjDesc2, 29691116Smsmith ACPI_OPERAND_OBJECT **ActualReturnDesc, 29791116Smsmith ACPI_WALK_STATE *WalkState); 29891116Smsmith 29991116SmsmithACPI_STATUS 30085756SmsmithAcpiExDoConcatenate ( 30185756Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 30285756Smsmith ACPI_OPERAND_OBJECT *ObjDesc2, 30385756Smsmith ACPI_OPERAND_OBJECT **ActualReturnDesc, 30485756Smsmith ACPI_WALK_STATE *WalkState); 30585756Smsmith 306138287SmarksACPI_STATUS 307138287SmarksAcpiExDoLogicalNumericOp ( 308138287Smarks UINT16 Opcode, 309202771Sjkim UINT64 Integer0, 310202771Sjkim UINT64 Integer1, 311138287Smarks BOOLEAN *LogicalResult); 312138287Smarks 313138287SmarksACPI_STATUS 31485756SmsmithAcpiExDoLogicalOp ( 31585756Smsmith UINT16 Opcode, 316138287Smarks ACPI_OPERAND_OBJECT *Operand0, 317138287Smarks ACPI_OPERAND_OBJECT *Operand1, 318138287Smarks BOOLEAN *LogicalResult); 31985756Smsmith 320202771SjkimUINT64 32185756SmsmithAcpiExDoMathOp ( 32285756Smsmith UINT16 Opcode, 323202771Sjkim UINT64 Operand0, 324202771Sjkim UINT64 Operand1); 32585756Smsmith 32685756SmsmithACPI_STATUS 32777424SmsmithAcpiExCreateMutex ( 32867754Smsmith ACPI_WALK_STATE *WalkState); 32967754Smsmith 33067754SmsmithACPI_STATUS 33177424SmsmithAcpiExCreateProcessor ( 33285756Smsmith ACPI_WALK_STATE *WalkState); 33367754Smsmith 33467754SmsmithACPI_STATUS 33577424SmsmithAcpiExCreatePowerResource ( 33685756Smsmith ACPI_WALK_STATE *WalkState); 33767754Smsmith 33867754SmsmithACPI_STATUS 33977424SmsmithAcpiExCreateRegion ( 34084491Smsmith UINT8 *AmlStart, 34177424Smsmith UINT32 AmlLength, 34269746Smsmith UINT8 RegionSpace, 34367754Smsmith ACPI_WALK_STATE *WalkState); 34467754Smsmith 34567754SmsmithACPI_STATUS 34677424SmsmithAcpiExCreateEvent ( 34767754Smsmith ACPI_WALK_STATE *WalkState); 34867754Smsmith 34967754SmsmithACPI_STATUS 35077424SmsmithAcpiExCreateAlias ( 35167754Smsmith ACPI_WALK_STATE *WalkState); 35267754Smsmith 35367754SmsmithACPI_STATUS 35477424SmsmithAcpiExCreateMethod ( 35584491Smsmith UINT8 *AmlStart, 35677424Smsmith UINT32 AmlLength, 35785756Smsmith ACPI_WALK_STATE *WalkState); 35867754Smsmith 35967754Smsmith 36067754Smsmith/* 36191116Smsmith * exconfig - dynamic table load/unload 36277424Smsmith */ 36377424SmsmithACPI_STATUS 36491116SmsmithAcpiExLoadOp ( 36591116Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 36691116Smsmith ACPI_OPERAND_OBJECT *Target, 36791116Smsmith ACPI_WALK_STATE *WalkState); 36891116Smsmith 36991116SmsmithACPI_STATUS 37091116SmsmithAcpiExLoadTableOp ( 37191116Smsmith ACPI_WALK_STATE *WalkState, 37291116Smsmith ACPI_OPERAND_OBJECT **ReturnDesc); 37391116Smsmith 37491116SmsmithACPI_STATUS 37591116SmsmithAcpiExUnloadTable ( 37691116Smsmith ACPI_OPERAND_OBJECT *DdbHandle); 37791116Smsmith 37891116Smsmith 37991116Smsmith/* 38091116Smsmith * exmutex - mutex support 38191116Smsmith */ 38291116SmsmithACPI_STATUS 38377424SmsmithAcpiExAcquireMutex ( 38477424Smsmith ACPI_OPERAND_OBJECT *TimeDesc, 38577424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 38677424Smsmith ACPI_WALK_STATE *WalkState); 38777424Smsmith 38877424SmsmithACPI_STATUS 389167802SjkimAcpiExAcquireMutexObject ( 390167802Sjkim UINT16 Timeout, 391167802Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 392167802Sjkim ACPI_THREAD_ID ThreadId); 393167802Sjkim 394167802SjkimACPI_STATUS 39577424SmsmithAcpiExReleaseMutex ( 39677424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 39777424Smsmith ACPI_WALK_STATE *WalkState); 39877424Smsmith 399167802SjkimACPI_STATUS 400167802SjkimAcpiExReleaseMutexObject ( 401167802Sjkim ACPI_OPERAND_OBJECT *ObjDesc); 402167802Sjkim 40399679Siwasakivoid 40477424SmsmithAcpiExReleaseAllMutexes ( 40587031Smsmith ACPI_THREAD_STATE *Thread); 40677424Smsmith 40777424Smsmithvoid 40877424SmsmithAcpiExUnlinkMutex ( 40977424Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 41077424Smsmith 41177424Smsmith 41277424Smsmith/* 413151937Sjkim * exprep - ACPI AML execution - prep utilities 41467754Smsmith */ 41567754SmsmithACPI_STATUS 41677424SmsmithAcpiExPrepCommonFieldObject ( 41777424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 41877424Smsmith UINT8 FieldFlags, 41987031Smsmith UINT8 FieldAttribute, 42087031Smsmith UINT32 FieldBitPosition, 42187031Smsmith UINT32 FieldBitLength); 42277424Smsmith 42377424SmsmithACPI_STATUS 42485756SmsmithAcpiExPrepFieldValue ( 42585756Smsmith ACPI_CREATE_FIELD_INFO *Info); 42667754Smsmith 427151937Sjkim 42867754Smsmith/* 42991116Smsmith * exsystem - Interface to OS services 43067754Smsmith */ 43167754SmsmithACPI_STATUS 43277424SmsmithAcpiExSystemDoNotifyOp ( 43367754Smsmith ACPI_OPERAND_OBJECT *Value, 43467754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 43567754Smsmith 43691116SmsmithACPI_STATUS 43777424SmsmithAcpiExSystemDoSuspend( 438202771Sjkim UINT64 Time); 43967754Smsmith 44091116SmsmithACPI_STATUS 44177424SmsmithAcpiExSystemDoStall ( 44267754Smsmith UINT32 Time); 44367754Smsmith 44467754SmsmithACPI_STATUS 44577424SmsmithAcpiExSystemSignalEvent( 44667754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 44767754Smsmith 44867754SmsmithACPI_STATUS 44977424SmsmithAcpiExSystemWaitEvent( 45067754Smsmith ACPI_OPERAND_OBJECT *Time, 45167754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 45267754Smsmith 45367754SmsmithACPI_STATUS 45477424SmsmithAcpiExSystemResetEvent( 45567754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 45667754Smsmith 45767754SmsmithACPI_STATUS 45877424SmsmithAcpiExSystemWaitSemaphore ( 459167802Sjkim ACPI_SEMAPHORE Semaphore, 460107325Siwasaki UINT16 Timeout); 46167754Smsmith 462167802SjkimACPI_STATUS 463167802SjkimAcpiExSystemWaitMutex ( 464167802Sjkim ACPI_MUTEX Mutex, 465167802Sjkim UINT16 Timeout); 46667754Smsmith 46767754Smsmith/* 468151937Sjkim * exoparg1 - ACPI AML execution, 1 operand 46967754Smsmith */ 47067754SmsmithACPI_STATUS 471138287SmarksAcpiExOpcode_0A_0T_1R ( 472138287Smarks ACPI_WALK_STATE *WalkState); 473138287Smarks 474138287SmarksACPI_STATUS 47585756SmsmithAcpiExOpcode_1A_0T_0R ( 47667754Smsmith ACPI_WALK_STATE *WalkState); 47767754Smsmith 47867754SmsmithACPI_STATUS 47985756SmsmithAcpiExOpcode_1A_0T_1R ( 48084491Smsmith ACPI_WALK_STATE *WalkState); 48167754Smsmith 48267754SmsmithACPI_STATUS 48385756SmsmithAcpiExOpcode_1A_1T_1R ( 48484491Smsmith ACPI_WALK_STATE *WalkState); 48567754Smsmith 48685756SmsmithACPI_STATUS 48785756SmsmithAcpiExOpcode_1A_1T_0R ( 48885756Smsmith ACPI_WALK_STATE *WalkState); 48967754Smsmith 49067754Smsmith/* 491151937Sjkim * exoparg2 - ACPI AML execution, 2 operands 49267754Smsmith */ 49367754SmsmithACPI_STATUS 49485756SmsmithAcpiExOpcode_2A_0T_0R ( 49567754Smsmith ACPI_WALK_STATE *WalkState); 49667754Smsmith 49767754SmsmithACPI_STATUS 49885756SmsmithAcpiExOpcode_2A_0T_1R ( 49984491Smsmith ACPI_WALK_STATE *WalkState); 50067754Smsmith 50167754SmsmithACPI_STATUS 50285756SmsmithAcpiExOpcode_2A_1T_1R ( 50384491Smsmith ACPI_WALK_STATE *WalkState); 50467754Smsmith 50567754SmsmithACPI_STATUS 50685756SmsmithAcpiExOpcode_2A_2T_1R ( 50784491Smsmith ACPI_WALK_STATE *WalkState); 50867754Smsmith 50967754Smsmith 51067754Smsmith/* 511151937Sjkim * exoparg3 - ACPI AML execution, 3 operands 51267754Smsmith */ 513151937SjkimACPI_STATUS 514151937SjkimAcpiExOpcode_3A_0T_0R ( 515151937Sjkim ACPI_WALK_STATE *WalkState); 51667754Smsmith 51767754SmsmithACPI_STATUS 518151937SjkimAcpiExOpcode_3A_1T_1R ( 519151937Sjkim ACPI_WALK_STATE *WalkState); 520151937Sjkim 521151937Sjkim 522151937Sjkim/* 523151937Sjkim * exoparg6 - ACPI AML execution, 6 operands 524151937Sjkim */ 525151937SjkimACPI_STATUS 526151937SjkimAcpiExOpcode_6A_0T_1R ( 527151937Sjkim ACPI_WALK_STATE *WalkState); 528151937Sjkim 529151937Sjkim 530151937Sjkim/* 531151937Sjkim * exresolv - Object resolution and get value functions 532151937Sjkim */ 533151937SjkimACPI_STATUS 53477424SmsmithAcpiExResolveToValue ( 53567754Smsmith ACPI_OPERAND_OBJECT **StackPtr, 53667754Smsmith ACPI_WALK_STATE *WalkState); 53767754Smsmith 53867754SmsmithACPI_STATUS 539151937SjkimAcpiExResolveMultiple ( 540151937Sjkim ACPI_WALK_STATE *WalkState, 541151937Sjkim ACPI_OPERAND_OBJECT *Operand, 542151937Sjkim ACPI_OBJECT_TYPE *ReturnType, 543151937Sjkim ACPI_OPERAND_OBJECT **ReturnDesc); 544151937Sjkim 545151937Sjkim 546151937Sjkim/* 547151937Sjkim * exresnte - resolve namespace node 548151937Sjkim */ 549151937SjkimACPI_STATUS 55077424SmsmithAcpiExResolveNodeToValue ( 55169450Smsmith ACPI_NAMESPACE_NODE **StackPtr, 55269450Smsmith ACPI_WALK_STATE *WalkState); 55367754Smsmith 554151937Sjkim 555151937Sjkim/* 556151937Sjkim * exresop - resolve operand to value 557151937Sjkim */ 55867754SmsmithACPI_STATUS 559151937SjkimAcpiExResolveOperands ( 560151937Sjkim UINT16 Opcode, 56167754Smsmith ACPI_OPERAND_OBJECT **StackPtr, 56267754Smsmith ACPI_WALK_STATE *WalkState); 56367754Smsmith 56467754Smsmith 56567754Smsmith/* 566138287Smarks * exdump - Interpreter debug output routines 56767754Smsmith */ 56867754Smsmithvoid 56977424SmsmithAcpiExDumpOperand ( 570138287Smarks ACPI_OPERAND_OBJECT *ObjDesc, 571138287Smarks UINT32 Depth); 57267754Smsmith 57367754Smsmithvoid 57477424SmsmithAcpiExDumpOperands ( 57567754Smsmith ACPI_OPERAND_OBJECT **Operands, 576193267Sjkim const char *OpcodeName, 577193267Sjkim UINT32 NumOpcodes); 57867754Smsmith 57967754Smsmithvoid 58077424SmsmithAcpiExDumpObjectDescriptor ( 58167754Smsmith ACPI_OPERAND_OBJECT *Object, 58267754Smsmith UINT32 Flags); 58367754Smsmith 58467754Smsmithvoid 585167802SjkimAcpiExDumpNamespaceNode ( 58667754Smsmith ACPI_NAMESPACE_NODE *Node, 58767754Smsmith UINT32 Flags); 58867754Smsmith 58967754Smsmith 59067754Smsmith/* 591151937Sjkim * exnames - AML namestring support 59267754Smsmith */ 59367754SmsmithACPI_STATUS 59477424SmsmithAcpiExGetNameString ( 59591116Smsmith ACPI_OBJECT_TYPE DataType, 59667754Smsmith UINT8 *InAmlAddress, 597114237Snjl char **OutNameString, 59867754Smsmith UINT32 *OutNameLength); 59967754Smsmith 60067754Smsmith 60167754Smsmith/* 60291116Smsmith * exstore - Object store support 60367754Smsmith */ 60467754SmsmithACPI_STATUS 60577424SmsmithAcpiExStore ( 60667754Smsmith ACPI_OPERAND_OBJECT *ValDesc, 60767754Smsmith ACPI_OPERAND_OBJECT *DestDesc, 60867754Smsmith ACPI_WALK_STATE *WalkState); 60967754Smsmith 61067754SmsmithACPI_STATUS 61177424SmsmithAcpiExStoreObjectToNode ( 61271867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 61367754Smsmith ACPI_NAMESPACE_NODE *Node, 614128212Snjl ACPI_WALK_STATE *WalkState, 615128212Snjl UINT8 ImplicitConversion); 61667754Smsmith 617128212Snjl#define ACPI_IMPLICIT_CONVERSION TRUE 618128212Snjl#define ACPI_NO_IMPLICIT_CONVERSION FALSE 61967754Smsmith 620151937Sjkim 62167754Smsmith/* 622151937Sjkim * exstoren - resolve/store object 62371867Smsmith */ 62471867SmsmithACPI_STATUS 62577424SmsmithAcpiExResolveObject ( 62671867Smsmith ACPI_OPERAND_OBJECT **SourceDescPtr, 62791116Smsmith ACPI_OBJECT_TYPE TargetType, 62871867Smsmith ACPI_WALK_STATE *WalkState); 62971867Smsmith 63071867SmsmithACPI_STATUS 63191116SmsmithAcpiExStoreObjectToObject ( 63271867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 63391116Smsmith ACPI_OPERAND_OBJECT *DestDesc, 63491116Smsmith ACPI_OPERAND_OBJECT **NewDesc, 63571867Smsmith ACPI_WALK_STATE *WalkState); 63671867Smsmith 63771867Smsmith 63871867Smsmith/* 639151937Sjkim * exstorob - store object - buffer/string 64071867Smsmith */ 64171867SmsmithACPI_STATUS 64291116SmsmithAcpiExStoreBufferToBuffer ( 64371867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 64471867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 64571867Smsmith 64671867SmsmithACPI_STATUS 64791116SmsmithAcpiExStoreStringToString ( 64871867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 64971867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 65071867Smsmith 651151937Sjkim 652151937Sjkim/* 653151937Sjkim * excopy - object copy 654151937Sjkim */ 65571867SmsmithACPI_STATUS 65677424SmsmithAcpiExCopyIntegerToIndexField ( 65771867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 65871867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 65971867Smsmith 66071867SmsmithACPI_STATUS 66177424SmsmithAcpiExCopyIntegerToBankField ( 66271867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 66371867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 66471867Smsmith 66571867SmsmithACPI_STATUS 66677424SmsmithAcpiExCopyDataToNamedField ( 66771867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 66871867Smsmith ACPI_NAMESPACE_NODE *Node); 66971867Smsmith 67071867SmsmithACPI_STATUS 67177424SmsmithAcpiExCopyIntegerToBufferField ( 67271867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 67371867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 67471867Smsmith 675151937Sjkim 67671867Smsmith/* 67791116Smsmith * exutils - interpreter/scanner utilities 67867754Smsmith */ 679167802Sjkimvoid 68077424SmsmithAcpiExEnterInterpreter ( 68167754Smsmith void); 68267754Smsmith 68367754Smsmithvoid 68477424SmsmithAcpiExExitInterpreter ( 68567754Smsmith void); 68667754Smsmith 68769450Smsmithvoid 688167802SjkimAcpiExReacquireInterpreter ( 689167802Sjkim void); 690167802Sjkim 691167802Sjkimvoid 692167802SjkimAcpiExRelinquishInterpreter ( 693167802Sjkim void); 694167802Sjkim 695167802Sjkimvoid 69677424SmsmithAcpiExTruncateFor32bitTable ( 69799679Siwasaki ACPI_OPERAND_OBJECT *ObjDesc); 69869450Smsmith 699167802Sjkimvoid 70077424SmsmithAcpiExAcquireGlobalLock ( 70167754Smsmith UINT32 Rule); 70267754Smsmith 70399679Siwasakivoid 70477424SmsmithAcpiExReleaseGlobalLock ( 705167802Sjkim UINT32 Rule); 70667754Smsmith 70799679Siwasakivoid 70877424SmsmithAcpiExEisaIdToString ( 709197104Sjkim char *Dest, 710202771Sjkim UINT64 CompressedId); 71167754Smsmith 71299679Siwasakivoid 713197104SjkimAcpiExIntegerToString ( 714197104Sjkim char *Dest, 715202771Sjkim UINT64 Value); 71667754Smsmith 71767754Smsmith 71867754Smsmith/* 71991116Smsmith * exregion - default OpRegion handlers 72067754Smsmith */ 72167754SmsmithACPI_STATUS 72277424SmsmithAcpiExSystemMemorySpaceHandler ( 72367754Smsmith UINT32 Function, 72469450Smsmith ACPI_PHYSICAL_ADDRESS Address, 72567754Smsmith UINT32 BitWidth, 726202771Sjkim UINT64 *Value, 72767754Smsmith void *HandlerContext, 72867754Smsmith void *RegionContext); 72967754Smsmith 73067754SmsmithACPI_STATUS 73177424SmsmithAcpiExSystemIoSpaceHandler ( 73267754Smsmith UINT32 Function, 73369450Smsmith ACPI_PHYSICAL_ADDRESS Address, 73467754Smsmith UINT32 BitWidth, 735202771Sjkim UINT64 *Value, 73667754Smsmith void *HandlerContext, 73767754Smsmith void *RegionContext); 73867754Smsmith 73967754SmsmithACPI_STATUS 74077424SmsmithAcpiExPciConfigSpaceHandler ( 74167754Smsmith UINT32 Function, 74269450Smsmith ACPI_PHYSICAL_ADDRESS Address, 74367754Smsmith UINT32 BitWidth, 744202771Sjkim UINT64 *Value, 74567754Smsmith void *HandlerContext, 74667754Smsmith void *RegionContext); 74767754Smsmith 74867754SmsmithACPI_STATUS 74984491SmsmithAcpiExCmosSpaceHandler ( 75084491Smsmith UINT32 Function, 75184491Smsmith ACPI_PHYSICAL_ADDRESS Address, 75284491Smsmith UINT32 BitWidth, 753202771Sjkim UINT64 *Value, 75484491Smsmith void *HandlerContext, 75584491Smsmith void *RegionContext); 75684491Smsmith 75784491SmsmithACPI_STATUS 75884491SmsmithAcpiExPciBarSpaceHandler ( 75984491Smsmith UINT32 Function, 76084491Smsmith ACPI_PHYSICAL_ADDRESS Address, 76184491Smsmith UINT32 BitWidth, 762202771Sjkim UINT64 *Value, 76384491Smsmith void *HandlerContext, 76484491Smsmith void *RegionContext); 76584491Smsmith 76684491SmsmithACPI_STATUS 76777424SmsmithAcpiExEmbeddedControllerSpaceHandler ( 76867754Smsmith UINT32 Function, 76969450Smsmith ACPI_PHYSICAL_ADDRESS Address, 77067754Smsmith UINT32 BitWidth, 771202771Sjkim UINT64 *Value, 77267754Smsmith void *HandlerContext, 77367754Smsmith void *RegionContext); 77467754Smsmith 77567754SmsmithACPI_STATUS 77677424SmsmithAcpiExSmBusSpaceHandler ( 77767754Smsmith UINT32 Function, 77869450Smsmith ACPI_PHYSICAL_ADDRESS Address, 77967754Smsmith UINT32 BitWidth, 780202771Sjkim UINT64 *Value, 78167754Smsmith void *HandlerContext, 78267754Smsmith void *RegionContext); 78367754Smsmith 78467754Smsmith 78591116SmsmithACPI_STATUS 78691116SmsmithAcpiExDataTableSpaceHandler ( 78791116Smsmith UINT32 Function, 78891116Smsmith ACPI_PHYSICAL_ADDRESS Address, 78991116Smsmith UINT32 BitWidth, 790202771Sjkim UINT64 *Value, 79191116Smsmith void *HandlerContext, 79291116Smsmith void *RegionContext); 79391116Smsmith 79467754Smsmith#endif /* __INTERP_H__ */ 795