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