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 - 2025, 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 0x20250807 158 159 #include "acconfig.h" 160 #include "actypes.h" 161 #include "actbl.h" 162 #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 (_Bool, 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 use 32-bit FADT addresses if and when there is a conflict 305 * (address mismatch) between the 32-bit and 64-bit versions of the 306 * address. Although ACPICA adheres to the ACPI specification which 307 * requires the use of the corresponding 64-bit address if it is non-zero, 308 * some machines have been found to have a corrupted non-zero 64-bit 309 * address. Default is FALSE, do not favor the 32-bit addresses. 310 */ 311 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE); 312 313 /* 314 * Optionally use 32-bit FACS table addresses. 315 * It is reported that some platforms fail to resume from system suspending 316 * if 64-bit FACS table address is selected: 317 * https://bugzilla.kernel.org/show_bug.cgi?id=74021 318 * Default is TRUE, favor the 32-bit addresses. 319 */ 320 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE); 321 322 /* 323 * Optionally truncate I/O addresses to 16 bits. Provides compatibility 324 * with other ACPI implementations. NOTE: During ACPICA initialization, 325 * this value is set to TRUE if any Windows OSI strings have been 326 * requested by the BIOS. 327 */ 328 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE); 329 330 /* 331 * Disable runtime checking and repair of values returned by control methods. 332 * Use only if the repair is causing a problem on a particular machine. 333 */ 334 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE); 335 336 /* 337 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. 338 * This can be useful for debugging ACPI problems on some machines. 339 */ 340 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE); 341 342 /* 343 * Optionally enable runtime namespace override. 344 */ 345 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE); 346 347 /* 348 * We keep track of the latest version of Windows that has been requested by 349 * the BIOS. ACPI 5.0. 350 */ 351 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0); 352 353 /* 354 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning 355 * that the ACPI hardware is no longer required. A flag in the FADT indicates 356 * a reduced HW machine, and that flag is duplicated here for convenience. 357 */ 358 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE); 359 360 /* 361 * ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems 362 * (such as LoongArch) may not have and not use Global Lock. 363 */ 364 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_UseGlobalLock, TRUE); 365 366 /* 367 * Maximum timeout for While() loop iterations before forced method abort. 368 * This mechanism is intended to prevent infinite loops during interpreter 369 * execution within a host kernel. 370 */ 371 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_TIMEOUT); 372 373 /* 374 * Optionally ignore AE_NOT_FOUND errors from named reference package elements 375 * during DSDT/SSDT table loading. This reduces error "noise" in platforms 376 * whose firmware is carrying around a bunch of unused package objects that 377 * refer to non-existent named objects. However, If the AML actually tries to 378 * use such a package, the unresolved element(s) will be replaced with NULL 379 * elements. 380 */ 381 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnorePackageResolutionErrors, FALSE); 382 383 /* 384 * This mechanism is used to trace a specified AML method. The method is 385 * traced each time it is executed. 386 */ 387 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0); 388 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL); 389 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT); 390 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT); 391 392 /* 393 * Runtime configuration of debug output control masks. We want the debug 394 * switches statically initialized so they are already set when the debugger 395 * is entered. 396 */ 397 #if defined(ACPI_DEBUG_OUTPUT) && defined(ACPI_DEBUG_TRACE) 398 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT); 399 #else 400 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT); 401 #endif 402 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT); 403 404 /* Optionally enable timer output with Debug Object output */ 405 406 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE); 407 408 /* 409 * Debugger command handshake globals. Host OSes need to access these 410 * variables to implement their own command handshake mechanism. 411 */ 412 #ifdef ACPI_DEBUGGER 413 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE); 414 ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]); 415 #endif 416 417 /* 418 * Other miscellaneous globals 419 */ 420 ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT); 421 ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount); 422 ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); 423 424 425 /***************************************************************************** 426 * 427 * ACPICA public interface configuration. 428 * 429 * Interfaces that are configured out of the ACPICA build are replaced 430 * by inlined stubs by default. 431 * 432 ****************************************************************************/ 433 434 /* 435 * Hardware-reduced prototypes (default: Not hardware reduced). 436 * 437 * All ACPICA hardware-related interfaces that use these macros will be 438 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag 439 * is set to TRUE. 440 * 441 * Note: This static build option for reduced hardware is intended to 442 * reduce ACPICA code size if desired or necessary. However, even if this 443 * option is not specified, the runtime behavior of ACPICA is dependent 444 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set, 445 * the flag will enable similar behavior -- ACPICA will not attempt 446 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.) 447 */ 448 #if (!ACPI_REDUCED_HARDWARE) 449 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 450 ACPI_EXTERNAL_RETURN_STATUS(Prototype) 451 452 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 453 ACPI_EXTERNAL_RETURN_OK(Prototype) 454 455 #define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \ 456 ACPI_EXTERNAL_RETURN_UINT32(prototype) 457 458 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 459 ACPI_EXTERNAL_RETURN_VOID(Prototype) 460 461 #else 462 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 463 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);} 464 465 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 466 static ACPI_INLINE Prototype {return(AE_OK);} 467 468 #define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \ 469 static ACPI_INLINE prototype {return(0);} 470 471 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 472 static ACPI_INLINE Prototype {return;} 473 474 #endif /* !ACPI_REDUCED_HARDWARE */ 475 476 477 /* 478 * Error message prototypes (default: error messages enabled). 479 * 480 * All interfaces related to error and warning messages 481 * will be configured out of the ACPICA build if the 482 * ACPI_NO_ERROR_MESSAGE flag is defined. 483 */ 484 #ifndef ACPI_NO_ERROR_MESSAGES 485 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \ 486 Prototype; 487 488 #else 489 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \ 490 static ACPI_INLINE Prototype {return;} 491 492 #endif /* ACPI_NO_ERROR_MESSAGES */ 493 494 495 /* 496 * Debugging output prototypes (default: no debug output). 497 * 498 * All interfaces related to debug output messages 499 * will be configured out of the ACPICA build unless the 500 * ACPI_DEBUG_OUTPUT flag is defined. 501 */ 502 #ifdef ACPI_DEBUG_OUTPUT 503 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \ 504 Prototype; 505 506 #else 507 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \ 508 static ACPI_INLINE Prototype {return;} 509 510 #endif /* ACPI_DEBUG_OUTPUT */ 511 512 513 /* 514 * Application prototypes 515 * 516 * All interfaces used by application will be configured 517 * out of the ACPICA build unless the ACPI_APPLICATION 518 * flag is defined. 519 */ 520 #ifdef ACPI_APPLICATION 521 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \ 522 Prototype; 523 524 #else 525 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \ 526 static ACPI_INLINE Prototype {return;} 527 528 #endif /* ACPI_APPLICATION */ 529 530 531 /* 532 * Debugger prototypes 533 * 534 * All interfaces used by debugger will be configured 535 * out of the ACPICA build unless the ACPI_DEBUGGER 536 * flag is defined. 537 */ 538 #ifdef ACPI_DEBUGGER 539 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \ 540 ACPI_EXTERNAL_RETURN_OK(Prototype) 541 542 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \ 543 ACPI_EXTERNAL_RETURN_VOID(Prototype) 544 545 #else 546 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \ 547 static ACPI_INLINE Prototype {return(AE_OK);} 548 549 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \ 550 static ACPI_INLINE Prototype {return;} 551 552 #endif /* ACPI_DEBUGGER */ 553 554 555 /***************************************************************************** 556 * 557 * ACPICA public interface prototypes 558 * 559 ****************************************************************************/ 560 561 /* 562 * Initialization 563 */ 564 ACPI_EXTERNAL_RETURN_STATUS ( 565 ACPI_STATUS ACPI_INIT_FUNCTION 566 AcpiInitializeTables ( 567 ACPI_TABLE_DESC *InitialStorage, 568 UINT32 InitialTableCount, 569 BOOLEAN AllowResize)) 570 571 ACPI_EXTERNAL_RETURN_STATUS ( 572 ACPI_STATUS ACPI_INIT_FUNCTION 573 AcpiInitializeSubsystem ( 574 void)) 575 576 ACPI_EXTERNAL_RETURN_STATUS ( 577 ACPI_STATUS ACPI_INIT_FUNCTION 578 AcpiEnableSubsystem ( 579 UINT32 Flags)) 580 581 ACPI_EXTERNAL_RETURN_STATUS ( 582 ACPI_STATUS ACPI_INIT_FUNCTION 583 AcpiInitializeObjects ( 584 UINT32 Flags)) 585 586 ACPI_EXTERNAL_RETURN_STATUS ( 587 ACPI_STATUS ACPI_INIT_FUNCTION 588 AcpiTerminate ( 589 void)) 590 591 592 /* 593 * Miscellaneous global interfaces 594 */ 595 ACPI_HW_DEPENDENT_RETURN_STATUS ( 596 ACPI_STATUS 597 AcpiEnable ( 598 void)) 599 600 ACPI_HW_DEPENDENT_RETURN_STATUS ( 601 ACPI_STATUS 602 AcpiDisable ( 603 void)) 604 605 ACPI_EXTERNAL_RETURN_STATUS ( 606 ACPI_STATUS 607 AcpiSubsystemStatus ( 608 void)) 609 610 ACPI_EXTERNAL_RETURN_STATUS ( 611 ACPI_STATUS 612 AcpiGetSystemInfo ( 613 ACPI_BUFFER *RetBuffer)) 614 615 ACPI_EXTERNAL_RETURN_STATUS ( 616 ACPI_STATUS 617 AcpiGetStatistics ( 618 ACPI_STATISTICS *Stats)) 619 620 ACPI_EXTERNAL_RETURN_PTR ( 621 const char * 622 AcpiFormatException ( 623 ACPI_STATUS Exception)) 624 625 ACPI_EXTERNAL_RETURN_STATUS ( 626 ACPI_STATUS 627 AcpiPurgeCachedObjects ( 628 void)) 629 630 ACPI_EXTERNAL_RETURN_STATUS ( 631 ACPI_STATUS 632 AcpiInstallInterface ( 633 ACPI_STRING InterfaceName)) 634 635 ACPI_EXTERNAL_RETURN_STATUS ( 636 ACPI_STATUS 637 AcpiRemoveInterface ( 638 ACPI_STRING InterfaceName)) 639 640 ACPI_EXTERNAL_RETURN_STATUS ( 641 ACPI_STATUS 642 AcpiUpdateInterfaces ( 643 UINT8 Action)) 644 645 ACPI_EXTERNAL_RETURN_UINT32 ( 646 UINT32 647 AcpiCheckAddressRange ( 648 ACPI_ADR_SPACE_TYPE SpaceId, 649 ACPI_PHYSICAL_ADDRESS Address, 650 ACPI_SIZE Length, 651 BOOLEAN Warn)) 652 653 ACPI_EXTERNAL_RETURN_STATUS ( 654 ACPI_STATUS 655 AcpiDecodePldBuffer ( 656 UINT8 *InBuffer, 657 ACPI_SIZE Length, 658 ACPI_PLD_INFO **ReturnBuffer)) 659 660 661 /* 662 * ACPI table load/unload interfaces 663 */ 664 ACPI_EXTERNAL_RETURN_STATUS ( 665 ACPI_STATUS ACPI_INIT_FUNCTION 666 AcpiInstallTable ( 667 ACPI_TABLE_HEADER *Table)) 668 669 ACPI_EXTERNAL_RETURN_STATUS ( 670 ACPI_STATUS ACPI_INIT_FUNCTION 671 AcpiInstallPhysicalTable ( 672 ACPI_PHYSICAL_ADDRESS Address)) 673 674 ACPI_EXTERNAL_RETURN_STATUS ( 675 ACPI_STATUS 676 AcpiLoadTable ( 677 ACPI_TABLE_HEADER *Table, 678 UINT32 *TableIdx)) 679 680 ACPI_EXTERNAL_RETURN_STATUS ( 681 ACPI_STATUS 682 AcpiUnloadTable ( 683 UINT32 TableIndex)) 684 685 ACPI_EXTERNAL_RETURN_STATUS ( 686 ACPI_STATUS 687 AcpiUnloadParentTable ( 688 ACPI_HANDLE Object)) 689 690 ACPI_EXTERNAL_RETURN_STATUS ( 691 ACPI_STATUS ACPI_INIT_FUNCTION 692 AcpiLoadTables ( 693 void)) 694 695 696 /* 697 * ACPI table manipulation interfaces 698 */ 699 ACPI_EXTERNAL_RETURN_STATUS ( 700 ACPI_STATUS ACPI_INIT_FUNCTION 701 AcpiReallocateRootTable ( 702 void)) 703 704 ACPI_EXTERNAL_RETURN_STATUS ( 705 ACPI_STATUS ACPI_INIT_FUNCTION 706 AcpiFindRootPointer ( 707 ACPI_PHYSICAL_ADDRESS *RsdpAddress)) 708 709 ACPI_EXTERNAL_RETURN_STATUS ( 710 ACPI_STATUS 711 AcpiGetTableHeader ( 712 ACPI_CONST_STRING Signature, 713 UINT32 Instance, 714 ACPI_TABLE_HEADER *OutTableHeader)) 715 716 ACPI_EXTERNAL_RETURN_STATUS ( 717 ACPI_STATUS 718 AcpiGetTable ( 719 ACPI_CONST_STRING Signature, 720 UINT32 Instance, 721 ACPI_TABLE_HEADER **OutTable)) 722 723 ACPI_EXTERNAL_RETURN_VOID ( 724 void 725 AcpiPutTable ( 726 ACPI_TABLE_HEADER *Table)) 727 728 ACPI_EXTERNAL_RETURN_STATUS ( 729 ACPI_STATUS 730 AcpiGetTableByIndex ( 731 UINT32 TableIndex, 732 ACPI_TABLE_HEADER **OutTable)) 733 734 ACPI_EXTERNAL_RETURN_STATUS ( 735 ACPI_STATUS 736 AcpiInstallTableHandler ( 737 ACPI_TABLE_HANDLER Handler, 738 void *Context)) 739 740 ACPI_EXTERNAL_RETURN_STATUS ( 741 ACPI_STATUS 742 AcpiRemoveTableHandler ( 743 ACPI_TABLE_HANDLER Handler)) 744 745 746 /* 747 * Namespace and name interfaces 748 */ 749 ACPI_EXTERNAL_RETURN_STATUS ( 750 ACPI_STATUS 751 AcpiWalkNamespace ( 752 ACPI_OBJECT_TYPE Type, 753 ACPI_HANDLE StartObject, 754 UINT32 MaxDepth, 755 ACPI_WALK_CALLBACK DescendingCallback, 756 ACPI_WALK_CALLBACK AscendingCallback, 757 void *Context, 758 void **ReturnValue)) 759 760 ACPI_EXTERNAL_RETURN_STATUS ( 761 ACPI_STATUS 762 AcpiGetDevices ( 763 char *HID, 764 ACPI_WALK_CALLBACK UserFunction, 765 void *Context, 766 void **ReturnValue)) 767 768 ACPI_EXTERNAL_RETURN_STATUS ( 769 ACPI_STATUS 770 AcpiGetName ( 771 ACPI_HANDLE Object, 772 UINT32 NameType, 773 ACPI_BUFFER *RetPathPtr)) 774 775 ACPI_EXTERNAL_RETURN_STATUS ( 776 ACPI_STATUS 777 AcpiGetHandle ( 778 ACPI_HANDLE Parent, 779 const char *Pathname, 780 ACPI_HANDLE *RetHandle)) 781 782 ACPI_EXTERNAL_RETURN_STATUS ( 783 ACPI_STATUS 784 AcpiAttachData ( 785 ACPI_HANDLE Object, 786 ACPI_OBJECT_HANDLER Handler, 787 void *Data)) 788 789 ACPI_EXTERNAL_RETURN_STATUS ( 790 ACPI_STATUS 791 AcpiDetachData ( 792 ACPI_HANDLE Object, 793 ACPI_OBJECT_HANDLER Handler)) 794 795 ACPI_EXTERNAL_RETURN_STATUS ( 796 ACPI_STATUS 797 AcpiGetData ( 798 ACPI_HANDLE Object, 799 ACPI_OBJECT_HANDLER Handler, 800 void **Data)) 801 802 ACPI_EXTERNAL_RETURN_STATUS ( 803 ACPI_STATUS 804 AcpiDebugTrace ( 805 const char *Name, 806 UINT32 DebugLevel, 807 UINT32 DebugLayer, 808 UINT32 Flags)) 809 810 811 /* 812 * Object manipulation and enumeration 813 */ 814 ACPI_EXTERNAL_RETURN_STATUS ( 815 ACPI_STATUS 816 AcpiEvaluateObject ( 817 ACPI_HANDLE Object, 818 ACPI_CONST_STRING Pathname, 819 ACPI_OBJECT_LIST *ParameterObjects, 820 ACPI_BUFFER *ReturnObjectBuffer)) 821 822 ACPI_EXTERNAL_RETURN_STATUS ( 823 ACPI_STATUS 824 AcpiEvaluateObjectTyped ( 825 ACPI_HANDLE Object, 826 ACPI_CONST_STRING Pathname, 827 ACPI_OBJECT_LIST *ExternalParams, 828 ACPI_BUFFER *ReturnBuffer, 829 ACPI_OBJECT_TYPE ReturnType)) 830 831 ACPI_EXTERNAL_RETURN_STATUS ( 832 ACPI_STATUS 833 AcpiGetObjectInfo ( 834 ACPI_HANDLE Object, 835 ACPI_DEVICE_INFO **ReturnBuffer)) 836 837 ACPI_EXTERNAL_RETURN_STATUS ( 838 ACPI_STATUS 839 AcpiInstallMethod ( 840 UINT8 *Buffer)) 841 842 ACPI_EXTERNAL_RETURN_STATUS ( 843 ACPI_STATUS 844 AcpiGetNextObject ( 845 ACPI_OBJECT_TYPE Type, 846 ACPI_HANDLE Parent, 847 ACPI_HANDLE Child, 848 ACPI_HANDLE *OutHandle)) 849 850 ACPI_EXTERNAL_RETURN_STATUS ( 851 ACPI_STATUS 852 AcpiGetType ( 853 ACPI_HANDLE Object, 854 ACPI_OBJECT_TYPE *OutType)) 855 856 ACPI_EXTERNAL_RETURN_STATUS ( 857 ACPI_STATUS 858 AcpiGetParent ( 859 ACPI_HANDLE Object, 860 ACPI_HANDLE *OutHandle)) 861 862 863 /* 864 * Handler interfaces 865 */ 866 ACPI_EXTERNAL_RETURN_STATUS ( 867 ACPI_STATUS 868 AcpiInstallInitializationHandler ( 869 ACPI_INIT_HANDLER Handler, 870 UINT32 Function)) 871 872 ACPI_HW_DEPENDENT_RETURN_STATUS ( 873 ACPI_STATUS 874 AcpiInstallSciHandler ( 875 ACPI_SCI_HANDLER Address, 876 void *Context)) 877 878 ACPI_HW_DEPENDENT_RETURN_STATUS ( 879 ACPI_STATUS 880 AcpiRemoveSciHandler ( 881 ACPI_SCI_HANDLER Address)) 882 883 ACPI_HW_DEPENDENT_RETURN_STATUS ( 884 ACPI_STATUS 885 AcpiInstallGlobalEventHandler ( 886 ACPI_GBL_EVENT_HANDLER Handler, 887 void *Context)) 888 889 ACPI_HW_DEPENDENT_RETURN_STATUS ( 890 ACPI_STATUS 891 AcpiInstallFixedEventHandler ( 892 UINT32 AcpiEvent, 893 ACPI_EVENT_HANDLER Handler, 894 void *Context)) 895 896 ACPI_HW_DEPENDENT_RETURN_STATUS ( 897 ACPI_STATUS 898 AcpiRemoveFixedEventHandler ( 899 UINT32 AcpiEvent, 900 ACPI_EVENT_HANDLER Handler)) 901 902 ACPI_HW_DEPENDENT_RETURN_STATUS ( 903 ACPI_STATUS 904 AcpiInstallGpeHandler ( 905 ACPI_HANDLE GpeDevice, 906 UINT32 GpeNumber, 907 UINT32 Type, 908 ACPI_GPE_HANDLER Address, 909 void *Context)) 910 911 ACPI_HW_DEPENDENT_RETURN_STATUS ( 912 ACPI_STATUS 913 AcpiInstallGpeRawHandler ( 914 ACPI_HANDLE GpeDevice, 915 UINT32 GpeNumber, 916 UINT32 Type, 917 ACPI_GPE_HANDLER Address, 918 void *Context)) 919 920 ACPI_HW_DEPENDENT_RETURN_STATUS ( 921 ACPI_STATUS 922 AcpiRemoveGpeHandler ( 923 ACPI_HANDLE GpeDevice, 924 UINT32 GpeNumber, 925 ACPI_GPE_HANDLER Address)) 926 927 ACPI_EXTERNAL_RETURN_STATUS ( 928 ACPI_STATUS 929 AcpiInstallNotifyHandler ( 930 ACPI_HANDLE Device, 931 UINT32 HandlerType, 932 ACPI_NOTIFY_HANDLER Handler, 933 void *Context)) 934 935 ACPI_EXTERNAL_RETURN_STATUS ( 936 ACPI_STATUS 937 AcpiRemoveNotifyHandler ( 938 ACPI_HANDLE Device, 939 UINT32 HandlerType, 940 ACPI_NOTIFY_HANDLER Handler)) 941 942 ACPI_EXTERNAL_RETURN_STATUS ( 943 ACPI_STATUS 944 AcpiInstallAddressSpaceHandler ( 945 ACPI_HANDLE Device, 946 ACPI_ADR_SPACE_TYPE SpaceId, 947 ACPI_ADR_SPACE_HANDLER Handler, 948 ACPI_ADR_SPACE_SETUP Setup, 949 void *Context)) 950 951 ACPI_EXTERNAL_RETURN_STATUS ( 952 ACPI_STATUS 953 AcpiInstallAddressSpaceHandlerNo_Reg( 954 ACPI_HANDLE Device, 955 ACPI_ADR_SPACE_TYPE SpaceId, 956 ACPI_ADR_SPACE_HANDLER Handler, 957 ACPI_ADR_SPACE_SETUP Setup, 958 void *Context)) 959 960 ACPI_EXTERNAL_RETURN_STATUS ( 961 ACPI_STATUS 962 AcpiExecuteRegMethods ( 963 ACPI_HANDLE Device, 964 ACPI_ADR_SPACE_TYPE SpaceId)) 965 966 ACPI_EXTERNAL_RETURN_STATUS ( 967 ACPI_STATUS 968 AcpiRemoveAddressSpaceHandler ( 969 ACPI_HANDLE Device, 970 ACPI_ADR_SPACE_TYPE SpaceId, 971 ACPI_ADR_SPACE_HANDLER Handler)) 972 973 ACPI_EXTERNAL_RETURN_STATUS ( 974 ACPI_STATUS 975 AcpiInstallExceptionHandler ( 976 ACPI_EXCEPTION_HANDLER Handler)) 977 978 ACPI_EXTERNAL_RETURN_STATUS ( 979 ACPI_STATUS 980 AcpiInstallInterfaceHandler ( 981 ACPI_INTERFACE_HANDLER Handler)) 982 983 984 /* 985 * Global Lock interfaces 986 */ 987 ACPI_HW_DEPENDENT_RETURN_STATUS ( 988 ACPI_STATUS 989 AcpiAcquireGlobalLock ( 990 UINT16 Timeout, 991 UINT32 *Handle)) 992 993 ACPI_HW_DEPENDENT_RETURN_STATUS ( 994 ACPI_STATUS 995 AcpiReleaseGlobalLock ( 996 UINT32 Handle)) 997 998 999 /* 1000 * Interfaces to AML mutex objects 1001 */ 1002 ACPI_EXTERNAL_RETURN_STATUS ( 1003 ACPI_STATUS 1004 AcpiAcquireMutex ( 1005 ACPI_HANDLE Handle, 1006 ACPI_STRING Pathname, 1007 UINT16 Timeout)) 1008 1009 ACPI_EXTERNAL_RETURN_STATUS ( 1010 ACPI_STATUS 1011 AcpiReleaseMutex ( 1012 ACPI_HANDLE Handle, 1013 ACPI_STRING Pathname)) 1014 1015 1016 /* 1017 * Fixed Event interfaces 1018 */ 1019 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1020 ACPI_STATUS 1021 AcpiEnableEvent ( 1022 UINT32 Event, 1023 UINT32 Flags)) 1024 1025 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1026 ACPI_STATUS 1027 AcpiDisableEvent ( 1028 UINT32 Event, 1029 UINT32 Flags)) 1030 1031 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1032 ACPI_STATUS 1033 AcpiClearEvent ( 1034 UINT32 Event)) 1035 1036 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1037 ACPI_STATUS 1038 AcpiGetEventStatus ( 1039 UINT32 Event, 1040 ACPI_EVENT_STATUS *EventStatus)) 1041 1042 1043 /* 1044 * General Purpose Event (GPE) Interfaces 1045 */ 1046 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1047 ACPI_STATUS 1048 AcpiUpdateAllGpes ( 1049 void)) 1050 1051 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1052 ACPI_STATUS 1053 AcpiEnableGpe ( 1054 ACPI_HANDLE GpeDevice, 1055 UINT32 GpeNumber)) 1056 1057 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1058 ACPI_STATUS 1059 AcpiDisableGpe ( 1060 ACPI_HANDLE GpeDevice, 1061 UINT32 GpeNumber)) 1062 1063 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1064 ACPI_STATUS 1065 AcpiClearGpe ( 1066 ACPI_HANDLE GpeDevice, 1067 UINT32 GpeNumber)) 1068 1069 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1070 ACPI_STATUS 1071 AcpiSetGpe ( 1072 ACPI_HANDLE GpeDevice, 1073 UINT32 GpeNumber, 1074 UINT8 Action)) 1075 1076 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1077 ACPI_STATUS 1078 AcpiFinishGpe ( 1079 ACPI_HANDLE GpeDevice, 1080 UINT32 GpeNumber)) 1081 1082 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1083 ACPI_STATUS 1084 AcpiMaskGpe ( 1085 ACPI_HANDLE GpeDevice, 1086 UINT32 GpeNumber, 1087 BOOLEAN IsMasked)) 1088 1089 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1090 ACPI_STATUS 1091 AcpiMarkGpeForWake ( 1092 ACPI_HANDLE GpeDevice, 1093 UINT32 GpeNumber)) 1094 1095 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1096 ACPI_STATUS 1097 AcpiSetupGpeForWake ( 1098 ACPI_HANDLE ParentDevice, 1099 ACPI_HANDLE GpeDevice, 1100 UINT32 GpeNumber)) 1101 1102 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1103 ACPI_STATUS 1104 AcpiSetGpeWakeMask ( 1105 ACPI_HANDLE GpeDevice, 1106 UINT32 GpeNumber, 1107 UINT8 Action)) 1108 1109 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1110 ACPI_STATUS 1111 AcpiGetGpeStatus ( 1112 ACPI_HANDLE GpeDevice, 1113 UINT32 GpeNumber, 1114 ACPI_EVENT_STATUS *EventStatus)) 1115 1116 ACPI_HW_DEPENDENT_RETURN_UINT32 ( 1117 UINT32 1118 AcpiDispatchGpe ( 1119 ACPI_HANDLE GpeDevice, 1120 UINT32 GpeNumber)) 1121 1122 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1123 ACPI_STATUS 1124 AcpiDisableAllGpes ( 1125 void)) 1126 1127 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1128 ACPI_STATUS 1129 AcpiEnableAllRuntimeGpes ( 1130 void)) 1131 1132 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1133 ACPI_STATUS 1134 AcpiEnableAllWakeupGpes ( 1135 void)) 1136 1137 ACPI_HW_DEPENDENT_RETURN_UINT32 ( 1138 UINT32 AcpiAnyGpeStatusSet ( 1139 void)) 1140 1141 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1142 ACPI_STATUS 1143 AcpiGetGpeDevice ( 1144 UINT32 GpeIndex, 1145 ACPI_HANDLE *GpeDevice)) 1146 1147 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1148 ACPI_STATUS 1149 AcpiInstallGpeBlock ( 1150 ACPI_HANDLE GpeDevice, 1151 ACPI_GENERIC_ADDRESS *GpeBlockAddress, 1152 UINT32 RegisterCount, 1153 UINT32 InterruptNumber)) 1154 1155 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1156 ACPI_STATUS 1157 AcpiRemoveGpeBlock ( 1158 ACPI_HANDLE GpeDevice)) 1159 1160 1161 /* 1162 * Resource interfaces 1163 */ 1164 typedef 1165 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 1166 ACPI_RESOURCE *Resource, 1167 void *Context); 1168 1169 ACPI_EXTERNAL_RETURN_STATUS ( 1170 ACPI_STATUS 1171 AcpiGetVendorResource ( 1172 ACPI_HANDLE Device, 1173 char *Name, 1174 ACPI_VENDOR_UUID *Uuid, 1175 ACPI_BUFFER *RetBuffer)) 1176 1177 ACPI_EXTERNAL_RETURN_STATUS ( 1178 ACPI_STATUS 1179 AcpiGetCurrentResources ( 1180 ACPI_HANDLE Device, 1181 ACPI_BUFFER *RetBuffer)) 1182 1183 ACPI_EXTERNAL_RETURN_STATUS ( 1184 ACPI_STATUS 1185 AcpiGetPossibleResources ( 1186 ACPI_HANDLE Device, 1187 ACPI_BUFFER *RetBuffer)) 1188 1189 ACPI_EXTERNAL_RETURN_STATUS ( 1190 ACPI_STATUS 1191 AcpiGetEventResources ( 1192 ACPI_HANDLE DeviceHandle, 1193 ACPI_BUFFER *RetBuffer)) 1194 1195 ACPI_EXTERNAL_RETURN_STATUS ( 1196 ACPI_STATUS 1197 AcpiWalkResourceBuffer ( 1198 ACPI_BUFFER *Buffer, 1199 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 1200 void *Context)) 1201 1202 ACPI_EXTERNAL_RETURN_STATUS ( 1203 ACPI_STATUS 1204 AcpiWalkResources ( 1205 ACPI_HANDLE Device, 1206 const char *Name, 1207 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 1208 void *Context)) 1209 1210 ACPI_EXTERNAL_RETURN_STATUS ( 1211 ACPI_STATUS 1212 AcpiSetCurrentResources ( 1213 ACPI_HANDLE Device, 1214 ACPI_BUFFER *InBuffer)) 1215 1216 ACPI_EXTERNAL_RETURN_STATUS ( 1217 ACPI_STATUS 1218 AcpiGetIrqRoutingTable ( 1219 ACPI_HANDLE Device, 1220 ACPI_BUFFER *RetBuffer)) 1221 1222 ACPI_EXTERNAL_RETURN_STATUS ( 1223 ACPI_STATUS 1224 AcpiResourceToAddress64 ( 1225 ACPI_RESOURCE *Resource, 1226 ACPI_RESOURCE_ADDRESS64 *Out)) 1227 1228 ACPI_EXTERNAL_RETURN_STATUS ( 1229 ACPI_STATUS 1230 AcpiBufferToResource ( 1231 UINT8 *AmlBuffer, 1232 UINT16 AmlBufferLength, 1233 ACPI_RESOURCE **ResourcePtr)) 1234 1235 1236 /* 1237 * Hardware (ACPI device) interfaces 1238 */ 1239 ACPI_EXTERNAL_RETURN_STATUS ( 1240 ACPI_STATUS 1241 AcpiReset ( 1242 void)) 1243 1244 ACPI_EXTERNAL_RETURN_STATUS ( 1245 ACPI_STATUS 1246 AcpiRead ( 1247 UINT64 *Value, 1248 ACPI_GENERIC_ADDRESS *Reg)) 1249 1250 ACPI_EXTERNAL_RETURN_STATUS ( 1251 ACPI_STATUS 1252 AcpiWrite ( 1253 UINT64 Value, 1254 ACPI_GENERIC_ADDRESS *Reg)) 1255 1256 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1257 ACPI_STATUS 1258 AcpiReadBitRegister ( 1259 UINT32 RegisterId, 1260 UINT32 *ReturnValue)) 1261 1262 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1263 ACPI_STATUS 1264 AcpiWriteBitRegister ( 1265 UINT32 RegisterId, 1266 UINT32 Value)) 1267 1268 1269 /* 1270 * Sleep/Wake interfaces 1271 */ 1272 ACPI_EXTERNAL_RETURN_STATUS ( 1273 ACPI_STATUS 1274 AcpiGetSleepTypeData ( 1275 UINT8 SleepState, 1276 UINT8 *Slp_TypA, 1277 UINT8 *Slp_TypB)) 1278 1279 ACPI_EXTERNAL_RETURN_STATUS ( 1280 ACPI_STATUS 1281 AcpiEnterSleepStatePrep ( 1282 UINT8 SleepState)) 1283 1284 ACPI_EXTERNAL_RETURN_STATUS ( 1285 ACPI_STATUS 1286 AcpiEnterSleepState ( 1287 UINT8 SleepState)) 1288 1289 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1290 ACPI_STATUS 1291 AcpiEnterSleepStateS4bios ( 1292 void)) 1293 1294 ACPI_EXTERNAL_RETURN_STATUS ( 1295 ACPI_STATUS 1296 AcpiLeaveSleepStatePrep ( 1297 UINT8 SleepState)) 1298 1299 ACPI_EXTERNAL_RETURN_STATUS ( 1300 ACPI_STATUS 1301 AcpiLeaveSleepState ( 1302 UINT8 SleepState)) 1303 1304 ACPI_EXTERNAL_RETURN_STATUS ( 1305 ACPI_STATUS 1306 AcpiSetFirmwareWakingVector ( 1307 ACPI_PHYSICAL_ADDRESS PhysicalAddress, 1308 ACPI_PHYSICAL_ADDRESS PhysicalAddress64)) 1309 1310 1311 /* 1312 * ACPI Timer interfaces 1313 */ 1314 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1315 ACPI_STATUS 1316 AcpiGetTimerResolution ( 1317 UINT32 *Resolution)) 1318 1319 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1320 ACPI_STATUS 1321 AcpiGetTimer ( 1322 UINT32 *Ticks)) 1323 1324 ACPI_HW_DEPENDENT_RETURN_STATUS ( 1325 ACPI_STATUS 1326 AcpiGetTimerDuration ( 1327 UINT32 StartTicks, 1328 UINT32 EndTicks, 1329 UINT32 *TimeElapsed)) 1330 1331 1332 /* 1333 * Error/Warning output 1334 */ 1335 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1336 ACPI_PRINTF_LIKE(3) 1337 void ACPI_INTERNAL_VAR_XFACE 1338 AcpiError ( 1339 const char *ModuleName, 1340 UINT32 LineNumber, 1341 const char *Format, 1342 ...)) 1343 1344 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1345 ACPI_PRINTF_LIKE(4) 1346 void ACPI_INTERNAL_VAR_XFACE 1347 AcpiException ( 1348 const char *ModuleName, 1349 UINT32 LineNumber, 1350 ACPI_STATUS Status, 1351 const char *Format, 1352 ...)) 1353 1354 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1355 ACPI_PRINTF_LIKE(3) 1356 void ACPI_INTERNAL_VAR_XFACE 1357 AcpiWarning ( 1358 const char *ModuleName, 1359 UINT32 LineNumber, 1360 const char *Format, 1361 ...)) 1362 1363 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1364 ACPI_PRINTF_LIKE(1) 1365 void ACPI_INTERNAL_VAR_XFACE 1366 AcpiInfo ( 1367 const char *Format, 1368 ...)) 1369 1370 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1371 ACPI_PRINTF_LIKE(3) 1372 void ACPI_INTERNAL_VAR_XFACE 1373 AcpiBiosError ( 1374 const char *ModuleName, 1375 UINT32 LineNumber, 1376 const char *Format, 1377 ...)) 1378 1379 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1380 ACPI_PRINTF_LIKE(4) 1381 void ACPI_INTERNAL_VAR_XFACE 1382 AcpiBiosException ( 1383 const char *ModuleName, 1384 UINT32 LineNumber, 1385 ACPI_STATUS Status, 1386 const char *Format, 1387 ...)) 1388 1389 ACPI_MSG_DEPENDENT_RETURN_VOID ( 1390 ACPI_PRINTF_LIKE(3) 1391 void ACPI_INTERNAL_VAR_XFACE 1392 AcpiBiosWarning ( 1393 const char *ModuleName, 1394 UINT32 LineNumber, 1395 const char *Format, 1396 ...)) 1397 1398 1399 /* 1400 * Debug output 1401 */ 1402 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1403 ACPI_PRINTF_LIKE(6) 1404 void ACPI_INTERNAL_VAR_XFACE 1405 AcpiDebugPrint ( 1406 UINT32 RequestedDebugLevel, 1407 UINT32 LineNumber, 1408 const char *FunctionName, 1409 const char *ModuleName, 1410 UINT32 ComponentId, 1411 const char *Format, 1412 ...)) 1413 1414 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1415 ACPI_PRINTF_LIKE(6) 1416 void ACPI_INTERNAL_VAR_XFACE 1417 AcpiDebugPrintRaw ( 1418 UINT32 RequestedDebugLevel, 1419 UINT32 LineNumber, 1420 const char *FunctionName, 1421 const char *ModuleName, 1422 UINT32 ComponentId, 1423 const char *Format, 1424 ...)) 1425 1426 ACPI_DBG_DEPENDENT_RETURN_VOID ( 1427 void 1428 AcpiTracePoint ( 1429 ACPI_TRACE_EVENT_TYPE Type, 1430 BOOLEAN Begin, 1431 UINT8 *Aml, 1432 char *Pathname)) 1433 1434 ACPI_STATUS 1435 AcpiInitializeDebugger ( 1436 void); 1437 1438 void 1439 AcpiTerminateDebugger ( 1440 void); 1441 1442 void 1443 AcpiRunDebugger ( 1444 char *BatchBuffer); 1445 1446 void 1447 AcpiSetDebuggerThreadId ( 1448 ACPI_THREAD_ID ThreadId); 1449 1450 #endif /* __ACXFACE_H__ */ 1451