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 - 2018, Intel Corp. 12 * All rights reserved. 13 * 14 * 2. License 15 * 16 * 2.1. This is your license from Intel Corp. under its intellectual property 17 * rights. You may have additional license terms from the party that provided 18 * you this software, covering your right to use that party's intellectual 19 * property rights. 20 * 21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22 * copy of the source code appearing in this file ("Covered Code") an 23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24 * base code distributed originally by Intel ("Original Intel Code") to copy, 25 * make derivatives, distribute, use and display any portion of the Covered 26 * Code in any form, with the right to sublicense such rights; and 27 * 28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29 * license (with the right to sublicense), under only those claims of Intel 30 * patents that are infringed by the Original Intel Code, to make, use, sell, 31 * offer to sell, and import the Covered Code and derivative works thereof 32 * solely to the minimum extent necessary to exercise the above copyright 33 * license, and in no event shall the patent license extend to any additions 34 * to or modifications of the Original Intel Code. No other license or right 35 * is granted directly or by implication, estoppel or otherwise; 36 * 37 * The above copyright and patent license is granted only if the following 38 * conditions are met: 39 * 40 * 3. Conditions 41 * 42 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43 * Redistribution of source code of any substantial portion of the Covered 44 * Code or modification with rights to further distribute source must include 45 * the above Copyright Notice, the above License, this list of Conditions, 46 * and the following Disclaimer and Export Compliance provision. In addition, 47 * Licensee must cause all Covered Code to which Licensee contributes to 48 * contain a file documenting the changes Licensee made to create that Covered 49 * Code and the date of any change. Licensee must include in that file the 50 * documentation of any changes made by any predecessor Licensee. Licensee 51 * must include a prominent statement that the modification is derived, 52 * directly or indirectly, from Original Intel Code. 53 * 54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55 * Redistribution of source code of any substantial portion of the Covered 56 * Code or modification without rights to further distribute source must 57 * include the following Disclaimer and Export Compliance provision in the 58 * documentation and/or other materials provided with distribution. In 59 * addition, Licensee may not authorize further sublicense of source of any 60 * portion of the Covered Code, and must include terms to the effect that the 61 * license from Licensee to its licensee is limited to the intellectual 62 * property embodied in the software Licensee provides to its licensee, and 63 * not to intellectual property embodied in modifications its licensee may 64 * make. 65 * 66 * 3.3. Redistribution of Executable. Redistribution in executable form of any 67 * substantial portion of the Covered Code or modification must reproduce the 68 * above Copyright Notice, and the following Disclaimer and Export Compliance 69 * provision in the documentation and/or other materials provided with the 70 * distribution. 71 * 72 * 3.4. Intel retains all right, title, and interest in and to the Original 73 * Intel Code. 74 * 75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76 * Intel shall be used in advertising or otherwise to promote the sale, use or 77 * other dealings in products derived from or relating to the Covered Code 78 * without prior written authorization from Intel. 79 * 80 * 4. Disclaimer and Export Compliance 81 * 82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88 * PARTICULAR PURPOSE. 89 * 90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97 * LIMITED REMEDY. 98 * 99 * 4.3. Licensee shall not export, either directly or indirectly, any of this 100 * software or system incorporating such software without first obtaining any 101 * required license or other approval from the U. S. Department of Commerce or 102 * any other agency or department of the United States Government. In the 103 * event Licensee exports any such software from the United States or 104 * re-exports any such software from a foreign destination, Licensee shall 105 * ensure that the distribution and export/re-export of the software is in 106 * compliance with all laws, regulations, orders, or other restrictions of the 107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108 * any of its subsidiaries will export/re-export any technical data, process, 109 * software, or service, directly or indirectly, to any country for which the 110 * United States government or any agency thereof requires an export license, 111 * other governmental approval, or letter of assurance, without first obtaining 112 * such license, approval or letter. 113 * 114 ***************************************************************************** 115 * 116 * Alternatively, you may choose to be licensed under the terms of the 117 * following license: 118 * 119 * Redistribution and use in source and binary forms, with or without 120 * modification, are permitted provided that the following conditions 121 * are met: 122 * 1. Redistributions of source code must retain the above copyright 123 * notice, this list of conditions, and the following disclaimer, 124 * without modification. 125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 126 * substantially similar to the "NO WARRANTY" disclaimer below 127 * ("Disclaimer") and any redistribution must be conditioned upon 128 * including a substantially similar Disclaimer requirement for further 129 * binary redistribution. 130 * 3. Neither the names of the above-listed copyright holders nor the names 131 * of any contributors may be used to endorse or promote products derived 132 * from this software without specific prior written permission. 133 * 134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 145 * 146 * Alternatively, you may choose to be licensed under the terms of the 147 * GNU General Public License ("GPL") version 2 as published by the Free 148 * Software Foundation. 149 * 150 *****************************************************************************/ 151 152 #ifndef __ACXFACE_H__ 153 #define __ACXFACE_H__ 154 155 /* Current ACPICA subsystem version in YYYYMMDD format */ 156 157 #define ACPI_CA_VERSION 0x20181003 158 159 #include <contrib/dev/acpica/include/acconfig.h> 160 #include <contrib/dev/acpica/include/actypes.h> 161 #include <contrib/dev/acpica/include/actbl.h> 162 #include <contrib/dev/acpica/include/acbuffer.h> 163 164 165 /***************************************************************************** 166 * 167 * Macros used for ACPICA globals and configuration 168 * 169 ****************************************************************************/ 170 171 /* 172 * Ensure that global variables are defined and initialized only once. 173 * 174 * The use of these macros allows for a single list of globals (here) 175 * in order to simplify maintenance of the code. 176 */ 177 #ifdef DEFINE_ACPI_GLOBALS 178 #define ACPI_GLOBAL(type,name) \ 179 extern type name; \ 180 type name 181 182 #define ACPI_INIT_GLOBAL(type,name,value) \ 183 type name=value 184 185 #else 186 #ifndef ACPI_GLOBAL 187 #define ACPI_GLOBAL(type,name) \ 188 extern type name 189 #endif 190 191 #ifndef ACPI_INIT_GLOBAL 192 #define ACPI_INIT_GLOBAL(type,name,value) \ 193 extern type name 194 #endif 195 #endif 196 197 /* 198 * These macros configure the various ACPICA interfaces. They are 199 * useful for generating stub inline functions for features that are 200 * configured out of the current kernel or ACPICA application. 201 */ 202 #ifndef ACPI_EXTERNAL_RETURN_STATUS 203 #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \ 204 Prototype; 205 #endif 206 207 #ifndef ACPI_EXTERNAL_RETURN_OK 208 #define ACPI_EXTERNAL_RETURN_OK(Prototype) \ 209 Prototype; 210 #endif 211 212 #ifndef ACPI_EXTERNAL_RETURN_VOID 213 #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \ 214 Prototype; 215 #endif 216 217 #ifndef ACPI_EXTERNAL_RETURN_UINT32 218 #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \ 219 Prototype; 220 #endif 221 222 #ifndef ACPI_EXTERNAL_RETURN_PTR 223 #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \ 224 Prototype; 225 #endif 226 227 228 /***************************************************************************** 229 * 230 * Public globals and runtime configuration options 231 * 232 ****************************************************************************/ 233 234 /* 235 * Enable "slack mode" of the AML interpreter? Default is FALSE, and the 236 * interpreter strictly follows the ACPI specification. Setting to TRUE 237 * allows the interpreter to ignore certain errors and/or bad AML constructs. 238 * 239 * Currently, these features are enabled by this flag: 240 * 241 * 1) Allow "implicit return" of last value in a control method 242 * 2) Allow access beyond the end of an operation region 243 * 3) Allow access to uninitialized locals/args (auto-init to integer 0) 244 * 4) Allow ANY object type to be a source operand for the Store() operator 245 * 5) Allow unresolved references (invalid target name) in package objects 246 * 6) Enable warning messages for behavior that is not ACPI spec compliant 247 */ 248 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE); 249 250 /* 251 * Automatically serialize all methods that create named objects? Default 252 * is TRUE, meaning that all NonSerialized methods are scanned once at 253 * table load time to determine those that create named objects. Methods 254 * that create named objects are marked Serialized in order to prevent 255 * possible run-time problems if they are entered by more than one thread. 256 */ 257 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE); 258 259 /* 260 * Create the predefined _OSI method in the namespace? Default is TRUE 261 * because ACPICA is fully compatible with other ACPI implementations. 262 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior. 263 */ 264 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE); 265 266 /* 267 * Optionally use default values for the ACPI register widths. Set this to 268 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. 269 */ 270 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE); 271 272 /* 273 * Whether or not to validate (map) an entire table to verify 274 * checksum/duplication in early stage before install. Set this to TRUE to 275 * allow early table validation before install it to the table manager. 276 * Note that enabling this option causes errors to happen in some OSPMs 277 * during early initialization stages. Default behavior is to allow such 278 * validation. 279 */ 280 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableTableValidation, TRUE); 281 282 /* 283 * Optionally enable output from the AML Debug Object. 284 */ 285 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE); 286 287 /* 288 * Optionally copy the entire DSDT to local memory (instead of simply 289 * mapping it.) There are some BIOSs that corrupt or replace the original 290 * DSDT, creating the need for this option. Default is FALSE, do not copy 291 * the DSDT. 292 */ 293 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE); 294 295 /* 296 * Optionally ignore an XSDT if present and use the RSDT instead. 297 * Although the ACPI specification requires that an XSDT be used instead 298 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on 299 * some machines. Default behavior is to use the XSDT if present. 300 */ 301 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE); 302 303 /* 304 * Optionally support group module level code. 305 * NOTE, this is essentially obsolete and will be removed soon 306 * (01/2018). 307 */ 308 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_GroupModuleLevelCode, FALSE); 309 310 /* 311 * Optionally support module level code by parsing an entire table as 312 * a method as it is loaded. Default is TRUE. 313 * NOTE, this is essentially obsolete and will be removed soon 314 * (01/2018). 315 */ 316 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_ExecuteTablesAsMethods, TRUE); 317 318 /* 319 * Optionally use 32-bit FADT addresses if and when there is a conflict 320 * (address mismatch) between the 32-bit and 64-bit versions of the 321 * address. Although ACPICA adheres to the ACPI specification which 322 * requires the use of the corresponding 64-bit address if it is non-zero, 323 * some machines have been found to have a corrupted non-zero 64-bit 324 * address. Default is FALSE, do not favor the 32-bit addresses. 325 */ 326 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE); 327 328 /* 329 * Optionally use 32-bit FACS table addresses. 330 * It is reported that some platforms fail to resume from system suspending 331 * if 64-bit FACS table address is selected: 332 * https://bugzilla.kernel.org/show_bug.cgi?id=74021 333 * Default is TRUE, favor the 32-bit addresses. 334 */ 335 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE); 336 337 /* 338 * Optionally truncate I/O addresses to 16 bits. Provides compatibility 339 * with other ACPI implementations. NOTE: During ACPICA initialization, 340 * this value is set to TRUE if any Windows OSI strings have been 341 * requested by the BIOS. 342 */ 343 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE); 344 345 /* 346 * Disable runtime checking and repair of values returned by control methods. 347 * Use only if the repair is causing a problem on a particular machine. 348 */ 349 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE); 350 351 /* 352 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. 353 * This can be useful for debugging ACPI problems on some machines. 354 */ 355 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE); 356 357 /* 358 * Optionally enable runtime namespace override. 359 */ 360 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE); 361 362 /* 363 * We keep track of the latest version of Windows that has been requested by 364 * the BIOS. ACPI 5.0. 365 */ 366 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0); 367 368 /* 369 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning 370 * that the ACPI hardware is no longer required. A flag in the FADT indicates 371 * a reduced HW machine, and that flag is duplicated here for convenience. 372 */ 373 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE); 374 375 /* 376 * Maximum timeout for While() loop iterations before forced method abort. 377 * This mechanism is intended to prevent infinite loops during interpreter 378 * execution within a host kernel. 379 */ 380 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_TIMEOUT); 381 382 /* 383 * Optionally ignore AE_NOT_FOUND errors from named reference package elements 384 * during DSDT/SSDT table loading. This reduces error "noise" in platforms 385 * whose firmware is carrying around a bunch of unused package objects that 386 * refer to non-existent named objects. However, If the AML actually tries to 387 * use such a package, the unresolved element(s) will be replaced with NULL 388 * elements. 389 */ 390 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnorePackageResolutionErrors, FALSE); 391 392 /* 393 * This mechanism is used to trace a specified AML method. The method is 394 * traced each time it is executed. 395 */ 396 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0); 397 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL); 398 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT); 399 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT); 400 401 /* 402 * Runtime configuration of debug output control masks. We want the debug 403 * switches statically initialized so they are already set when the debugger 404 * is entered. 405 */ 406 #ifdef ACPI_DEBUG_OUTPUT 407 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT); 408 #else 409 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT); 410 #endif 411 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT); 412 413 /* Optionally enable timer output with Debug Object output */ 414 415 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE); 416 417 /* 418 * Debugger command handshake globals. Host OSes need to access these 419 * variables to implement their own command handshake mechanism. 420 */ 421 #ifdef ACPI_DEBUGGER 422 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE); 423 ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]); 424 #endif 425 426 /* 427 * Other miscellaneous globals 428 */ 429 ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT); 430 ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount); 431 ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); 432 433 434 /***************************************************************************** 435 * 436 * ACPICA public interface configuration. 437 * 438 * Interfaces that are configured out of the ACPICA build are replaced 439 * by inlined stubs by default. 440 * 441 ****************************************************************************/ 442 443 /* 444 * Hardware-reduced prototypes (default: Not hardware reduced). 445 * 446 * All ACPICA hardware-related interfaces that use these macros will be 447 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag 448 * is set to TRUE. 449 * 450 * Note: This static build option for reduced hardware is intended to 451 * reduce ACPICA code size if desired or necessary. However, even if this 452 * option is not specified, the runtime behavior of ACPICA is dependent 453 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set, 454 * the flag will enable similar behavior -- ACPICA will not attempt 455 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.) 456 */ 457 #if (!ACPI_REDUCED_HARDWARE) 458 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 459 ACPI_EXTERNAL_RETURN_STATUS(Prototype) 460 461 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 462 ACPI_EXTERNAL_RETURN_OK(Prototype) 463 464 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 465 ACPI_EXTERNAL_RETURN_VOID(Prototype) 466 467 #else 468 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 469 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);} 470 471 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 472 static ACPI_INLINE Prototype {return(AE_OK);} 473 474 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 475 static ACPI_INLINE Prototype {return;} 476 477 #endif /* !ACPI_REDUCED_HARDWARE */ 478 479 480 /* 481 * Error message prototypes (default: error messages enabled). 482 * 483 * All interfaces related to error and warning messages 484 * will be configured out of the ACPICA build if the 485 * ACPI_NO_ERROR_MESSAGE flag is defined. 486 */ 487 #ifndef ACPI_NO_ERROR_MESSAGES 488 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \ 489 Prototype; 490 491 #else 492 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \ 493 static ACPI_INLINE Prototype {return;} 494 495 #endif /* ACPI_NO_ERROR_MESSAGES */ 496 497 498 /* 499 * Debugging output prototypes (default: no debug output). 500 * 501 * All interfaces related to debug output messages 502 * will be configured out of the ACPICA build unless the 503 * ACPI_DEBUG_OUTPUT flag is defined. 504 */ 505 #ifdef ACPI_DEBUG_OUTPUT 506 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \ 507 Prototype; 508 509 #else 510 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \ 511 static ACPI_INLINE Prototype {return;} 512 513 #endif /* ACPI_DEBUG_OUTPUT */ 514 515 516 /* 517 * Application prototypes 518 * 519 * All interfaces used by application will be configured 520 * out of the ACPICA build unless the ACPI_APPLICATION 521 * flag is defined. 522 */ 523 #ifdef ACPI_APPLICATION 524 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \ 525 Prototype; 526 527 #else 528 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \ 529 static ACPI_INLINE Prototype {return;} 530 531 #endif /* ACPI_APPLICATION */ 532 533 534 /* 535 * Debugger prototypes 536 * 537 * All interfaces used by debugger will be configured 538 * out of the ACPICA build unless the ACPI_DEBUGGER 539 * flag is defined. 540 */ 541 #ifdef ACPI_DEBUGGER 542 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \ 543 ACPI_EXTERNAL_RETURN_OK(Prototype) 544 545 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \ 546 ACPI_EXTERNAL_RETURN_VOID(Prototype) 547 548 #else 549 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \ 550 static ACPI_INLINE Prototype {return(AE_OK);} 551 552 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \ 553 static ACPI_INLINE Prototype {return;} 554 555 #endif /* ACPI_DEBUGGER */ 556 557 558 /***************************************************************************** 559 * 560 * ACPICA public interface prototypes 561 * 562 ****************************************************************************/ 563 564 /* 565 * Initialization 566 */ 567 ACPI_EXTERNAL_RETURN_STATUS ( 568 ACPI_STATUS ACPI_INIT_FUNCTION 569 AcpiInitializeTables ( 570 ACPI_TABLE_DESC *InitialStorage, 571 UINT32 InitialTableCount, 572 BOOLEAN AllowResize)) 573 574 ACPI_EXTERNAL_RETURN_STATUS ( 575 ACPI_STATUS ACPI_INIT_FUNCTION 576 AcpiInitializeSubsystem ( 577 void)) 578 579 ACPI_EXTERNAL_RETURN_STATUS ( 580 ACPI_STATUS ACPI_INIT_FUNCTION 581 AcpiEnableSubsystem ( 582 UINT32 Flags)) 583 584 ACPI_EXTERNAL_RETURN_STATUS ( 585 ACPI_STATUS ACPI_INIT_FUNCTION 586 AcpiInitializeObjects ( 587 UINT32 Flags)) 588 589 ACPI_EXTERNAL_RETURN_STATUS ( 590 ACPI_STATUS ACPI_INIT_FUNCTION 591 AcpiTerminate ( 592 void)) 593 594 595 /* 596 * Miscellaneous global interfaces 597 */ 598 ACPI_HW_DEPENDENT_RETURN_STATUS ( 599 ACPI_STATUS 600 AcpiEnable ( 601 void)) 602 603 ACPI_HW_DEPENDENT_RETURN_STATUS ( 604 ACPI_STATUS 605 AcpiDisable ( 606 void)) 607 608 ACPI_EXTERNAL_RETURN_STATUS ( 609 ACPI_STATUS 610 AcpiSubsystemStatus ( 611 void)) 612 613 ACPI_EXTERNAL_RETURN_STATUS ( 614 ACPI_STATUS 615 AcpiGetSystemInfo ( 616 ACPI_BUFFER *RetBuffer)) 617 618 ACPI_EXTERNAL_RETURN_STATUS ( 619 ACPI_STATUS 620 AcpiGetStatistics ( 621 ACPI_STATISTICS *Stats)) 622 623 ACPI_EXTERNAL_RETURN_PTR ( 624 const char * 625 AcpiFormatException ( 626 ACPI_STATUS Exception)) 627 628 ACPI_EXTERNAL_RETURN_STATUS ( 629 ACPI_STATUS 630 AcpiPurgeCachedObjects ( 631 void)) 632 633 ACPI_EXTERNAL_RETURN_STATUS ( 634 ACPI_STATUS 635 AcpiInstallInterface ( 636 ACPI_STRING InterfaceName)) 637 638 ACPI_EXTERNAL_RETURN_STATUS ( 639 ACPI_STATUS 640 AcpiRemoveInterface ( 641 ACPI_STRING InterfaceName)) 642 643 ACPI_EXTERNAL_RETURN_STATUS ( 644 ACPI_STATUS 645 AcpiUpdateInterfaces ( 646 UINT8 Action)) 647 648 ACPI_EXTERNAL_RETURN_UINT32 ( 649 UINT32 650 AcpiCheckAddressRange ( 651 ACPI_ADR_SPACE_TYPE SpaceId, 652 ACPI_PHYSICAL_ADDRESS Address, 653 ACPI_SIZE Length, 654 BOOLEAN Warn)) 655 656 ACPI_EXTERNAL_RETURN_STATUS ( 657 ACPI_STATUS 658 AcpiDecodePldBuffer ( 659 UINT8 *InBuffer, 660 ACPI_SIZE Length, 661 ACPI_PLD_INFO **ReturnBuffer)) 662 663 664 /* 665 * ACPI table load/unload interfaces 666 */ 667 ACPI_EXTERNAL_RETURN_STATUS ( 668 ACPI_STATUS ACPI_INIT_FUNCTION 669 AcpiInstallTable ( 670 ACPI_PHYSICAL_ADDRESS Address, 671 BOOLEAN Physical)) 672 673 ACPI_EXTERNAL_RETURN_STATUS ( 674 ACPI_STATUS 675 AcpiLoadTable ( 676 ACPI_TABLE_HEADER *Table)) 677 678 ACPI_EXTERNAL_RETURN_STATUS ( 679 ACPI_STATUS 680 AcpiUnloadParentTable ( 681 ACPI_HANDLE Object)) 682 683 ACPI_EXTERNAL_RETURN_STATUS ( 684 ACPI_STATUS ACPI_INIT_FUNCTION 685 AcpiLoadTables ( 686 void)) 687 688 689 /* 690 * ACPI table manipulation interfaces 691 */ 692 ACPI_EXTERNAL_RETURN_STATUS ( 693 ACPI_STATUS ACPI_INIT_FUNCTION 694 AcpiReallocateRootTable ( 695 void)) 696 697 ACPI_EXTERNAL_RETURN_STATUS ( 698 ACPI_STATUS ACPI_INIT_FUNCTION 699 AcpiFindRootPointer ( 700 ACPI_PHYSICAL_ADDRESS *RsdpAddress)) 701 702 ACPI_EXTERNAL_RETURN_STATUS ( 703 ACPI_STATUS 704 AcpiGetTableHeader ( 705 ACPI_STRING Signature, 706 UINT32 Instance, 707 ACPI_TABLE_HEADER *OutTableHeader)) 708 709 ACPI_EXTERNAL_RETURN_STATUS ( 710 ACPI_STATUS 711 AcpiGetTable ( 712 ACPI_STRING Signature, 713 UINT32 Instance, 714 ACPI_TABLE_HEADER **OutTable)) 715 716 ACPI_EXTERNAL_RETURN_VOID ( 717 void 718 AcpiPutTable ( 719 ACPI_TABLE_HEADER *Table)) 720 721 ACPI_EXTERNAL_RETURN_STATUS ( 722 ACPI_STATUS 723 AcpiGetTableByIndex ( 724 UINT32 TableIndex, 725 ACPI_TABLE_HEADER **OutTable)) 726 727 ACPI_EXTERNAL_RETURN_STATUS ( 728 ACPI_STATUS 729 AcpiInstallTableHandler ( 730 ACPI_TABLE_HANDLER Handler, 731 void *Context)) 732 733 ACPI_EXTERNAL_RETURN_STATUS ( 734 ACPI_STATUS 735 AcpiRemoveTableHandler ( 736 ACPI_TABLE_HANDLER Handler)) 737 738 739 /* 740 * Namespace and name interfaces 741 */ 742 ACPI_EXTERNAL_RETURN_STATUS ( 743 ACPI_STATUS 744 AcpiWalkNamespace ( 745 ACPI_OBJECT_TYPE Type, 746 ACPI_HANDLE StartObject, 747 UINT32 MaxDepth, 748 ACPI_WALK_CALLBACK DescendingCallback, 749 ACPI_WALK_CALLBACK AscendingCallback, 750 void *Context, 751 void **ReturnValue)) 752 753 ACPI_EXTERNAL_RETURN_STATUS ( 754 ACPI_STATUS 755 AcpiGetDevices ( 756 char *HID, 757 ACPI_WALK_CALLBACK UserFunction, 758 void *Context, 759 void **ReturnValue)) 760 761 ACPI_EXTERNAL_RETURN_STATUS ( 762 ACPI_STATUS 763 AcpiGetName ( 764 ACPI_HANDLE Object, 765 UINT32 NameType, 766 ACPI_BUFFER *RetPathPtr)) 767 768 ACPI_EXTERNAL_RETURN_STATUS ( 769 ACPI_STATUS 770 AcpiGetHandle ( 771 ACPI_HANDLE Parent, 772 ACPI_STRING Pathname, 773 ACPI_HANDLE *RetHandle)) 774 775 ACPI_EXTERNAL_RETURN_STATUS ( 776 ACPI_STATUS 777 AcpiAttachData ( 778 ACPI_HANDLE Object, 779 ACPI_OBJECT_HANDLER Handler, 780 void *Data)) 781 782 ACPI_EXTERNAL_RETURN_STATUS ( 783 ACPI_STATUS 784 AcpiDetachData ( 785 ACPI_HANDLE Object, 786 ACPI_OBJECT_HANDLER Handler)) 787 788 ACPI_EXTERNAL_RETURN_STATUS ( 789 ACPI_STATUS 790 AcpiGetData ( 791 ACPI_HANDLE Object, 792 ACPI_OBJECT_HANDLER Handler, 793 void **Data)) 794 795 ACPI_EXTERNAL_RETURN_STATUS ( 796 ACPI_STATUS 797 AcpiDebugTrace ( 798 const char *Name, 799 UINT32 DebugLevel, 800 UINT32 DebugLayer, 801 UINT32 Flags)) 802 803 804 /* 805 * Object manipulation and enumeration 806 */ 807 ACPI_EXTERNAL_RETURN_STATUS ( 808 ACPI_STATUS 809 AcpiEvaluateObject ( 810 ACPI_HANDLE Object, 811 ACPI_STRING Pathname, 812 ACPI_OBJECT_LIST *ParameterObjects, 813 ACPI_BUFFER *ReturnObjectBuffer)) 814 815 ACPI_EXTERNAL_RETURN_STATUS ( 816 ACPI_STATUS 817 AcpiEvaluateObjectTyped ( 818 ACPI_HANDLE Object, 819 ACPI_STRING Pathname, 820 ACPI_OBJECT_LIST *ExternalParams, 821 ACPI_BUFFER *ReturnBuffer, 822 ACPI_OBJECT_TYPE ReturnType)) 823 824 ACPI_EXTERNAL_RETURN_STATUS ( 825 ACPI_STATUS 826 AcpiGetObjectInfo ( 827 ACPI_HANDLE Object, 828 ACPI_DEVICE_INFO **ReturnBuffer)) 829 830 ACPI_EXTERNAL_RETURN_STATUS ( 831 ACPI_STATUS 832 AcpiInstallMethod ( 833 UINT8 *Buffer)) 834 835 ACPI_EXTERNAL_RETURN_STATUS ( 836 ACPI_STATUS 837 AcpiGetNextObject ( 838 ACPI_OBJECT_TYPE Type, 839 ACPI_HANDLE Parent, 840 ACPI_HANDLE Child, 841 ACPI_HANDLE *OutHandle)) 842 843 ACPI_EXTERNAL_RETURN_STATUS ( 844 ACPI_STATUS 845 AcpiGetType ( 846 ACPI_HANDLE Object, 847 ACPI_OBJECT_TYPE *OutType)) 848 849 ACPI_EXTERNAL_RETURN_STATUS ( 850 ACPI_STATUS 851 AcpiGetParent ( 852 ACPI_HANDLE Object, 853 ACPI_HANDLE *OutHandle)) 854 855 856 /* 857 * Handler interfaces 858 */ 859 ACPI_EXTERNAL_RETURN_STATUS ( 860 ACPI_STATUS 861 AcpiInstallInitializationHandler ( 862 ACPI_INIT_HANDLER Handler, 863 UINT32 Function)) 864 865 ACPI_HW_DEPENDENT_RETURN_STATUS ( 866 ACPI_STATUS 867 AcpiInstallSciHandler ( 868 ACPI_SCI_HANDLER Address, 869 void *Context)) 870 871 ACPI_HW_DEPENDENT_RETURN_STATUS ( 872 ACPI_STATUS 873 AcpiRemoveSciHandler ( 874 ACPI_SCI_HANDLER Address)) 875 876 ACPI_HW_DEPENDENT_RETURN_STATUS ( 877 ACPI_STATUS 878 AcpiInstallGlobalEventHandler ( 879 ACPI_GBL_EVENT_HANDLER Handler, 880 void *Context)) 881 882 ACPI_HW_DEPENDENT_RETURN_STATUS ( 883 ACPI_STATUS 884 AcpiInstallFixedEventHandler ( 885 UINT32 AcpiEvent, 886 ACPI_EVENT_HANDLER Handler, 887 void *Context)) 888 889 ACPI_HW_DEPENDENT_RETURN_STATUS ( 890 ACPI_STATUS 891 AcpiRemoveFixedEventHandler ( 892 UINT32 AcpiEvent, 893 ACPI_EVENT_HANDLER Handler)) 894 895 ACPI_HW_DEPENDENT_RETURN_STATUS ( 896 ACPI_STATUS 897 AcpiInstallGpeHandler ( 898 ACPI_HANDLE GpeDevice, 899 UINT32 GpeNumber, 900 UINT32 Type, 901 ACPI_GPE_HANDLER Address, 902 void *Context)) 903 904 ACPI_HW_DEPENDENT_RETURN_STATUS ( 905 ACPI_STATUS 906 AcpiInstallGpeRawHandler ( 907 ACPI_HANDLE GpeDevice, 908 UINT32 GpeNumber, 909 UINT32 Type, 910 ACPI_GPE_HANDLER Address, 911 void *Context)) 912 913 ACPI_HW_DEPENDENT_RETURN_STATUS ( 914 ACPI_STATUS 915 AcpiRemoveGpeHandler ( 916 ACPI_HANDLE GpeDevice, 917 UINT32 GpeNumber, 918 ACPI_GPE_HANDLER Address)) 919 920 ACPI_EXTERNAL_RETURN_STATUS ( 921 ACPI_STATUS 922 AcpiInstallNotifyHandler ( 923 ACPI_HANDLE Device, 924 UINT32 HandlerType, 925 ACPI_NOTIFY_HANDLER Handler, 926 void *Context)) 927 928 ACPI_EXTERNAL_RETURN_STATUS ( 929 ACPI_STATUS 930 AcpiRemoveNotifyHandler ( 931 ACPI_HANDLE Device, 932 UINT32 HandlerType, 933 ACPI_NOTIFY_HANDLER Handler)) 934 935 ACPI_EXTERNAL_RETURN_STATUS ( 936 ACPI_STATUS 937 AcpiInstallAddressSpaceHandler ( 938 ACPI_HANDLE Device, 939 ACPI_ADR_SPACE_TYPE SpaceId, 940 ACPI_ADR_SPACE_HANDLER Handler, 941 ACPI_ADR_SPACE_SETUP Setup, 942 void *Context)) 943 944 ACPI_EXTERNAL_RETURN_STATUS ( 945 ACPI_STATUS 946 AcpiRemoveAddressSpaceHandler ( 947 ACPI_HANDLE Device, 948 ACPI_ADR_SPACE_TYPE SpaceId, 949 ACPI_ADR_SPACE_HANDLER Handler)) 950 951 ACPI_EXTERNAL_RETURN_STATUS ( 952 ACPI_STATUS 953 AcpiInstallExceptionHandler ( 954 ACPI_EXCEPTION_HANDLER Handler)) 955 956 ACPI_EXTERNAL_RETURN_STATUS ( 957 ACPI_STATUS 958 AcpiInstallInterfaceHandler ( 959 ACPI_INTERFACE_HANDLER Handler)) 960 961 962 /* 963 * Global Lock interfaces 964 */ 965 ACPI_HW_DEPENDENT_RETURN_STATUS ( 966 ACPI_STATUS 967 AcpiAcquireGlobalLock ( 968 UINT16 Timeout, 969 UINT32 *Handle)) 970 971 ACPI_HW_DEPENDENT_RETURN_STATUS ( 972 ACPI_STATUS 973 AcpiReleaseGlobalLock ( 974 UINT32 Handle)) 975 976 977 /* 978 * Interfaces to AML mutex objects 979 */ 980 ACPI_EXTERNAL_RETURN_STATUS ( 981 ACPI_STATUS 982 AcpiAcquireMutex ( 983 ACPI_HANDLE Handle, 984 ACPI_STRING Pathname, 985 UINT16 Timeout)) 986 987 ACPI_EXTERNAL_RETURN_STATUS ( 988 ACPI_STATUS 989 AcpiReleaseMutex ( 990 ACPI_HANDLE Handle, 991 ACPI_STRING Pathname)) 992 993 994 /* 995 * Fixed Event interfaces 996 */ 997 ACPI_HW_DEPENDENT_RETURN_STATUS ( 998 ACPI_STATUS 999 AcpiEnableEvent ( 1000 UINT32 Event, 1001 UINT32 Flags)) 1002 1003 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1004 ACPI_STATUS 1005 AcpiDisableEvent ( 1006 UINT32 Event, 1007 UINT32 Flags)) 1008 1009 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1010 ACPI_STATUS 1011 AcpiClearEvent ( 1012 UINT32 Event)) 1013 1014 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1015 ACPI_STATUS 1016 AcpiGetEventStatus ( 1017 UINT32 Event, 1018 ACPI_EVENT_STATUS *EventStatus)) 1019 1020 1021 /* 1022 * General Purpose Event (GPE) Interfaces 1023 */ 1024 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1025 ACPI_STATUS 1026 AcpiUpdateAllGpes ( 1027 void)) 1028 1029 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1030 ACPI_STATUS 1031 AcpiEnableGpe ( 1032 ACPI_HANDLE GpeDevice, 1033 UINT32 GpeNumber)) 1034 1035 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1036 ACPI_STATUS 1037 AcpiDisableGpe ( 1038 ACPI_HANDLE GpeDevice, 1039 UINT32 GpeNumber)) 1040 1041 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1042 ACPI_STATUS 1043 AcpiClearGpe ( 1044 ACPI_HANDLE GpeDevice, 1045 UINT32 GpeNumber)) 1046 1047 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1048 ACPI_STATUS 1049 AcpiSetGpe ( 1050 ACPI_HANDLE GpeDevice, 1051 UINT32 GpeNumber, 1052 UINT8 Action)) 1053 1054 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1055 ACPI_STATUS 1056 AcpiFinishGpe ( 1057 ACPI_HANDLE GpeDevice, 1058 UINT32 GpeNumber)) 1059 1060 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1061 ACPI_STATUS 1062 AcpiMaskGpe ( 1063 ACPI_HANDLE GpeDevice, 1064 UINT32 GpeNumber, 1065 BOOLEAN IsMasked)) 1066 1067 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1068 ACPI_STATUS 1069 AcpiMarkGpeForWake ( 1070 ACPI_HANDLE GpeDevice, 1071 UINT32 GpeNumber)) 1072 1073 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1074 ACPI_STATUS 1075 AcpiSetupGpeForWake ( 1076 ACPI_HANDLE ParentDevice, 1077 ACPI_HANDLE GpeDevice, 1078 UINT32 GpeNumber)) 1079 1080 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1081 ACPI_STATUS 1082 AcpiSetGpeWakeMask ( 1083 ACPI_HANDLE GpeDevice, 1084 UINT32 GpeNumber, 1085 UINT8 Action)) 1086 1087 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1088 ACPI_STATUS 1089 AcpiGetGpeStatus ( 1090 ACPI_HANDLE GpeDevice, 1091 UINT32 GpeNumber, 1092 ACPI_EVENT_STATUS *EventStatus)) 1093 1094 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1095 ACPI_STATUS 1096 AcpiDisableAllGpes ( 1097 void)) 1098 1099 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1100 ACPI_STATUS 1101 AcpiEnableAllRuntimeGpes ( 1102 void)) 1103 1104 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1105 ACPI_STATUS 1106 AcpiEnableAllWakeupGpes ( 1107 void)) 1108 1109 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1110 ACPI_STATUS 1111 AcpiGetGpeDevice ( 1112 UINT32 GpeIndex, 1113 ACPI_HANDLE *GpeDevice)) 1114 1115 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1116 ACPI_STATUS 1117 AcpiInstallGpeBlock ( 1118 ACPI_HANDLE GpeDevice, 1119 ACPI_GENERIC_ADDRESS *GpeBlockAddress, 1120 UINT32 RegisterCount, 1121 UINT32 InterruptNumber)) 1122 1123 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1124 ACPI_STATUS 1125 AcpiRemoveGpeBlock ( 1126 ACPI_HANDLE GpeDevice)) 1127 1128 1129 /* 1130 * Resource interfaces 1131 */ 1132 typedef 1133 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 1134 ACPI_RESOURCE *Resource, 1135 void *Context); 1136 1137 ACPI_EXTERNAL_RETURN_STATUS ( 1138 ACPI_STATUS 1139 AcpiGetVendorResource ( 1140 ACPI_HANDLE Device, 1141 char *Name, 1142 ACPI_VENDOR_UUID *Uuid, 1143 ACPI_BUFFER *RetBuffer)) 1144 1145 ACPI_EXTERNAL_RETURN_STATUS ( 1146 ACPI_STATUS 1147 AcpiGetCurrentResources ( 1148 ACPI_HANDLE Device, 1149 ACPI_BUFFER *RetBuffer)) 1150 1151 ACPI_EXTERNAL_RETURN_STATUS ( 1152 ACPI_STATUS 1153 AcpiGetPossibleResources ( 1154 ACPI_HANDLE Device, 1155 ACPI_BUFFER *RetBuffer)) 1156 1157 ACPI_EXTERNAL_RETURN_STATUS ( 1158 ACPI_STATUS 1159 AcpiGetEventResources ( 1160 ACPI_HANDLE DeviceHandle, 1161 ACPI_BUFFER *RetBuffer)) 1162 1163 ACPI_EXTERNAL_RETURN_STATUS ( 1164 ACPI_STATUS 1165 AcpiWalkResourceBuffer ( 1166 ACPI_BUFFER *Buffer, 1167 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 1168 void *Context)) 1169 1170 ACPI_EXTERNAL_RETURN_STATUS ( 1171 ACPI_STATUS 1172 AcpiWalkResources ( 1173 ACPI_HANDLE Device, 1174 char *Name, 1175 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 1176 void *Context)) 1177 1178 ACPI_EXTERNAL_RETURN_STATUS ( 1179 ACPI_STATUS 1180 AcpiSetCurrentResources ( 1181 ACPI_HANDLE Device, 1182 ACPI_BUFFER *InBuffer)) 1183 1184 ACPI_EXTERNAL_RETURN_STATUS ( 1185 ACPI_STATUS 1186 AcpiGetIrqRoutingTable ( 1187 ACPI_HANDLE Device, 1188 ACPI_BUFFER *RetBuffer)) 1189 1190 ACPI_EXTERNAL_RETURN_STATUS ( 1191 ACPI_STATUS 1192 AcpiResourceToAddress64 ( 1193 ACPI_RESOURCE *Resource, 1194 ACPI_RESOURCE_ADDRESS64 *Out)) 1195 1196 ACPI_EXTERNAL_RETURN_STATUS ( 1197 ACPI_STATUS 1198 AcpiBufferToResource ( 1199 UINT8 *AmlBuffer, 1200 UINT16 AmlBufferLength, 1201 ACPI_RESOURCE **ResourcePtr)) 1202 1203 1204 /* 1205 * Hardware (ACPI device) interfaces 1206 */ 1207 ACPI_EXTERNAL_RETURN_STATUS ( 1208 ACPI_STATUS 1209 AcpiReset ( 1210 void)) 1211 1212 ACPI_EXTERNAL_RETURN_STATUS ( 1213 ACPI_STATUS 1214 AcpiRead ( 1215 UINT64 *Value, 1216 ACPI_GENERIC_ADDRESS *Reg)) 1217 1218 ACPI_EXTERNAL_RETURN_STATUS ( 1219 ACPI_STATUS 1220 AcpiWrite ( 1221 UINT64 Value, 1222 ACPI_GENERIC_ADDRESS *Reg)) 1223 1224 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1225 ACPI_STATUS 1226 AcpiReadBitRegister ( 1227 UINT32 RegisterId, 1228 UINT32 *ReturnValue)) 1229 1230 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1231 ACPI_STATUS 1232 AcpiWriteBitRegister ( 1233 UINT32 RegisterId, 1234 UINT32 Value)) 1235 1236 1237 /* 1238 * Sleep/Wake interfaces 1239 */ 1240 ACPI_EXTERNAL_RETURN_STATUS ( 1241 ACPI_STATUS 1242 AcpiGetSleepTypeData ( 1243 UINT8 SleepState, 1244 UINT8 *Slp_TypA, 1245 UINT8 *Slp_TypB)) 1246 1247 ACPI_EXTERNAL_RETURN_STATUS ( 1248 ACPI_STATUS 1249 AcpiEnterSleepStatePrep ( 1250 UINT8 SleepState)) 1251 1252 ACPI_EXTERNAL_RETURN_STATUS ( 1253 ACPI_STATUS 1254 AcpiEnterSleepState ( 1255 UINT8 SleepState)) 1256 1257 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1258 ACPI_STATUS 1259 AcpiEnterSleepStateS4bios ( 1260 void)) 1261 1262 ACPI_EXTERNAL_RETURN_STATUS ( 1263 ACPI_STATUS 1264 AcpiLeaveSleepStatePrep ( 1265 UINT8 SleepState)) 1266 1267 ACPI_EXTERNAL_RETURN_STATUS ( 1268 ACPI_STATUS 1269 AcpiLeaveSleepState ( 1270 UINT8 SleepState)) 1271 1272 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1273 ACPI_STATUS 1274 AcpiSetFirmwareWakingVector ( 1275 ACPI_PHYSICAL_ADDRESS PhysicalAddress, 1276 ACPI_PHYSICAL_ADDRESS PhysicalAddress64)) 1277 1278 1279 /* 1280 * ACPI Timer interfaces 1281 */ 1282 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1283 ACPI_STATUS 1284 AcpiGetTimerResolution ( 1285 UINT32 *Resolution)) 1286 1287 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1288 ACPI_STATUS 1289 AcpiGetTimer ( 1290 UINT32 *Ticks)) 1291 1292 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1293 ACPI_STATUS 1294 AcpiGetTimerDuration ( 1295 UINT32 StartTicks, 1296 UINT32 EndTicks, 1297 UINT32 *TimeElapsed)) 1298 1299 1300 /* 1301 * Error/Warning output 1302 */ 1303 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1304 ACPI_PRINTF_LIKE(3) 1305 void ACPI_INTERNAL_VAR_XFACE 1306 AcpiError ( 1307 const char *ModuleName, 1308 UINT32 LineNumber, 1309 const char *Format, 1310 ...)) 1311 1312 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1313 ACPI_PRINTF_LIKE(4) 1314 void ACPI_INTERNAL_VAR_XFACE 1315 AcpiException ( 1316 const char *ModuleName, 1317 UINT32 LineNumber, 1318 ACPI_STATUS Status, 1319 const char *Format, 1320 ...)) 1321 1322 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1323 ACPI_PRINTF_LIKE(3) 1324 void ACPI_INTERNAL_VAR_XFACE 1325 AcpiWarning ( 1326 const char *ModuleName, 1327 UINT32 LineNumber, 1328 const char *Format, 1329 ...)) 1330 1331 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1332 ACPI_PRINTF_LIKE(1) 1333 void ACPI_INTERNAL_VAR_XFACE 1334 AcpiInfo ( 1335 const char *Format, 1336 ...)) 1337 1338 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1339 ACPI_PRINTF_LIKE(3) 1340 void ACPI_INTERNAL_VAR_XFACE 1341 AcpiBiosError ( 1342 const char *ModuleName, 1343 UINT32 LineNumber, 1344 const char *Format, 1345 ...)) 1346 1347 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1348 ACPI_PRINTF_LIKE(3) 1349 void ACPI_INTERNAL_VAR_XFACE 1350 AcpiBiosWarning ( 1351 const char *ModuleName, 1352 UINT32 LineNumber, 1353 const char *Format, 1354 ...)) 1355 1356 1357 /* 1358 * Debug output 1359 */ 1360 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1361 ACPI_PRINTF_LIKE(6) 1362 void ACPI_INTERNAL_VAR_XFACE 1363 AcpiDebugPrint ( 1364 UINT32 RequestedDebugLevel, 1365 UINT32 LineNumber, 1366 const char *FunctionName, 1367 const char *ModuleName, 1368 UINT32 ComponentId, 1369 const char *Format, 1370 ...)) 1371 1372 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1373 ACPI_PRINTF_LIKE(6) 1374 void ACPI_INTERNAL_VAR_XFACE 1375 AcpiDebugPrintRaw ( 1376 UINT32 RequestedDebugLevel, 1377 UINT32 LineNumber, 1378 const char *FunctionName, 1379 const char *ModuleName, 1380 UINT32 ComponentId, 1381 const char *Format, 1382 ...)) 1383 1384 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1385 void 1386 AcpiTracePoint ( 1387 ACPI_TRACE_EVENT_TYPE Type, 1388 BOOLEAN Begin, 1389 UINT8 *Aml, 1390 char *Pathname)) 1391 1392 ACPI_STATUS 1393 AcpiInitializeDebugger ( 1394 void); 1395 1396 void 1397 AcpiTerminateDebugger ( 1398 void); 1399 1400 void 1401 AcpiRunDebugger ( 1402 char *BatchBuffer); 1403 1404 void 1405 AcpiSetDebuggerThreadId ( 1406 ACPI_THREAD_ID ThreadId); 1407 1408 #endif /* __ACXFACE_H__ */ 1409