11da177e4SLinus Torvalds /****************************************************************************** 21da177e4SLinus Torvalds * 31da177e4SLinus Torvalds * Name: acpixf.h - External interfaces to the ACPI subsystem 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds *****************************************************************************/ 61da177e4SLinus Torvalds 71da177e4SLinus Torvalds /* 882a80941SDavid E. Box * Copyright (C) 2000 - 2015, Intel Corp. 91da177e4SLinus Torvalds * All rights reserved. 101da177e4SLinus Torvalds * 111da177e4SLinus Torvalds * Redistribution and use in source and binary forms, with or without 121da177e4SLinus Torvalds * modification, are permitted provided that the following conditions 131da177e4SLinus Torvalds * are met: 141da177e4SLinus Torvalds * 1. Redistributions of source code must retain the above copyright 151da177e4SLinus Torvalds * notice, this list of conditions, and the following disclaimer, 161da177e4SLinus Torvalds * without modification. 171da177e4SLinus Torvalds * 2. Redistributions in binary form must reproduce at minimum a disclaimer 181da177e4SLinus Torvalds * substantially similar to the "NO WARRANTY" disclaimer below 191da177e4SLinus Torvalds * ("Disclaimer") and any redistribution must be conditioned upon 201da177e4SLinus Torvalds * including a substantially similar Disclaimer requirement for further 211da177e4SLinus Torvalds * binary redistribution. 221da177e4SLinus Torvalds * 3. Neither the names of the above-listed copyright holders nor the names 231da177e4SLinus Torvalds * of any contributors may be used to endorse or promote products derived 241da177e4SLinus Torvalds * from this software without specific prior written permission. 251da177e4SLinus Torvalds * 261da177e4SLinus Torvalds * Alternatively, this software may be distributed under the terms of the 271da177e4SLinus Torvalds * GNU General Public License ("GPL") version 2 as published by the Free 281da177e4SLinus Torvalds * Software Foundation. 291da177e4SLinus Torvalds * 301da177e4SLinus Torvalds * NO WARRANTY 311da177e4SLinus Torvalds * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 321da177e4SLinus Torvalds * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 331da177e4SLinus Torvalds * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 341da177e4SLinus Torvalds * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 351da177e4SLinus Torvalds * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 361da177e4SLinus Torvalds * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 371da177e4SLinus Torvalds * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 381da177e4SLinus Torvalds * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 391da177e4SLinus Torvalds * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 401da177e4SLinus Torvalds * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 411da177e4SLinus Torvalds * POSSIBILITY OF SUCH DAMAGES. 421da177e4SLinus Torvalds */ 431da177e4SLinus Torvalds 441da177e4SLinus Torvalds #ifndef __ACXFACE_H__ 451da177e4SLinus Torvalds #define __ACXFACE_H__ 461da177e4SLinus Torvalds 4750df4d8bSBob Moore /* Current ACPICA subsystem version in YYYYMMDD format */ 4850df4d8bSBob Moore 49e5874591SBob Moore #define ACPI_CA_VERSION 0x20141107 5050df4d8bSBob Moore 51a1ce3928SDavid Howells #include <acpi/acconfig.h> 52a1ce3928SDavid Howells #include <acpi/actypes.h> 53a1ce3928SDavid Howells #include <acpi/actbl.h> 54d8dc91b7SLinus Torvalds #include <acpi/acbuffer.h> 551da177e4SLinus Torvalds 561011080dSBob Moore /***************************************************************************** 573035ff70SLv Zheng * 581011080dSBob Moore * Macros used for ACPICA globals and configuration 591011080dSBob Moore * 601011080dSBob Moore ****************************************************************************/ 611011080dSBob Moore 621da177e4SLinus Torvalds /* 631011080dSBob Moore * Ensure that global variables are defined and initialized only once. 641011080dSBob Moore * 651011080dSBob Moore * The use of these macros allows for a single list of globals (here) 661011080dSBob Moore * in order to simplify maintenance of the code. 6750df4d8bSBob Moore */ 683035ff70SLv Zheng #ifdef DEFINE_ACPI_GLOBALS 693035ff70SLv Zheng #define ACPI_GLOBAL(type,name) \ 703035ff70SLv Zheng extern type name; \ 713035ff70SLv Zheng type name 723e8214e5SLv Zheng 733035ff70SLv Zheng #define ACPI_INIT_GLOBAL(type,name,value) \ 743035ff70SLv Zheng type name=value 753e8214e5SLv Zheng 763035ff70SLv Zheng #else 773035ff70SLv Zheng #ifndef ACPI_GLOBAL 783035ff70SLv Zheng #define ACPI_GLOBAL(type,name) \ 793035ff70SLv Zheng extern type name 803035ff70SLv Zheng #endif 813e8214e5SLv Zheng 823035ff70SLv Zheng #ifndef ACPI_INIT_GLOBAL 833035ff70SLv Zheng #define ACPI_INIT_GLOBAL(type,name,value) \ 843035ff70SLv Zheng extern type name 853035ff70SLv Zheng #endif 863035ff70SLv Zheng #endif 8750df4d8bSBob Moore 8833620c54SBob Moore /* 891011080dSBob Moore * These macros configure the various ACPICA interfaces. They are 901011080dSBob Moore * useful for generating stub inline functions for features that are 911011080dSBob Moore * configured out of the current kernel or ACPICA application. 921011080dSBob Moore */ 938b9c1152SLv Zheng #ifndef ACPI_EXTERNAL_RETURN_STATUS 948b9c1152SLv Zheng #define ACPI_EXTERNAL_RETURN_STATUS(prototype) \ 958b9c1152SLv Zheng prototype; 968b9c1152SLv Zheng #endif 978b9c1152SLv Zheng 988b9c1152SLv Zheng #ifndef ACPI_EXTERNAL_RETURN_OK 998b9c1152SLv Zheng #define ACPI_EXTERNAL_RETURN_OK(prototype) \ 1008b9c1152SLv Zheng prototype; 1018b9c1152SLv Zheng #endif 1028b9c1152SLv Zheng 1038b9c1152SLv Zheng #ifndef ACPI_EXTERNAL_RETURN_VOID 1048b9c1152SLv Zheng #define ACPI_EXTERNAL_RETURN_VOID(prototype) \ 1058b9c1152SLv Zheng prototype; 1068b9c1152SLv Zheng #endif 1078b9c1152SLv Zheng 1088b9c1152SLv Zheng #ifndef ACPI_EXTERNAL_RETURN_UINT32 1098b9c1152SLv Zheng #define ACPI_EXTERNAL_RETURN_UINT32(prototype) \ 1108b9c1152SLv Zheng prototype; 1118b9c1152SLv Zheng #endif 1128b9c1152SLv Zheng 1138b9c1152SLv Zheng #ifndef ACPI_EXTERNAL_RETURN_PTR 1148b9c1152SLv Zheng #define ACPI_EXTERNAL_RETURN_PTR(prototype) \ 1158b9c1152SLv Zheng prototype; 1168b9c1152SLv Zheng #endif 1178b9c1152SLv Zheng 1183035ff70SLv Zheng /***************************************************************************** 1193035ff70SLv Zheng * 1201011080dSBob Moore * Public globals and runtime configuration options 1213035ff70SLv Zheng * 1223035ff70SLv Zheng ****************************************************************************/ 1233035ff70SLv Zheng 1243035ff70SLv Zheng /* 1251011080dSBob Moore * Enable "slack mode" of the AML interpreter? Default is FALSE, and the 1263035ff70SLv Zheng * interpreter strictly follows the ACPI specification. Setting to TRUE 1273035ff70SLv Zheng * allows the interpreter to ignore certain errors and/or bad AML constructs. 1283035ff70SLv Zheng * 1293035ff70SLv Zheng * Currently, these features are enabled by this flag: 1303035ff70SLv Zheng * 1313035ff70SLv Zheng * 1) Allow "implicit return" of last value in a control method 1323035ff70SLv Zheng * 2) Allow access beyond the end of an operation region 1333035ff70SLv Zheng * 3) Allow access to uninitialized locals/args (auto-init to integer 0) 1343035ff70SLv Zheng * 4) Allow ANY object type to be a source operand for the Store() operator 1353035ff70SLv Zheng * 5) Allow unresolved references (invalid target name) in package objects 1363035ff70SLv Zheng * 6) Enable warning messages for behavior that is not ACPI spec compliant 1373035ff70SLv Zheng */ 1383035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE); 1393035ff70SLv Zheng 1403035ff70SLv Zheng /* 1413035ff70SLv Zheng * Automatically serialize all methods that create named objects? Default 1423035ff70SLv Zheng * is TRUE, meaning that all non_serialized methods are scanned once at 1433035ff70SLv Zheng * table load time to determine those that create named objects. Methods 1443035ff70SLv Zheng * that create named objects are marked Serialized in order to prevent 1453035ff70SLv Zheng * possible run-time problems if they are entered by more than one thread. 1463035ff70SLv Zheng */ 1473035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE); 1483035ff70SLv Zheng 1493035ff70SLv Zheng /* 1503035ff70SLv Zheng * Create the predefined _OSI method in the namespace? Default is TRUE 1513035ff70SLv Zheng * because ACPICA is fully compatible with other ACPI implementations. 1523035ff70SLv Zheng * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior. 1533035ff70SLv Zheng */ 1543035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE); 1553035ff70SLv Zheng 1563035ff70SLv Zheng /* 1573035ff70SLv Zheng * Optionally use default values for the ACPI register widths. Set this to 1583035ff70SLv Zheng * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. 1593035ff70SLv Zheng */ 1603035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE); 1613035ff70SLv Zheng 1623035ff70SLv Zheng /* 16347d68c7fSLv Zheng * Whether or not to verify the table checksum before installation. Set 16447d68c7fSLv Zheng * this to TRUE to verify the table checksum before install it to the table 16547d68c7fSLv Zheng * manager. Note that enabling this option causes errors to happen in some 16647d68c7fSLv Zheng * OSPMs during early initialization stages. Default behavior is to do such 16747d68c7fSLv Zheng * verification. 16847d68c7fSLv Zheng */ 16947d68c7fSLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_verify_table_checksum, TRUE); 17047d68c7fSLv Zheng 17147d68c7fSLv Zheng /* 1723035ff70SLv Zheng * Optionally enable output from the AML Debug Object. 1733035ff70SLv Zheng */ 1743035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE); 1753035ff70SLv Zheng 1763035ff70SLv Zheng /* 1773035ff70SLv Zheng * Optionally copy the entire DSDT to local memory (instead of simply 1783035ff70SLv Zheng * mapping it.) There are some BIOSs that corrupt or replace the original 1793035ff70SLv Zheng * DSDT, creating the need for this option. Default is FALSE, do not copy 1803035ff70SLv Zheng * the DSDT. 1813035ff70SLv Zheng */ 1823035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE); 1833035ff70SLv Zheng 1843035ff70SLv Zheng /* 1853035ff70SLv Zheng * Optionally ignore an XSDT if present and use the RSDT instead. 1863035ff70SLv Zheng * Although the ACPI specification requires that an XSDT be used instead 1873035ff70SLv Zheng * of the RSDT, the XSDT has been found to be corrupt or ill-formed on 1883035ff70SLv Zheng * some machines. Default behavior is to use the XSDT if present. 1893035ff70SLv Zheng */ 1903035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); 1913035ff70SLv Zheng 1923035ff70SLv Zheng /* 1933035ff70SLv Zheng * Optionally use 32-bit FADT addresses if and when there is a conflict 1943035ff70SLv Zheng * (address mismatch) between the 32-bit and 64-bit versions of the 1953035ff70SLv Zheng * address. Although ACPICA adheres to the ACPI specification which 1963035ff70SLv Zheng * requires the use of the corresponding 64-bit address if it is non-zero, 1973035ff70SLv Zheng * some machines have been found to have a corrupted non-zero 64-bit 198c9b77a40SRafael J. Wysocki * address. Default is TRUE, favor the 32-bit addresses. 1993035ff70SLv Zheng */ 200c9b77a40SRafael J. Wysocki ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, TRUE); 2013035ff70SLv Zheng 2023035ff70SLv Zheng /* 2033035ff70SLv Zheng * Optionally truncate I/O addresses to 16 bits. Provides compatibility 2043035ff70SLv Zheng * with other ACPI implementations. NOTE: During ACPICA initialization, 2053035ff70SLv Zheng * this value is set to TRUE if any Windows OSI strings have been 2063035ff70SLv Zheng * requested by the BIOS. 2073035ff70SLv Zheng */ 2083035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE); 2093035ff70SLv Zheng 2103035ff70SLv Zheng /* 2113035ff70SLv Zheng * Disable runtime checking and repair of values returned by control methods. 2123035ff70SLv Zheng * Use only if the repair is causing a problem on a particular machine. 2133035ff70SLv Zheng */ 2143035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE); 2153035ff70SLv Zheng 2163035ff70SLv Zheng /* 2173035ff70SLv Zheng * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. 2183035ff70SLv Zheng * This can be useful for debugging ACPI problems on some machines. 2193035ff70SLv Zheng */ 2203035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE); 2213035ff70SLv Zheng 2223035ff70SLv Zheng /* 2233035ff70SLv Zheng * We keep track of the latest version of Windows that has been requested by 2243035ff70SLv Zheng * the BIOS. ACPI 5.0. 2253035ff70SLv Zheng */ 2263035ff70SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0); 2273035ff70SLv Zheng 2283035ff70SLv Zheng /* 2293a2f3a33SLv Zheng * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning 2303a2f3a33SLv Zheng * that the ACPI hardware is no longer required. A flag in the FADT indicates 2313a2f3a33SLv Zheng * a reduced HW machine, and that flag is duplicated here for convenience. 2321da177e4SLinus Torvalds */ 2333a2f3a33SLv Zheng ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE); 23450df4d8bSBob Moore 2353a2f3a33SLv Zheng /* 2363a2f3a33SLv Zheng * This mechanism is used to trace a specified AML method. The method is 2373a2f3a33SLv Zheng * traced each time it is executed. 2383a2f3a33SLv Zheng */ 2393a2f3a33SLv Zheng ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0); 2403a2f3a33SLv Zheng ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0); 24150df4d8bSBob Moore 2423a2f3a33SLv Zheng /* 2433a2f3a33SLv Zheng * Runtime configuration of debug output control masks. We want the debug 2443a2f3a33SLv Zheng * switches statically initialized so they are already set when the debugger 2453a2f3a33SLv Zheng * is entered. 2463a2f3a33SLv Zheng */ 2473a2f3a33SLv Zheng ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT); 2483a2f3a33SLv Zheng ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0); 24950df4d8bSBob Moore 2503a2f3a33SLv Zheng /* 2511011080dSBob Moore * Other miscellaneous globals 2523a2f3a33SLv Zheng */ 2533a2f3a33SLv Zheng ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT); 2541011080dSBob Moore ACPI_GLOBAL(u32, acpi_current_gpe_count); 2553a2f3a33SLv Zheng ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running); 25650df4d8bSBob Moore 2571011080dSBob Moore /***************************************************************************** 2581011080dSBob Moore * 2591011080dSBob Moore * ACPICA public interface configuration. 2601011080dSBob Moore * 2611011080dSBob Moore * Interfaces that are configured out of the ACPICA build are replaced 2621011080dSBob Moore * by inlined stubs by default. 2631011080dSBob Moore * 2641011080dSBob Moore ****************************************************************************/ 2651011080dSBob Moore 26633620c54SBob Moore /* 2671011080dSBob Moore * Hardware-reduced prototypes (default: Not hardware reduced). 2681011080dSBob Moore * 2691011080dSBob Moore * All ACPICA hardware-related interfaces that use these macros will be 2701011080dSBob Moore * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag 27133620c54SBob Moore * is set to TRUE. 2721011080dSBob Moore * 2731011080dSBob Moore * Note: This static build option for reduced hardware is intended to 2741011080dSBob Moore * reduce ACPICA code size if desired or necessary. However, even if this 2751011080dSBob Moore * option is not specified, the runtime behavior of ACPICA is dependent 2761011080dSBob Moore * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set, 2771011080dSBob Moore * the flag will enable similar behavior -- ACPICA will not attempt 2781011080dSBob Moore * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.) 27933620c54SBob Moore */ 28033620c54SBob Moore #if (!ACPI_REDUCED_HARDWARE) 28133620c54SBob Moore #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ 2828b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(prototype) 28333620c54SBob Moore 28433620c54SBob Moore #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ 2858b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_OK(prototype) 28633620c54SBob Moore 28733620c54SBob Moore #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ 2888b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_VOID(prototype) 28933620c54SBob Moore 29033620c54SBob Moore #else 29133620c54SBob Moore #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ 29233620c54SBob Moore static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);} 29333620c54SBob Moore 29433620c54SBob Moore #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ 29533620c54SBob Moore static ACPI_INLINE prototype {return(AE_OK);} 29633620c54SBob Moore 29733620c54SBob Moore #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ 298c26f3c90SBob Moore static ACPI_INLINE prototype {return;} 29933620c54SBob Moore 30033620c54SBob Moore #endif /* !ACPI_REDUCED_HARDWARE */ 30133620c54SBob Moore 30250df4d8bSBob Moore /* 3031011080dSBob Moore * Error message prototypes (default: error messages enabled). 3041011080dSBob Moore * 3051011080dSBob Moore * All interfaces related to error and warning messages 3061011080dSBob Moore * will be configured out of the ACPICA build if the 3071011080dSBob Moore * ACPI_NO_ERROR_MESSAGE flag is defined. 308407e22afSLv Zheng */ 309407e22afSLv Zheng #ifndef ACPI_NO_ERROR_MESSAGES 310407e22afSLv Zheng #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \ 311407e22afSLv Zheng prototype; 312407e22afSLv Zheng 313407e22afSLv Zheng #else 314407e22afSLv Zheng #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \ 315407e22afSLv Zheng static ACPI_INLINE prototype {return;} 316407e22afSLv Zheng 317407e22afSLv Zheng #endif /* ACPI_NO_ERROR_MESSAGES */ 318407e22afSLv Zheng 319407e22afSLv Zheng /* 3201011080dSBob Moore * Debugging output prototypes (default: no debug output). 3211011080dSBob Moore * 3221011080dSBob Moore * All interfaces related to debug output messages 3231011080dSBob Moore * will be configured out of the ACPICA build unless the 3241011080dSBob Moore * ACPI_DEBUG_OUTPUT flag is defined. 3251ce28c32SLv Zheng */ 3261ce28c32SLv Zheng #ifdef ACPI_DEBUG_OUTPUT 3271ce28c32SLv Zheng #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \ 3281ce28c32SLv Zheng prototype; 3291ce28c32SLv Zheng 3301ce28c32SLv Zheng #else 3311ce28c32SLv Zheng #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \ 3321ce28c32SLv Zheng static ACPI_INLINE prototype {return;} 3331ce28c32SLv Zheng 3341ce28c32SLv Zheng #endif /* ACPI_DEBUG_OUTPUT */ 3351ce28c32SLv Zheng 3362e70da4cSLv Zheng /* 3372e70da4cSLv Zheng * Application prototypes 3382e70da4cSLv Zheng * 3392e70da4cSLv Zheng * All interfaces used by application will be configured 3402e70da4cSLv Zheng * out of the ACPICA build unless the ACPI_APPLICATION 3412e70da4cSLv Zheng * flag is defined. 3422e70da4cSLv Zheng */ 3432e70da4cSLv Zheng #ifdef ACPI_APPLICATION 3442e70da4cSLv Zheng #define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \ 3452e70da4cSLv Zheng prototype; 3462e70da4cSLv Zheng 3472e70da4cSLv Zheng #else 3482e70da4cSLv Zheng #define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \ 3492e70da4cSLv Zheng static ACPI_INLINE prototype {return;} 3502e70da4cSLv Zheng 3512e70da4cSLv Zheng #endif /* ACPI_APPLICATION */ 3522e70da4cSLv Zheng 3531011080dSBob Moore /***************************************************************************** 3541011080dSBob Moore * 3551011080dSBob Moore * ACPICA public interface prototypes 3561011080dSBob Moore * 3571011080dSBob Moore ****************************************************************************/ 3581011080dSBob Moore 3591ce28c32SLv Zheng /* 36075c8044fSLv Zheng * Initialization 3611da177e4SLinus Torvalds */ 3628b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init 3638b9c1152SLv Zheng acpi_initialize_tables(struct acpi_table_desc 3648b9c1152SLv Zheng *initial_storage, 3658b9c1152SLv Zheng u32 initial_table_count, 3668b9c1152SLv Zheng u8 allow_resize)) 3678b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void)) 368f3d2e786SBob Moore 3698b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags)) 3701da177e4SLinus Torvalds 3718b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init 3728b9c1152SLv Zheng acpi_initialize_objects(u32 flags)) 3738b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void)) 3741da177e4SLinus Torvalds 37575c8044fSLv Zheng /* 37675c8044fSLv Zheng * Miscellaneous global interfaces 37775c8044fSLv Zheng */ 37833620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) 37933620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) 380739dcbb9SLv Zheng #ifdef ACPI_FUTURE_USAGE 3818b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void)) 382739dcbb9SLv Zheng #endif 3831da177e4SLinus Torvalds 3841da177e4SLinus Torvalds #ifdef ACPI_FUTURE_USAGE 3858b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 3868b9c1152SLv Zheng acpi_get_system_info(struct acpi_buffer 3878b9c1152SLv Zheng *ret_buffer)) 3881da177e4SLinus Torvalds #endif 3898b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 3908b9c1152SLv Zheng acpi_get_statistics(struct acpi_statistics *stats)) 3918b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_PTR(const char 3928b9c1152SLv Zheng *acpi_format_exception(acpi_status exception)) 3938b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void)) 3941da177e4SLinus Torvalds 3958b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 3968b9c1152SLv Zheng acpi_install_interface(acpi_string interface_name)) 3979187a415SLv Zheng 3988b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 3998b9c1152SLv Zheng acpi_remove_interface(acpi_string interface_name)) 4008b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action)) 4011da177e4SLinus Torvalds 4028b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_UINT32(u32 4038b9c1152SLv Zheng acpi_check_address_range(acpi_adr_space_type 4048b9c1152SLv Zheng space_id, 4058b9c1152SLv Zheng acpi_physical_address 4068b9c1152SLv Zheng address, acpi_size length, 4078b9c1152SLv Zheng u8 warn)) 4088b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 409be030a57SBob Moore acpi_decode_pld_buffer(u8 *in_buffer, 4108b9c1152SLv Zheng acpi_size length, 4118b9c1152SLv Zheng struct acpi_pld_info 4128b9c1152SLv Zheng **return_buffer)) 413be030a57SBob Moore 4141da177e4SLinus Torvalds /* 415f60d8181SBob Moore * ACPI table load/unload interfaces 416f60d8181SBob Moore */ 4178b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init 4188b9c1152SLv Zheng acpi_install_table(acpi_physical_address address, 4198b9c1152SLv Zheng u8 physical)) 420f60d8181SBob Moore 4218b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4228b9c1152SLv Zheng acpi_load_table(struct acpi_table_header *table)) 423f60d8181SBob Moore 4248b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4258b9c1152SLv Zheng acpi_unload_parent_table(acpi_handle object)) 4268b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void)) 427f60d8181SBob Moore 428f60d8181SBob Moore /* 4291da177e4SLinus Torvalds * ACPI table manipulation interfaces 4301da177e4SLinus Torvalds */ 4318b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) 432f3d2e786SBob Moore 4338b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init 4348b9c1152SLv Zheng acpi_find_root_pointer(acpi_size * rsdp_address)) 4351da177e4SLinus Torvalds 4368b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 437f3d2e786SBob Moore acpi_get_table_header(acpi_string signature, 4388b9c1152SLv Zheng u32 instance, 4398b9c1152SLv Zheng struct acpi_table_header 4408b9c1152SLv Zheng *out_table_header)) 4418b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4428b9c1152SLv Zheng acpi_get_table(acpi_string signature, u32 instance, 4438b9c1152SLv Zheng struct acpi_table_header 4448b9c1152SLv Zheng **out_table)) 4458b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4468b9c1152SLv Zheng acpi_get_table_by_index(u32 table_index, 4478b9c1152SLv Zheng struct acpi_table_header 4488b9c1152SLv Zheng **out_table)) 4498b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4508b9c1152SLv Zheng acpi_install_table_handler(acpi_table_handler 4518b9c1152SLv Zheng handler, void *context)) 4528b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4538b9c1152SLv Zheng acpi_remove_table_handler(acpi_table_handler 4548b9c1152SLv Zheng handler)) 4553e08e2d2SLin Ming 4561da177e4SLinus Torvalds /* 4571da177e4SLinus Torvalds * Namespace and name interfaces 4581da177e4SLinus Torvalds */ 4598b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4604be44fcdSLen Brown acpi_walk_namespace(acpi_object_type type, 4611da177e4SLinus Torvalds acpi_handle start_object, 4621da177e4SLinus Torvalds u32 max_depth, 4638b9c1152SLv Zheng acpi_walk_callback 4648b9c1152SLv Zheng descending_callback, 4658b9c1152SLv Zheng acpi_walk_callback 4668b9c1152SLv Zheng ascending_callback, 4678b9c1152SLv Zheng void *context, 4688b9c1152SLv Zheng void **return_value)) 4698b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 47070b30fb1SAl Viro acpi_get_devices(const char *HID, 4711da177e4SLinus Torvalds acpi_walk_callback user_function, 4728b9c1152SLv Zheng void *context, 4738b9c1152SLv Zheng void **return_value)) 4748b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4758b9c1152SLv Zheng acpi_get_name(acpi_handle object, u32 name_type, 4768b9c1152SLv Zheng struct acpi_buffer *ret_path_ptr)) 4778b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4784be44fcdSLen Brown acpi_get_handle(acpi_handle parent, 4798b9c1152SLv Zheng acpi_string pathname, 4808b9c1152SLv Zheng acpi_handle * ret_handle)) 4818b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4828b9c1152SLv Zheng acpi_attach_data(acpi_handle object, 4838b9c1152SLv Zheng acpi_object_handler handler, 4848b9c1152SLv Zheng void *data)) 4858b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4868b9c1152SLv Zheng acpi_detach_data(acpi_handle object, 4878b9c1152SLv Zheng acpi_object_handler handler)) 4888b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4898b9c1152SLv Zheng acpi_get_data(acpi_handle object, 4908b9c1152SLv Zheng acpi_object_handler handler, 4918b9c1152SLv Zheng void **data)) 4928b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 4938b9c1152SLv Zheng acpi_debug_trace(char *name, u32 debug_level, 4948b9c1152SLv Zheng u32 debug_layer, u32 flags)) 49550eca3ebSBob Moore 4961da177e4SLinus Torvalds /* 4971da177e4SLinus Torvalds * Object manipulation and enumeration 4981da177e4SLinus Torvalds */ 4998b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5004be44fcdSLen Brown acpi_evaluate_object(acpi_handle object, 5011da177e4SLinus Torvalds acpi_string pathname, 5028b9c1152SLv Zheng struct acpi_object_list 5038b9c1152SLv Zheng *parameter_objects, 5048b9c1152SLv Zheng struct acpi_buffer 5058b9c1152SLv Zheng *return_object_buffer)) 5068b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5074be44fcdSLen Brown acpi_evaluate_object_typed(acpi_handle object, 5081da177e4SLinus Torvalds acpi_string pathname, 5098b9c1152SLv Zheng struct acpi_object_list 5108b9c1152SLv Zheng *external_params, 5118b9c1152SLv Zheng struct acpi_buffer 5128b9c1152SLv Zheng *return_buffer, 5138b9c1152SLv Zheng acpi_object_type 5148b9c1152SLv Zheng return_type)) 5158b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 516b47cf58eSBob Moore acpi_get_object_info(acpi_handle object, 5178b9c1152SLv Zheng struct acpi_device_info 5188b9c1152SLv Zheng **return_buffer)) 5198b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer)) 5201da177e4SLinus Torvalds 5218b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5224be44fcdSLen Brown acpi_get_next_object(acpi_object_type type, 5231da177e4SLinus Torvalds acpi_handle parent, 5248b9c1152SLv Zheng acpi_handle child, 5258b9c1152SLv Zheng acpi_handle * out_handle)) 5261da177e4SLinus Torvalds 5278b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5288b9c1152SLv Zheng acpi_get_type(acpi_handle object, 5298b9c1152SLv Zheng acpi_object_type * out_type)) 5301da177e4SLinus Torvalds 5318b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5328b9c1152SLv Zheng acpi_get_parent(acpi_handle object, 5338b9c1152SLv Zheng acpi_handle * out_handle)) 5341da177e4SLinus Torvalds 5351da177e4SLinus Torvalds /* 536ecfbbc7bSBob Moore * Handler interfaces 5371da177e4SLinus Torvalds */ 5388b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5398b9c1152SLv Zheng acpi_install_initialization_handler 5408b9c1152SLv Zheng (acpi_init_handler handler, u32 function)) 54133620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 542a2fd4b4bSLv Zheng acpi_install_sci_handler(acpi_sci_handler 543a2fd4b4bSLv Zheng address, 544a2fd4b4bSLv Zheng void *context)) 545a2fd4b4bSLv Zheng ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 546a2fd4b4bSLv Zheng acpi_remove_sci_handler(acpi_sci_handler 547a2fd4b4bSLv Zheng address)) 548a2fd4b4bSLv Zheng ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 54933620c54SBob Moore acpi_install_global_event_handler 550a2fd4b4bSLv Zheng (acpi_gbl_event_handler handler, 551a2fd4b4bSLv Zheng void *context)) 55233620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 55333620c54SBob Moore acpi_install_fixed_event_handler(u32 55433620c54SBob Moore acpi_event, 55533620c54SBob Moore acpi_event_handler 55633620c54SBob Moore handler, 55733620c54SBob Moore void 55833620c54SBob Moore *context)) 55933620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 56033620c54SBob Moore acpi_remove_fixed_event_handler(u32 acpi_event, 56133620c54SBob Moore acpi_event_handler 56233620c54SBob Moore handler)) 56333620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 56433620c54SBob Moore acpi_install_gpe_handler(acpi_handle 56533620c54SBob Moore gpe_device, 56633620c54SBob Moore u32 gpe_number, 56733620c54SBob Moore u32 type, 56833620c54SBob Moore acpi_gpe_handler 56933620c54SBob Moore address, 57033620c54SBob Moore void *context)) 57133620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 57233620c54SBob Moore acpi_remove_gpe_handler(acpi_handle gpe_device, 57333620c54SBob Moore u32 gpe_number, 57433620c54SBob Moore acpi_gpe_handler 57533620c54SBob Moore address)) 5768b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5778b9c1152SLv Zheng acpi_install_notify_handler(acpi_handle device, 5788b9c1152SLv Zheng u32 handler_type, 5798b9c1152SLv Zheng acpi_notify_handler 5808b9c1152SLv Zheng handler, 5818b9c1152SLv Zheng void *context)) 5828b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5834be44fcdSLen Brown acpi_remove_notify_handler(acpi_handle device, 5848b9c1152SLv Zheng u32 handler_type, 5858b9c1152SLv Zheng acpi_notify_handler 5868b9c1152SLv Zheng handler)) 5878b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5888b9c1152SLv Zheng acpi_install_address_space_handler(acpi_handle 5898b9c1152SLv Zheng device, 5908b9c1152SLv Zheng acpi_adr_space_type 5918b9c1152SLv Zheng space_id, 5928b9c1152SLv Zheng acpi_adr_space_handler 5938b9c1152SLv Zheng handler, 5948b9c1152SLv Zheng acpi_adr_space_setup 5958b9c1152SLv Zheng setup, 5968b9c1152SLv Zheng void *context)) 5978b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 5988b9c1152SLv Zheng acpi_remove_address_space_handler(acpi_handle 5998b9c1152SLv Zheng device, 6008b9c1152SLv Zheng acpi_adr_space_type 6018b9c1152SLv Zheng space_id, 6028b9c1152SLv Zheng acpi_adr_space_handler 6038b9c1152SLv Zheng handler)) 6041da177e4SLinus Torvalds #ifdef ACPI_FUTURE_USAGE 6058b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 6068b9c1152SLv Zheng acpi_install_exception_handler 6078b9c1152SLv Zheng (acpi_exception_handler handler)) 6081da177e4SLinus Torvalds #endif 6098b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 6108b9c1152SLv Zheng acpi_install_interface_handler 6118b9c1152SLv Zheng (acpi_interface_handler handler)) 612b0ed7a91SLin Ming 6131da177e4SLinus Torvalds /* 614ffef6827SLin Ming * Global Lock interfaces 6151da177e4SLinus Torvalds */ 61633620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 61733620c54SBob Moore acpi_acquire_global_lock(u16 timeout, 61833620c54SBob Moore u32 *handle)) 619cd27d79fSLv Zheng 62033620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 62133620c54SBob Moore acpi_release_global_lock(u32 handle)) 6221da177e4SLinus Torvalds 623ffef6827SLin Ming /* 624ffef6827SLin Ming * Interfaces to AML mutex objects 625ffef6827SLin Ming */ 6268b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 6278b9c1152SLv Zheng acpi_acquire_mutex(acpi_handle handle, 6288b9c1152SLv Zheng acpi_string pathname, 6298b9c1152SLv Zheng u16 timeout)) 630ffef6827SLin Ming 6318b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 6328b9c1152SLv Zheng acpi_release_mutex(acpi_handle handle, 6338b9c1152SLv Zheng acpi_string pathname)) 634ffef6827SLin Ming 635ffef6827SLin Ming /* 636ffef6827SLin Ming * Fixed Event interfaces 637ffef6827SLin Ming */ 63833620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 63933620c54SBob Moore acpi_enable_event(u32 event, u32 flags)) 6401da177e4SLinus Torvalds 64133620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 64233620c54SBob Moore acpi_disable_event(u32 event, u32 flags)) 64333620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event)) 6441da177e4SLinus Torvalds 64533620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 64633620c54SBob Moore acpi_get_event_status(u32 event, 64733620c54SBob Moore acpi_event_status 64833620c54SBob Moore *event_status)) 649cd27d79fSLv Zheng 65008ac07b8SBob Moore /* 651ffef6827SLin Ming * General Purpose Event (GPE) Interfaces 65208ac07b8SBob Moore */ 65333620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void)) 6544be44fcdSLen Brown 65533620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 65633620c54SBob Moore acpi_enable_gpe(acpi_handle gpe_device, 65733620c54SBob Moore u32 gpe_number)) 6584be44fcdSLen Brown 65933620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 66033620c54SBob Moore acpi_disable_gpe(acpi_handle gpe_device, 66133620c54SBob Moore u32 gpe_number)) 6621da177e4SLinus Torvalds 66333620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 66433620c54SBob Moore acpi_clear_gpe(acpi_handle gpe_device, 66533620c54SBob Moore u32 gpe_number)) 666bba63a29SLin Ming 66733620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 66833620c54SBob Moore acpi_set_gpe(acpi_handle gpe_device, 66933620c54SBob Moore u32 gpe_number, u8 action)) 670e8b6f970SRafael J. Wysocki 67133620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 67233620c54SBob Moore acpi_finish_gpe(acpi_handle gpe_device, 67333620c54SBob Moore u32 gpe_number)) 67433620c54SBob Moore 67533620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 676c12f07d1SRafael J. Wysocki acpi_mark_gpe_for_wake(acpi_handle gpe_device, 677c12f07d1SRafael J. Wysocki u32 gpe_number)) 678c12f07d1SRafael J. Wysocki 679c12f07d1SRafael J. Wysocki ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 68033620c54SBob Moore acpi_setup_gpe_for_wake(acpi_handle 68133620c54SBob Moore parent_device, 68233620c54SBob Moore acpi_handle gpe_device, 68333620c54SBob Moore u32 gpe_number)) 68433620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 68533620c54SBob Moore acpi_set_gpe_wake_mask(acpi_handle gpe_device, 68633620c54SBob Moore u32 gpe_number, 68733620c54SBob Moore u8 action)) 68833620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 6894be44fcdSLen Brown acpi_get_gpe_status(acpi_handle gpe_device, 69033620c54SBob Moore u32 gpe_number, 69133620c54SBob Moore acpi_event_status 69233620c54SBob Moore *event_status)) 69333620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) 69433620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) 695e0fa975dSRafael J. Wysocki ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) 69608ac07b8SBob Moore 69733620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 69833620c54SBob Moore acpi_get_gpe_device(u32 gpe_index, 69933620c54SBob Moore acpi_handle * gpe_device)) 700e97d6bf1SBob Moore 70133620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 7024be44fcdSLen Brown acpi_install_gpe_block(acpi_handle gpe_device, 70333620c54SBob Moore struct 70433620c54SBob Moore acpi_generic_address 70533620c54SBob Moore *gpe_block_address, 70633620c54SBob Moore u32 register_count, 70733620c54SBob Moore u32 interrupt_number)) 70833620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 70933620c54SBob Moore acpi_remove_gpe_block(acpi_handle gpe_device)) 710a2100801SRafael J. Wysocki 7111da177e4SLinus Torvalds /* 7121da177e4SLinus Torvalds * Resource interfaces 7131da177e4SLinus Torvalds */ 7141da177e4SLinus Torvalds typedef 71561686124SBob Moore acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, 7161da177e4SLinus Torvalds void *context); 7171da177e4SLinus Torvalds 7188b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 719b47cf58eSBob Moore acpi_get_vendor_resource(acpi_handle device, 720c51a4de8SBob Moore char *name, 7218b9c1152SLv Zheng struct acpi_vendor_uuid 7228b9c1152SLv Zheng *uuid, 7238b9c1152SLv Zheng struct acpi_buffer 7248b9c1152SLv Zheng *ret_buffer)) 7258b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7268b9c1152SLv Zheng acpi_get_current_resources(acpi_handle device, 7278b9c1152SLv Zheng struct acpi_buffer 7288b9c1152SLv Zheng *ret_buffer)) 7291da177e4SLinus Torvalds #ifdef ACPI_FUTURE_USAGE 7308b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7318b9c1152SLv Zheng acpi_get_possible_resources(acpi_handle device, 7328b9c1152SLv Zheng struct acpi_buffer 7338b9c1152SLv Zheng *ret_buffer)) 7341da177e4SLinus Torvalds #endif 7358b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 736a91cdde2SBob Moore acpi_get_event_resources(acpi_handle device_handle, 7378b9c1152SLv Zheng struct acpi_buffer 7388b9c1152SLv Zheng *ret_buffer)) 7398b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7408b9c1152SLv Zheng acpi_walk_resource_buffer(struct acpi_buffer 7418b9c1152SLv Zheng *buffer, 7428b9c1152SLv Zheng acpi_walk_resource_callback 7438b9c1152SLv Zheng user_function, 7448b9c1152SLv Zheng void *context)) 7458b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7468b9c1152SLv Zheng acpi_walk_resources(acpi_handle device, char *name, 7478b9c1152SLv Zheng acpi_walk_resource_callback 7488b9c1152SLv Zheng user_function, void *context)) 7498b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7508b9c1152SLv Zheng acpi_set_current_resources(acpi_handle device, 7518b9c1152SLv Zheng struct acpi_buffer 7528b9c1152SLv Zheng *in_buffer)) 7538b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7548b9c1152SLv Zheng acpi_get_irq_routing_table(acpi_handle device, 7558b9c1152SLv Zheng struct acpi_buffer 7568b9c1152SLv Zheng *ret_buffer)) 7578b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7588b9c1152SLv Zheng acpi_resource_to_address64(struct acpi_resource 7598b9c1152SLv Zheng *resource, 7608b9c1152SLv Zheng struct 7618b9c1152SLv Zheng acpi_resource_address64 7628b9c1152SLv Zheng *out)) 7638b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7640e243178SBob Moore acpi_buffer_to_resource(u8 *aml_buffer, 7650e243178SBob Moore u16 aml_buffer_length, 7668b9c1152SLv Zheng struct acpi_resource 7678b9c1152SLv Zheng **resource_ptr)) 7680e243178SBob Moore 7691da177e4SLinus Torvalds /* 7701da177e4SLinus Torvalds * Hardware (ACPI device) interfaces 7711da177e4SLinus Torvalds */ 7728b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void)) 773d3fd902dSBob Moore 7748b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7758b9c1152SLv Zheng acpi_read(u64 *value, 7768b9c1152SLv Zheng struct acpi_generic_address *reg)) 777739dcbb9SLv Zheng 7788b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7798b9c1152SLv Zheng acpi_write(u64 value, 7808b9c1152SLv Zheng struct acpi_generic_address *reg)) 781739dcbb9SLv Zheng 78233620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 78333620c54SBob Moore acpi_read_bit_register(u32 register_id, 78433620c54SBob Moore u32 *return_value)) 7854be44fcdSLen Brown 78633620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 78733620c54SBob Moore acpi_write_bit_register(u32 register_id, 78833620c54SBob Moore u32 value)) 7891da177e4SLinus Torvalds 79033620c54SBob Moore /* 79133620c54SBob Moore * Sleep/Wake interfaces 79233620c54SBob Moore */ 7938b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7948b9c1152SLv Zheng acpi_get_sleep_type_data(u8 sleep_state, 7958b9c1152SLv Zheng u8 *slp_typ_a, 7968b9c1152SLv Zheng u8 *slp_typ_b)) 7971da177e4SLinus Torvalds 7988b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 7998b9c1152SLv Zheng acpi_enter_sleep_state_prep(u8 sleep_state)) 8008b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state)) 8011da177e4SLinus Torvalds 80240bce100SLv Zheng ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void)) 8031da177e4SLinus Torvalds 8048b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 8058b9c1152SLv Zheng acpi_leave_sleep_state_prep(u8 sleep_state)) 8068b9c1152SLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state)) 8071da177e4SLinus Torvalds 808739dcbb9SLv Zheng ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 809739dcbb9SLv Zheng acpi_set_firmware_waking_vector(u32 810739dcbb9SLv Zheng physical_address)) 811739dcbb9SLv Zheng #if ACPI_MACHINE_WIDTH == 64 812739dcbb9SLv Zheng ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 813739dcbb9SLv Zheng acpi_set_firmware_waking_vector64(u64 814739dcbb9SLv Zheng physical_address)) 815739dcbb9SLv Zheng #endif 81650df4d8bSBob Moore /* 817d08310feSBob Moore * ACPI Timer interfaces 818d08310feSBob Moore */ 819d08310feSBob Moore #ifdef ACPI_FUTURE_USAGE 82033620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 82133620c54SBob Moore acpi_get_timer_resolution(u32 *resolution)) 82233620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks)) 823d08310feSBob Moore 82433620c54SBob Moore ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 82533620c54SBob Moore acpi_get_timer_duration(u32 start_ticks, 82633620c54SBob Moore u32 end_ticks, 82733620c54SBob Moore u32 *time_elapsed)) 828d08310feSBob Moore #endif /* ACPI_FUTURE_USAGE */ 829d08310feSBob Moore 830d08310feSBob Moore /* 831b74be611SBob Moore * Error/Warning output 83250df4d8bSBob Moore */ 833407e22afSLv Zheng ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) 83450df4d8bSBob Moore void ACPI_INTERNAL_VAR_XFACE 835407e22afSLv Zheng acpi_error(const char *module_name, 836407e22afSLv Zheng u32 line_number, 837407e22afSLv Zheng const char *format, ...)) 838407e22afSLv Zheng ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4) 83950df4d8bSBob Moore void ACPI_INTERNAL_VAR_XFACE 84050df4d8bSBob Moore acpi_exception(const char *module_name, 841407e22afSLv Zheng u32 line_number, 842407e22afSLv Zheng acpi_status status, 843407e22afSLv Zheng const char *format, ...)) 844407e22afSLv Zheng ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) 84550df4d8bSBob Moore void ACPI_INTERNAL_VAR_XFACE 846407e22afSLv Zheng acpi_warning(const char *module_name, 847407e22afSLv Zheng u32 line_number, 848407e22afSLv Zheng const char *format, ...)) 849407e22afSLv Zheng ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) 85050df4d8bSBob Moore void ACPI_INTERNAL_VAR_XFACE 851407e22afSLv Zheng acpi_info(const char *module_name, 852407e22afSLv Zheng u32 line_number, 853407e22afSLv Zheng const char *format, ...)) 854407e22afSLv Zheng ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) 85562cdd141SBob Moore void ACPI_INTERNAL_VAR_XFACE 85662cdd141SBob Moore acpi_bios_error(const char *module_name, 857407e22afSLv Zheng u32 line_number, 858407e22afSLv Zheng const char *format, ...)) 859407e22afSLv Zheng ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) 86062cdd141SBob Moore void ACPI_INTERNAL_VAR_XFACE 86162cdd141SBob Moore acpi_bios_warning(const char *module_name, 862407e22afSLv Zheng u32 line_number, 863407e22afSLv Zheng const char *format, ...)) 86462cdd141SBob Moore 865b74be611SBob Moore /* 866b74be611SBob Moore * Debug output 867b74be611SBob Moore */ 8681ce28c32SLv Zheng ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6) 86950df4d8bSBob Moore void ACPI_INTERNAL_VAR_XFACE 87050df4d8bSBob Moore acpi_debug_print(u32 requested_debug_level, 87150df4d8bSBob Moore u32 line_number, 87250df4d8bSBob Moore const char *function_name, 87350df4d8bSBob Moore const char *module_name, 8741ce28c32SLv Zheng u32 component_id, 8751ce28c32SLv Zheng const char *format, ...)) 8761ce28c32SLv Zheng ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6) 87750df4d8bSBob Moore void ACPI_INTERNAL_VAR_XFACE 87850df4d8bSBob Moore acpi_debug_print_raw(u32 requested_debug_level, 87950df4d8bSBob Moore u32 line_number, 88050df4d8bSBob Moore const char *function_name, 88150df4d8bSBob Moore const char *module_name, 8821ce28c32SLv Zheng u32 component_id, 8831ce28c32SLv Zheng const char *format, ...)) 8842e70da4cSLv Zheng ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) 8852e70da4cSLv Zheng void ACPI_INTERNAL_VAR_XFACE 8862e70da4cSLv Zheng acpi_log_error(const char *format, ...)) 8870dedb3c4SLv Zheng 8880dedb3c4SLv Zheng /* 8890dedb3c4SLv Zheng * Divergences 8900dedb3c4SLv Zheng */ 891a8278efdSLv Zheng ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); 8920dedb3c4SLv Zheng 893a8278efdSLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 8940dedb3c4SLv Zheng acpi_get_table_with_size(acpi_string signature, 895a8278efdSLv Zheng u32 instance, 896a8278efdSLv Zheng struct acpi_table_header 897a8278efdSLv Zheng **out_table, 898a8278efdSLv Zheng acpi_size *tbl_size)) 8990dedb3c4SLv Zheng 900a8278efdSLv Zheng ACPI_EXTERNAL_RETURN_STATUS(acpi_status 901a8278efdSLv Zheng acpi_get_data_full(acpi_handle object, 902a8278efdSLv Zheng acpi_object_handler handler, 903a8278efdSLv Zheng void **data, 904a8278efdSLv Zheng void (*callback)(void *))) 90550df4d8bSBob Moore 9061da177e4SLinus Torvalds #endif /* __ACXFACE_H__ */ 907