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