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