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