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