1 /****************************************************************************** 2 * 3 * Name: acinterp.h - Interpreter subcomponent prototypes and defines 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. 12 * All rights reserved. 13 * 14 * 2. License 15 * 16 * 2.1. This is your license from Intel Corp. under its intellectual property 17 * rights. You may have additional license terms from the party that provided 18 * you this software, covering your right to use that party's intellectual 19 * property rights. 20 * 21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22 * copy of the source code appearing in this file ("Covered Code") an 23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24 * base code distributed originally by Intel ("Original Intel Code") to copy, 25 * make derivatives, distribute, use and display any portion of the Covered 26 * Code in any form, with the right to sublicense such rights; and 27 * 28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29 * license (with the right to sublicense), under only those claims of Intel 30 * patents that are infringed by the Original Intel Code, to make, use, sell, 31 * offer to sell, and import the Covered Code and derivative works thereof 32 * solely to the minimum extent necessary to exercise the above copyright 33 * license, and in no event shall the patent license extend to any additions 34 * to or modifications of the Original Intel Code. No other license or right 35 * is granted directly or by implication, estoppel or otherwise; 36 * 37 * The above copyright and patent license is granted only if the following 38 * conditions are met: 39 * 40 * 3. Conditions 41 * 42 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43 * Redistribution of source code of any substantial portion of the Covered 44 * Code or modification with rights to further distribute source must include 45 * the above Copyright Notice, the above License, this list of Conditions, 46 * and the following Disclaimer and Export Compliance provision. In addition, 47 * Licensee must cause all Covered Code to which Licensee contributes to 48 * contain a file documenting the changes Licensee made to create that Covered 49 * Code and the date of any change. Licensee must include in that file the 50 * documentation of any changes made by any predecessor Licensee. Licensee 51 * must include a prominent statement that the modification is derived, 52 * directly or indirectly, from Original Intel Code. 53 * 54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55 * Redistribution of source code of any substantial portion of the Covered 56 * Code or modification without rights to further distribute source must 57 * include the following Disclaimer and Export Compliance provision in the 58 * documentation and/or other materials provided with distribution. In 59 * addition, Licensee may not authorize further sublicense of source of any 60 * portion of the Covered Code, and must include terms to the effect that the 61 * license from Licensee to its licensee is limited to the intellectual 62 * property embodied in the software Licensee provides to its licensee, and 63 * not to intellectual property embodied in modifications its licensee may 64 * make. 65 * 66 * 3.3. Redistribution of Executable. Redistribution in executable form of any 67 * substantial portion of the Covered Code or modification must reproduce the 68 * above Copyright Notice, and the following Disclaimer and Export Compliance 69 * provision in the documentation and/or other materials provided with the 70 * distribution. 71 * 72 * 3.4. Intel retains all right, title, and interest in and to the Original 73 * Intel Code. 74 * 75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76 * Intel shall be used in advertising or otherwise to promote the sale, use or 77 * other dealings in products derived from or relating to the Covered Code 78 * without prior written authorization from Intel. 79 * 80 * 4. Disclaimer and Export Compliance 81 * 82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88 * PARTICULAR PURPOSE. 89 * 90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97 * LIMITED REMEDY. 98 * 99 * 4.3. Licensee shall not export, either directly or indirectly, any of this 100 * software or system incorporating such software without first obtaining any 101 * required license or other approval from the U. S. Department of Commerce or 102 * any other agency or department of the United States Government. In the 103 * event Licensee exports any such software from the United States or 104 * re-exports any such software from a foreign destination, Licensee shall 105 * ensure that the distribution and export/re-export of the software is in 106 * compliance with all laws, regulations, orders, or other restrictions of the 107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108 * any of its subsidiaries will export/re-export any technical data, process, 109 * software, or service, directly or indirectly, to any country for which the 110 * United States government or any agency thereof requires an export license, 111 * other governmental approval, or letter of assurance, without first obtaining 112 * such license, approval or letter. 113 * 114 ***************************************************************************** 115 * 116 * Alternatively, you may choose to be licensed under the terms of the 117 * following license: 118 * 119 * Redistribution and use in source and binary forms, with or without 120 * modification, are permitted provided that the following conditions 121 * are met: 122 * 1. Redistributions of source code must retain the above copyright 123 * notice, this list of conditions, and the following disclaimer, 124 * without modification. 125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 126 * substantially similar to the "NO WARRANTY" disclaimer below 127 * ("Disclaimer") and any redistribution must be conditioned upon 128 * including a substantially similar Disclaimer requirement for further 129 * binary redistribution. 130 * 3. Neither the names of the above-listed copyright holders nor the names 131 * of any contributors may be used to endorse or promote products derived 132 * from this software without specific prior written permission. 133 * 134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 145 * 146 * Alternatively, you may choose to be licensed under the terms of the 147 * GNU General Public License ("GPL") version 2 as published by the Free 148 * Software Foundation. 149 * 150 *****************************************************************************/ 151 152 #ifndef __ACINTERP_H__ 153 #define __ACINTERP_H__ 154 155 156 #define ACPI_WALK_OPERANDS (&(WalkState->Operands [WalkState->NumOperands -1])) 157 158 /* Macros for tables used for debug output */ 159 160 #define ACPI_EXD_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_OPERAND_OBJECT,f) 161 #define ACPI_EXD_NSOFFSET(f) (UINT8) ACPI_OFFSET (ACPI_NAMESPACE_NODE,f) 162 #define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (ACPI_EXDUMP_INFO)) 163 164 /* 165 * If possible, pack the following structures to byte alignment, since we 166 * don't care about performance for debug output. Two cases where we cannot 167 * pack the structures: 168 * 169 * 1) Hardware does not support misaligned memory transfers 170 * 2) Compiler does not support pointers within packed structures 171 */ 172 #if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) 173 #pragma pack(1) 174 #endif 175 176 typedef const struct acpi_exdump_info 177 { 178 UINT8 Opcode; 179 UINT8 Offset; 180 const char *Name; 181 182 } ACPI_EXDUMP_INFO; 183 184 /* Values for the Opcode field above */ 185 186 #define ACPI_EXD_INIT 0 187 #define ACPI_EXD_TYPE 1 188 #define ACPI_EXD_UINT8 2 189 #define ACPI_EXD_UINT16 3 190 #define ACPI_EXD_UINT32 4 191 #define ACPI_EXD_UINT64 5 192 #define ACPI_EXD_LITERAL 6 193 #define ACPI_EXD_POINTER 7 194 #define ACPI_EXD_ADDRESS 8 195 #define ACPI_EXD_STRING 9 196 #define ACPI_EXD_BUFFER 10 197 #define ACPI_EXD_PACKAGE 11 198 #define ACPI_EXD_FIELD 12 199 #define ACPI_EXD_REFERENCE 13 200 #define ACPI_EXD_LIST 14 /* Operand object list */ 201 #define ACPI_EXD_HDLR_LIST 15 /* Address Handler list */ 202 #define ACPI_EXD_RGN_LIST 16 /* Region list */ 203 #define ACPI_EXD_NODE 17 /* Namespace Node */ 204 205 /* restore default alignment */ 206 207 #pragma pack() 208 209 210 /* 211 * exconvrt - object conversion 212 */ 213 ACPI_STATUS 214 AcpiExConvertToInteger ( 215 ACPI_OPERAND_OBJECT *ObjDesc, 216 ACPI_OPERAND_OBJECT **ResultDesc, 217 UINT32 ImplicitConversion); 218 219 ACPI_STATUS 220 AcpiExConvertToBuffer ( 221 ACPI_OPERAND_OBJECT *ObjDesc, 222 ACPI_OPERAND_OBJECT **ResultDesc); 223 224 ACPI_STATUS 225 AcpiExConvertToString ( 226 ACPI_OPERAND_OBJECT *ObjDesc, 227 ACPI_OPERAND_OBJECT **ResultDesc, 228 UINT32 Type); 229 230 /* Types for ->String conversion */ 231 232 #define ACPI_EXPLICIT_BYTE_COPY 0x00000000 233 #define ACPI_EXPLICIT_CONVERT_HEX 0x00000001 234 #define ACPI_IMPLICIT_CONVERT_HEX 0x00000002 235 #define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003 236 237 ACPI_STATUS 238 AcpiExConvertToTargetType ( 239 ACPI_OBJECT_TYPE DestinationType, 240 ACPI_OPERAND_OBJECT *SourceDesc, 241 ACPI_OPERAND_OBJECT **ResultDesc, 242 ACPI_WALK_STATE *WalkState); 243 244 245 /* 246 * exdebug - AML debug object 247 */ 248 void 249 AcpiExDoDebugObject ( 250 ACPI_OPERAND_OBJECT *SourceDesc, 251 UINT32 Level, 252 UINT32 Index); 253 254 void 255 AcpiExStartTraceMethod ( 256 ACPI_NAMESPACE_NODE *MethodNode, 257 ACPI_OPERAND_OBJECT *ObjDesc, 258 ACPI_WALK_STATE *WalkState); 259 260 void 261 AcpiExStopTraceMethod ( 262 ACPI_NAMESPACE_NODE *MethodNode, 263 ACPI_OPERAND_OBJECT *ObjDesc, 264 ACPI_WALK_STATE *WalkState); 265 266 void 267 AcpiExStartTraceOpcode ( 268 ACPI_PARSE_OBJECT *Op, 269 ACPI_WALK_STATE *WalkState); 270 271 void 272 AcpiExStopTraceOpcode ( 273 ACPI_PARSE_OBJECT *Op, 274 ACPI_WALK_STATE *WalkState); 275 276 void 277 AcpiExTracePoint ( 278 ACPI_TRACE_EVENT_TYPE Type, 279 BOOLEAN Begin, 280 UINT8 *Aml, 281 char *Pathname); 282 283 284 /* 285 * exfield - ACPI AML (p-code) execution - field manipulation 286 */ 287 ACPI_STATUS 288 AcpiExGetProtocolBufferLength ( 289 UINT32 ProtocolId, 290 UINT32 *ReturnLength); 291 292 ACPI_STATUS 293 AcpiExCommonBufferSetup ( 294 ACPI_OPERAND_OBJECT *ObjDesc, 295 UINT32 BufferLength, 296 UINT32 *DatumCount); 297 298 ACPI_STATUS 299 AcpiExWriteWithUpdateRule ( 300 ACPI_OPERAND_OBJECT *ObjDesc, 301 UINT64 Mask, 302 UINT64 FieldValue, 303 UINT32 FieldDatumByteOffset); 304 305 void 306 AcpiExGetBufferDatum( 307 UINT64 *Datum, 308 void *Buffer, 309 UINT32 BufferLength, 310 UINT32 ByteGranularity, 311 UINT32 BufferOffset); 312 313 void 314 AcpiExSetBufferDatum ( 315 UINT64 MergedDatum, 316 void *Buffer, 317 UINT32 BufferLength, 318 UINT32 ByteGranularity, 319 UINT32 BufferOffset); 320 321 ACPI_STATUS 322 AcpiExReadDataFromField ( 323 ACPI_WALK_STATE *WalkState, 324 ACPI_OPERAND_OBJECT *ObjDesc, 325 ACPI_OPERAND_OBJECT **RetBufferDesc); 326 327 ACPI_STATUS 328 AcpiExWriteDataToField ( 329 ACPI_OPERAND_OBJECT *SourceDesc, 330 ACPI_OPERAND_OBJECT *ObjDesc, 331 ACPI_OPERAND_OBJECT **ResultDesc); 332 333 334 /* 335 * exfldio - low level field I/O 336 */ 337 ACPI_STATUS 338 AcpiExExtractFromField ( 339 ACPI_OPERAND_OBJECT *ObjDesc, 340 void *Buffer, 341 UINT32 BufferLength); 342 343 ACPI_STATUS 344 AcpiExInsertIntoField ( 345 ACPI_OPERAND_OBJECT *ObjDesc, 346 void *Buffer, 347 UINT32 BufferLength); 348 349 ACPI_STATUS 350 AcpiExAccessRegion ( 351 ACPI_OPERAND_OBJECT *ObjDesc, 352 UINT32 FieldDatumByteOffset, 353 UINT64 *Value, 354 UINT32 ReadWrite); 355 356 357 /* 358 * exmisc - misc support routines 359 */ 360 ACPI_STATUS 361 AcpiExGetObjectReference ( 362 ACPI_OPERAND_OBJECT *ObjDesc, 363 ACPI_OPERAND_OBJECT **ReturnDesc, 364 ACPI_WALK_STATE *WalkState); 365 366 ACPI_STATUS 367 AcpiExConcatTemplate ( 368 ACPI_OPERAND_OBJECT *ObjDesc, 369 ACPI_OPERAND_OBJECT *ObjDesc2, 370 ACPI_OPERAND_OBJECT **ActualReturnDesc, 371 ACPI_WALK_STATE *WalkState); 372 373 ACPI_STATUS 374 AcpiExDoConcatenate ( 375 ACPI_OPERAND_OBJECT *ObjDesc, 376 ACPI_OPERAND_OBJECT *ObjDesc2, 377 ACPI_OPERAND_OBJECT **ActualReturnDesc, 378 ACPI_WALK_STATE *WalkState); 379 380 ACPI_STATUS 381 AcpiExDoLogicalNumericOp ( 382 UINT16 Opcode, 383 UINT64 Integer0, 384 UINT64 Integer1, 385 BOOLEAN *LogicalResult); 386 387 ACPI_STATUS 388 AcpiExDoLogicalOp ( 389 UINT16 Opcode, 390 ACPI_OPERAND_OBJECT *Operand0, 391 ACPI_OPERAND_OBJECT *Operand1, 392 BOOLEAN *LogicalResult); 393 394 UINT64 395 AcpiExDoMathOp ( 396 UINT16 Opcode, 397 UINT64 Operand0, 398 UINT64 Operand1); 399 400 ACPI_STATUS 401 AcpiExCreateMutex ( 402 ACPI_WALK_STATE *WalkState); 403 404 ACPI_STATUS 405 AcpiExCreateProcessor ( 406 ACPI_WALK_STATE *WalkState); 407 408 ACPI_STATUS 409 AcpiExCreatePowerResource ( 410 ACPI_WALK_STATE *WalkState); 411 412 ACPI_STATUS 413 AcpiExCreateRegion ( 414 UINT8 *AmlStart, 415 UINT32 AmlLength, 416 UINT8 RegionSpace, 417 ACPI_WALK_STATE *WalkState); 418 419 ACPI_STATUS 420 AcpiExCreateEvent ( 421 ACPI_WALK_STATE *WalkState); 422 423 ACPI_STATUS 424 AcpiExCreateAlias ( 425 ACPI_WALK_STATE *WalkState); 426 427 ACPI_STATUS 428 AcpiExCreateMethod ( 429 UINT8 *AmlStart, 430 UINT32 AmlLength, 431 ACPI_WALK_STATE *WalkState); 432 433 434 /* 435 * exconfig - dynamic table load/unload 436 */ 437 ACPI_STATUS 438 AcpiExLoadOp ( 439 ACPI_OPERAND_OBJECT *ObjDesc, 440 ACPI_OPERAND_OBJECT *Target, 441 ACPI_WALK_STATE *WalkState); 442 443 ACPI_STATUS 444 AcpiExLoadTableOp ( 445 ACPI_WALK_STATE *WalkState, 446 ACPI_OPERAND_OBJECT **ReturnDesc); 447 448 ACPI_STATUS 449 AcpiExUnloadTable ( 450 ACPI_OPERAND_OBJECT *DdbHandle); 451 452 453 /* 454 * exmutex - mutex support 455 */ 456 ACPI_STATUS 457 AcpiExAcquireMutex ( 458 ACPI_OPERAND_OBJECT *TimeDesc, 459 ACPI_OPERAND_OBJECT *ObjDesc, 460 ACPI_WALK_STATE *WalkState); 461 462 ACPI_STATUS 463 AcpiExAcquireMutexObject ( 464 UINT16 Timeout, 465 ACPI_OPERAND_OBJECT *ObjDesc, 466 ACPI_THREAD_ID ThreadId); 467 468 ACPI_STATUS 469 AcpiExReleaseMutex ( 470 ACPI_OPERAND_OBJECT *ObjDesc, 471 ACPI_WALK_STATE *WalkState); 472 473 ACPI_STATUS 474 AcpiExReleaseMutexObject ( 475 ACPI_OPERAND_OBJECT *ObjDesc); 476 477 void 478 AcpiExReleaseAllMutexes ( 479 ACPI_THREAD_STATE *Thread); 480 481 void 482 AcpiExUnlinkMutex ( 483 ACPI_OPERAND_OBJECT *ObjDesc); 484 485 486 /* 487 * exprep - ACPI AML execution - prep utilities 488 */ 489 ACPI_STATUS 490 AcpiExPrepCommonFieldObject ( 491 ACPI_OPERAND_OBJECT *ObjDesc, 492 UINT8 FieldFlags, 493 UINT8 FieldAttribute, 494 UINT32 FieldBitPosition, 495 UINT32 FieldBitLength); 496 497 ACPI_STATUS 498 AcpiExPrepFieldValue ( 499 ACPI_CREATE_FIELD_INFO *Info); 500 501 502 /* 503 * exserial - FieldUnit support for serial address spaces 504 */ 505 ACPI_STATUS 506 AcpiExReadSerialBus ( 507 ACPI_OPERAND_OBJECT *ObjDesc, 508 ACPI_OPERAND_OBJECT **ReturnBuffer); 509 510 ACPI_STATUS 511 AcpiExWriteSerialBus ( 512 ACPI_OPERAND_OBJECT *SourceDesc, 513 ACPI_OPERAND_OBJECT *ObjDesc, 514 ACPI_OPERAND_OBJECT **ReturnBuffer); 515 516 ACPI_STATUS 517 AcpiExReadGpio ( 518 ACPI_OPERAND_OBJECT *ObjDesc, 519 void *Buffer); 520 521 ACPI_STATUS 522 AcpiExWriteGpio ( 523 ACPI_OPERAND_OBJECT *SourceDesc, 524 ACPI_OPERAND_OBJECT *ObjDesc, 525 ACPI_OPERAND_OBJECT **ReturnBuffer); 526 527 528 /* 529 * exsystem - Interface to OS services 530 */ 531 ACPI_STATUS 532 AcpiExSystemDoNotifyOp ( 533 ACPI_OPERAND_OBJECT *Value, 534 ACPI_OPERAND_OBJECT *ObjDesc); 535 536 ACPI_STATUS 537 AcpiExSystemDoSleep( 538 UINT64 Time); 539 540 ACPI_STATUS 541 AcpiExSystemDoStall ( 542 UINT32 Time); 543 544 ACPI_STATUS 545 AcpiExSystemSignalEvent( 546 ACPI_OPERAND_OBJECT *ObjDesc); 547 548 ACPI_STATUS 549 AcpiExSystemWaitEvent( 550 ACPI_OPERAND_OBJECT *Time, 551 ACPI_OPERAND_OBJECT *ObjDesc); 552 553 ACPI_STATUS 554 AcpiExSystemResetEvent( 555 ACPI_OPERAND_OBJECT *ObjDesc); 556 557 ACPI_STATUS 558 AcpiExSystemWaitSemaphore ( 559 ACPI_SEMAPHORE Semaphore, 560 UINT16 Timeout); 561 562 ACPI_STATUS 563 AcpiExSystemWaitMutex ( 564 ACPI_MUTEX Mutex, 565 UINT16 Timeout); 566 567 /* 568 * exoparg1 - ACPI AML execution, 1 operand 569 */ 570 ACPI_STATUS 571 AcpiExOpcode_0A_0T_1R ( 572 ACPI_WALK_STATE *WalkState); 573 574 ACPI_STATUS 575 AcpiExOpcode_1A_0T_0R ( 576 ACPI_WALK_STATE *WalkState); 577 578 ACPI_STATUS 579 AcpiExOpcode_1A_0T_1R ( 580 ACPI_WALK_STATE *WalkState); 581 582 ACPI_STATUS 583 AcpiExOpcode_1A_1T_1R ( 584 ACPI_WALK_STATE *WalkState); 585 586 ACPI_STATUS 587 AcpiExOpcode_1A_1T_0R ( 588 ACPI_WALK_STATE *WalkState); 589 590 /* 591 * exoparg2 - ACPI AML execution, 2 operands 592 */ 593 ACPI_STATUS 594 AcpiExOpcode_2A_0T_0R ( 595 ACPI_WALK_STATE *WalkState); 596 597 ACPI_STATUS 598 AcpiExOpcode_2A_0T_1R ( 599 ACPI_WALK_STATE *WalkState); 600 601 ACPI_STATUS 602 AcpiExOpcode_2A_1T_1R ( 603 ACPI_WALK_STATE *WalkState); 604 605 ACPI_STATUS 606 AcpiExOpcode_2A_2T_1R ( 607 ACPI_WALK_STATE *WalkState); 608 609 610 /* 611 * exoparg3 - ACPI AML execution, 3 operands 612 */ 613 ACPI_STATUS 614 AcpiExOpcode_3A_0T_0R ( 615 ACPI_WALK_STATE *WalkState); 616 617 ACPI_STATUS 618 AcpiExOpcode_3A_1T_1R ( 619 ACPI_WALK_STATE *WalkState); 620 621 622 /* 623 * exoparg6 - ACPI AML execution, 6 operands 624 */ 625 ACPI_STATUS 626 AcpiExOpcode_6A_0T_1R ( 627 ACPI_WALK_STATE *WalkState); 628 629 630 /* 631 * exresolv - Object resolution and get value functions 632 */ 633 ACPI_STATUS 634 AcpiExResolveToValue ( 635 ACPI_OPERAND_OBJECT **StackPtr, 636 ACPI_WALK_STATE *WalkState); 637 638 ACPI_STATUS 639 AcpiExResolveMultiple ( 640 ACPI_WALK_STATE *WalkState, 641 ACPI_OPERAND_OBJECT *Operand, 642 ACPI_OBJECT_TYPE *ReturnType, 643 ACPI_OPERAND_OBJECT **ReturnDesc); 644 645 646 /* 647 * exresnte - resolve namespace node 648 */ 649 ACPI_STATUS 650 AcpiExResolveNodeToValue ( 651 ACPI_NAMESPACE_NODE **StackPtr, 652 ACPI_WALK_STATE *WalkState); 653 654 655 /* 656 * exresop - resolve operand to value 657 */ 658 ACPI_STATUS 659 AcpiExResolveOperands ( 660 UINT16 Opcode, 661 ACPI_OPERAND_OBJECT **StackPtr, 662 ACPI_WALK_STATE *WalkState); 663 664 665 /* 666 * exdump - Interpreter debug output routines 667 */ 668 void 669 AcpiExDumpOperand ( 670 ACPI_OPERAND_OBJECT *ObjDesc, 671 UINT32 Depth); 672 673 void 674 AcpiExDumpOperands ( 675 ACPI_OPERAND_OBJECT **Operands, 676 const char *OpcodeName, 677 UINT32 NumOpcodes); 678 679 void 680 AcpiExDumpObjectDescriptor ( 681 ACPI_OPERAND_OBJECT *Object, 682 UINT32 Flags); 683 684 void 685 AcpiExDumpNamespaceNode ( 686 ACPI_NAMESPACE_NODE *Node, 687 UINT32 Flags); 688 689 690 /* 691 * exnames - AML namestring support 692 */ 693 ACPI_STATUS 694 AcpiExGetNameString ( 695 ACPI_OBJECT_TYPE DataType, 696 UINT8 *InAmlAddress, 697 char **OutNameString, 698 UINT32 *OutNameLength); 699 700 701 /* 702 * exstore - Object store support 703 */ 704 ACPI_STATUS 705 AcpiExStore ( 706 ACPI_OPERAND_OBJECT *ValDesc, 707 ACPI_OPERAND_OBJECT *DestDesc, 708 ACPI_WALK_STATE *WalkState); 709 710 ACPI_STATUS 711 AcpiExStoreObjectToNode ( 712 ACPI_OPERAND_OBJECT *SourceDesc, 713 ACPI_NAMESPACE_NODE *Node, 714 ACPI_WALK_STATE *WalkState, 715 UINT8 ImplicitConversion); 716 717 718 /* 719 * exstoren - resolve/store object 720 */ 721 ACPI_STATUS 722 AcpiExResolveObject ( 723 ACPI_OPERAND_OBJECT **SourceDescPtr, 724 ACPI_OBJECT_TYPE TargetType, 725 ACPI_WALK_STATE *WalkState); 726 727 ACPI_STATUS 728 AcpiExStoreObjectToObject ( 729 ACPI_OPERAND_OBJECT *SourceDesc, 730 ACPI_OPERAND_OBJECT *DestDesc, 731 ACPI_OPERAND_OBJECT **NewDesc, 732 ACPI_WALK_STATE *WalkState); 733 734 735 /* 736 * exstorob - store object - buffer/string 737 */ 738 ACPI_STATUS 739 AcpiExStoreBufferToBuffer ( 740 ACPI_OPERAND_OBJECT *SourceDesc, 741 ACPI_OPERAND_OBJECT *TargetDesc); 742 743 ACPI_STATUS 744 AcpiExStoreStringToString ( 745 ACPI_OPERAND_OBJECT *SourceDesc, 746 ACPI_OPERAND_OBJECT *TargetDesc); 747 748 749 /* 750 * excopy - object copy 751 */ 752 ACPI_STATUS 753 AcpiExCopyIntegerToIndexField ( 754 ACPI_OPERAND_OBJECT *SourceDesc, 755 ACPI_OPERAND_OBJECT *TargetDesc); 756 757 ACPI_STATUS 758 AcpiExCopyIntegerToBankField ( 759 ACPI_OPERAND_OBJECT *SourceDesc, 760 ACPI_OPERAND_OBJECT *TargetDesc); 761 762 ACPI_STATUS 763 AcpiExCopyDataToNamedField ( 764 ACPI_OPERAND_OBJECT *SourceDesc, 765 ACPI_NAMESPACE_NODE *Node); 766 767 ACPI_STATUS 768 AcpiExCopyIntegerToBufferField ( 769 ACPI_OPERAND_OBJECT *SourceDesc, 770 ACPI_OPERAND_OBJECT *TargetDesc); 771 772 773 /* 774 * exutils - interpreter/scanner utilities 775 */ 776 void 777 AcpiExEnterInterpreter ( 778 void); 779 780 void 781 AcpiExExitInterpreter ( 782 void); 783 784 BOOLEAN 785 AcpiExTruncateFor32bitTable ( 786 ACPI_OPERAND_OBJECT *ObjDesc); 787 788 void 789 AcpiExAcquireGlobalLock ( 790 UINT32 Rule); 791 792 void 793 AcpiExReleaseGlobalLock ( 794 UINT32 Rule); 795 796 void 797 AcpiExEisaIdToString ( 798 char *Dest, 799 UINT64 CompressedId); 800 801 void 802 AcpiExIntegerToString ( 803 char *Dest, 804 UINT64 Value); 805 806 void 807 AcpiExPciClsToString ( 808 char *Dest, 809 UINT8 ClassCode[3]); 810 811 BOOLEAN 812 AcpiIsValidSpaceId ( 813 UINT8 SpaceId); 814 815 816 /* 817 * exregion - default OpRegion handlers 818 */ 819 ACPI_STATUS 820 AcpiExSystemMemorySpaceHandler ( 821 UINT32 Function, 822 ACPI_PHYSICAL_ADDRESS Address, 823 UINT32 BitWidth, 824 UINT64 *Value, 825 void *HandlerContext, 826 void *RegionContext); 827 828 ACPI_STATUS 829 AcpiExSystemIoSpaceHandler ( 830 UINT32 Function, 831 ACPI_PHYSICAL_ADDRESS Address, 832 UINT32 BitWidth, 833 UINT64 *Value, 834 void *HandlerContext, 835 void *RegionContext); 836 837 ACPI_STATUS 838 AcpiExPciConfigSpaceHandler ( 839 UINT32 Function, 840 ACPI_PHYSICAL_ADDRESS Address, 841 UINT32 BitWidth, 842 UINT64 *Value, 843 void *HandlerContext, 844 void *RegionContext); 845 846 ACPI_STATUS 847 AcpiExCmosSpaceHandler ( 848 UINT32 Function, 849 ACPI_PHYSICAL_ADDRESS Address, 850 UINT32 BitWidth, 851 UINT64 *Value, 852 void *HandlerContext, 853 void *RegionContext); 854 855 ACPI_STATUS 856 AcpiExPciBarSpaceHandler ( 857 UINT32 Function, 858 ACPI_PHYSICAL_ADDRESS Address, 859 UINT32 BitWidth, 860 UINT64 *Value, 861 void *HandlerContext, 862 void *RegionContext); 863 864 ACPI_STATUS 865 AcpiExEmbeddedControllerSpaceHandler ( 866 UINT32 Function, 867 ACPI_PHYSICAL_ADDRESS Address, 868 UINT32 BitWidth, 869 UINT64 *Value, 870 void *HandlerContext, 871 void *RegionContext); 872 873 ACPI_STATUS 874 AcpiExSmBusSpaceHandler ( 875 UINT32 Function, 876 ACPI_PHYSICAL_ADDRESS Address, 877 UINT32 BitWidth, 878 UINT64 *Value, 879 void *HandlerContext, 880 void *RegionContext); 881 882 883 ACPI_STATUS 884 AcpiExDataTableSpaceHandler ( 885 UINT32 Function, 886 ACPI_PHYSICAL_ADDRESS Address, 887 UINT32 BitWidth, 888 UINT64 *Value, 889 void *HandlerContext, 890 void *RegionContext); 891 892 #endif /* __INTERP_H__ */ 893