[BACK]Return to acpixf.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / external / bsd / acpica / dist / include

Annotation of src/sys/external/bsd/acpica/dist/include/acpixf.h, Revision 1.1.1.17

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

CVSweb <webmaster@jp.NetBSD.org>