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