167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Name: acinterp.h - Interpreter subcomponent prototypes and defines 467754Smsmith * 567754Smsmith *****************************************************************************/ 667754Smsmith 7217365Sjkim/* 8281075Sdim * Copyright (C) 2000 - 2015, Intel Corp. 970243Smsmith * All rights reserved. 1067754Smsmith * 11217365Sjkim * Redistribution and use in source and binary forms, with or without 12217365Sjkim * modification, are permitted provided that the following conditions 13217365Sjkim * are met: 14217365Sjkim * 1. Redistributions of source code must retain the above copyright 15217365Sjkim * notice, this list of conditions, and the following disclaimer, 16217365Sjkim * without modification. 17217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18217365Sjkim * substantially similar to the "NO WARRANTY" disclaimer below 19217365Sjkim * ("Disclaimer") and any redistribution must be conditioned upon 20217365Sjkim * including a substantially similar Disclaimer requirement for further 21217365Sjkim * binary redistribution. 22217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names 23217365Sjkim * of any contributors may be used to endorse or promote products derived 24217365Sjkim * from this software without specific prior written permission. 2567754Smsmith * 26217365Sjkim * Alternatively, this software may be distributed under the terms of the 27217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free 28217365Sjkim * Software Foundation. 2967754Smsmith * 30217365Sjkim * NO WARRANTY 31217365Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32217365Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33217365Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34217365Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35217365Sjkim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36217365Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37217365Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38217365Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39217365Sjkim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40217365Sjkim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41217365Sjkim * POSSIBILITY OF SUCH DAMAGES. 42217365Sjkim */ 4367754Smsmith 4467754Smsmith#ifndef __ACINTERP_H__ 4567754Smsmith#define __ACINTERP_H__ 4667754Smsmith 4767754Smsmith 48167802Sjkim#define ACPI_WALK_OPERANDS (&(WalkState->Operands [WalkState->NumOperands -1])) 4967754Smsmith 50167802Sjkim/* Macros for tables used for debug output */ 5167754Smsmith 52167802Sjkim#define ACPI_EXD_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_OPERAND_OBJECT,f) 53167802Sjkim#define ACPI_EXD_NSOFFSET(f) (UINT8) ACPI_OFFSET (ACPI_NAMESPACE_NODE,f) 54167802Sjkim#define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (ACPI_EXDUMP_INFO)) 55167802Sjkim 5667754Smsmith/* 57167802Sjkim * If possible, pack the following structures to byte alignment, since we 58167802Sjkim * don't care about performance for debug output. Two cases where we cannot 59167802Sjkim * pack the structures: 60167802Sjkim * 61167802Sjkim * 1) Hardware does not support misaligned memory transfers 62167802Sjkim * 2) Compiler does not support pointers within packed structures 63167802Sjkim */ 64167802Sjkim#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) 65167802Sjkim#pragma pack(1) 66167802Sjkim#endif 67167802Sjkim 68167802Sjkimtypedef const struct acpi_exdump_info 69167802Sjkim{ 70167802Sjkim UINT8 Opcode; 71167802Sjkim UINT8 Offset; 72167802Sjkim char *Name; 73167802Sjkim 74167802Sjkim} ACPI_EXDUMP_INFO; 75167802Sjkim 76167802Sjkim/* Values for the Opcode field above */ 77167802Sjkim 78167802Sjkim#define ACPI_EXD_INIT 0 79167802Sjkim#define ACPI_EXD_TYPE 1 80167802Sjkim#define ACPI_EXD_UINT8 2 81167802Sjkim#define ACPI_EXD_UINT16 3 82167802Sjkim#define ACPI_EXD_UINT32 4 83167802Sjkim#define ACPI_EXD_UINT64 5 84167802Sjkim#define ACPI_EXD_LITERAL 6 85167802Sjkim#define ACPI_EXD_POINTER 7 86167802Sjkim#define ACPI_EXD_ADDRESS 8 87167802Sjkim#define ACPI_EXD_STRING 9 88167802Sjkim#define ACPI_EXD_BUFFER 10 89167802Sjkim#define ACPI_EXD_PACKAGE 11 90167802Sjkim#define ACPI_EXD_FIELD 12 91167802Sjkim#define ACPI_EXD_REFERENCE 13 92281075Sdim#define ACPI_EXD_LIST 14 /* Operand object list */ 93281075Sdim#define ACPI_EXD_HDLR_LIST 15 /* Address Handler list */ 94281075Sdim#define ACPI_EXD_RGN_LIST 16 /* Region list */ 95281075Sdim#define ACPI_EXD_NODE 17 /* Namespace Node */ 96167802Sjkim 97167802Sjkim/* restore default alignment */ 98167802Sjkim 99167802Sjkim#pragma pack() 100167802Sjkim 101167802Sjkim 102167802Sjkim/* 10391116Smsmith * exconvrt - object conversion 10467754Smsmith */ 10571867SmsmithACPI_STATUS 10677424SmsmithAcpiExConvertToInteger ( 10780062Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 10880062Smsmith ACPI_OPERAND_OBJECT **ResultDesc, 109138287Smarks UINT32 Flags); 11067754Smsmith 11167754SmsmithACPI_STATUS 11277424SmsmithAcpiExConvertToBuffer ( 11380062Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 114138287Smarks ACPI_OPERAND_OBJECT **ResultDesc); 11571867Smsmith 11671867SmsmithACPI_STATUS 11777424SmsmithAcpiExConvertToString ( 11880062Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 11980062Smsmith ACPI_OPERAND_OBJECT **ResultDesc, 120138287Smarks UINT32 Type); 12171867Smsmith 122138287Smarks/* Types for ->String conversion */ 123138287Smarks 124138287Smarks#define ACPI_EXPLICIT_BYTE_COPY 0x00000000 125138287Smarks#define ACPI_EXPLICIT_CONVERT_HEX 0x00000001 126138287Smarks#define ACPI_IMPLICIT_CONVERT_HEX 0x00000002 127138287Smarks#define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003 128138287Smarks 12971867SmsmithACPI_STATUS 13077424SmsmithAcpiExConvertToTargetType ( 13191116Smsmith ACPI_OBJECT_TYPE DestinationType, 13291116Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 13391116Smsmith ACPI_OPERAND_OBJECT **ResultDesc, 13471867Smsmith ACPI_WALK_STATE *WalkState); 13571867Smsmith 13671867Smsmith 13771867Smsmith/* 138204773Sjkim * exdebug - AML debug object 139204773Sjkim */ 140204773Sjkimvoid 141204773SjkimAcpiExDoDebugObject ( 142204773Sjkim ACPI_OPERAND_OBJECT *SourceDesc, 143204773Sjkim UINT32 Level, 144204773Sjkim UINT32 Index); 145204773Sjkim 146204773Sjkim 147204773Sjkim/* 14891116Smsmith * exfield - ACPI AML (p-code) execution - field manipulation 14971867Smsmith */ 15071867SmsmithACPI_STATUS 151131440SmarksAcpiExCommonBufferSetup ( 152131440Smarks ACPI_OPERAND_OBJECT *ObjDesc, 153131440Smarks UINT32 BufferLength, 154131440Smarks UINT32 *DatumCount); 155131440Smarks 156131440SmarksACPI_STATUS 15787031SmsmithAcpiExWriteWithUpdateRule ( 15877424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 159202771Sjkim UINT64 Mask, 160202771Sjkim UINT64 FieldValue, 16187031Smsmith UINT32 FieldDatumByteOffset); 16277424Smsmith 16387031Smsmithvoid 16487031SmsmithAcpiExGetBufferDatum( 165202771Sjkim UINT64 *Datum, 16677424Smsmith void *Buffer, 167117521Snjl UINT32 BufferLength, 16887031Smsmith UINT32 ByteGranularity, 169117521Snjl UINT32 BufferOffset); 17077424Smsmith 17187031Smsmithvoid 17287031SmsmithAcpiExSetBufferDatum ( 173202771Sjkim UINT64 MergedDatum, 17477424Smsmith void *Buffer, 175117521Snjl UINT32 BufferLength, 17687031Smsmith UINT32 ByteGranularity, 177117521Snjl UINT32 BufferOffset); 17877424Smsmith 17977424SmsmithACPI_STATUS 18077424SmsmithAcpiExReadDataFromField ( 18199146Siwasaki ACPI_WALK_STATE *WalkState, 18277424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 18377424Smsmith ACPI_OPERAND_OBJECT **RetBufferDesc); 18477424Smsmith 18577424SmsmithACPI_STATUS 18677424SmsmithAcpiExWriteDataToField ( 18777424Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 188107325Siwasaki ACPI_OPERAND_OBJECT *ObjDesc, 189107325Siwasaki ACPI_OPERAND_OBJECT **ResultDesc); 19077424Smsmith 191151937Sjkim 19267754Smsmith/* 193151937Sjkim * exfldio - low level field I/O 19467754Smsmith */ 19567754SmsmithACPI_STATUS 196151937SjkimAcpiExExtractFromField ( 197151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 198151937Sjkim void *Buffer, 199151937Sjkim UINT32 BufferLength); 20080062Smsmith 20180062SmsmithACPI_STATUS 202151937SjkimAcpiExInsertIntoField ( 203151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 204151937Sjkim void *Buffer, 205151937Sjkim UINT32 BufferLength); 20680062Smsmith 20780062SmsmithACPI_STATUS 208151937SjkimAcpiExAccessRegion ( 209151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 210151937Sjkim UINT32 FieldDatumByteOffset, 211202771Sjkim UINT64 *Value, 212151937Sjkim UINT32 ReadWrite); 21367754Smsmith 21499679Siwasaki 215151937Sjkim/* 216151937Sjkim * exmisc - misc support routines 217151937Sjkim */ 21867754SmsmithACPI_STATUS 21985756SmsmithAcpiExGetObjectReference ( 22085756Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 22185756Smsmith ACPI_OPERAND_OBJECT **ReturnDesc, 22267754Smsmith ACPI_WALK_STATE *WalkState); 22367754Smsmith 22467754SmsmithACPI_STATUS 22591116SmsmithAcpiExConcatTemplate ( 22691116Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 22791116Smsmith ACPI_OPERAND_OBJECT *ObjDesc2, 22891116Smsmith ACPI_OPERAND_OBJECT **ActualReturnDesc, 22991116Smsmith ACPI_WALK_STATE *WalkState); 23091116Smsmith 23191116SmsmithACPI_STATUS 23285756SmsmithAcpiExDoConcatenate ( 23385756Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 23485756Smsmith ACPI_OPERAND_OBJECT *ObjDesc2, 23585756Smsmith ACPI_OPERAND_OBJECT **ActualReturnDesc, 23685756Smsmith ACPI_WALK_STATE *WalkState); 23785756Smsmith 238138287SmarksACPI_STATUS 239138287SmarksAcpiExDoLogicalNumericOp ( 240138287Smarks UINT16 Opcode, 241202771Sjkim UINT64 Integer0, 242202771Sjkim UINT64 Integer1, 243138287Smarks BOOLEAN *LogicalResult); 244138287Smarks 245138287SmarksACPI_STATUS 24685756SmsmithAcpiExDoLogicalOp ( 24785756Smsmith UINT16 Opcode, 248138287Smarks ACPI_OPERAND_OBJECT *Operand0, 249138287Smarks ACPI_OPERAND_OBJECT *Operand1, 250138287Smarks BOOLEAN *LogicalResult); 25185756Smsmith 252202771SjkimUINT64 25385756SmsmithAcpiExDoMathOp ( 25485756Smsmith UINT16 Opcode, 255202771Sjkim UINT64 Operand0, 256202771Sjkim UINT64 Operand1); 25785756Smsmith 25885756SmsmithACPI_STATUS 25977424SmsmithAcpiExCreateMutex ( 26067754Smsmith ACPI_WALK_STATE *WalkState); 26167754Smsmith 26267754SmsmithACPI_STATUS 26377424SmsmithAcpiExCreateProcessor ( 26485756Smsmith ACPI_WALK_STATE *WalkState); 26567754Smsmith 26667754SmsmithACPI_STATUS 26777424SmsmithAcpiExCreatePowerResource ( 26885756Smsmith ACPI_WALK_STATE *WalkState); 26967754Smsmith 27067754SmsmithACPI_STATUS 27177424SmsmithAcpiExCreateRegion ( 27284491Smsmith UINT8 *AmlStart, 27377424Smsmith UINT32 AmlLength, 27469746Smsmith UINT8 RegionSpace, 27567754Smsmith ACPI_WALK_STATE *WalkState); 27667754Smsmith 27767754SmsmithACPI_STATUS 27877424SmsmithAcpiExCreateEvent ( 27967754Smsmith ACPI_WALK_STATE *WalkState); 28067754Smsmith 28167754SmsmithACPI_STATUS 28277424SmsmithAcpiExCreateAlias ( 28367754Smsmith ACPI_WALK_STATE *WalkState); 28467754Smsmith 28567754SmsmithACPI_STATUS 28677424SmsmithAcpiExCreateMethod ( 28784491Smsmith UINT8 *AmlStart, 28877424Smsmith UINT32 AmlLength, 28985756Smsmith ACPI_WALK_STATE *WalkState); 29067754Smsmith 29167754Smsmith 29267754Smsmith/* 29391116Smsmith * exconfig - dynamic table load/unload 29477424Smsmith */ 29577424SmsmithACPI_STATUS 29691116SmsmithAcpiExLoadOp ( 29791116Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 29891116Smsmith ACPI_OPERAND_OBJECT *Target, 29991116Smsmith ACPI_WALK_STATE *WalkState); 30091116Smsmith 30191116SmsmithACPI_STATUS 30291116SmsmithAcpiExLoadTableOp ( 30391116Smsmith ACPI_WALK_STATE *WalkState, 30491116Smsmith ACPI_OPERAND_OBJECT **ReturnDesc); 30591116Smsmith 30691116SmsmithACPI_STATUS 30791116SmsmithAcpiExUnloadTable ( 30891116Smsmith ACPI_OPERAND_OBJECT *DdbHandle); 30991116Smsmith 31091116Smsmith 31191116Smsmith/* 31291116Smsmith * exmutex - mutex support 31391116Smsmith */ 31491116SmsmithACPI_STATUS 31577424SmsmithAcpiExAcquireMutex ( 31677424Smsmith ACPI_OPERAND_OBJECT *TimeDesc, 31777424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 31877424Smsmith ACPI_WALK_STATE *WalkState); 31977424Smsmith 32077424SmsmithACPI_STATUS 321167802SjkimAcpiExAcquireMutexObject ( 322167802Sjkim UINT16 Timeout, 323167802Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 324167802Sjkim ACPI_THREAD_ID ThreadId); 325167802Sjkim 326167802SjkimACPI_STATUS 32777424SmsmithAcpiExReleaseMutex ( 32877424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 32977424Smsmith ACPI_WALK_STATE *WalkState); 33077424Smsmith 331167802SjkimACPI_STATUS 332167802SjkimAcpiExReleaseMutexObject ( 333167802Sjkim ACPI_OPERAND_OBJECT *ObjDesc); 334167802Sjkim 33599679Siwasakivoid 33677424SmsmithAcpiExReleaseAllMutexes ( 33787031Smsmith ACPI_THREAD_STATE *Thread); 33877424Smsmith 33977424Smsmithvoid 34077424SmsmithAcpiExUnlinkMutex ( 34177424Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 34277424Smsmith 34377424Smsmith 34477424Smsmith/* 345151937Sjkim * exprep - ACPI AML execution - prep utilities 34667754Smsmith */ 34767754SmsmithACPI_STATUS 34877424SmsmithAcpiExPrepCommonFieldObject ( 34977424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 35077424Smsmith UINT8 FieldFlags, 35187031Smsmith UINT8 FieldAttribute, 35287031Smsmith UINT32 FieldBitPosition, 35387031Smsmith UINT32 FieldBitLength); 35477424Smsmith 35577424SmsmithACPI_STATUS 35685756SmsmithAcpiExPrepFieldValue ( 35785756Smsmith ACPI_CREATE_FIELD_INFO *Info); 35867754Smsmith 359151937Sjkim 36067754Smsmith/* 36191116Smsmith * exsystem - Interface to OS services 36267754Smsmith */ 36367754SmsmithACPI_STATUS 36477424SmsmithAcpiExSystemDoNotifyOp ( 36567754Smsmith ACPI_OPERAND_OBJECT *Value, 36667754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 36767754Smsmith 36891116SmsmithACPI_STATUS 369207344SjkimAcpiExSystemDoSleep( 370202771Sjkim UINT64 Time); 37167754Smsmith 37291116SmsmithACPI_STATUS 37377424SmsmithAcpiExSystemDoStall ( 37467754Smsmith UINT32 Time); 37567754Smsmith 37667754SmsmithACPI_STATUS 37777424SmsmithAcpiExSystemSignalEvent( 37867754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 37967754Smsmith 38067754SmsmithACPI_STATUS 38177424SmsmithAcpiExSystemWaitEvent( 38267754Smsmith ACPI_OPERAND_OBJECT *Time, 38367754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 38467754Smsmith 38567754SmsmithACPI_STATUS 38677424SmsmithAcpiExSystemResetEvent( 38767754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 38867754Smsmith 38967754SmsmithACPI_STATUS 39077424SmsmithAcpiExSystemWaitSemaphore ( 391167802Sjkim ACPI_SEMAPHORE Semaphore, 392107325Siwasaki UINT16 Timeout); 39367754Smsmith 394167802SjkimACPI_STATUS 395167802SjkimAcpiExSystemWaitMutex ( 396167802Sjkim ACPI_MUTEX Mutex, 397167802Sjkim UINT16 Timeout); 39867754Smsmith 39967754Smsmith/* 400151937Sjkim * exoparg1 - ACPI AML execution, 1 operand 40167754Smsmith */ 40267754SmsmithACPI_STATUS 403138287SmarksAcpiExOpcode_0A_0T_1R ( 404138287Smarks ACPI_WALK_STATE *WalkState); 405138287Smarks 406138287SmarksACPI_STATUS 40785756SmsmithAcpiExOpcode_1A_0T_0R ( 40867754Smsmith ACPI_WALK_STATE *WalkState); 40967754Smsmith 41067754SmsmithACPI_STATUS 41185756SmsmithAcpiExOpcode_1A_0T_1R ( 41284491Smsmith ACPI_WALK_STATE *WalkState); 41367754Smsmith 41467754SmsmithACPI_STATUS 41585756SmsmithAcpiExOpcode_1A_1T_1R ( 41684491Smsmith ACPI_WALK_STATE *WalkState); 41767754Smsmith 41885756SmsmithACPI_STATUS 41985756SmsmithAcpiExOpcode_1A_1T_0R ( 42085756Smsmith ACPI_WALK_STATE *WalkState); 42167754Smsmith 42267754Smsmith/* 423151937Sjkim * exoparg2 - ACPI AML execution, 2 operands 42467754Smsmith */ 42567754SmsmithACPI_STATUS 42685756SmsmithAcpiExOpcode_2A_0T_0R ( 42767754Smsmith ACPI_WALK_STATE *WalkState); 42867754Smsmith 42967754SmsmithACPI_STATUS 43085756SmsmithAcpiExOpcode_2A_0T_1R ( 43184491Smsmith ACPI_WALK_STATE *WalkState); 43267754Smsmith 43367754SmsmithACPI_STATUS 43485756SmsmithAcpiExOpcode_2A_1T_1R ( 43584491Smsmith ACPI_WALK_STATE *WalkState); 43667754Smsmith 43767754SmsmithACPI_STATUS 43885756SmsmithAcpiExOpcode_2A_2T_1R ( 43984491Smsmith ACPI_WALK_STATE *WalkState); 44067754Smsmith 44167754Smsmith 44267754Smsmith/* 443151937Sjkim * exoparg3 - ACPI AML execution, 3 operands 44467754Smsmith */ 445151937SjkimACPI_STATUS 446151937SjkimAcpiExOpcode_3A_0T_0R ( 447151937Sjkim ACPI_WALK_STATE *WalkState); 44867754Smsmith 44967754SmsmithACPI_STATUS 450151937SjkimAcpiExOpcode_3A_1T_1R ( 451151937Sjkim ACPI_WALK_STATE *WalkState); 452151937Sjkim 453151937Sjkim 454151937Sjkim/* 455151937Sjkim * exoparg6 - ACPI AML execution, 6 operands 456151937Sjkim */ 457151937SjkimACPI_STATUS 458151937SjkimAcpiExOpcode_6A_0T_1R ( 459151937Sjkim ACPI_WALK_STATE *WalkState); 460151937Sjkim 461151937Sjkim 462151937Sjkim/* 463151937Sjkim * exresolv - Object resolution and get value functions 464151937Sjkim */ 465151937SjkimACPI_STATUS 46677424SmsmithAcpiExResolveToValue ( 46767754Smsmith ACPI_OPERAND_OBJECT **StackPtr, 46867754Smsmith ACPI_WALK_STATE *WalkState); 46967754Smsmith 47067754SmsmithACPI_STATUS 471151937SjkimAcpiExResolveMultiple ( 472151937Sjkim ACPI_WALK_STATE *WalkState, 473151937Sjkim ACPI_OPERAND_OBJECT *Operand, 474151937Sjkim ACPI_OBJECT_TYPE *ReturnType, 475151937Sjkim ACPI_OPERAND_OBJECT **ReturnDesc); 476151937Sjkim 477151937Sjkim 478151937Sjkim/* 479151937Sjkim * exresnte - resolve namespace node 480151937Sjkim */ 481151937SjkimACPI_STATUS 48277424SmsmithAcpiExResolveNodeToValue ( 48369450Smsmith ACPI_NAMESPACE_NODE **StackPtr, 48469450Smsmith ACPI_WALK_STATE *WalkState); 48567754Smsmith 486151937Sjkim 487151937Sjkim/* 488151937Sjkim * exresop - resolve operand to value 489151937Sjkim */ 49067754SmsmithACPI_STATUS 491151937SjkimAcpiExResolveOperands ( 492151937Sjkim UINT16 Opcode, 49367754Smsmith ACPI_OPERAND_OBJECT **StackPtr, 49467754Smsmith ACPI_WALK_STATE *WalkState); 49567754Smsmith 49667754Smsmith 49767754Smsmith/* 498138287Smarks * exdump - Interpreter debug output routines 49967754Smsmith */ 50067754Smsmithvoid 50177424SmsmithAcpiExDumpOperand ( 502138287Smarks ACPI_OPERAND_OBJECT *ObjDesc, 503138287Smarks UINT32 Depth); 50467754Smsmith 50567754Smsmithvoid 50677424SmsmithAcpiExDumpOperands ( 50767754Smsmith ACPI_OPERAND_OBJECT **Operands, 508193267Sjkim const char *OpcodeName, 509193267Sjkim UINT32 NumOpcodes); 51067754Smsmith 51167754Smsmithvoid 51277424SmsmithAcpiExDumpObjectDescriptor ( 51367754Smsmith ACPI_OPERAND_OBJECT *Object, 51467754Smsmith UINT32 Flags); 51567754Smsmith 51667754Smsmithvoid 517167802SjkimAcpiExDumpNamespaceNode ( 51867754Smsmith ACPI_NAMESPACE_NODE *Node, 51967754Smsmith UINT32 Flags); 52067754Smsmith 52167754Smsmith 52267754Smsmith/* 523151937Sjkim * exnames - AML namestring support 52467754Smsmith */ 52567754SmsmithACPI_STATUS 52677424SmsmithAcpiExGetNameString ( 52791116Smsmith ACPI_OBJECT_TYPE DataType, 52867754Smsmith UINT8 *InAmlAddress, 529114237Snjl char **OutNameString, 53067754Smsmith UINT32 *OutNameLength); 53167754Smsmith 53267754Smsmith 53367754Smsmith/* 53491116Smsmith * exstore - Object store support 53567754Smsmith */ 53667754SmsmithACPI_STATUS 53777424SmsmithAcpiExStore ( 53867754Smsmith ACPI_OPERAND_OBJECT *ValDesc, 53967754Smsmith ACPI_OPERAND_OBJECT *DestDesc, 54067754Smsmith ACPI_WALK_STATE *WalkState); 54167754Smsmith 54267754SmsmithACPI_STATUS 54377424SmsmithAcpiExStoreObjectToNode ( 54471867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 54567754Smsmith ACPI_NAMESPACE_NODE *Node, 546128212Snjl ACPI_WALK_STATE *WalkState, 547128212Snjl UINT8 ImplicitConversion); 54867754Smsmith 549128212Snjl#define ACPI_IMPLICIT_CONVERSION TRUE 550128212Snjl#define ACPI_NO_IMPLICIT_CONVERSION FALSE 55167754Smsmith 552151937Sjkim 55367754Smsmith/* 554151937Sjkim * exstoren - resolve/store object 55571867Smsmith */ 55671867SmsmithACPI_STATUS 55777424SmsmithAcpiExResolveObject ( 55871867Smsmith ACPI_OPERAND_OBJECT **SourceDescPtr, 55991116Smsmith ACPI_OBJECT_TYPE TargetType, 56071867Smsmith ACPI_WALK_STATE *WalkState); 56171867Smsmith 56271867SmsmithACPI_STATUS 56391116SmsmithAcpiExStoreObjectToObject ( 56471867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 56591116Smsmith ACPI_OPERAND_OBJECT *DestDesc, 56691116Smsmith ACPI_OPERAND_OBJECT **NewDesc, 56771867Smsmith ACPI_WALK_STATE *WalkState); 56871867Smsmith 56971867Smsmith 57071867Smsmith/* 571151937Sjkim * exstorob - store object - buffer/string 57271867Smsmith */ 57371867SmsmithACPI_STATUS 57491116SmsmithAcpiExStoreBufferToBuffer ( 57571867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 57671867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 57771867Smsmith 57871867SmsmithACPI_STATUS 57991116SmsmithAcpiExStoreStringToString ( 58071867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 58171867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 58271867Smsmith 583151937Sjkim 584151937Sjkim/* 585151937Sjkim * excopy - object copy 586151937Sjkim */ 58771867SmsmithACPI_STATUS 58877424SmsmithAcpiExCopyIntegerToIndexField ( 58971867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 59071867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 59171867Smsmith 59271867SmsmithACPI_STATUS 59377424SmsmithAcpiExCopyIntegerToBankField ( 59471867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 59571867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 59671867Smsmith 59771867SmsmithACPI_STATUS 59877424SmsmithAcpiExCopyDataToNamedField ( 59971867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 60071867Smsmith ACPI_NAMESPACE_NODE *Node); 60171867Smsmith 60271867SmsmithACPI_STATUS 60377424SmsmithAcpiExCopyIntegerToBufferField ( 60471867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 60571867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 60671867Smsmith 607151937Sjkim 60871867Smsmith/* 60991116Smsmith * exutils - interpreter/scanner utilities 61067754Smsmith */ 611167802Sjkimvoid 61277424SmsmithAcpiExEnterInterpreter ( 61367754Smsmith void); 61467754Smsmith 61567754Smsmithvoid 61677424SmsmithAcpiExExitInterpreter ( 61767754Smsmith void); 61867754Smsmith 619245582SjkimBOOLEAN 62077424SmsmithAcpiExTruncateFor32bitTable ( 62199679Siwasaki ACPI_OPERAND_OBJECT *ObjDesc); 62269450Smsmith 623167802Sjkimvoid 62477424SmsmithAcpiExAcquireGlobalLock ( 62567754Smsmith UINT32 Rule); 62667754Smsmith 62799679Siwasakivoid 62877424SmsmithAcpiExReleaseGlobalLock ( 629167802Sjkim UINT32 Rule); 63067754Smsmith 63199679Siwasakivoid 63277424SmsmithAcpiExEisaIdToString ( 633197104Sjkim char *Dest, 634202771Sjkim UINT64 CompressedId); 63567754Smsmith 63699679Siwasakivoid 637197104SjkimAcpiExIntegerToString ( 638197104Sjkim char *Dest, 639202771Sjkim UINT64 Value); 64067754Smsmith 641228110SjkimBOOLEAN 642228110SjkimAcpiIsValidSpaceId ( 643228110Sjkim UINT8 SpaceId); 64467754Smsmith 645228110Sjkim 64667754Smsmith/* 64791116Smsmith * exregion - default OpRegion handlers 64867754Smsmith */ 64967754SmsmithACPI_STATUS 65077424SmsmithAcpiExSystemMemorySpaceHandler ( 65167754Smsmith UINT32 Function, 65269450Smsmith ACPI_PHYSICAL_ADDRESS Address, 65367754Smsmith UINT32 BitWidth, 654202771Sjkim UINT64 *Value, 65567754Smsmith void *HandlerContext, 65667754Smsmith void *RegionContext); 65767754Smsmith 65867754SmsmithACPI_STATUS 65977424SmsmithAcpiExSystemIoSpaceHandler ( 66067754Smsmith UINT32 Function, 66169450Smsmith ACPI_PHYSICAL_ADDRESS Address, 66267754Smsmith UINT32 BitWidth, 663202771Sjkim UINT64 *Value, 66467754Smsmith void *HandlerContext, 66567754Smsmith void *RegionContext); 66667754Smsmith 66767754SmsmithACPI_STATUS 66877424SmsmithAcpiExPciConfigSpaceHandler ( 66967754Smsmith UINT32 Function, 67069450Smsmith ACPI_PHYSICAL_ADDRESS Address, 67167754Smsmith UINT32 BitWidth, 672202771Sjkim UINT64 *Value, 67367754Smsmith void *HandlerContext, 67467754Smsmith void *RegionContext); 67567754Smsmith 67667754SmsmithACPI_STATUS 67784491SmsmithAcpiExCmosSpaceHandler ( 67884491Smsmith UINT32 Function, 67984491Smsmith ACPI_PHYSICAL_ADDRESS Address, 68084491Smsmith UINT32 BitWidth, 681202771Sjkim UINT64 *Value, 68284491Smsmith void *HandlerContext, 68384491Smsmith void *RegionContext); 68484491Smsmith 68584491SmsmithACPI_STATUS 68684491SmsmithAcpiExPciBarSpaceHandler ( 68784491Smsmith UINT32 Function, 68884491Smsmith ACPI_PHYSICAL_ADDRESS Address, 68984491Smsmith UINT32 BitWidth, 690202771Sjkim UINT64 *Value, 69184491Smsmith void *HandlerContext, 69284491Smsmith void *RegionContext); 69384491Smsmith 69484491SmsmithACPI_STATUS 69577424SmsmithAcpiExEmbeddedControllerSpaceHandler ( 69667754Smsmith UINT32 Function, 69769450Smsmith ACPI_PHYSICAL_ADDRESS Address, 69867754Smsmith UINT32 BitWidth, 699202771Sjkim UINT64 *Value, 70067754Smsmith void *HandlerContext, 70167754Smsmith void *RegionContext); 70267754Smsmith 70367754SmsmithACPI_STATUS 70477424SmsmithAcpiExSmBusSpaceHandler ( 70567754Smsmith UINT32 Function, 70669450Smsmith ACPI_PHYSICAL_ADDRESS Address, 70767754Smsmith UINT32 BitWidth, 708202771Sjkim UINT64 *Value, 70967754Smsmith void *HandlerContext, 71067754Smsmith void *RegionContext); 71167754Smsmith 71267754Smsmith 71391116SmsmithACPI_STATUS 71491116SmsmithAcpiExDataTableSpaceHandler ( 71591116Smsmith UINT32 Function, 71691116Smsmith ACPI_PHYSICAL_ADDRESS Address, 71791116Smsmith UINT32 BitWidth, 718202771Sjkim UINT64 *Value, 71991116Smsmith void *HandlerContext, 72091116Smsmith void *RegionContext); 72191116Smsmith 72267754Smsmith#endif /* __INTERP_H__ */ 723