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