167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Name: acinterp.h - Interpreter subcomponent prototypes and defines 467754Smsmith * 567754Smsmith *****************************************************************************/ 667754Smsmith 7217365Sjkim/* 8306536Sjkim * Copyright (C) 2000 - 2016, 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; 72306536Sjkim const 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 146306536Sjkimvoid 147306536SjkimAcpiExStartTraceMethod ( 148306536Sjkim ACPI_NAMESPACE_NODE *MethodNode, 149306536Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 150306536Sjkim ACPI_WALK_STATE *WalkState); 151204773Sjkim 152306536Sjkimvoid 153306536SjkimAcpiExStopTraceMethod ( 154306536Sjkim ACPI_NAMESPACE_NODE *MethodNode, 155306536Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 156306536Sjkim ACPI_WALK_STATE *WalkState); 157306536Sjkim 158306536Sjkimvoid 159306536SjkimAcpiExStartTraceOpcode ( 160306536Sjkim ACPI_PARSE_OBJECT *Op, 161306536Sjkim ACPI_WALK_STATE *WalkState); 162306536Sjkim 163306536Sjkimvoid 164306536SjkimAcpiExStopTraceOpcode ( 165306536Sjkim ACPI_PARSE_OBJECT *Op, 166306536Sjkim ACPI_WALK_STATE *WalkState); 167306536Sjkim 168306536Sjkimvoid 169306536SjkimAcpiExTracePoint ( 170306536Sjkim ACPI_TRACE_EVENT_TYPE Type, 171306536Sjkim BOOLEAN Begin, 172306536Sjkim UINT8 *Aml, 173306536Sjkim char *Pathname); 174306536Sjkim 175306536Sjkim 176204773Sjkim/* 17791116Smsmith * exfield - ACPI AML (p-code) execution - field manipulation 17871867Smsmith */ 17971867SmsmithACPI_STATUS 180131440SmarksAcpiExCommonBufferSetup ( 181131440Smarks ACPI_OPERAND_OBJECT *ObjDesc, 182131440Smarks UINT32 BufferLength, 183131440Smarks UINT32 *DatumCount); 184131440Smarks 185131440SmarksACPI_STATUS 18687031SmsmithAcpiExWriteWithUpdateRule ( 18777424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 188202771Sjkim UINT64 Mask, 189202771Sjkim UINT64 FieldValue, 19087031Smsmith UINT32 FieldDatumByteOffset); 19177424Smsmith 19287031Smsmithvoid 19387031SmsmithAcpiExGetBufferDatum( 194202771Sjkim UINT64 *Datum, 19577424Smsmith void *Buffer, 196117521Snjl UINT32 BufferLength, 19787031Smsmith UINT32 ByteGranularity, 198117521Snjl UINT32 BufferOffset); 19977424Smsmith 20087031Smsmithvoid 20187031SmsmithAcpiExSetBufferDatum ( 202202771Sjkim UINT64 MergedDatum, 20377424Smsmith void *Buffer, 204117521Snjl UINT32 BufferLength, 20587031Smsmith UINT32 ByteGranularity, 206117521Snjl UINT32 BufferOffset); 20777424Smsmith 20877424SmsmithACPI_STATUS 20977424SmsmithAcpiExReadDataFromField ( 21099146Siwasaki ACPI_WALK_STATE *WalkState, 21177424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 21277424Smsmith ACPI_OPERAND_OBJECT **RetBufferDesc); 21377424Smsmith 21477424SmsmithACPI_STATUS 21577424SmsmithAcpiExWriteDataToField ( 21677424Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 217107325Siwasaki ACPI_OPERAND_OBJECT *ObjDesc, 218107325Siwasaki ACPI_OPERAND_OBJECT **ResultDesc); 21977424Smsmith 220151937Sjkim 22167754Smsmith/* 222151937Sjkim * exfldio - low level field I/O 22367754Smsmith */ 22467754SmsmithACPI_STATUS 225151937SjkimAcpiExExtractFromField ( 226151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 227151937Sjkim void *Buffer, 228151937Sjkim UINT32 BufferLength); 22980062Smsmith 23080062SmsmithACPI_STATUS 231151937SjkimAcpiExInsertIntoField ( 232151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 233151937Sjkim void *Buffer, 234151937Sjkim UINT32 BufferLength); 23580062Smsmith 23680062SmsmithACPI_STATUS 237151937SjkimAcpiExAccessRegion ( 238151937Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 239151937Sjkim UINT32 FieldDatumByteOffset, 240202771Sjkim UINT64 *Value, 241151937Sjkim UINT32 ReadWrite); 24267754Smsmith 24399679Siwasaki 244151937Sjkim/* 245151937Sjkim * exmisc - misc support routines 246151937Sjkim */ 24767754SmsmithACPI_STATUS 24885756SmsmithAcpiExGetObjectReference ( 24985756Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 25085756Smsmith ACPI_OPERAND_OBJECT **ReturnDesc, 25167754Smsmith ACPI_WALK_STATE *WalkState); 25267754Smsmith 25367754SmsmithACPI_STATUS 25491116SmsmithAcpiExConcatTemplate ( 25591116Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 25691116Smsmith ACPI_OPERAND_OBJECT *ObjDesc2, 25791116Smsmith ACPI_OPERAND_OBJECT **ActualReturnDesc, 25891116Smsmith ACPI_WALK_STATE *WalkState); 25991116Smsmith 26091116SmsmithACPI_STATUS 26185756SmsmithAcpiExDoConcatenate ( 26285756Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 26385756Smsmith ACPI_OPERAND_OBJECT *ObjDesc2, 26485756Smsmith ACPI_OPERAND_OBJECT **ActualReturnDesc, 26585756Smsmith ACPI_WALK_STATE *WalkState); 26685756Smsmith 267138287SmarksACPI_STATUS 268138287SmarksAcpiExDoLogicalNumericOp ( 269138287Smarks UINT16 Opcode, 270202771Sjkim UINT64 Integer0, 271202771Sjkim UINT64 Integer1, 272138287Smarks BOOLEAN *LogicalResult); 273138287Smarks 274138287SmarksACPI_STATUS 27585756SmsmithAcpiExDoLogicalOp ( 27685756Smsmith UINT16 Opcode, 277138287Smarks ACPI_OPERAND_OBJECT *Operand0, 278138287Smarks ACPI_OPERAND_OBJECT *Operand1, 279138287Smarks BOOLEAN *LogicalResult); 28085756Smsmith 281202771SjkimUINT64 28285756SmsmithAcpiExDoMathOp ( 28385756Smsmith UINT16 Opcode, 284202771Sjkim UINT64 Operand0, 285202771Sjkim UINT64 Operand1); 28685756Smsmith 28785756SmsmithACPI_STATUS 28877424SmsmithAcpiExCreateMutex ( 28967754Smsmith ACPI_WALK_STATE *WalkState); 29067754Smsmith 29167754SmsmithACPI_STATUS 29277424SmsmithAcpiExCreateProcessor ( 29385756Smsmith ACPI_WALK_STATE *WalkState); 29467754Smsmith 29567754SmsmithACPI_STATUS 29677424SmsmithAcpiExCreatePowerResource ( 29785756Smsmith ACPI_WALK_STATE *WalkState); 29867754Smsmith 29967754SmsmithACPI_STATUS 30077424SmsmithAcpiExCreateRegion ( 30184491Smsmith UINT8 *AmlStart, 30277424Smsmith UINT32 AmlLength, 30369746Smsmith UINT8 RegionSpace, 30467754Smsmith ACPI_WALK_STATE *WalkState); 30567754Smsmith 30667754SmsmithACPI_STATUS 30777424SmsmithAcpiExCreateEvent ( 30867754Smsmith ACPI_WALK_STATE *WalkState); 30967754Smsmith 31067754SmsmithACPI_STATUS 31177424SmsmithAcpiExCreateAlias ( 31267754Smsmith ACPI_WALK_STATE *WalkState); 31367754Smsmith 31467754SmsmithACPI_STATUS 31577424SmsmithAcpiExCreateMethod ( 31684491Smsmith UINT8 *AmlStart, 31777424Smsmith UINT32 AmlLength, 31885756Smsmith ACPI_WALK_STATE *WalkState); 31967754Smsmith 32067754Smsmith 32167754Smsmith/* 32291116Smsmith * exconfig - dynamic table load/unload 32377424Smsmith */ 32477424SmsmithACPI_STATUS 32591116SmsmithAcpiExLoadOp ( 32691116Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 32791116Smsmith ACPI_OPERAND_OBJECT *Target, 32891116Smsmith ACPI_WALK_STATE *WalkState); 32991116Smsmith 33091116SmsmithACPI_STATUS 33191116SmsmithAcpiExLoadTableOp ( 33291116Smsmith ACPI_WALK_STATE *WalkState, 33391116Smsmith ACPI_OPERAND_OBJECT **ReturnDesc); 33491116Smsmith 33591116SmsmithACPI_STATUS 33691116SmsmithAcpiExUnloadTable ( 33791116Smsmith ACPI_OPERAND_OBJECT *DdbHandle); 33891116Smsmith 33991116Smsmith 34091116Smsmith/* 34191116Smsmith * exmutex - mutex support 34291116Smsmith */ 34391116SmsmithACPI_STATUS 34477424SmsmithAcpiExAcquireMutex ( 34577424Smsmith ACPI_OPERAND_OBJECT *TimeDesc, 34677424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 34777424Smsmith ACPI_WALK_STATE *WalkState); 34877424Smsmith 34977424SmsmithACPI_STATUS 350167802SjkimAcpiExAcquireMutexObject ( 351167802Sjkim UINT16 Timeout, 352167802Sjkim ACPI_OPERAND_OBJECT *ObjDesc, 353167802Sjkim ACPI_THREAD_ID ThreadId); 354167802Sjkim 355167802SjkimACPI_STATUS 35677424SmsmithAcpiExReleaseMutex ( 35777424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 35877424Smsmith ACPI_WALK_STATE *WalkState); 35977424Smsmith 360167802SjkimACPI_STATUS 361167802SjkimAcpiExReleaseMutexObject ( 362167802Sjkim ACPI_OPERAND_OBJECT *ObjDesc); 363167802Sjkim 36499679Siwasakivoid 36577424SmsmithAcpiExReleaseAllMutexes ( 36687031Smsmith ACPI_THREAD_STATE *Thread); 36777424Smsmith 36877424Smsmithvoid 36977424SmsmithAcpiExUnlinkMutex ( 37077424Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 37177424Smsmith 37277424Smsmith 37377424Smsmith/* 374151937Sjkim * exprep - ACPI AML execution - prep utilities 37567754Smsmith */ 37667754SmsmithACPI_STATUS 37777424SmsmithAcpiExPrepCommonFieldObject ( 37877424Smsmith ACPI_OPERAND_OBJECT *ObjDesc, 37977424Smsmith UINT8 FieldFlags, 38087031Smsmith UINT8 FieldAttribute, 38187031Smsmith UINT32 FieldBitPosition, 38287031Smsmith UINT32 FieldBitLength); 38377424Smsmith 38477424SmsmithACPI_STATUS 38585756SmsmithAcpiExPrepFieldValue ( 38685756Smsmith ACPI_CREATE_FIELD_INFO *Info); 38767754Smsmith 388151937Sjkim 38967754Smsmith/* 39091116Smsmith * exsystem - Interface to OS services 39167754Smsmith */ 39267754SmsmithACPI_STATUS 39377424SmsmithAcpiExSystemDoNotifyOp ( 39467754Smsmith ACPI_OPERAND_OBJECT *Value, 39567754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 39667754Smsmith 39791116SmsmithACPI_STATUS 398207344SjkimAcpiExSystemDoSleep( 399202771Sjkim UINT64 Time); 40067754Smsmith 40191116SmsmithACPI_STATUS 40277424SmsmithAcpiExSystemDoStall ( 40367754Smsmith UINT32 Time); 40467754Smsmith 40567754SmsmithACPI_STATUS 40677424SmsmithAcpiExSystemSignalEvent( 40767754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 40867754Smsmith 40967754SmsmithACPI_STATUS 41077424SmsmithAcpiExSystemWaitEvent( 41167754Smsmith ACPI_OPERAND_OBJECT *Time, 41267754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 41367754Smsmith 41467754SmsmithACPI_STATUS 41577424SmsmithAcpiExSystemResetEvent( 41667754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 41767754Smsmith 41867754SmsmithACPI_STATUS 41977424SmsmithAcpiExSystemWaitSemaphore ( 420167802Sjkim ACPI_SEMAPHORE Semaphore, 421107325Siwasaki UINT16 Timeout); 42267754Smsmith 423167802SjkimACPI_STATUS 424167802SjkimAcpiExSystemWaitMutex ( 425167802Sjkim ACPI_MUTEX Mutex, 426167802Sjkim UINT16 Timeout); 42767754Smsmith 42867754Smsmith/* 429151937Sjkim * exoparg1 - ACPI AML execution, 1 operand 43067754Smsmith */ 43167754SmsmithACPI_STATUS 432138287SmarksAcpiExOpcode_0A_0T_1R ( 433138287Smarks ACPI_WALK_STATE *WalkState); 434138287Smarks 435138287SmarksACPI_STATUS 43685756SmsmithAcpiExOpcode_1A_0T_0R ( 43767754Smsmith ACPI_WALK_STATE *WalkState); 43867754Smsmith 43967754SmsmithACPI_STATUS 44085756SmsmithAcpiExOpcode_1A_0T_1R ( 44184491Smsmith ACPI_WALK_STATE *WalkState); 44267754Smsmith 44367754SmsmithACPI_STATUS 44485756SmsmithAcpiExOpcode_1A_1T_1R ( 44584491Smsmith ACPI_WALK_STATE *WalkState); 44667754Smsmith 44785756SmsmithACPI_STATUS 44885756SmsmithAcpiExOpcode_1A_1T_0R ( 44985756Smsmith ACPI_WALK_STATE *WalkState); 45067754Smsmith 45167754Smsmith/* 452151937Sjkim * exoparg2 - ACPI AML execution, 2 operands 45367754Smsmith */ 45467754SmsmithACPI_STATUS 45585756SmsmithAcpiExOpcode_2A_0T_0R ( 45667754Smsmith ACPI_WALK_STATE *WalkState); 45767754Smsmith 45867754SmsmithACPI_STATUS 45985756SmsmithAcpiExOpcode_2A_0T_1R ( 46084491Smsmith ACPI_WALK_STATE *WalkState); 46167754Smsmith 46267754SmsmithACPI_STATUS 46385756SmsmithAcpiExOpcode_2A_1T_1R ( 46484491Smsmith ACPI_WALK_STATE *WalkState); 46567754Smsmith 46667754SmsmithACPI_STATUS 46785756SmsmithAcpiExOpcode_2A_2T_1R ( 46884491Smsmith ACPI_WALK_STATE *WalkState); 46967754Smsmith 47067754Smsmith 47167754Smsmith/* 472151937Sjkim * exoparg3 - ACPI AML execution, 3 operands 47367754Smsmith */ 474151937SjkimACPI_STATUS 475151937SjkimAcpiExOpcode_3A_0T_0R ( 476151937Sjkim ACPI_WALK_STATE *WalkState); 47767754Smsmith 47867754SmsmithACPI_STATUS 479151937SjkimAcpiExOpcode_3A_1T_1R ( 480151937Sjkim ACPI_WALK_STATE *WalkState); 481151937Sjkim 482151937Sjkim 483151937Sjkim/* 484151937Sjkim * exoparg6 - ACPI AML execution, 6 operands 485151937Sjkim */ 486151937SjkimACPI_STATUS 487151937SjkimAcpiExOpcode_6A_0T_1R ( 488151937Sjkim ACPI_WALK_STATE *WalkState); 489151937Sjkim 490151937Sjkim 491151937Sjkim/* 492151937Sjkim * exresolv - Object resolution and get value functions 493151937Sjkim */ 494151937SjkimACPI_STATUS 49577424SmsmithAcpiExResolveToValue ( 49667754Smsmith ACPI_OPERAND_OBJECT **StackPtr, 49767754Smsmith ACPI_WALK_STATE *WalkState); 49867754Smsmith 49967754SmsmithACPI_STATUS 500151937SjkimAcpiExResolveMultiple ( 501151937Sjkim ACPI_WALK_STATE *WalkState, 502151937Sjkim ACPI_OPERAND_OBJECT *Operand, 503151937Sjkim ACPI_OBJECT_TYPE *ReturnType, 504151937Sjkim ACPI_OPERAND_OBJECT **ReturnDesc); 505151937Sjkim 506151937Sjkim 507151937Sjkim/* 508151937Sjkim * exresnte - resolve namespace node 509151937Sjkim */ 510151937SjkimACPI_STATUS 51177424SmsmithAcpiExResolveNodeToValue ( 51269450Smsmith ACPI_NAMESPACE_NODE **StackPtr, 51369450Smsmith ACPI_WALK_STATE *WalkState); 51467754Smsmith 515151937Sjkim 516151937Sjkim/* 517151937Sjkim * exresop - resolve operand to value 518151937Sjkim */ 51967754SmsmithACPI_STATUS 520151937SjkimAcpiExResolveOperands ( 521151937Sjkim UINT16 Opcode, 52267754Smsmith ACPI_OPERAND_OBJECT **StackPtr, 52367754Smsmith ACPI_WALK_STATE *WalkState); 52467754Smsmith 52567754Smsmith 52667754Smsmith/* 527138287Smarks * exdump - Interpreter debug output routines 52867754Smsmith */ 52967754Smsmithvoid 53077424SmsmithAcpiExDumpOperand ( 531138287Smarks ACPI_OPERAND_OBJECT *ObjDesc, 532138287Smarks UINT32 Depth); 53367754Smsmith 53467754Smsmithvoid 53577424SmsmithAcpiExDumpOperands ( 53667754Smsmith ACPI_OPERAND_OBJECT **Operands, 537193267Sjkim const char *OpcodeName, 538193267Sjkim UINT32 NumOpcodes); 53967754Smsmith 54067754Smsmithvoid 54177424SmsmithAcpiExDumpObjectDescriptor ( 54267754Smsmith ACPI_OPERAND_OBJECT *Object, 54367754Smsmith UINT32 Flags); 54467754Smsmith 54567754Smsmithvoid 546167802SjkimAcpiExDumpNamespaceNode ( 54767754Smsmith ACPI_NAMESPACE_NODE *Node, 54867754Smsmith UINT32 Flags); 54967754Smsmith 55067754Smsmith 55167754Smsmith/* 552151937Sjkim * exnames - AML namestring support 55367754Smsmith */ 55467754SmsmithACPI_STATUS 55577424SmsmithAcpiExGetNameString ( 55691116Smsmith ACPI_OBJECT_TYPE DataType, 55767754Smsmith UINT8 *InAmlAddress, 558114237Snjl char **OutNameString, 55967754Smsmith UINT32 *OutNameLength); 56067754Smsmith 56167754Smsmith 56267754Smsmith/* 56391116Smsmith * exstore - Object store support 56467754Smsmith */ 56567754SmsmithACPI_STATUS 56677424SmsmithAcpiExStore ( 56767754Smsmith ACPI_OPERAND_OBJECT *ValDesc, 56867754Smsmith ACPI_OPERAND_OBJECT *DestDesc, 56967754Smsmith ACPI_WALK_STATE *WalkState); 57067754Smsmith 57167754SmsmithACPI_STATUS 57277424SmsmithAcpiExStoreObjectToNode ( 57371867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 57467754Smsmith ACPI_NAMESPACE_NODE *Node, 575128212Snjl ACPI_WALK_STATE *WalkState, 576128212Snjl UINT8 ImplicitConversion); 57767754Smsmith 578128212Snjl#define ACPI_IMPLICIT_CONVERSION TRUE 579128212Snjl#define ACPI_NO_IMPLICIT_CONVERSION FALSE 58067754Smsmith 581151937Sjkim 58267754Smsmith/* 583151937Sjkim * exstoren - resolve/store object 58471867Smsmith */ 58571867SmsmithACPI_STATUS 58677424SmsmithAcpiExResolveObject ( 58771867Smsmith ACPI_OPERAND_OBJECT **SourceDescPtr, 58891116Smsmith ACPI_OBJECT_TYPE TargetType, 58971867Smsmith ACPI_WALK_STATE *WalkState); 59071867Smsmith 59171867SmsmithACPI_STATUS 59291116SmsmithAcpiExStoreObjectToObject ( 59371867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 59491116Smsmith ACPI_OPERAND_OBJECT *DestDesc, 59591116Smsmith ACPI_OPERAND_OBJECT **NewDesc, 59671867Smsmith ACPI_WALK_STATE *WalkState); 59771867Smsmith 59871867Smsmith 59971867Smsmith/* 600151937Sjkim * exstorob - store object - buffer/string 60171867Smsmith */ 60271867SmsmithACPI_STATUS 60391116SmsmithAcpiExStoreBufferToBuffer ( 60471867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 60571867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 60671867Smsmith 60771867SmsmithACPI_STATUS 60891116SmsmithAcpiExStoreStringToString ( 60971867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 61071867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 61171867Smsmith 612151937Sjkim 613151937Sjkim/* 614151937Sjkim * excopy - object copy 615151937Sjkim */ 61671867SmsmithACPI_STATUS 61777424SmsmithAcpiExCopyIntegerToIndexField ( 61871867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 61971867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 62071867Smsmith 62171867SmsmithACPI_STATUS 62277424SmsmithAcpiExCopyIntegerToBankField ( 62371867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 62471867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 62571867Smsmith 62671867SmsmithACPI_STATUS 62777424SmsmithAcpiExCopyDataToNamedField ( 62871867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 62971867Smsmith ACPI_NAMESPACE_NODE *Node); 63071867Smsmith 63171867SmsmithACPI_STATUS 63277424SmsmithAcpiExCopyIntegerToBufferField ( 63371867Smsmith ACPI_OPERAND_OBJECT *SourceDesc, 63471867Smsmith ACPI_OPERAND_OBJECT *TargetDesc); 63571867Smsmith 636151937Sjkim 63771867Smsmith/* 63891116Smsmith * exutils - interpreter/scanner utilities 63967754Smsmith */ 640167802Sjkimvoid 64177424SmsmithAcpiExEnterInterpreter ( 64267754Smsmith void); 64367754Smsmith 64467754Smsmithvoid 64577424SmsmithAcpiExExitInterpreter ( 64667754Smsmith void); 64767754Smsmith 648245582SjkimBOOLEAN 64977424SmsmithAcpiExTruncateFor32bitTable ( 65099679Siwasaki ACPI_OPERAND_OBJECT *ObjDesc); 65169450Smsmith 652167802Sjkimvoid 65377424SmsmithAcpiExAcquireGlobalLock ( 65467754Smsmith UINT32 Rule); 65567754Smsmith 65699679Siwasakivoid 65777424SmsmithAcpiExReleaseGlobalLock ( 658167802Sjkim UINT32 Rule); 65967754Smsmith 66099679Siwasakivoid 66177424SmsmithAcpiExEisaIdToString ( 662197104Sjkim char *Dest, 663202771Sjkim UINT64 CompressedId); 66467754Smsmith 66599679Siwasakivoid 666197104SjkimAcpiExIntegerToString ( 667197104Sjkim char *Dest, 668202771Sjkim UINT64 Value); 66967754Smsmith 670306536Sjkimvoid 671306536SjkimAcpiExPciClsToString ( 672306536Sjkim char *Dest, 673306536Sjkim UINT8 ClassCode[3]); 674306536Sjkim 675228110SjkimBOOLEAN 676228110SjkimAcpiIsValidSpaceId ( 677228110Sjkim UINT8 SpaceId); 67867754Smsmith 679228110Sjkim 68067754Smsmith/* 68191116Smsmith * exregion - default OpRegion handlers 68267754Smsmith */ 68367754SmsmithACPI_STATUS 68477424SmsmithAcpiExSystemMemorySpaceHandler ( 68567754Smsmith UINT32 Function, 68669450Smsmith ACPI_PHYSICAL_ADDRESS Address, 68767754Smsmith UINT32 BitWidth, 688202771Sjkim UINT64 *Value, 68967754Smsmith void *HandlerContext, 69067754Smsmith void *RegionContext); 69167754Smsmith 69267754SmsmithACPI_STATUS 69377424SmsmithAcpiExSystemIoSpaceHandler ( 69467754Smsmith UINT32 Function, 69569450Smsmith ACPI_PHYSICAL_ADDRESS Address, 69667754Smsmith UINT32 BitWidth, 697202771Sjkim UINT64 *Value, 69867754Smsmith void *HandlerContext, 69967754Smsmith void *RegionContext); 70067754Smsmith 70167754SmsmithACPI_STATUS 70277424SmsmithAcpiExPciConfigSpaceHandler ( 70367754Smsmith UINT32 Function, 70469450Smsmith ACPI_PHYSICAL_ADDRESS Address, 70567754Smsmith UINT32 BitWidth, 706202771Sjkim UINT64 *Value, 70767754Smsmith void *HandlerContext, 70867754Smsmith void *RegionContext); 70967754Smsmith 71067754SmsmithACPI_STATUS 71184491SmsmithAcpiExCmosSpaceHandler ( 71284491Smsmith UINT32 Function, 71384491Smsmith ACPI_PHYSICAL_ADDRESS Address, 71484491Smsmith UINT32 BitWidth, 715202771Sjkim UINT64 *Value, 71684491Smsmith void *HandlerContext, 71784491Smsmith void *RegionContext); 71884491Smsmith 71984491SmsmithACPI_STATUS 72084491SmsmithAcpiExPciBarSpaceHandler ( 72184491Smsmith UINT32 Function, 72284491Smsmith ACPI_PHYSICAL_ADDRESS Address, 72384491Smsmith UINT32 BitWidth, 724202771Sjkim UINT64 *Value, 72584491Smsmith void *HandlerContext, 72684491Smsmith void *RegionContext); 72784491Smsmith 72884491SmsmithACPI_STATUS 72977424SmsmithAcpiExEmbeddedControllerSpaceHandler ( 73067754Smsmith UINT32 Function, 73169450Smsmith ACPI_PHYSICAL_ADDRESS Address, 73267754Smsmith UINT32 BitWidth, 733202771Sjkim UINT64 *Value, 73467754Smsmith void *HandlerContext, 73567754Smsmith void *RegionContext); 73667754Smsmith 73767754SmsmithACPI_STATUS 73877424SmsmithAcpiExSmBusSpaceHandler ( 73967754Smsmith UINT32 Function, 74069450Smsmith ACPI_PHYSICAL_ADDRESS Address, 74167754Smsmith UINT32 BitWidth, 742202771Sjkim UINT64 *Value, 74367754Smsmith void *HandlerContext, 74467754Smsmith void *RegionContext); 74567754Smsmith 74667754Smsmith 74791116SmsmithACPI_STATUS 74891116SmsmithAcpiExDataTableSpaceHandler ( 74991116Smsmith UINT32 Function, 75091116Smsmith ACPI_PHYSICAL_ADDRESS Address, 75191116Smsmith UINT32 BitWidth, 752202771Sjkim UINT64 *Value, 75391116Smsmith void *HandlerContext, 75491116Smsmith void *RegionContext); 75591116Smsmith 75667754Smsmith#endif /* __INTERP_H__ */ 757