1 /****************************************************************************** 2 * 3 * Name: acpixf.h - External interfaces to the ACPI subsystem 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2014, 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 #ifndef __ACXFACE_H__ 117 #define __ACXFACE_H__ 118 119 /* Current ACPICA subsystem version in YYYYMMDD format */ 120 121 #define ACPI_CA_VERSION 0x20140724 122 123 #include "acconfig.h" 124 #include "actypes.h" 125 #include "actbl.h" 126 #include "acbuffer.h" 127 128 129 /***************************************************************************** 130 * 131 * Macros used for ACPICA globals and configuration 132 * 133 ****************************************************************************/ 134 135 /* 136 * Ensure that global variables are defined and initialized only once. 137 * 138 * The use of these macros allows for a single list of globals (here) 139 * in order to simplify maintenance of the code. 140 */ 141 #ifdef DEFINE_ACPI_GLOBALS 142 #define ACPI_GLOBAL(type,name) \ 143 extern type name; \ 144 type name 145 146 #define ACPI_INIT_GLOBAL(type,name,value) \ 147 type name=value 148 149 #else 150 #ifndef ACPI_GLOBAL 151 #define ACPI_GLOBAL(type,name) \ 152 extern type name 153 #endif 154 155 #ifndef ACPI_INIT_GLOBAL 156 #define ACPI_INIT_GLOBAL(type,name,value) \ 157 extern type name 158 #endif 159 #endif 160 161 /* 162 * These macros configure the various ACPICA interfaces. They are 163 * useful for generating stub inline functions for features that are 164 * configured out of the current kernel or ACPICA application. 165 */ 166 #ifndef ACPI_EXTERNAL_RETURN_STATUS 167 #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \ 168 Prototype; 169 #endif 170 171 #ifndef ACPI_EXTERNAL_RETURN_OK 172 #define ACPI_EXTERNAL_RETURN_OK(Prototype) \ 173 Prototype; 174 #endif 175 176 #ifndef ACPI_EXTERNAL_RETURN_VOID 177 #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \ 178 Prototype; 179 #endif 180 181 #ifndef ACPI_EXTERNAL_RETURN_UINT32 182 #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \ 183 Prototype; 184 #endif 185 186 #ifndef ACPI_EXTERNAL_RETURN_PTR 187 #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \ 188 Prototype; 189 #endif 190 191 192 /***************************************************************************** 193 * 194 * Public globals and runtime configuration options 195 * 196 ****************************************************************************/ 197 198 /* 199 * Enable "slack mode" of the AML interpreter? Default is FALSE, and the 200 * interpreter strictly follows the ACPI specification. Setting to TRUE 201 * allows the interpreter to ignore certain errors and/or bad AML constructs. 202 * 203 * Currently, these features are enabled by this flag: 204 * 205 * 1) Allow "implicit return" of last value in a control method 206 * 2) Allow access beyond the end of an operation region 207 * 3) Allow access to uninitialized locals/args (auto-init to integer 0) 208 * 4) Allow ANY object type to be a source operand for the Store() operator 209 * 5) Allow unresolved references (invalid target name) in package objects 210 * 6) Enable warning messages for behavior that is not ACPI spec compliant 211 */ 212 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE); 213 214 /* 215 * Automatically serialize all methods that create named objects? Default 216 * is TRUE, meaning that all NonSerialized methods are scanned once at 217 * table load time to determine those that create named objects. Methods 218 * that create named objects are marked Serialized in order to prevent 219 * possible run-time problems if they are entered by more than one thread. 220 */ 221 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE); 222 223 /* 224 * Create the predefined _OSI method in the namespace? Default is TRUE 225 * because ACPICA is fully compatible with other ACPI implementations. 226 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior. 227 */ 228 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE); 229 230 /* 231 * Optionally use default values for the ACPI register widths. Set this to 232 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. 233 */ 234 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE); 235 236 /* 237 * Whether or not to verify the table checksum before installation. Set 238 * this to TRUE to verify the table checksum before install it to the table 239 * manager. Note that enabling this option causes errors to happen in some 240 * OSPMs during early initialization stages. Default behavior is to do such 241 * verification. 242 */ 243 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_VerifyTableChecksum, TRUE); 244 245 /* 246 * Optionally enable output from the AML Debug Object. 247 */ 248 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE); 249 250 /* 251 * Optionally copy the entire DSDT to local memory (instead of simply 252 * mapping it.) There are some BIOSs that corrupt or replace the original 253 * DSDT, creating the need for this option. Default is FALSE, do not copy 254 * the DSDT. 255 */ 256 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE); 257 258 /* 259 * Optionally ignore an XSDT if present and use the RSDT instead. 260 * Although the ACPI specification requires that an XSDT be used instead 261 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on 262 * some machines. Default behavior is to use the XSDT if present. 263 */ 264 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE); 265 266 /* 267 * Optionally use 32-bit FADT addresses if and when there is a conflict 268 * (address mismatch) between the 32-bit and 64-bit versions of the 269 * address. Although ACPICA adheres to the ACPI specification which 270 * requires the use of the corresponding 64-bit address if it is non-zero, 271 * some machines have been found to have a corrupted non-zero 64-bit 272 * address. Default is FALSE, do not favor the 32-bit addresses. 273 */ 274 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE); 275 276 /* 277 * Optionally truncate I/O addresses to 16 bits. Provides compatibility 278 * with other ACPI implementations. NOTE: During ACPICA initialization, 279 * this value is set to TRUE if any Windows OSI strings have been 280 * requested by the BIOS. 281 */ 282 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE); 283 284 /* 285 * Disable runtime checking and repair of values returned by control methods. 286 * Use only if the repair is causing a problem on a particular machine. 287 */ 288 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE); 289 290 /* 291 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. 292 * This can be useful for debugging ACPI problems on some machines. 293 */ 294 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE); 295 296 /* 297 * We keep track of the latest version of Windows that has been requested by 298 * the BIOS. ACPI 5.0. 299 */ 300 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0); 301 302 /* 303 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning 304 * that the ACPI hardware is no longer required. A flag in the FADT indicates 305 * a reduced HW machine, and that flag is duplicated here for convenience. 306 */ 307 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE); 308 309 /* 310 * This mechanism is used to trace a specified AML method. The method is 311 * traced each time it is executed. 312 */ 313 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0); 314 ACPI_INIT_GLOBAL (ACPI_NAME, AcpiGbl_TraceMethodName, 0); 315 316 /* 317 * Runtime configuration of debug output control masks. We want the debug 318 * switches statically initialized so they are already set when the debugger 319 * is entered. 320 */ 321 #ifdef ACPI_DEBUG_OUTPUT 322 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT); 323 #else 324 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT); 325 #endif 326 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT); 327 328 /* 329 * Other miscellaneous globals 330 */ 331 ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT); 332 ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount); 333 ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); 334 335 336 /***************************************************************************** 337 * 338 * ACPICA public interface configuration. 339 * 340 * Interfaces that are configured out of the ACPICA build are replaced 341 * by inlined stubs by default. 342 * 343 ****************************************************************************/ 344 345 /* 346 * Hardware-reduced prototypes (default: Not hardware reduced). 347 * 348 * All ACPICA hardware-related interfaces that use these macros will be 349 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag 350 * is set to TRUE. 351 * 352 * Note: This static build option for reduced hardware is intended to 353 * reduce ACPICA code size if desired or necessary. However, even if this 354 * option is not specified, the runtime behavior of ACPICA is dependent 355 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set, 356 * the flag will enable similar behavior -- ACPICA will not attempt 357 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.) 358 */ 359 #if (!ACPI_REDUCED_HARDWARE) 360 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 361 ACPI_EXTERNAL_RETURN_STATUS(Prototype) 362 363 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 364 ACPI_EXTERNAL_RETURN_OK(Prototype) 365 366 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 367 ACPI_EXTERNAL_RETURN_VOID(Prototype) 368 369 #else 370 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 371 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);} 372 373 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 374 static ACPI_INLINE Prototype {return(AE_OK);} 375 376 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 377 static ACPI_INLINE Prototype {return;} 378 379 #endif /* !ACPI_REDUCED_HARDWARE */ 380 381 382 /* 383 * Error message prototypes (default: error messages enabled). 384 * 385 * All interfaces related to error and warning messages 386 * will be configured out of the ACPICA build if the 387 * ACPI_NO_ERROR_MESSAGE flag is defined. 388 */ 389 #ifndef ACPI_NO_ERROR_MESSAGES 390 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \ 391 Prototype; 392 393 #else 394 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \ 395 static ACPI_INLINE Prototype {return;} 396 397 #endif /* ACPI_NO_ERROR_MESSAGES */ 398 399 400 /* 401 * Debugging output prototypes (default: no debug output). 402 * 403 * All interfaces related to debug output messages 404 * will be configured out of the ACPICA build unless the 405 * ACPI_DEBUG_OUTPUT flag is defined. 406 */ 407 #ifdef ACPI_DEBUG_OUTPUT 408 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \ 409 Prototype; 410 411 #else 412 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \ 413 static ACPI_INLINE Prototype {return;} 414 415 #endif /* ACPI_DEBUG_OUTPUT */ 416 417 418 /* 419 * Application prototypes 420 * 421 * All interfaces used by application will be configured 422 * out of the ACPICA build unless the ACPI_APPLICATION 423 * flag is defined. 424 */ 425 #ifdef ACPI_APPLICATION 426 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \ 427 Prototype; 428 429 #else 430 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \ 431 static ACPI_INLINE Prototype {return;} 432 433 #endif /* ACPI_APPLICATION */ 434 435 436 /***************************************************************************** 437 * 438 * ACPICA public interface prototypes 439 * 440 ****************************************************************************/ 441 442 /* 443 * Initialization 444 */ 445 ACPI_EXTERNAL_RETURN_STATUS ( 446 ACPI_STATUS 447 AcpiInitializeTables ( 448 ACPI_TABLE_DESC *InitialStorage, 449 UINT32 InitialTableCount, 450 BOOLEAN AllowResize)) 451 452 ACPI_EXTERNAL_RETURN_STATUS ( 453 ACPI_STATUS 454 AcpiInitializeSubsystem ( 455 void)) 456 457 ACPI_EXTERNAL_RETURN_STATUS ( 458 ACPI_STATUS 459 AcpiEnableSubsystem ( 460 UINT32 Flags)) 461 462 ACPI_EXTERNAL_RETURN_STATUS ( 463 ACPI_STATUS 464 AcpiInitializeObjects ( 465 UINT32 Flags)) 466 467 ACPI_EXTERNAL_RETURN_STATUS ( 468 ACPI_STATUS 469 AcpiTerminate ( 470 void)) 471 472 473 /* 474 * Miscellaneous global interfaces 475 */ 476 ACPI_HW_DEPENDENT_RETURN_STATUS ( 477 ACPI_STATUS 478 AcpiEnable ( 479 void)) 480 481 ACPI_HW_DEPENDENT_RETURN_STATUS ( 482 ACPI_STATUS 483 AcpiDisable ( 484 void)) 485 486 ACPI_EXTERNAL_RETURN_STATUS ( 487 ACPI_STATUS 488 AcpiSubsystemStatus ( 489 void)) 490 491 ACPI_EXTERNAL_RETURN_STATUS ( 492 ACPI_STATUS 493 AcpiGetSystemInfo ( 494 ACPI_BUFFER *RetBuffer)) 495 496 ACPI_EXTERNAL_RETURN_STATUS ( 497 ACPI_STATUS 498 AcpiGetStatistics ( 499 ACPI_STATISTICS *Stats)) 500 501 ACPI_EXTERNAL_RETURN_PTR ( 502 const char * 503 AcpiFormatException ( 504 ACPI_STATUS Exception)) 505 506 ACPI_EXTERNAL_RETURN_STATUS ( 507 ACPI_STATUS 508 AcpiPurgeCachedObjects ( 509 void)) 510 511 ACPI_EXTERNAL_RETURN_STATUS ( 512 ACPI_STATUS 513 AcpiInstallInterface ( 514 ACPI_STRING InterfaceName)) 515 516 ACPI_EXTERNAL_RETURN_STATUS ( 517 ACPI_STATUS 518 AcpiRemoveInterface ( 519 ACPI_STRING InterfaceName)) 520 521 ACPI_EXTERNAL_RETURN_STATUS ( 522 ACPI_STATUS 523 AcpiUpdateInterfaces ( 524 UINT8 Action)) 525 526 ACPI_EXTERNAL_RETURN_UINT32 ( 527 UINT32 528 AcpiCheckAddressRange ( 529 ACPI_ADR_SPACE_TYPE SpaceId, 530 ACPI_PHYSICAL_ADDRESS Address, 531 ACPI_SIZE Length, 532 BOOLEAN Warn)) 533 534 ACPI_EXTERNAL_RETURN_STATUS ( 535 ACPI_STATUS 536 AcpiDecodePldBuffer ( 537 UINT8 *InBuffer, 538 ACPI_SIZE Length, 539 ACPI_PLD_INFO **ReturnBuffer)) 540 541 542 /* 543 * ACPI table load/unload interfaces 544 */ 545 ACPI_EXTERNAL_RETURN_STATUS ( 546 ACPI_STATUS 547 AcpiInstallTable ( 548 ACPI_PHYSICAL_ADDRESS Address, 549 BOOLEAN Physical)) 550 551 ACPI_EXTERNAL_RETURN_STATUS ( 552 ACPI_STATUS 553 AcpiLoadTable ( 554 ACPI_TABLE_HEADER *Table)) 555 556 ACPI_EXTERNAL_RETURN_STATUS ( 557 ACPI_STATUS 558 AcpiUnloadParentTable ( 559 ACPI_HANDLE Object)) 560 561 ACPI_EXTERNAL_RETURN_STATUS ( 562 ACPI_STATUS 563 AcpiLoadTables ( 564 void)) 565 566 567 /* 568 * ACPI table manipulation interfaces 569 */ 570 ACPI_EXTERNAL_RETURN_STATUS ( 571 ACPI_STATUS 572 AcpiReallocateRootTable ( 573 void)) 574 575 ACPI_EXTERNAL_RETURN_STATUS ( 576 ACPI_STATUS 577 AcpiFindRootPointer ( 578 ACPI_SIZE *RsdpAddress)) 579 580 ACPI_EXTERNAL_RETURN_STATUS ( 581 ACPI_STATUS 582 AcpiGetTableHeader ( 583 ACPI_STRING Signature, 584 UINT32 Instance, 585 ACPI_TABLE_HEADER *OutTableHeader)) 586 587 ACPI_EXTERNAL_RETURN_STATUS ( 588 ACPI_STATUS 589 AcpiGetTable ( 590 ACPI_STRING Signature, 591 UINT32 Instance, 592 ACPI_TABLE_HEADER **OutTable)) 593 594 ACPI_EXTERNAL_RETURN_STATUS ( 595 ACPI_STATUS 596 AcpiGetTableByIndex ( 597 UINT32 TableIndex, 598 ACPI_TABLE_HEADER **OutTable)) 599 600 ACPI_EXTERNAL_RETURN_STATUS ( 601 ACPI_STATUS 602 AcpiInstallTableHandler ( 603 ACPI_TABLE_HANDLER Handler, 604 void *Context)) 605 606 ACPI_EXTERNAL_RETURN_STATUS ( 607 ACPI_STATUS 608 AcpiRemoveTableHandler ( 609 ACPI_TABLE_HANDLER Handler)) 610 611 612 /* 613 * Namespace and name interfaces 614 */ 615 ACPI_EXTERNAL_RETURN_STATUS ( 616 ACPI_STATUS 617 AcpiWalkNamespace ( 618 ACPI_OBJECT_TYPE Type, 619 ACPI_HANDLE StartObject, 620 UINT32 MaxDepth, 621 ACPI_WALK_CALLBACK DescendingCallback, 622 ACPI_WALK_CALLBACK AscendingCallback, 623 void *Context, 624 void **ReturnValue)) 625 626 ACPI_EXTERNAL_RETURN_STATUS ( 627 ACPI_STATUS 628 AcpiGetDevices ( 629 char *HID, 630 ACPI_WALK_CALLBACK UserFunction, 631 void *Context, 632 void **ReturnValue)) 633 634 ACPI_EXTERNAL_RETURN_STATUS ( 635 ACPI_STATUS 636 AcpiGetName ( 637 ACPI_HANDLE Object, 638 UINT32 NameType, 639 ACPI_BUFFER *RetPathPtr)) 640 641 ACPI_EXTERNAL_RETURN_STATUS ( 642 ACPI_STATUS 643 AcpiGetHandle ( 644 ACPI_HANDLE Parent, 645 ACPI_STRING Pathname, 646 ACPI_HANDLE *RetHandle)) 647 648 ACPI_EXTERNAL_RETURN_STATUS ( 649 ACPI_STATUS 650 AcpiAttachData ( 651 ACPI_HANDLE Object, 652 ACPI_OBJECT_HANDLER Handler, 653 void *Data)) 654 655 ACPI_EXTERNAL_RETURN_STATUS ( 656 ACPI_STATUS 657 AcpiDetachData ( 658 ACPI_HANDLE Object, 659 ACPI_OBJECT_HANDLER Handler)) 660 661 ACPI_EXTERNAL_RETURN_STATUS ( 662 ACPI_STATUS 663 AcpiGetData ( 664 ACPI_HANDLE Object, 665 ACPI_OBJECT_HANDLER Handler, 666 void **Data)) 667 668 ACPI_EXTERNAL_RETURN_STATUS ( 669 ACPI_STATUS 670 AcpiDebugTrace ( 671 char *Name, 672 UINT32 DebugLevel, 673 UINT32 DebugLayer, 674 UINT32 Flags)) 675 676 677 /* 678 * Object manipulation and enumeration 679 */ 680 ACPI_EXTERNAL_RETURN_STATUS ( 681 ACPI_STATUS 682 AcpiEvaluateObject ( 683 ACPI_HANDLE Object, 684 ACPI_STRING Pathname, 685 ACPI_OBJECT_LIST *ParameterObjects, 686 ACPI_BUFFER *ReturnObjectBuffer)) 687 688 ACPI_EXTERNAL_RETURN_STATUS ( 689 ACPI_STATUS 690 AcpiEvaluateObjectTyped ( 691 ACPI_HANDLE Object, 692 ACPI_STRING Pathname, 693 ACPI_OBJECT_LIST *ExternalParams, 694 ACPI_BUFFER *ReturnBuffer, 695 ACPI_OBJECT_TYPE ReturnType)) 696 697 ACPI_EXTERNAL_RETURN_STATUS ( 698 ACPI_STATUS 699 AcpiGetObjectInfo ( 700 ACPI_HANDLE Object, 701 ACPI_DEVICE_INFO **ReturnBuffer)) 702 703 ACPI_EXTERNAL_RETURN_STATUS ( 704 ACPI_STATUS 705 AcpiInstallMethod ( 706 UINT8 *Buffer)) 707 708 ACPI_EXTERNAL_RETURN_STATUS ( 709 ACPI_STATUS 710 AcpiGetNextObject ( 711 ACPI_OBJECT_TYPE Type, 712 ACPI_HANDLE Parent, 713 ACPI_HANDLE Child, 714 ACPI_HANDLE *OutHandle)) 715 716 ACPI_EXTERNAL_RETURN_STATUS ( 717 ACPI_STATUS 718 AcpiGetType ( 719 ACPI_HANDLE Object, 720 ACPI_OBJECT_TYPE *OutType)) 721 722 ACPI_EXTERNAL_RETURN_STATUS ( 723 ACPI_STATUS 724 AcpiGetParent ( 725 ACPI_HANDLE Object, 726 ACPI_HANDLE *OutHandle)) 727 728 729 /* 730 * Handler interfaces 731 */ 732 ACPI_EXTERNAL_RETURN_STATUS ( 733 ACPI_STATUS 734 AcpiInstallInitializationHandler ( 735 ACPI_INIT_HANDLER Handler, 736 UINT32 Function)) 737 738 ACPI_HW_DEPENDENT_RETURN_STATUS ( 739 ACPI_STATUS 740 AcpiInstallSciHandler ( 741 ACPI_SCI_HANDLER Address, 742 void *Context)) 743 744 ACPI_HW_DEPENDENT_RETURN_STATUS ( 745 ACPI_STATUS 746 AcpiRemoveSciHandler ( 747 ACPI_SCI_HANDLER Address)) 748 749 ACPI_HW_DEPENDENT_RETURN_STATUS ( 750 ACPI_STATUS 751 AcpiInstallGlobalEventHandler ( 752 ACPI_GBL_EVENT_HANDLER Handler, 753 void *Context)) 754 755 ACPI_HW_DEPENDENT_RETURN_STATUS ( 756 ACPI_STATUS 757 AcpiInstallFixedEventHandler ( 758 UINT32 AcpiEvent, 759 ACPI_EVENT_HANDLER Handler, 760 void *Context)) 761 762 ACPI_HW_DEPENDENT_RETURN_STATUS ( 763 ACPI_STATUS 764 AcpiRemoveFixedEventHandler ( 765 UINT32 AcpiEvent, 766 ACPI_EVENT_HANDLER Handler)) 767 768 ACPI_HW_DEPENDENT_RETURN_STATUS ( 769 ACPI_STATUS 770 AcpiInstallGpeHandler ( 771 ACPI_HANDLE GpeDevice, 772 UINT32 GpeNumber, 773 UINT32 Type, 774 ACPI_GPE_HANDLER Address, 775 void *Context)) 776 777 ACPI_HW_DEPENDENT_RETURN_STATUS ( 778 ACPI_STATUS 779 AcpiRemoveGpeHandler ( 780 ACPI_HANDLE GpeDevice, 781 UINT32 GpeNumber, 782 ACPI_GPE_HANDLER Address)) 783 784 ACPI_EXTERNAL_RETURN_STATUS ( 785 ACPI_STATUS 786 AcpiInstallNotifyHandler ( 787 ACPI_HANDLE Device, 788 UINT32 HandlerType, 789 ACPI_NOTIFY_HANDLER Handler, 790 void *Context)) 791 792 ACPI_EXTERNAL_RETURN_STATUS ( 793 ACPI_STATUS 794 AcpiRemoveNotifyHandler ( 795 ACPI_HANDLE Device, 796 UINT32 HandlerType, 797 ACPI_NOTIFY_HANDLER Handler)) 798 799 ACPI_EXTERNAL_RETURN_STATUS ( 800 ACPI_STATUS 801 AcpiInstallAddressSpaceHandler ( 802 ACPI_HANDLE Device, 803 ACPI_ADR_SPACE_TYPE SpaceId, 804 ACPI_ADR_SPACE_HANDLER Handler, 805 ACPI_ADR_SPACE_SETUP Setup, 806 void *Context)) 807 808 ACPI_EXTERNAL_RETURN_STATUS ( 809 ACPI_STATUS 810 AcpiRemoveAddressSpaceHandler ( 811 ACPI_HANDLE Device, 812 ACPI_ADR_SPACE_TYPE SpaceId, 813 ACPI_ADR_SPACE_HANDLER Handler)) 814 815 ACPI_EXTERNAL_RETURN_STATUS ( 816 ACPI_STATUS 817 AcpiInstallExceptionHandler ( 818 ACPI_EXCEPTION_HANDLER Handler)) 819 820 ACPI_EXTERNAL_RETURN_STATUS ( 821 ACPI_STATUS 822 AcpiInstallInterfaceHandler ( 823 ACPI_INTERFACE_HANDLER Handler)) 824 825 826 /* 827 * Global Lock interfaces 828 */ 829 ACPI_HW_DEPENDENT_RETURN_STATUS ( 830 ACPI_STATUS 831 AcpiAcquireGlobalLock ( 832 UINT16 Timeout, 833 UINT32 *Handle)) 834 835 ACPI_HW_DEPENDENT_RETURN_STATUS ( 836 ACPI_STATUS 837 AcpiReleaseGlobalLock ( 838 UINT32 Handle)) 839 840 841 /* 842 * Interfaces to AML mutex objects 843 */ 844 ACPI_EXTERNAL_RETURN_STATUS ( 845 ACPI_STATUS 846 AcpiAcquireMutex ( 847 ACPI_HANDLE Handle, 848 ACPI_STRING Pathname, 849 UINT16 Timeout)) 850 851 ACPI_EXTERNAL_RETURN_STATUS ( 852 ACPI_STATUS 853 AcpiReleaseMutex ( 854 ACPI_HANDLE Handle, 855 ACPI_STRING Pathname)) 856 857 858 /* 859 * Fixed Event interfaces 860 */ 861 ACPI_HW_DEPENDENT_RETURN_STATUS ( 862 ACPI_STATUS 863 AcpiEnableEvent ( 864 UINT32 Event, 865 UINT32 Flags)) 866 867 ACPI_HW_DEPENDENT_RETURN_STATUS ( 868 ACPI_STATUS 869 AcpiDisableEvent ( 870 UINT32 Event, 871 UINT32 Flags)) 872 873 ACPI_HW_DEPENDENT_RETURN_STATUS ( 874 ACPI_STATUS 875 AcpiClearEvent ( 876 UINT32 Event)) 877 878 ACPI_HW_DEPENDENT_RETURN_STATUS ( 879 ACPI_STATUS 880 AcpiGetEventStatus ( 881 UINT32 Event, 882 ACPI_EVENT_STATUS *EventStatus)) 883 884 885 /* 886 * General Purpose Event (GPE) Interfaces 887 */ 888 ACPI_HW_DEPENDENT_RETURN_STATUS ( 889 ACPI_STATUS 890 AcpiUpdateAllGpes ( 891 void)) 892 893 ACPI_HW_DEPENDENT_RETURN_STATUS ( 894 ACPI_STATUS 895 AcpiEnableGpe ( 896 ACPI_HANDLE GpeDevice, 897 UINT32 GpeNumber)) 898 899 ACPI_HW_DEPENDENT_RETURN_STATUS ( 900 ACPI_STATUS 901 AcpiDisableGpe ( 902 ACPI_HANDLE GpeDevice, 903 UINT32 GpeNumber)) 904 905 ACPI_HW_DEPENDENT_RETURN_STATUS ( 906 ACPI_STATUS 907 AcpiClearGpe ( 908 ACPI_HANDLE GpeDevice, 909 UINT32 GpeNumber)) 910 911 ACPI_HW_DEPENDENT_RETURN_STATUS ( 912 ACPI_STATUS 913 AcpiSetGpe ( 914 ACPI_HANDLE GpeDevice, 915 UINT32 GpeNumber, 916 UINT8 Action)) 917 918 ACPI_HW_DEPENDENT_RETURN_STATUS ( 919 ACPI_STATUS 920 AcpiFinishGpe ( 921 ACPI_HANDLE GpeDevice, 922 UINT32 GpeNumber)) 923 924 ACPI_HW_DEPENDENT_RETURN_STATUS ( 925 ACPI_STATUS 926 AcpiMarkGpeForWake ( 927 ACPI_HANDLE GpeDevice, 928 UINT32 GpeNumber)) 929 930 ACPI_HW_DEPENDENT_RETURN_STATUS ( 931 ACPI_STATUS 932 AcpiSetupGpeForWake ( 933 ACPI_HANDLE ParentDevice, 934 ACPI_HANDLE GpeDevice, 935 UINT32 GpeNumber)) 936 937 ACPI_HW_DEPENDENT_RETURN_STATUS ( 938 ACPI_STATUS 939 AcpiSetGpeWakeMask ( 940 ACPI_HANDLE GpeDevice, 941 UINT32 GpeNumber, 942 UINT8 Action)) 943 944 ACPI_HW_DEPENDENT_RETURN_STATUS ( 945 ACPI_STATUS 946 AcpiGetGpeStatus ( 947 ACPI_HANDLE GpeDevice, 948 UINT32 GpeNumber, 949 ACPI_EVENT_STATUS *EventStatus)) 950 951 ACPI_HW_DEPENDENT_RETURN_STATUS ( 952 ACPI_STATUS 953 AcpiDisableAllGpes ( 954 void)) 955 956 ACPI_HW_DEPENDENT_RETURN_STATUS ( 957 ACPI_STATUS 958 AcpiEnableAllRuntimeGpes ( 959 void)) 960 961 ACPI_HW_DEPENDENT_RETURN_STATUS ( 962 ACPI_STATUS 963 AcpiGetGpeDevice ( 964 UINT32 GpeIndex, 965 ACPI_HANDLE *GpeDevice)) 966 967 ACPI_HW_DEPENDENT_RETURN_STATUS ( 968 ACPI_STATUS 969 AcpiInstallGpeBlock ( 970 ACPI_HANDLE GpeDevice, 971 ACPI_GENERIC_ADDRESS *GpeBlockAddress, 972 UINT32 RegisterCount, 973 UINT32 InterruptNumber)) 974 975 ACPI_HW_DEPENDENT_RETURN_STATUS ( 976 ACPI_STATUS 977 AcpiRemoveGpeBlock ( 978 ACPI_HANDLE GpeDevice)) 979 980 981 /* 982 * Resource interfaces 983 */ 984 typedef 985 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 986 ACPI_RESOURCE *Resource, 987 void *Context); 988 989 ACPI_EXTERNAL_RETURN_STATUS ( 990 ACPI_STATUS 991 AcpiGetVendorResource ( 992 ACPI_HANDLE Device, 993 char *Name, 994 ACPI_VENDOR_UUID *Uuid, 995 ACPI_BUFFER *RetBuffer)) 996 997 ACPI_EXTERNAL_RETURN_STATUS ( 998 ACPI_STATUS 999 AcpiGetCurrentResources ( 1000 ACPI_HANDLE Device, 1001 ACPI_BUFFER *RetBuffer)) 1002 1003 ACPI_EXTERNAL_RETURN_STATUS ( 1004 ACPI_STATUS 1005 AcpiGetPossibleResources ( 1006 ACPI_HANDLE Device, 1007 ACPI_BUFFER *RetBuffer)) 1008 1009 ACPI_EXTERNAL_RETURN_STATUS ( 1010 ACPI_STATUS 1011 AcpiGetEventResources ( 1012 ACPI_HANDLE DeviceHandle, 1013 ACPI_BUFFER *RetBuffer)) 1014 1015 ACPI_EXTERNAL_RETURN_STATUS ( 1016 ACPI_STATUS 1017 AcpiWalkResourceBuffer ( 1018 ACPI_BUFFER *Buffer, 1019 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 1020 void *Context)) 1021 1022 ACPI_EXTERNAL_RETURN_STATUS ( 1023 ACPI_STATUS 1024 AcpiWalkResources ( 1025 ACPI_HANDLE Device, 1026 char *Name, 1027 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 1028 void *Context)) 1029 1030 ACPI_EXTERNAL_RETURN_STATUS ( 1031 ACPI_STATUS 1032 AcpiSetCurrentResources ( 1033 ACPI_HANDLE Device, 1034 ACPI_BUFFER *InBuffer)) 1035 1036 ACPI_EXTERNAL_RETURN_STATUS ( 1037 ACPI_STATUS 1038 AcpiGetIrqRoutingTable ( 1039 ACPI_HANDLE Device, 1040 ACPI_BUFFER *RetBuffer)) 1041 1042 ACPI_EXTERNAL_RETURN_STATUS ( 1043 ACPI_STATUS 1044 AcpiResourceToAddress64 ( 1045 ACPI_RESOURCE *Resource, 1046 ACPI_RESOURCE_ADDRESS64 *Out)) 1047 1048 ACPI_EXTERNAL_RETURN_STATUS ( 1049 ACPI_STATUS 1050 AcpiBufferToResource ( 1051 UINT8 *AmlBuffer, 1052 UINT16 AmlBufferLength, 1053 ACPI_RESOURCE **ResourcePtr)) 1054 1055 1056 /* 1057 * Hardware (ACPI device) interfaces 1058 */ 1059 ACPI_EXTERNAL_RETURN_STATUS ( 1060 ACPI_STATUS 1061 AcpiReset ( 1062 void)) 1063 1064 ACPI_EXTERNAL_RETURN_STATUS ( 1065 ACPI_STATUS 1066 AcpiRead ( 1067 UINT64 *Value, 1068 ACPI_GENERIC_ADDRESS *Reg)) 1069 1070 ACPI_EXTERNAL_RETURN_STATUS ( 1071 ACPI_STATUS 1072 AcpiWrite ( 1073 UINT64 Value, 1074 ACPI_GENERIC_ADDRESS *Reg)) 1075 1076 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1077 ACPI_STATUS 1078 AcpiReadBitRegister ( 1079 UINT32 RegisterId, 1080 UINT32 *ReturnValue)) 1081 1082 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1083 ACPI_STATUS 1084 AcpiWriteBitRegister ( 1085 UINT32 RegisterId, 1086 UINT32 Value)) 1087 1088 1089 /* 1090 * Sleep/Wake interfaces 1091 */ 1092 ACPI_EXTERNAL_RETURN_STATUS ( 1093 ACPI_STATUS 1094 AcpiGetSleepTypeData ( 1095 UINT8 SleepState, 1096 UINT8 *Slp_TypA, 1097 UINT8 *Slp_TypB)) 1098 1099 ACPI_EXTERNAL_RETURN_STATUS ( 1100 ACPI_STATUS 1101 AcpiEnterSleepStatePrep ( 1102 UINT8 SleepState)) 1103 1104 ACPI_EXTERNAL_RETURN_STATUS ( 1105 ACPI_STATUS 1106 AcpiEnterSleepState ( 1107 UINT8 SleepState)) 1108 1109 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1110 ACPI_STATUS 1111 AcpiEnterSleepStateS4bios ( 1112 void)) 1113 1114 ACPI_EXTERNAL_RETURN_STATUS ( 1115 ACPI_STATUS 1116 AcpiLeaveSleepStatePrep ( 1117 UINT8 SleepState)) 1118 1119 ACPI_EXTERNAL_RETURN_STATUS ( 1120 ACPI_STATUS 1121 AcpiLeaveSleepState ( 1122 UINT8 SleepState)) 1123 1124 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1125 ACPI_STATUS 1126 AcpiSetFirmwareWakingVector ( 1127 UINT32 PhysicalAddress)) 1128 1129 #if ACPI_MACHINE_WIDTH == 64 1130 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1131 ACPI_STATUS 1132 AcpiSetFirmwareWakingVector64 ( 1133 UINT64 PhysicalAddress)) 1134 #endif 1135 1136 1137 /* 1138 * ACPI Timer interfaces 1139 */ 1140 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1141 ACPI_STATUS 1142 AcpiGetTimerResolution ( 1143 UINT32 *Resolution)) 1144 1145 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1146 ACPI_STATUS 1147 AcpiGetTimer ( 1148 UINT32 *Ticks)) 1149 1150 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1151 ACPI_STATUS 1152 AcpiGetTimerDuration ( 1153 UINT32 StartTicks, 1154 UINT32 EndTicks, 1155 UINT32 *TimeElapsed)) 1156 1157 1158 /* 1159 * Error/Warning output 1160 */ 1161 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1162 ACPI_PRINTF_LIKE(3) 1163 void ACPI_INTERNAL_VAR_XFACE 1164 AcpiError ( 1165 const char *ModuleName, 1166 UINT32 LineNumber, 1167 const char *Format, 1168 ...)) 1169 1170 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1171 ACPI_PRINTF_LIKE(4) 1172 void ACPI_INTERNAL_VAR_XFACE 1173 AcpiException ( 1174 const char *ModuleName, 1175 UINT32 LineNumber, 1176 ACPI_STATUS Status, 1177 const char *Format, 1178 ...)) 1179 1180 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1181 ACPI_PRINTF_LIKE(3) 1182 void ACPI_INTERNAL_VAR_XFACE 1183 AcpiWarning ( 1184 const char *ModuleName, 1185 UINT32 LineNumber, 1186 const char *Format, 1187 ...)) 1188 1189 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1190 ACPI_PRINTF_LIKE(3) 1191 void ACPI_INTERNAL_VAR_XFACE 1192 AcpiInfo ( 1193 const char *ModuleName, 1194 UINT32 LineNumber, 1195 const char *Format, 1196 ...)) 1197 1198 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1199 ACPI_PRINTF_LIKE(3) 1200 void ACPI_INTERNAL_VAR_XFACE 1201 AcpiBiosError ( 1202 const char *ModuleName, 1203 UINT32 LineNumber, 1204 const char *Format, 1205 ...)) 1206 1207 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1208 ACPI_PRINTF_LIKE(3) 1209 void ACPI_INTERNAL_VAR_XFACE 1210 AcpiBiosWarning ( 1211 const char *ModuleName, 1212 UINT32 LineNumber, 1213 const char *Format, 1214 ...)) 1215 1216 1217 /* 1218 * Debug output 1219 */ 1220 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1221 ACPI_PRINTF_LIKE(6) 1222 void ACPI_INTERNAL_VAR_XFACE 1223 AcpiDebugPrint ( 1224 UINT32 RequestedDebugLevel, 1225 UINT32 LineNumber, 1226 const char *FunctionName, 1227 const char *ModuleName, 1228 UINT32 ComponentId, 1229 const char *Format, 1230 ...)) 1231 1232 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1233 ACPI_PRINTF_LIKE(6) 1234 void ACPI_INTERNAL_VAR_XFACE 1235 AcpiDebugPrintRaw ( 1236 UINT32 RequestedDebugLevel, 1237 UINT32 LineNumber, 1238 const char *FunctionName, 1239 const char *ModuleName, 1240 UINT32 ComponentId, 1241 const char *Format, 1242 ...)) 1243 1244 ACPI_APP_DEPENDENT_RETURN_VOID ( 1245 ACPI_PRINTF_LIKE(1) 1246 void ACPI_INTERNAL_VAR_XFACE 1247 AcpiLogError ( 1248 const char *Format, 1249 ...)) 1250 1251 #endif /* __ACXFACE_H__ */ 1252