xref: /haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/acpixf.h (revision 73254051b196497dfee9ab89eb0c2f60cc305819)
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 - 2013, 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 
117 #ifndef __ACXFACE_H__
118 #define __ACXFACE_H__
119 
120 /* Current ACPICA subsystem version in YYYYMMDD format */
121 
122 #define ACPI_CA_VERSION                 0x20130823
123 
124 #include "acconfig.h"
125 #include "actypes.h"
126 #include "actbl.h"
127 #include "acbuffer.h"
128 
129 /*
130  * Globals that are publically available
131  */
132 extern UINT32               AcpiCurrentGpeCount;
133 extern ACPI_TABLE_FADT      AcpiGbl_FADT;
134 extern BOOLEAN              AcpiGbl_SystemAwakeAndRunning;
135 extern BOOLEAN              AcpiGbl_ReducedHardware;        /* ACPI 5.0 */
136 extern UINT8                AcpiGbl_OsiData;
137 
138 /* Runtime configuration of debug print levels */
139 
140 extern UINT32               AcpiDbgLevel;
141 extern UINT32               AcpiDbgLayer;
142 
143 /* ACPICA runtime options */
144 
145 extern UINT8                AcpiGbl_EnableInterpreterSlack;
146 extern UINT8                AcpiGbl_AllMethodsSerialized;
147 extern UINT8                AcpiGbl_CreateOsiMethod;
148 extern UINT8                AcpiGbl_UseDefaultRegisterWidths;
149 extern ACPI_NAME            AcpiGbl_TraceMethodName;
150 extern UINT32               AcpiGbl_TraceFlags;
151 extern UINT8                AcpiGbl_EnableAmlDebugObject;
152 extern UINT8                AcpiGbl_CopyDsdtLocally;
153 extern UINT8                AcpiGbl_TruncateIoAddresses;
154 extern UINT8                AcpiGbl_DisableAutoRepair;
155 extern UINT8                AcpiGbl_DisableSsdtTableLoad;
156 
157 
158 /*
159  * Hardware-reduced prototypes. All interfaces that use these macros will
160  * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
161  * is set to TRUE.
162  */
163 #if (!ACPI_REDUCED_HARDWARE)
164 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
165     Prototype;
166 
167 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
168     Prototype;
169 
170 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
171     Prototype;
172 
173 #else
174 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
175     static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
176 
177 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
178     static ACPI_INLINE Prototype {return(AE_OK);}
179 
180 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
181     static ACPI_INLINE Prototype {}
182 
183 #endif /* !ACPI_REDUCED_HARDWARE */
184 
185 
186 /*
187  * Initialization
188  */
189 ACPI_STATUS
190 AcpiInitializeTables (
191     ACPI_TABLE_DESC         *InitialStorage,
192     UINT32                  InitialTableCount,
193     BOOLEAN                 AllowResize);
194 
195 ACPI_STATUS
196 AcpiInitializeSubsystem (
197     void);
198 
199 ACPI_STATUS
200 AcpiEnableSubsystem (
201     UINT32                  Flags);
202 
203 ACPI_STATUS
204 AcpiInitializeObjects (
205     UINT32                  Flags);
206 
207 ACPI_STATUS
208 AcpiTerminate (
209     void);
210 
211 
212 /*
213  * Miscellaneous global interfaces
214  */
215 ACPI_HW_DEPENDENT_RETURN_STATUS (
216 ACPI_STATUS
217 AcpiEnable (
218     void))
219 
220 ACPI_HW_DEPENDENT_RETURN_STATUS (
221 ACPI_STATUS
222 AcpiDisable (
223     void))
224 
225 ACPI_STATUS
226 AcpiSubsystemStatus (
227     void);
228 
229 ACPI_STATUS
230 AcpiGetSystemInfo (
231     ACPI_BUFFER             *RetBuffer);
232 
233 ACPI_STATUS
234 AcpiGetStatistics (
235     ACPI_STATISTICS         *Stats);
236 
237 const char *
238 AcpiFormatException (
239     ACPI_STATUS             Exception);
240 
241 ACPI_STATUS
242 AcpiPurgeCachedObjects (
243     void);
244 
245 ACPI_STATUS
246 AcpiInstallInterface (
247     ACPI_STRING             InterfaceName);
248 
249 ACPI_STATUS
250 AcpiRemoveInterface (
251     ACPI_STRING             InterfaceName);
252 
253 ACPI_STATUS
254 AcpiUpdateInterfaces (
255     UINT8                   Action);
256 
257 UINT32
258 AcpiCheckAddressRange (
259     ACPI_ADR_SPACE_TYPE     SpaceId,
260     ACPI_PHYSICAL_ADDRESS   Address,
261     ACPI_SIZE               Length,
262     BOOLEAN                 Warn);
263 
264 ACPI_STATUS
265 AcpiDecodePldBuffer (
266     UINT8                   *InBuffer,
267     ACPI_SIZE               Length,
268     ACPI_PLD_INFO           **ReturnBuffer);
269 
270 /*
271  * ACPI Memory management
272  */
273 void *
274 AcpiAllocate (
275     UINT32                  Size);
276 
277 void *
278 AcpiCallocate (
279     UINT32                  Size);
280 
281 void
282 AcpiFree (
283     void                    *Address);
284 
285 
286 /*
287  * ACPI table load/unload interfaces
288  */
289 ACPI_STATUS
290 AcpiLoadTable (
291     ACPI_TABLE_HEADER       *Table);
292 
293 ACPI_STATUS
294 AcpiUnloadParentTable (
295     ACPI_HANDLE             Object);
296 
297 ACPI_STATUS
298 AcpiLoadTables (
299     void);
300 
301 
302 /*
303  * ACPI table manipulation interfaces
304  */
305 ACPI_STATUS
306 AcpiReallocateRootTable (
307     void);
308 
309 ACPI_STATUS
310 AcpiFindRootPointer (
311     ACPI_SIZE               *RsdpAddress);
312 
313 ACPI_STATUS
314 AcpiGetTableHeader (
315     ACPI_STRING             Signature,
316     UINT32                  Instance,
317     ACPI_TABLE_HEADER       *OutTableHeader);
318 
319 ACPI_STATUS
320 AcpiGetTable (
321     ACPI_STRING             Signature,
322     UINT32                  Instance,
323     ACPI_TABLE_HEADER       **OutTable);
324 
325 ACPI_STATUS
326 AcpiGetTableByIndex (
327     UINT32                  TableIndex,
328     ACPI_TABLE_HEADER       **OutTable);
329 
330 ACPI_STATUS
331 AcpiInstallTableHandler (
332     ACPI_TABLE_HANDLER      Handler,
333     void                    *Context);
334 
335 ACPI_STATUS
336 AcpiRemoveTableHandler (
337     ACPI_TABLE_HANDLER      Handler);
338 
339 
340 /*
341  * Namespace and name interfaces
342  */
343 ACPI_STATUS
344 AcpiWalkNamespace (
345     ACPI_OBJECT_TYPE        Type,
346     ACPI_HANDLE             StartObject,
347     UINT32                  MaxDepth,
348     ACPI_WALK_CALLBACK      DescendingCallback,
349     ACPI_WALK_CALLBACK      AscendingCallback,
350     void                    *Context,
351     void                    **ReturnValue);
352 
353 ACPI_STATUS
354 AcpiGetDevices (
355     char                    *HID,
356     ACPI_WALK_CALLBACK      UserFunction,
357     void                    *Context,
358     void                    **ReturnValue);
359 
360 ACPI_STATUS
361 AcpiGetName (
362     ACPI_HANDLE             Object,
363     UINT32                  NameType,
364     ACPI_BUFFER             *RetPathPtr);
365 
366 ACPI_STATUS
367 AcpiGetHandle (
368     ACPI_HANDLE             Parent,
369     ACPI_STRING             Pathname,
370     ACPI_HANDLE             *RetHandle);
371 
372 ACPI_STATUS
373 AcpiAttachData (
374     ACPI_HANDLE             Object,
375     ACPI_OBJECT_HANDLER     Handler,
376     void                    *Data);
377 
378 ACPI_STATUS
379 AcpiDetachData (
380     ACPI_HANDLE             Object,
381     ACPI_OBJECT_HANDLER     Handler);
382 
383 ACPI_STATUS
384 AcpiGetData (
385     ACPI_HANDLE             Object,
386     ACPI_OBJECT_HANDLER     Handler,
387     void                    **Data);
388 
389 ACPI_STATUS
390 AcpiDebugTrace (
391     char                    *Name,
392     UINT32                  DebugLevel,
393     UINT32                  DebugLayer,
394     UINT32                  Flags);
395 
396 
397 /*
398  * Object manipulation and enumeration
399  */
400 ACPI_STATUS
401 AcpiEvaluateObject (
402     ACPI_HANDLE             Object,
403     ACPI_STRING             Pathname,
404     ACPI_OBJECT_LIST        *ParameterObjects,
405     ACPI_BUFFER             *ReturnObjectBuffer);
406 
407 ACPI_STATUS
408 AcpiEvaluateObjectTyped (
409     ACPI_HANDLE             Object,
410     ACPI_STRING             Pathname,
411     ACPI_OBJECT_LIST        *ExternalParams,
412     ACPI_BUFFER             *ReturnBuffer,
413     ACPI_OBJECT_TYPE        ReturnType);
414 
415 ACPI_STATUS
416 AcpiGetObjectInfo (
417     ACPI_HANDLE             Object,
418     ACPI_DEVICE_INFO        **ReturnBuffer);
419 
420 ACPI_STATUS
421 AcpiInstallMethod (
422     UINT8                   *Buffer);
423 
424 ACPI_STATUS
425 AcpiGetNextObject (
426     ACPI_OBJECT_TYPE        Type,
427     ACPI_HANDLE             Parent,
428     ACPI_HANDLE             Child,
429     ACPI_HANDLE             *OutHandle);
430 
431 ACPI_STATUS
432 AcpiGetType (
433     ACPI_HANDLE             Object,
434     ACPI_OBJECT_TYPE        *OutType);
435 
436 ACPI_STATUS
437 AcpiGetParent (
438     ACPI_HANDLE             Object,
439     ACPI_HANDLE             *OutHandle);
440 
441 
442 /*
443  * Handler interfaces
444  */
445 ACPI_STATUS
446 AcpiInstallInitializationHandler (
447     ACPI_INIT_HANDLER       Handler,
448     UINT32                  Function);
449 
450 ACPI_HW_DEPENDENT_RETURN_STATUS (
451 ACPI_STATUS
452 AcpiInstallSciHandler (
453     ACPI_SCI_HANDLER        Address,
454     void                    *Context))
455 
456 ACPI_HW_DEPENDENT_RETURN_STATUS (
457 ACPI_STATUS
458 AcpiRemoveSciHandler (
459     ACPI_SCI_HANDLER        Address))
460 
461 ACPI_HW_DEPENDENT_RETURN_STATUS (
462 ACPI_STATUS
463 AcpiInstallGlobalEventHandler (
464     ACPI_GBL_EVENT_HANDLER  Handler,
465     void                    *Context))
466 
467 ACPI_HW_DEPENDENT_RETURN_STATUS (
468 ACPI_STATUS
469 AcpiInstallFixedEventHandler (
470     UINT32                  AcpiEvent,
471     ACPI_EVENT_HANDLER      Handler,
472     void                    *Context))
473 
474 ACPI_HW_DEPENDENT_RETURN_STATUS (
475 ACPI_STATUS
476 AcpiRemoveFixedEventHandler (
477     UINT32                  AcpiEvent,
478     ACPI_EVENT_HANDLER      Handler))
479 
480 ACPI_HW_DEPENDENT_RETURN_STATUS (
481 ACPI_STATUS
482 AcpiInstallGpeHandler (
483     ACPI_HANDLE             GpeDevice,
484     UINT32                  GpeNumber,
485     UINT32                  Type,
486     ACPI_GPE_HANDLER        Address,
487     void                    *Context))
488 
489 ACPI_HW_DEPENDENT_RETURN_STATUS (
490 ACPI_STATUS
491 AcpiRemoveGpeHandler (
492     ACPI_HANDLE             GpeDevice,
493     UINT32                  GpeNumber,
494     ACPI_GPE_HANDLER        Address))
495 
496 ACPI_STATUS
497 AcpiInstallNotifyHandler (
498     ACPI_HANDLE             Device,
499     UINT32                  HandlerType,
500     ACPI_NOTIFY_HANDLER     Handler,
501     void                    *Context);
502 
503 ACPI_STATUS
504 AcpiRemoveNotifyHandler (
505     ACPI_HANDLE             Device,
506     UINT32                  HandlerType,
507     ACPI_NOTIFY_HANDLER     Handler);
508 
509 ACPI_STATUS
510 AcpiInstallAddressSpaceHandler (
511     ACPI_HANDLE             Device,
512     ACPI_ADR_SPACE_TYPE     SpaceId,
513     ACPI_ADR_SPACE_HANDLER  Handler,
514     ACPI_ADR_SPACE_SETUP    Setup,
515     void                    *Context);
516 
517 ACPI_STATUS
518 AcpiRemoveAddressSpaceHandler (
519     ACPI_HANDLE             Device,
520     ACPI_ADR_SPACE_TYPE     SpaceId,
521     ACPI_ADR_SPACE_HANDLER  Handler);
522 
523 ACPI_STATUS
524 AcpiInstallExceptionHandler (
525     ACPI_EXCEPTION_HANDLER  Handler);
526 
527 ACPI_STATUS
528 AcpiInstallInterfaceHandler (
529     ACPI_INTERFACE_HANDLER  Handler);
530 
531 
532 /*
533  * Global Lock interfaces
534  */
535 ACPI_HW_DEPENDENT_RETURN_STATUS (
536 ACPI_STATUS
537 AcpiAcquireGlobalLock (
538     UINT16                  Timeout,
539     UINT32                  *Handle))
540 
541 ACPI_HW_DEPENDENT_RETURN_STATUS (
542 ACPI_STATUS
543 AcpiReleaseGlobalLock (
544     UINT32                  Handle))
545 
546 
547 /*
548  * Interfaces to AML mutex objects
549  */
550 ACPI_STATUS
551 AcpiAcquireMutex (
552     ACPI_HANDLE             Handle,
553     ACPI_STRING             Pathname,
554     UINT16                  Timeout);
555 
556 ACPI_STATUS
557 AcpiReleaseMutex (
558     ACPI_HANDLE             Handle,
559     ACPI_STRING             Pathname);
560 
561 
562 /*
563  * Fixed Event interfaces
564  */
565 ACPI_HW_DEPENDENT_RETURN_STATUS (
566 ACPI_STATUS
567 AcpiEnableEvent (
568     UINT32                  Event,
569     UINT32                  Flags))
570 
571 ACPI_HW_DEPENDENT_RETURN_STATUS (
572 ACPI_STATUS
573 AcpiDisableEvent (
574     UINT32                  Event,
575     UINT32                  Flags))
576 
577 ACPI_HW_DEPENDENT_RETURN_STATUS (
578 ACPI_STATUS
579 AcpiClearEvent (
580     UINT32                  Event))
581 
582 ACPI_HW_DEPENDENT_RETURN_STATUS (
583 ACPI_STATUS
584 AcpiGetEventStatus (
585     UINT32                  Event,
586     ACPI_EVENT_STATUS       *EventStatus))
587 
588 
589 /*
590  * General Purpose Event (GPE) Interfaces
591  */
592 ACPI_HW_DEPENDENT_RETURN_STATUS (
593 ACPI_STATUS
594 AcpiUpdateAllGpes (
595     void))
596 
597 ACPI_HW_DEPENDENT_RETURN_STATUS (
598 ACPI_STATUS
599 AcpiEnableGpe (
600     ACPI_HANDLE             GpeDevice,
601     UINT32                  GpeNumber))
602 
603 ACPI_HW_DEPENDENT_RETURN_STATUS (
604 ACPI_STATUS
605 AcpiDisableGpe (
606     ACPI_HANDLE             GpeDevice,
607     UINT32                  GpeNumber))
608 
609 ACPI_HW_DEPENDENT_RETURN_STATUS (
610 ACPI_STATUS
611 AcpiClearGpe (
612     ACPI_HANDLE             GpeDevice,
613     UINT32                  GpeNumber))
614 
615 ACPI_HW_DEPENDENT_RETURN_STATUS (
616 ACPI_STATUS
617 AcpiSetGpe (
618     ACPI_HANDLE             GpeDevice,
619     UINT32                  GpeNumber,
620     UINT8                   Action))
621 
622 ACPI_HW_DEPENDENT_RETURN_STATUS (
623 ACPI_STATUS
624 AcpiFinishGpe (
625     ACPI_HANDLE             GpeDevice,
626     UINT32                  GpeNumber))
627 
628 ACPI_HW_DEPENDENT_RETURN_STATUS (
629 ACPI_STATUS
630 AcpiSetupGpeForWake (
631     ACPI_HANDLE             ParentDevice,
632     ACPI_HANDLE             GpeDevice,
633     UINT32                  GpeNumber))
634 
635 ACPI_HW_DEPENDENT_RETURN_STATUS (
636 ACPI_STATUS
637 AcpiSetGpeWakeMask (
638     ACPI_HANDLE             GpeDevice,
639     UINT32                  GpeNumber,
640     UINT8                   Action))
641 
642 ACPI_HW_DEPENDENT_RETURN_STATUS (
643 ACPI_STATUS
644 AcpiGetGpeStatus (
645     ACPI_HANDLE             GpeDevice,
646     UINT32                  GpeNumber,
647     ACPI_EVENT_STATUS       *EventStatus))
648 
649 ACPI_HW_DEPENDENT_RETURN_STATUS (
650 ACPI_STATUS
651 AcpiDisableAllGpes (
652     void))
653 
654 ACPI_HW_DEPENDENT_RETURN_STATUS (
655 ACPI_STATUS
656 AcpiEnableAllRuntimeGpes (
657     void))
658 
659 ACPI_HW_DEPENDENT_RETURN_STATUS (
660 ACPI_STATUS
661 AcpiGetGpeDevice (
662     UINT32                  GpeIndex,
663     ACPI_HANDLE             *GpeDevice))
664 
665 ACPI_HW_DEPENDENT_RETURN_STATUS (
666 ACPI_STATUS
667 AcpiInstallGpeBlock (
668     ACPI_HANDLE             GpeDevice,
669     ACPI_GENERIC_ADDRESS    *GpeBlockAddress,
670     UINT32                  RegisterCount,
671     UINT32                  InterruptNumber))
672 
673 ACPI_HW_DEPENDENT_RETURN_STATUS (
674 ACPI_STATUS
675 AcpiRemoveGpeBlock (
676     ACPI_HANDLE             GpeDevice))
677 
678 
679 /*
680  * Resource interfaces
681  */
682 typedef
683 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
684     ACPI_RESOURCE           *Resource,
685     void                    *Context);
686 
687 ACPI_STATUS
688 AcpiGetVendorResource (
689     ACPI_HANDLE             Device,
690     char                    *Name,
691     ACPI_VENDOR_UUID        *Uuid,
692     ACPI_BUFFER             *RetBuffer);
693 
694 ACPI_STATUS
695 AcpiGetCurrentResources (
696     ACPI_HANDLE             Device,
697     ACPI_BUFFER             *RetBuffer);
698 
699 ACPI_STATUS
700 AcpiGetPossibleResources (
701     ACPI_HANDLE             Device,
702     ACPI_BUFFER             *RetBuffer);
703 
704 ACPI_STATUS
705 AcpiGetEventResources (
706     ACPI_HANDLE             DeviceHandle,
707     ACPI_BUFFER             *RetBuffer);
708 
709 ACPI_STATUS
710 AcpiWalkResourceBuffer (
711     ACPI_BUFFER                 *Buffer,
712     ACPI_WALK_RESOURCE_CALLBACK UserFunction,
713     void                        *Context);
714 
715 ACPI_STATUS
716 AcpiWalkResources (
717     ACPI_HANDLE                 Device,
718     char                        *Name,
719     ACPI_WALK_RESOURCE_CALLBACK UserFunction,
720     void                        *Context);
721 
722 ACPI_STATUS
723 AcpiSetCurrentResources (
724     ACPI_HANDLE             Device,
725     ACPI_BUFFER             *InBuffer);
726 
727 ACPI_STATUS
728 AcpiGetIrqRoutingTable (
729     ACPI_HANDLE             Device,
730     ACPI_BUFFER             *RetBuffer);
731 
732 ACPI_STATUS
733 AcpiResourceToAddress64 (
734     ACPI_RESOURCE           *Resource,
735     ACPI_RESOURCE_ADDRESS64 *Out);
736 
737 ACPI_STATUS
738 AcpiBufferToResource (
739     UINT8                   *AmlBuffer,
740     UINT16                  AmlBufferLength,
741     ACPI_RESOURCE           **ResourcePtr);
742 
743 
744 /*
745  * Hardware (ACPI device) interfaces
746  */
747 ACPI_STATUS
748 AcpiReset (
749     void);
750 
751 ACPI_STATUS
752 AcpiRead (
753     UINT64                  *Value,
754     ACPI_GENERIC_ADDRESS    *Reg);
755 
756 ACPI_STATUS
757 AcpiWrite (
758     UINT64                  Value,
759     ACPI_GENERIC_ADDRESS    *Reg);
760 
761 ACPI_HW_DEPENDENT_RETURN_STATUS (
762 ACPI_STATUS
763 AcpiReadBitRegister (
764     UINT32                  RegisterId,
765     UINT32                  *ReturnValue))
766 
767 ACPI_HW_DEPENDENT_RETURN_STATUS (
768 ACPI_STATUS
769 AcpiWriteBitRegister (
770     UINT32                  RegisterId,
771     UINT32                  Value))
772 
773 
774 /*
775  * Sleep/Wake interfaces
776  */
777 ACPI_STATUS
778 AcpiGetSleepTypeData (
779     UINT8                   SleepState,
780     UINT8                   *Slp_TypA,
781     UINT8                   *Slp_TypB);
782 
783 ACPI_STATUS
784 AcpiEnterSleepStatePrep (
785     UINT8                   SleepState);
786 
787 ACPI_STATUS
788 AcpiEnterSleepState (
789     UINT8                   SleepState);
790 
791 ACPI_HW_DEPENDENT_RETURN_STATUS (
792 ACPI_STATUS
793 AcpiEnterSleepStateS4bios (
794     void))
795 
796 ACPI_STATUS
797 AcpiLeaveSleepStatePrep (
798     UINT8                   SleepState);
799 
800 ACPI_STATUS
801 AcpiLeaveSleepState (
802     UINT8                   SleepState);
803 
804 ACPI_HW_DEPENDENT_RETURN_STATUS (
805 ACPI_STATUS
806 AcpiSetFirmwareWakingVector (
807     UINT32                  PhysicalAddress))
808 
809 #if ACPI_MACHINE_WIDTH == 64
810 ACPI_HW_DEPENDENT_RETURN_STATUS (
811 ACPI_STATUS
812 AcpiSetFirmwareWakingVector64 (
813     UINT64                  PhysicalAddress))
814 #endif
815 
816 
817 /*
818  * ACPI Timer interfaces
819  */
820 ACPI_HW_DEPENDENT_RETURN_STATUS (
821 ACPI_STATUS
822 AcpiGetTimerResolution (
823     UINT32                  *Resolution))
824 
825 ACPI_HW_DEPENDENT_RETURN_STATUS (
826 ACPI_STATUS
827 AcpiGetTimer (
828     UINT32                  *Ticks))
829 
830 ACPI_HW_DEPENDENT_RETURN_STATUS (
831 ACPI_STATUS
832 AcpiGetTimerDuration (
833     UINT32                  StartTicks,
834     UINT32                  EndTicks,
835     UINT32                  *TimeElapsed))
836 
837 
838 /*
839  * Error/Warning output
840  */
841 void ACPI_INTERNAL_VAR_XFACE
842 AcpiError (
843     const char              *ModuleName,
844     UINT32                  LineNumber,
845     const char              *Format,
846     ...) ACPI_PRINTF_LIKE(3);
847 
848 void  ACPI_INTERNAL_VAR_XFACE
849 AcpiException (
850     const char              *ModuleName,
851     UINT32                  LineNumber,
852     ACPI_STATUS             Status,
853     const char              *Format,
854     ...) ACPI_PRINTF_LIKE(4);
855 
856 void ACPI_INTERNAL_VAR_XFACE
857 AcpiWarning (
858     const char              *ModuleName,
859     UINT32                  LineNumber,
860     const char              *Format,
861     ...) ACPI_PRINTF_LIKE(3);
862 
863 void ACPI_INTERNAL_VAR_XFACE
864 AcpiInfo (
865     const char              *ModuleName,
866     UINT32                  LineNumber,
867     const char              *Format,
868     ...) ACPI_PRINTF_LIKE(3);
869 
870 void ACPI_INTERNAL_VAR_XFACE
871 AcpiBiosError (
872     const char              *ModuleName,
873     UINT32                  LineNumber,
874     const char              *Format,
875     ...) ACPI_PRINTF_LIKE(3);
876 
877 void ACPI_INTERNAL_VAR_XFACE
878 AcpiBiosWarning (
879     const char              *ModuleName,
880     UINT32                  LineNumber,
881     const char              *Format,
882     ...) ACPI_PRINTF_LIKE(3);
883 
884 
885 /*
886  * Debug output
887  */
888 #ifdef ACPI_DEBUG_OUTPUT
889 
890 void ACPI_INTERNAL_VAR_XFACE
891 AcpiDebugPrint (
892     UINT32                  RequestedDebugLevel,
893     UINT32                  LineNumber,
894     const char              *FunctionName,
895     const char              *ModuleName,
896     UINT32                  ComponentId,
897     const char              *Format,
898     ...) ACPI_PRINTF_LIKE(6);
899 
900 void ACPI_INTERNAL_VAR_XFACE
901 AcpiDebugPrintRaw (
902     UINT32                  RequestedDebugLevel,
903     UINT32                  LineNumber,
904     const char              *FunctionName,
905     const char              *ModuleName,
906     UINT32                  ComponentId,
907     const char              *Format,
908     ...) ACPI_PRINTF_LIKE(6);
909 #endif
910 
911 #endif /* __ACXFACE_H__ */
912