1 /****************************************************************************** 2 * 3 * Name: acpixf.h - External interfaces to the ACPI subsystem 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2015, 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 0x20150204 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 AcpiInstallGpeRawHandler ( 708 ACPI_HANDLE GpeDevice, 709 UINT32 GpeNumber, 710 UINT32 Type, 711 ACPI_GPE_HANDLER Address, 712 void *Context)) 713 714 ACPI_HW_DEPENDENT_RETURN_STATUS ( 715 ACPI_STATUS 716 AcpiRemoveGpeHandler ( 717 ACPI_HANDLE GpeDevice, 718 UINT32 GpeNumber, 719 ACPI_GPE_HANDLER Address)) 720 721 ACPI_EXTERNAL_RETURN_STATUS ( 722 ACPI_STATUS 723 AcpiInstallNotifyHandler ( 724 ACPI_HANDLE Device, 725 UINT32 HandlerType, 726 ACPI_NOTIFY_HANDLER Handler, 727 void *Context)) 728 729 ACPI_EXTERNAL_RETURN_STATUS ( 730 ACPI_STATUS 731 AcpiRemoveNotifyHandler ( 732 ACPI_HANDLE Device, 733 UINT32 HandlerType, 734 ACPI_NOTIFY_HANDLER Handler)) 735 736 ACPI_EXTERNAL_RETURN_STATUS ( 737 ACPI_STATUS 738 AcpiInstallAddressSpaceHandler ( 739 ACPI_HANDLE Device, 740 ACPI_ADR_SPACE_TYPE SpaceId, 741 ACPI_ADR_SPACE_HANDLER Handler, 742 ACPI_ADR_SPACE_SETUP Setup, 743 void *Context)) 744 745 ACPI_EXTERNAL_RETURN_STATUS ( 746 ACPI_STATUS 747 AcpiRemoveAddressSpaceHandler ( 748 ACPI_HANDLE Device, 749 ACPI_ADR_SPACE_TYPE SpaceId, 750 ACPI_ADR_SPACE_HANDLER Handler)) 751 752 ACPI_EXTERNAL_RETURN_STATUS ( 753 ACPI_STATUS 754 AcpiInstallExceptionHandler ( 755 ACPI_EXCEPTION_HANDLER Handler)) 756 757 ACPI_EXTERNAL_RETURN_STATUS ( 758 ACPI_STATUS 759 AcpiInstallInterfaceHandler ( 760 ACPI_INTERFACE_HANDLER Handler)) 761 762 763 /* 764 * Global Lock interfaces 765 */ 766 ACPI_HW_DEPENDENT_RETURN_STATUS ( 767 ACPI_STATUS 768 AcpiAcquireGlobalLock ( 769 UINT16 Timeout, 770 UINT32 *Handle)) 771 772 ACPI_HW_DEPENDENT_RETURN_STATUS ( 773 ACPI_STATUS 774 AcpiReleaseGlobalLock ( 775 UINT32 Handle)) 776 777 778 /* 779 * Interfaces to AML mutex objects 780 */ 781 ACPI_EXTERNAL_RETURN_STATUS ( 782 ACPI_STATUS 783 AcpiAcquireMutex ( 784 ACPI_HANDLE Handle, 785 ACPI_STRING Pathname, 786 UINT16 Timeout)) 787 788 ACPI_EXTERNAL_RETURN_STATUS ( 789 ACPI_STATUS 790 AcpiReleaseMutex ( 791 ACPI_HANDLE Handle, 792 ACPI_STRING Pathname)) 793 794 795 /* 796 * Fixed Event interfaces 797 */ 798 ACPI_HW_DEPENDENT_RETURN_STATUS ( 799 ACPI_STATUS 800 AcpiEnableEvent ( 801 UINT32 Event, 802 UINT32 Flags)) 803 804 ACPI_HW_DEPENDENT_RETURN_STATUS ( 805 ACPI_STATUS 806 AcpiDisableEvent ( 807 UINT32 Event, 808 UINT32 Flags)) 809 810 ACPI_HW_DEPENDENT_RETURN_STATUS ( 811 ACPI_STATUS 812 AcpiClearEvent ( 813 UINT32 Event)) 814 815 ACPI_HW_DEPENDENT_RETURN_STATUS ( 816 ACPI_STATUS 817 AcpiGetEventStatus ( 818 UINT32 Event, 819 ACPI_EVENT_STATUS *EventStatus)) 820 821 822 /* 823 * General Purpose Event (GPE) Interfaces 824 */ 825 ACPI_HW_DEPENDENT_RETURN_STATUS ( 826 ACPI_STATUS 827 AcpiUpdateAllGpes ( 828 void)) 829 830 ACPI_HW_DEPENDENT_RETURN_STATUS ( 831 ACPI_STATUS 832 AcpiEnableGpe ( 833 ACPI_HANDLE GpeDevice, 834 UINT32 GpeNumber)) 835 836 ACPI_HW_DEPENDENT_RETURN_STATUS ( 837 ACPI_STATUS 838 AcpiDisableGpe ( 839 ACPI_HANDLE GpeDevice, 840 UINT32 GpeNumber)) 841 842 ACPI_HW_DEPENDENT_RETURN_STATUS ( 843 ACPI_STATUS 844 AcpiClearGpe ( 845 ACPI_HANDLE GpeDevice, 846 UINT32 GpeNumber)) 847 848 ACPI_HW_DEPENDENT_RETURN_STATUS ( 849 ACPI_STATUS 850 AcpiSetGpe ( 851 ACPI_HANDLE GpeDevice, 852 UINT32 GpeNumber, 853 UINT8 Action)) 854 855 ACPI_HW_DEPENDENT_RETURN_STATUS ( 856 ACPI_STATUS 857 AcpiFinishGpe ( 858 ACPI_HANDLE GpeDevice, 859 UINT32 GpeNumber)) 860 861 ACPI_HW_DEPENDENT_RETURN_STATUS ( 862 ACPI_STATUS 863 AcpiMarkGpeForWake ( 864 ACPI_HANDLE GpeDevice, 865 UINT32 GpeNumber)) 866 867 ACPI_HW_DEPENDENT_RETURN_STATUS ( 868 ACPI_STATUS 869 AcpiSetupGpeForWake ( 870 ACPI_HANDLE ParentDevice, 871 ACPI_HANDLE GpeDevice, 872 UINT32 GpeNumber)) 873 874 ACPI_HW_DEPENDENT_RETURN_STATUS ( 875 ACPI_STATUS 876 AcpiSetGpeWakeMask ( 877 ACPI_HANDLE GpeDevice, 878 UINT32 GpeNumber, 879 UINT8 Action)) 880 881 ACPI_HW_DEPENDENT_RETURN_STATUS ( 882 ACPI_STATUS 883 AcpiGetGpeStatus ( 884 ACPI_HANDLE GpeDevice, 885 UINT32 GpeNumber, 886 ACPI_EVENT_STATUS *EventStatus)) 887 888 ACPI_HW_DEPENDENT_RETURN_STATUS ( 889 ACPI_STATUS 890 AcpiDisableAllGpes ( 891 void)) 892 893 ACPI_HW_DEPENDENT_RETURN_STATUS ( 894 ACPI_STATUS 895 AcpiEnableAllRuntimeGpes ( 896 void)) 897 898 ACPI_HW_DEPENDENT_RETURN_STATUS ( 899 ACPI_STATUS 900 AcpiEnableAllWakeupGpes ( 901 void)) 902 903 ACPI_HW_DEPENDENT_RETURN_STATUS ( 904 ACPI_STATUS 905 AcpiGetGpeDevice ( 906 UINT32 GpeIndex, 907 ACPI_HANDLE *GpeDevice)) 908 909 ACPI_HW_DEPENDENT_RETURN_STATUS ( 910 ACPI_STATUS 911 AcpiInstallGpeBlock ( 912 ACPI_HANDLE GpeDevice, 913 ACPI_GENERIC_ADDRESS *GpeBlockAddress, 914 UINT32 RegisterCount, 915 UINT32 InterruptNumber)) 916 917 ACPI_HW_DEPENDENT_RETURN_STATUS ( 918 ACPI_STATUS 919 AcpiRemoveGpeBlock ( 920 ACPI_HANDLE GpeDevice)) 921 922 923 /* 924 * Resource interfaces 925 */ 926 typedef 927 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 928 ACPI_RESOURCE *Resource, 929 void *Context); 930 931 ACPI_EXTERNAL_RETURN_STATUS ( 932 ACPI_STATUS 933 AcpiGetVendorResource ( 934 ACPI_HANDLE Device, 935 char *Name, 936 ACPI_VENDOR_UUID *Uuid, 937 ACPI_BUFFER *RetBuffer)) 938 939 ACPI_EXTERNAL_RETURN_STATUS ( 940 ACPI_STATUS 941 AcpiGetCurrentResources ( 942 ACPI_HANDLE Device, 943 ACPI_BUFFER *RetBuffer)) 944 945 ACPI_EXTERNAL_RETURN_STATUS ( 946 ACPI_STATUS 947 AcpiGetPossibleResources ( 948 ACPI_HANDLE Device, 949 ACPI_BUFFER *RetBuffer)) 950 951 ACPI_EXTERNAL_RETURN_STATUS ( 952 ACPI_STATUS 953 AcpiGetEventResources ( 954 ACPI_HANDLE DeviceHandle, 955 ACPI_BUFFER *RetBuffer)) 956 957 ACPI_EXTERNAL_RETURN_STATUS ( 958 ACPI_STATUS 959 AcpiWalkResourceBuffer ( 960 ACPI_BUFFER *Buffer, 961 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 962 void *Context)) 963 964 ACPI_EXTERNAL_RETURN_STATUS ( 965 ACPI_STATUS 966 AcpiWalkResources ( 967 ACPI_HANDLE Device, 968 char *Name, 969 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 970 void *Context)) 971 972 ACPI_EXTERNAL_RETURN_STATUS ( 973 ACPI_STATUS 974 AcpiSetCurrentResources ( 975 ACPI_HANDLE Device, 976 ACPI_BUFFER *InBuffer)) 977 978 ACPI_EXTERNAL_RETURN_STATUS ( 979 ACPI_STATUS 980 AcpiGetIrqRoutingTable ( 981 ACPI_HANDLE Device, 982 ACPI_BUFFER *RetBuffer)) 983 984 ACPI_EXTERNAL_RETURN_STATUS ( 985 ACPI_STATUS 986 AcpiResourceToAddress64 ( 987 ACPI_RESOURCE *Resource, 988 ACPI_RESOURCE_ADDRESS64 *Out)) 989 990 ACPI_EXTERNAL_RETURN_STATUS ( 991 ACPI_STATUS 992 AcpiBufferToResource ( 993 UINT8 *AmlBuffer, 994 UINT16 AmlBufferLength, 995 ACPI_RESOURCE **ResourcePtr)) 996 997 998 /* 999 * Hardware (ACPI device) interfaces 1000 */ 1001 ACPI_EXTERNAL_RETURN_STATUS ( 1002 ACPI_STATUS 1003 AcpiReset ( 1004 void)) 1005 1006 ACPI_EXTERNAL_RETURN_STATUS ( 1007 ACPI_STATUS 1008 AcpiRead ( 1009 UINT64 *Value, 1010 ACPI_GENERIC_ADDRESS *Reg)) 1011 1012 ACPI_EXTERNAL_RETURN_STATUS ( 1013 ACPI_STATUS 1014 AcpiWrite ( 1015 UINT64 Value, 1016 ACPI_GENERIC_ADDRESS *Reg)) 1017 1018 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1019 ACPI_STATUS 1020 AcpiReadBitRegister ( 1021 UINT32 RegisterId, 1022 UINT32 *ReturnValue)) 1023 1024 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1025 ACPI_STATUS 1026 AcpiWriteBitRegister ( 1027 UINT32 RegisterId, 1028 UINT32 Value)) 1029 1030 1031 /* 1032 * Sleep/Wake interfaces 1033 */ 1034 ACPI_EXTERNAL_RETURN_STATUS ( 1035 ACPI_STATUS 1036 AcpiGetSleepTypeData ( 1037 UINT8 SleepState, 1038 UINT8 *Slp_TypA, 1039 UINT8 *Slp_TypB)) 1040 1041 ACPI_EXTERNAL_RETURN_STATUS ( 1042 ACPI_STATUS 1043 AcpiEnterSleepStatePrep ( 1044 UINT8 SleepState)) 1045 1046 ACPI_EXTERNAL_RETURN_STATUS ( 1047 ACPI_STATUS 1048 AcpiEnterSleepState ( 1049 UINT8 SleepState)) 1050 1051 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1052 ACPI_STATUS 1053 AcpiEnterSleepStateS4bios ( 1054 void)) 1055 1056 ACPI_EXTERNAL_RETURN_STATUS ( 1057 ACPI_STATUS 1058 AcpiLeaveSleepStatePrep ( 1059 UINT8 SleepState)) 1060 1061 ACPI_EXTERNAL_RETURN_STATUS ( 1062 ACPI_STATUS 1063 AcpiLeaveSleepState ( 1064 UINT8 SleepState)) 1065 1066 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1067 ACPI_STATUS 1068 AcpiSetFirmwareWakingVector ( 1069 UINT32 PhysicalAddress)) 1070 1071 #if ACPI_MACHINE_WIDTH == 64 1072 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1073 ACPI_STATUS 1074 AcpiSetFirmwareWakingVector64 ( 1075 UINT64 PhysicalAddress)) 1076 #endif 1077 1078 1079 /* 1080 * ACPI Timer interfaces 1081 */ 1082 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1083 ACPI_STATUS 1084 AcpiGetTimerResolution ( 1085 UINT32 *Resolution)) 1086 1087 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1088 ACPI_STATUS 1089 AcpiGetTimer ( 1090 UINT32 *Ticks)) 1091 1092 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1093 ACPI_STATUS 1094 AcpiGetTimerDuration ( 1095 UINT32 StartTicks, 1096 UINT32 EndTicks, 1097 UINT32 *TimeElapsed)) 1098 1099 1100 /* 1101 * Error/Warning output 1102 */ 1103 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1104 ACPI_PRINTF_LIKE(3) 1105 void ACPI_INTERNAL_VAR_XFACE 1106 AcpiError ( 1107 const char *ModuleName, 1108 UINT32 LineNumber, 1109 const char *Format, 1110 ...)) 1111 1112 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1113 ACPI_PRINTF_LIKE(4) 1114 void ACPI_INTERNAL_VAR_XFACE 1115 AcpiException ( 1116 const char *ModuleName, 1117 UINT32 LineNumber, 1118 ACPI_STATUS Status, 1119 const char *Format, 1120 ...)) 1121 1122 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1123 ACPI_PRINTF_LIKE(3) 1124 void ACPI_INTERNAL_VAR_XFACE 1125 AcpiWarning ( 1126 const char *ModuleName, 1127 UINT32 LineNumber, 1128 const char *Format, 1129 ...)) 1130 1131 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1132 ACPI_PRINTF_LIKE(3) 1133 void ACPI_INTERNAL_VAR_XFACE 1134 AcpiInfo ( 1135 const char *ModuleName, 1136 UINT32 LineNumber, 1137 const char *Format, 1138 ...)) 1139 1140 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1141 ACPI_PRINTF_LIKE(3) 1142 void ACPI_INTERNAL_VAR_XFACE 1143 AcpiBiosError ( 1144 const char *ModuleName, 1145 UINT32 LineNumber, 1146 const char *Format, 1147 ...)) 1148 1149 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1150 ACPI_PRINTF_LIKE(3) 1151 void ACPI_INTERNAL_VAR_XFACE 1152 AcpiBiosWarning ( 1153 const char *ModuleName, 1154 UINT32 LineNumber, 1155 const char *Format, 1156 ...)) 1157 1158 1159 /* 1160 * Debug output 1161 */ 1162 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1163 ACPI_PRINTF_LIKE(6) 1164 void ACPI_INTERNAL_VAR_XFACE 1165 AcpiDebugPrint ( 1166 UINT32 RequestedDebugLevel, 1167 UINT32 LineNumber, 1168 const char *FunctionName, 1169 const char *ModuleName, 1170 UINT32 ComponentId, 1171 const char *Format, 1172 ...)) 1173 1174 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1175 ACPI_PRINTF_LIKE(6) 1176 void ACPI_INTERNAL_VAR_XFACE 1177 AcpiDebugPrintRaw ( 1178 UINT32 RequestedDebugLevel, 1179 UINT32 LineNumber, 1180 const char *FunctionName, 1181 const char *ModuleName, 1182 UINT32 ComponentId, 1183 const char *Format, 1184 ...)) 1185 1186 ACPI_APP_DEPENDENT_RETURN_VOID ( 1187 ACPI_PRINTF_LIKE(1) 1188 void ACPI_INTERNAL_VAR_XFACE 1189 AcpiLogError ( 1190 const char *Format, 1191 ...)) 1192 1193 #endif /* __ACXFACE_H__ */ 1194