xref: /titanic_44/usr/src/uts/intel/sys/acpi/acpiosxf.h (revision cb56572868bfc488bbd3ab847b09db2a25554d44)
17c478bd9Sstevel@tonic-gate /******************************************************************************
27c478bd9Sstevel@tonic-gate  *
37c478bd9Sstevel@tonic-gate  * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These
47c478bd9Sstevel@tonic-gate  *                    interfaces must be implemented by OSL to interface the
57c478bd9Sstevel@tonic-gate  *                    ACPI components to the host operating system.
67c478bd9Sstevel@tonic-gate  *
77c478bd9Sstevel@tonic-gate  *****************************************************************************/
87c478bd9Sstevel@tonic-gate 
926f3cdf0SGordon Ross /*
10*cb565728SJerry Jelinek  * Copyright (C) 2000 - 2016, Intel Corp.
117c478bd9Sstevel@tonic-gate  * All rights reserved.
127c478bd9Sstevel@tonic-gate  *
1326f3cdf0SGordon Ross  * Redistribution and use in source and binary forms, with or without
1426f3cdf0SGordon Ross  * modification, are permitted provided that the following conditions
1526f3cdf0SGordon Ross  * are met:
1626f3cdf0SGordon Ross  * 1. Redistributions of source code must retain the above copyright
1726f3cdf0SGordon Ross  *    notice, this list of conditions, and the following disclaimer,
1826f3cdf0SGordon Ross  *    without modification.
1926f3cdf0SGordon Ross  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
2026f3cdf0SGordon Ross  *    substantially similar to the "NO WARRANTY" disclaimer below
2126f3cdf0SGordon Ross  *    ("Disclaimer") and any redistribution must be conditioned upon
2226f3cdf0SGordon Ross  *    including a substantially similar Disclaimer requirement for further
2326f3cdf0SGordon Ross  *    binary redistribution.
2426f3cdf0SGordon Ross  * 3. Neither the names of the above-listed copyright holders nor the names
2526f3cdf0SGordon Ross  *    of any contributors may be used to endorse or promote products derived
2626f3cdf0SGordon Ross  *    from this software without specific prior written permission.
277c478bd9Sstevel@tonic-gate  *
2826f3cdf0SGordon Ross  * Alternatively, this software may be distributed under the terms of the
2926f3cdf0SGordon Ross  * GNU General Public License ("GPL") version 2 as published by the Free
3026f3cdf0SGordon Ross  * Software Foundation.
317c478bd9Sstevel@tonic-gate  *
3226f3cdf0SGordon Ross  * NO WARRANTY
3326f3cdf0SGordon Ross  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3426f3cdf0SGordon Ross  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3526f3cdf0SGordon Ross  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
3626f3cdf0SGordon Ross  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3726f3cdf0SGordon Ross  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3826f3cdf0SGordon Ross  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3926f3cdf0SGordon Ross  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4026f3cdf0SGordon Ross  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4126f3cdf0SGordon Ross  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
4226f3cdf0SGordon Ross  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4326f3cdf0SGordon Ross  * POSSIBILITY OF SUCH DAMAGES.
4426f3cdf0SGordon Ross  */
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate #ifndef __ACPIOSXF_H__
477c478bd9Sstevel@tonic-gate #define __ACPIOSXF_H__
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate #include "platform/acenv.h"
507c478bd9Sstevel@tonic-gate #include "actypes.h"
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate 
5327f7c583Smyers /* Types for AcpiOsExecute */
547c478bd9Sstevel@tonic-gate 
5527f7c583Smyers typedef enum
5627f7c583Smyers {
5727f7c583Smyers     OSL_GLOBAL_LOCK_HANDLER,
5827f7c583Smyers     OSL_NOTIFY_HANDLER,
5927f7c583Smyers     OSL_GPE_HANDLER,
60*cb565728SJerry Jelinek     OSL_DEBUGGER_MAIN_THREAD,
61*cb565728SJerry Jelinek     OSL_DEBUGGER_EXEC_THREAD,
6227f7c583Smyers     OSL_EC_POLL_HANDLER,
6327f7c583Smyers     OSL_EC_BURST_HANDLER
6427f7c583Smyers 
6527f7c583Smyers } ACPI_EXECUTE_TYPE;
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate #define ACPI_NO_UNIT_LIMIT          ((UINT32) -1)
687c478bd9Sstevel@tonic-gate #define ACPI_MUTEX_SEM              1
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate /* Functions for AcpiOsSignal */
727c478bd9Sstevel@tonic-gate 
737c478bd9Sstevel@tonic-gate #define ACPI_SIGNAL_FATAL           0
747c478bd9Sstevel@tonic-gate #define ACPI_SIGNAL_BREAKPOINT      1
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate typedef struct acpi_signal_fatal_info
777c478bd9Sstevel@tonic-gate {
787c478bd9Sstevel@tonic-gate     UINT32                  Type;
797c478bd9Sstevel@tonic-gate     UINT32                  Code;
807c478bd9Sstevel@tonic-gate     UINT32                  Argument;
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate } ACPI_SIGNAL_FATAL_INFO;
837c478bd9Sstevel@tonic-gate 
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate /*
867c478bd9Sstevel@tonic-gate  * OSL Initialization and shutdown primitives
877c478bd9Sstevel@tonic-gate  */
88*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitialize
897c478bd9Sstevel@tonic-gate ACPI_STATUS
907c478bd9Sstevel@tonic-gate AcpiOsInitialize (
917c478bd9Sstevel@tonic-gate     void);
92*cb565728SJerry Jelinek #endif
937c478bd9Sstevel@tonic-gate 
94*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminate
957c478bd9Sstevel@tonic-gate ACPI_STATUS
967c478bd9Sstevel@tonic-gate AcpiOsTerminate (
977c478bd9Sstevel@tonic-gate     void);
98*cb565728SJerry Jelinek #endif
997c478bd9Sstevel@tonic-gate 
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate /*
1027c478bd9Sstevel@tonic-gate  * ACPI Table interfaces
1037c478bd9Sstevel@tonic-gate  */
104*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetRootPointer
105db2bae30SDana Myers ACPI_PHYSICAL_ADDRESS
1067c478bd9Sstevel@tonic-gate AcpiOsGetRootPointer (
107db2bae30SDana Myers     void);
108*cb565728SJerry Jelinek #endif
1097c478bd9Sstevel@tonic-gate 
110*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPredefinedOverride
1117c478bd9Sstevel@tonic-gate ACPI_STATUS
1127c478bd9Sstevel@tonic-gate AcpiOsPredefinedOverride (
1137c478bd9Sstevel@tonic-gate     const ACPI_PREDEFINED_NAMES *InitVal,
1147c478bd9Sstevel@tonic-gate     ACPI_STRING                 *NewVal);
115*cb565728SJerry Jelinek #endif
1167c478bd9Sstevel@tonic-gate 
117*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTableOverride
1187c478bd9Sstevel@tonic-gate ACPI_STATUS
1197c478bd9Sstevel@tonic-gate AcpiOsTableOverride (
1207c478bd9Sstevel@tonic-gate     ACPI_TABLE_HEADER       *ExistingTable,
1217c478bd9Sstevel@tonic-gate     ACPI_TABLE_HEADER       **NewTable);
122*cb565728SJerry Jelinek #endif
123*cb565728SJerry Jelinek 
124*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPhysicalTableOverride
125*cb565728SJerry Jelinek ACPI_STATUS
126*cb565728SJerry Jelinek AcpiOsPhysicalTableOverride (
127*cb565728SJerry Jelinek     ACPI_TABLE_HEADER       *ExistingTable,
128*cb565728SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   *NewAddress,
129*cb565728SJerry Jelinek     UINT32                  *NewTableLength);
130*cb565728SJerry Jelinek #endif
1317c478bd9Sstevel@tonic-gate 
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate /*
13427f7c583Smyers  * Spinlock primitives
13527f7c583Smyers  */
136*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateLock
13727f7c583Smyers ACPI_STATUS
13827f7c583Smyers AcpiOsCreateLock (
13927f7c583Smyers     ACPI_SPINLOCK           *OutHandle);
140*cb565728SJerry Jelinek #endif
14127f7c583Smyers 
142*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteLock
14327f7c583Smyers void
14427f7c583Smyers AcpiOsDeleteLock (
14527f7c583Smyers     ACPI_SPINLOCK           Handle);
146*cb565728SJerry Jelinek #endif
14727f7c583Smyers 
148*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireLock
14927f7c583Smyers ACPI_CPU_FLAGS
15027f7c583Smyers AcpiOsAcquireLock (
15127f7c583Smyers     ACPI_SPINLOCK           Handle);
152*cb565728SJerry Jelinek #endif
15327f7c583Smyers 
154*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseLock
15527f7c583Smyers void
15627f7c583Smyers AcpiOsReleaseLock (
15727f7c583Smyers     ACPI_SPINLOCK           Handle,
15827f7c583Smyers     ACPI_CPU_FLAGS          Flags);
159*cb565728SJerry Jelinek #endif
16027f7c583Smyers 
16127f7c583Smyers 
16227f7c583Smyers /*
16327f7c583Smyers  * Semaphore primitives
1647c478bd9Sstevel@tonic-gate  */
165*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateSemaphore
1667c478bd9Sstevel@tonic-gate ACPI_STATUS
1677c478bd9Sstevel@tonic-gate AcpiOsCreateSemaphore (
1687c478bd9Sstevel@tonic-gate     UINT32                  MaxUnits,
1697c478bd9Sstevel@tonic-gate     UINT32                  InitialUnits,
17027f7c583Smyers     ACPI_SEMAPHORE          *OutHandle);
171*cb565728SJerry Jelinek #endif
1727c478bd9Sstevel@tonic-gate 
173*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteSemaphore
1747c478bd9Sstevel@tonic-gate ACPI_STATUS
1757c478bd9Sstevel@tonic-gate AcpiOsDeleteSemaphore (
17627f7c583Smyers     ACPI_SEMAPHORE          Handle);
177*cb565728SJerry Jelinek #endif
1787c478bd9Sstevel@tonic-gate 
179*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitSemaphore
1807c478bd9Sstevel@tonic-gate ACPI_STATUS
1817c478bd9Sstevel@tonic-gate AcpiOsWaitSemaphore (
18227f7c583Smyers     ACPI_SEMAPHORE          Handle,
1837c478bd9Sstevel@tonic-gate     UINT32                  Units,
1847c478bd9Sstevel@tonic-gate     UINT16                  Timeout);
185*cb565728SJerry Jelinek #endif
1867c478bd9Sstevel@tonic-gate 
187*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignalSemaphore
1887c478bd9Sstevel@tonic-gate ACPI_STATUS
1897c478bd9Sstevel@tonic-gate AcpiOsSignalSemaphore (
19027f7c583Smyers     ACPI_SEMAPHORE          Handle,
1917c478bd9Sstevel@tonic-gate     UINT32                  Units);
192*cb565728SJerry Jelinek #endif
1937c478bd9Sstevel@tonic-gate 
19427f7c583Smyers 
19527f7c583Smyers /*
196aa2aa9a6SDana Myers  * Mutex primitives. May be configured to use semaphores instead via
197aa2aa9a6SDana Myers  * ACPI_MUTEX_TYPE (see platform/acenv.h)
19827f7c583Smyers  */
199aa2aa9a6SDana Myers #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
200aa2aa9a6SDana Myers 
201*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateMutex
2027c478bd9Sstevel@tonic-gate ACPI_STATUS
20327f7c583Smyers AcpiOsCreateMutex (
20427f7c583Smyers     ACPI_MUTEX              *OutHandle);
205*cb565728SJerry Jelinek #endif
2067c478bd9Sstevel@tonic-gate 
207*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteMutex
2087c478bd9Sstevel@tonic-gate void
20927f7c583Smyers AcpiOsDeleteMutex (
21027f7c583Smyers     ACPI_MUTEX              Handle);
211*cb565728SJerry Jelinek #endif
2127c478bd9Sstevel@tonic-gate 
213*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireMutex
21427f7c583Smyers ACPI_STATUS
21527f7c583Smyers AcpiOsAcquireMutex (
21627f7c583Smyers     ACPI_MUTEX              Handle,
21727f7c583Smyers     UINT16                  Timeout);
218*cb565728SJerry Jelinek #endif
2197c478bd9Sstevel@tonic-gate 
220*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseMutex
2217c478bd9Sstevel@tonic-gate void
22227f7c583Smyers AcpiOsReleaseMutex (
22327f7c583Smyers     ACPI_MUTEX              Handle);
224aa2aa9a6SDana Myers #endif
2257c478bd9Sstevel@tonic-gate 
226*cb565728SJerry Jelinek #endif
227*cb565728SJerry Jelinek 
2287c478bd9Sstevel@tonic-gate 
2297c478bd9Sstevel@tonic-gate /*
2307c478bd9Sstevel@tonic-gate  * Memory allocation and mapping
2317c478bd9Sstevel@tonic-gate  */
232*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocate
2337c478bd9Sstevel@tonic-gate void *
2347c478bd9Sstevel@tonic-gate AcpiOsAllocate (
2357c478bd9Sstevel@tonic-gate     ACPI_SIZE               Size);
236*cb565728SJerry Jelinek #endif
2377c478bd9Sstevel@tonic-gate 
238*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocateZeroed
239*cb565728SJerry Jelinek void *
240*cb565728SJerry Jelinek AcpiOsAllocateZeroed (
241*cb565728SJerry Jelinek     ACPI_SIZE               Size);
242*cb565728SJerry Jelinek #endif
243*cb565728SJerry Jelinek 
244*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsFree
2457c478bd9Sstevel@tonic-gate void
2467c478bd9Sstevel@tonic-gate AcpiOsFree (
2477c478bd9Sstevel@tonic-gate     void *                  Memory);
248*cb565728SJerry Jelinek #endif
2497c478bd9Sstevel@tonic-gate 
250*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsMapMemory
251db2bae30SDana Myers void *
2527c478bd9Sstevel@tonic-gate AcpiOsMapMemory (
253db2bae30SDana Myers     ACPI_PHYSICAL_ADDRESS   Where,
254db2bae30SDana Myers     ACPI_SIZE               Length);
255*cb565728SJerry Jelinek #endif
2567c478bd9Sstevel@tonic-gate 
257*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsUnmapMemory
2587c478bd9Sstevel@tonic-gate void
2597c478bd9Sstevel@tonic-gate AcpiOsUnmapMemory (
2607c478bd9Sstevel@tonic-gate     void                    *LogicalAddress,
2617c478bd9Sstevel@tonic-gate     ACPI_SIZE               Size);
262*cb565728SJerry Jelinek #endif
2637c478bd9Sstevel@tonic-gate 
264*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetPhysicalAddress
2657c478bd9Sstevel@tonic-gate ACPI_STATUS
2667c478bd9Sstevel@tonic-gate AcpiOsGetPhysicalAddress (
2677c478bd9Sstevel@tonic-gate     void                    *LogicalAddress,
2687c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS   *PhysicalAddress);
269*cb565728SJerry Jelinek #endif
2707c478bd9Sstevel@tonic-gate 
2717c478bd9Sstevel@tonic-gate 
2727c478bd9Sstevel@tonic-gate /*
273450d6964Smyers  * Memory/Object Cache
274450d6964Smyers  */
275*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateCache
276450d6964Smyers ACPI_STATUS
277450d6964Smyers AcpiOsCreateCache (
278450d6964Smyers     char                    *CacheName,
279450d6964Smyers     UINT16                  ObjectSize,
280450d6964Smyers     UINT16                  MaxDepth,
281450d6964Smyers     ACPI_CACHE_T            **ReturnCache);
282*cb565728SJerry Jelinek #endif
283450d6964Smyers 
284*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteCache
285450d6964Smyers ACPI_STATUS
286450d6964Smyers AcpiOsDeleteCache (
287450d6964Smyers     ACPI_CACHE_T            *Cache);
288*cb565728SJerry Jelinek #endif
289450d6964Smyers 
290*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPurgeCache
291450d6964Smyers ACPI_STATUS
292450d6964Smyers AcpiOsPurgeCache (
293450d6964Smyers     ACPI_CACHE_T            *Cache);
294*cb565728SJerry Jelinek #endif
295450d6964Smyers 
296*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireObject
297450d6964Smyers void *
298450d6964Smyers AcpiOsAcquireObject (
299450d6964Smyers     ACPI_CACHE_T            *Cache);
300*cb565728SJerry Jelinek #endif
301450d6964Smyers 
302*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseObject
303450d6964Smyers ACPI_STATUS
304450d6964Smyers AcpiOsReleaseObject (
305450d6964Smyers     ACPI_CACHE_T            *Cache,
306450d6964Smyers     void                    *Object);
307*cb565728SJerry Jelinek #endif
308450d6964Smyers 
309450d6964Smyers 
310450d6964Smyers /*
3117c478bd9Sstevel@tonic-gate  * Interrupt handlers
3127c478bd9Sstevel@tonic-gate  */
313*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInstallInterruptHandler
3147c478bd9Sstevel@tonic-gate ACPI_STATUS
3157c478bd9Sstevel@tonic-gate AcpiOsInstallInterruptHandler (
3167c478bd9Sstevel@tonic-gate     UINT32                  InterruptNumber,
3177c478bd9Sstevel@tonic-gate     ACPI_OSD_HANDLER        ServiceRoutine,
3187c478bd9Sstevel@tonic-gate     void                    *Context);
319*cb565728SJerry Jelinek #endif
3207c478bd9Sstevel@tonic-gate 
321*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRemoveInterruptHandler
3227c478bd9Sstevel@tonic-gate ACPI_STATUS
3237c478bd9Sstevel@tonic-gate AcpiOsRemoveInterruptHandler (
3247c478bd9Sstevel@tonic-gate     UINT32                  InterruptNumber,
3257c478bd9Sstevel@tonic-gate     ACPI_OSD_HANDLER        ServiceRoutine);
326*cb565728SJerry Jelinek #endif
3277c478bd9Sstevel@tonic-gate 
3287c478bd9Sstevel@tonic-gate 
3297c478bd9Sstevel@tonic-gate /*
3307c478bd9Sstevel@tonic-gate  * Threads and Scheduling
3317c478bd9Sstevel@tonic-gate  */
332*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetThreadId
33327f7c583Smyers ACPI_THREAD_ID
3347c478bd9Sstevel@tonic-gate AcpiOsGetThreadId (
3357c478bd9Sstevel@tonic-gate     void);
336*cb565728SJerry Jelinek #endif
3377c478bd9Sstevel@tonic-gate 
338*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsExecute
3397c478bd9Sstevel@tonic-gate ACPI_STATUS
34027f7c583Smyers AcpiOsExecute (
34127f7c583Smyers     ACPI_EXECUTE_TYPE       Type,
3427c478bd9Sstevel@tonic-gate     ACPI_OSD_EXEC_CALLBACK  Function,
3437c478bd9Sstevel@tonic-gate     void                    *Context);
344*cb565728SJerry Jelinek #endif
3457c478bd9Sstevel@tonic-gate 
346*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitEventsComplete
3477c478bd9Sstevel@tonic-gate void
3487c478bd9Sstevel@tonic-gate AcpiOsWaitEventsComplete (
349*cb565728SJerry Jelinek     void);
350*cb565728SJerry Jelinek #endif
3517c478bd9Sstevel@tonic-gate 
352*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSleep
3537c478bd9Sstevel@tonic-gate void
3547c478bd9Sstevel@tonic-gate AcpiOsSleep (
35526f3cdf0SGordon Ross     UINT64                  Milliseconds);
356*cb565728SJerry Jelinek #endif
3577c478bd9Sstevel@tonic-gate 
358*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsStall
3597c478bd9Sstevel@tonic-gate void
3607c478bd9Sstevel@tonic-gate AcpiOsStall (
3617c478bd9Sstevel@tonic-gate     UINT32                  Microseconds);
362*cb565728SJerry Jelinek #endif
3637c478bd9Sstevel@tonic-gate 
3647c478bd9Sstevel@tonic-gate 
3657c478bd9Sstevel@tonic-gate /*
3667c478bd9Sstevel@tonic-gate  * Platform and hardware-independent I/O interfaces
3677c478bd9Sstevel@tonic-gate  */
368*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPort
3697c478bd9Sstevel@tonic-gate ACPI_STATUS
3707c478bd9Sstevel@tonic-gate AcpiOsReadPort (
3717c478bd9Sstevel@tonic-gate     ACPI_IO_ADDRESS         Address,
3727c478bd9Sstevel@tonic-gate     UINT32                  *Value,
3737c478bd9Sstevel@tonic-gate     UINT32                  Width);
374*cb565728SJerry Jelinek #endif
3757c478bd9Sstevel@tonic-gate 
376*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePort
3777c478bd9Sstevel@tonic-gate ACPI_STATUS
3787c478bd9Sstevel@tonic-gate AcpiOsWritePort (
3797c478bd9Sstevel@tonic-gate     ACPI_IO_ADDRESS         Address,
3807c478bd9Sstevel@tonic-gate     UINT32                  Value,
3817c478bd9Sstevel@tonic-gate     UINT32                  Width);
382*cb565728SJerry Jelinek #endif
3837c478bd9Sstevel@tonic-gate 
3847c478bd9Sstevel@tonic-gate 
3857c478bd9Sstevel@tonic-gate /*
3867c478bd9Sstevel@tonic-gate  * Platform and hardware-independent physical memory interfaces
3877c478bd9Sstevel@tonic-gate  */
388*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadMemory
3897c478bd9Sstevel@tonic-gate ACPI_STATUS
3907c478bd9Sstevel@tonic-gate AcpiOsReadMemory (
3917c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS   Address,
392*cb565728SJerry Jelinek     UINT64                  *Value,
3937c478bd9Sstevel@tonic-gate     UINT32                  Width);
394*cb565728SJerry Jelinek #endif
3957c478bd9Sstevel@tonic-gate 
396*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteMemory
3977c478bd9Sstevel@tonic-gate ACPI_STATUS
3987c478bd9Sstevel@tonic-gate AcpiOsWriteMemory (
3997c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS   Address,
400*cb565728SJerry Jelinek     UINT64                  Value,
4017c478bd9Sstevel@tonic-gate     UINT32                  Width);
402*cb565728SJerry Jelinek #endif
4037c478bd9Sstevel@tonic-gate 
4047c478bd9Sstevel@tonic-gate 
4057c478bd9Sstevel@tonic-gate /*
4067c478bd9Sstevel@tonic-gate  * Platform and hardware-independent PCI configuration space access
4077c478bd9Sstevel@tonic-gate  * Note: Can't use "Register" as a parameter, changed to "Reg" --
4087c478bd9Sstevel@tonic-gate  * certain compilers complain.
4097c478bd9Sstevel@tonic-gate  */
410*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPciConfiguration
4117c478bd9Sstevel@tonic-gate ACPI_STATUS
4127c478bd9Sstevel@tonic-gate AcpiOsReadPciConfiguration (
4137c478bd9Sstevel@tonic-gate     ACPI_PCI_ID             *PciId,
4147c478bd9Sstevel@tonic-gate     UINT32                  Reg,
41526f3cdf0SGordon Ross     UINT64                  *Value,
4167c478bd9Sstevel@tonic-gate     UINT32                  Width);
417*cb565728SJerry Jelinek #endif
4187c478bd9Sstevel@tonic-gate 
419*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePciConfiguration
4207c478bd9Sstevel@tonic-gate ACPI_STATUS
4217c478bd9Sstevel@tonic-gate AcpiOsWritePciConfiguration (
4227c478bd9Sstevel@tonic-gate     ACPI_PCI_ID             *PciId,
4237c478bd9Sstevel@tonic-gate     UINT32                  Reg,
42426f3cdf0SGordon Ross     UINT64                  Value,
4257c478bd9Sstevel@tonic-gate     UINT32                  Width);
426*cb565728SJerry Jelinek #endif
4277c478bd9Sstevel@tonic-gate 
42827f7c583Smyers 
4297c478bd9Sstevel@tonic-gate /*
4307c478bd9Sstevel@tonic-gate  * Miscellaneous
4317c478bd9Sstevel@tonic-gate  */
432*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadable
4337c478bd9Sstevel@tonic-gate BOOLEAN
4347c478bd9Sstevel@tonic-gate AcpiOsReadable (
4357c478bd9Sstevel@tonic-gate     void                    *Pointer,
4367c478bd9Sstevel@tonic-gate     ACPI_SIZE               Length);
437*cb565728SJerry Jelinek #endif
4387c478bd9Sstevel@tonic-gate 
439*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritable
4407c478bd9Sstevel@tonic-gate BOOLEAN
4417c478bd9Sstevel@tonic-gate AcpiOsWritable (
4427c478bd9Sstevel@tonic-gate     void                    *Pointer,
4437c478bd9Sstevel@tonic-gate     ACPI_SIZE               Length);
444*cb565728SJerry Jelinek #endif
4457c478bd9Sstevel@tonic-gate 
446*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTimer
4477c478bd9Sstevel@tonic-gate UINT64
4487c478bd9Sstevel@tonic-gate AcpiOsGetTimer (
4497c478bd9Sstevel@tonic-gate     void);
450*cb565728SJerry Jelinek #endif
4517c478bd9Sstevel@tonic-gate 
452*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignal
4537c478bd9Sstevel@tonic-gate ACPI_STATUS
4547c478bd9Sstevel@tonic-gate AcpiOsSignal (
4557c478bd9Sstevel@tonic-gate     UINT32                  Function,
4567c478bd9Sstevel@tonic-gate     void                    *Info);
457*cb565728SJerry Jelinek #endif
4587c478bd9Sstevel@tonic-gate 
45927f7c583Smyers 
4607c478bd9Sstevel@tonic-gate /*
4617c478bd9Sstevel@tonic-gate  * Debug print routines
4627c478bd9Sstevel@tonic-gate  */
463*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPrintf
4647c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE
4657c478bd9Sstevel@tonic-gate AcpiOsPrintf (
4667c478bd9Sstevel@tonic-gate     const char              *Format,
4677c478bd9Sstevel@tonic-gate     ...);
468*cb565728SJerry Jelinek #endif
4697c478bd9Sstevel@tonic-gate 
470*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsVprintf
4717c478bd9Sstevel@tonic-gate void
4727c478bd9Sstevel@tonic-gate AcpiOsVprintf (
4737c478bd9Sstevel@tonic-gate     const char              *Format,
4747c478bd9Sstevel@tonic-gate     va_list                 Args);
475*cb565728SJerry Jelinek #endif
4767c478bd9Sstevel@tonic-gate 
477*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRedirectOutput
4787c478bd9Sstevel@tonic-gate void
4797c478bd9Sstevel@tonic-gate AcpiOsRedirectOutput (
4807c478bd9Sstevel@tonic-gate     void                    *Destination);
481*cb565728SJerry Jelinek #endif
4827c478bd9Sstevel@tonic-gate 
4837c478bd9Sstevel@tonic-gate 
4847c478bd9Sstevel@tonic-gate /*
4857c478bd9Sstevel@tonic-gate  * Debug input
4867c478bd9Sstevel@tonic-gate  */
487*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetLine
48826f3cdf0SGordon Ross ACPI_STATUS
4897c478bd9Sstevel@tonic-gate AcpiOsGetLine (
49026f3cdf0SGordon Ross     char                    *Buffer,
49126f3cdf0SGordon Ross     UINT32                  BufferLength,
49226f3cdf0SGordon Ross     UINT32                  *BytesRead);
493*cb565728SJerry Jelinek #endif
494*cb565728SJerry Jelinek 
495*cb565728SJerry Jelinek 
496*cb565728SJerry Jelinek /*
497*cb565728SJerry Jelinek  * Obtain ACPI table(s)
498*cb565728SJerry Jelinek  */
499*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByName
500*cb565728SJerry Jelinek ACPI_STATUS
501*cb565728SJerry Jelinek AcpiOsGetTableByName (
502*cb565728SJerry Jelinek     char                    *Signature,
503*cb565728SJerry Jelinek     UINT32                  Instance,
504*cb565728SJerry Jelinek     ACPI_TABLE_HEADER       **Table,
505*cb565728SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   *Address);
506*cb565728SJerry Jelinek #endif
507*cb565728SJerry Jelinek 
508*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByIndex
509*cb565728SJerry Jelinek ACPI_STATUS
510*cb565728SJerry Jelinek AcpiOsGetTableByIndex (
511*cb565728SJerry Jelinek     UINT32                  Index,
512*cb565728SJerry Jelinek     ACPI_TABLE_HEADER       **Table,
513*cb565728SJerry Jelinek     UINT32                  *Instance,
514*cb565728SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   *Address);
515*cb565728SJerry Jelinek #endif
516*cb565728SJerry Jelinek 
517*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByAddress
518*cb565728SJerry Jelinek ACPI_STATUS
519*cb565728SJerry Jelinek AcpiOsGetTableByAddress (
520*cb565728SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   Address,
521*cb565728SJerry Jelinek     ACPI_TABLE_HEADER       **Table);
522*cb565728SJerry Jelinek #endif
5237c478bd9Sstevel@tonic-gate 
5247c478bd9Sstevel@tonic-gate 
5257c478bd9Sstevel@tonic-gate /*
5267c478bd9Sstevel@tonic-gate  * Directory manipulation
5277c478bd9Sstevel@tonic-gate  */
528*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenDirectory
5297c478bd9Sstevel@tonic-gate void *
5307c478bd9Sstevel@tonic-gate AcpiOsOpenDirectory (
5317c478bd9Sstevel@tonic-gate     char                    *Pathname,
5327c478bd9Sstevel@tonic-gate     char                    *WildcardSpec,
5337c478bd9Sstevel@tonic-gate     char                    RequestedFileType);
534*cb565728SJerry Jelinek #endif
5357c478bd9Sstevel@tonic-gate 
5367c478bd9Sstevel@tonic-gate /* RequesteFileType values */
5377c478bd9Sstevel@tonic-gate 
5387c478bd9Sstevel@tonic-gate #define REQUEST_FILE_ONLY                   0
5397c478bd9Sstevel@tonic-gate #define REQUEST_DIR_ONLY                    1
5407c478bd9Sstevel@tonic-gate 
5417c478bd9Sstevel@tonic-gate 
542*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetNextFilename
5437c478bd9Sstevel@tonic-gate char *
5447c478bd9Sstevel@tonic-gate AcpiOsGetNextFilename (
5457c478bd9Sstevel@tonic-gate     void                    *DirHandle);
546*cb565728SJerry Jelinek #endif
5477c478bd9Sstevel@tonic-gate 
548*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseDirectory
5497c478bd9Sstevel@tonic-gate void
5507c478bd9Sstevel@tonic-gate AcpiOsCloseDirectory (
5517c478bd9Sstevel@tonic-gate     void                    *DirHandle);
552*cb565728SJerry Jelinek #endif
553*cb565728SJerry Jelinek 
554*cb565728SJerry Jelinek 
555*cb565728SJerry Jelinek /*
556*cb565728SJerry Jelinek  * File I/O and related support
557*cb565728SJerry Jelinek  */
558*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenFile
559*cb565728SJerry Jelinek ACPI_FILE
560*cb565728SJerry Jelinek AcpiOsOpenFile (
561*cb565728SJerry Jelinek     const char              *Path,
562*cb565728SJerry Jelinek     UINT8                   Modes);
563*cb565728SJerry Jelinek #endif
564*cb565728SJerry Jelinek 
565*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseFile
566*cb565728SJerry Jelinek void
567*cb565728SJerry Jelinek AcpiOsCloseFile (
568*cb565728SJerry Jelinek     ACPI_FILE               File);
569*cb565728SJerry Jelinek #endif
570*cb565728SJerry Jelinek 
571*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadFile
572*cb565728SJerry Jelinek int
573*cb565728SJerry Jelinek AcpiOsReadFile (
574*cb565728SJerry Jelinek     ACPI_FILE               File,
575*cb565728SJerry Jelinek     void                    *Buffer,
576*cb565728SJerry Jelinek     ACPI_SIZE               Size,
577*cb565728SJerry Jelinek     ACPI_SIZE               Count);
578*cb565728SJerry Jelinek #endif
579*cb565728SJerry Jelinek 
580*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteFile
581*cb565728SJerry Jelinek int
582*cb565728SJerry Jelinek AcpiOsWriteFile (
583*cb565728SJerry Jelinek     ACPI_FILE               File,
584*cb565728SJerry Jelinek     void                    *Buffer,
585*cb565728SJerry Jelinek     ACPI_SIZE               Size,
586*cb565728SJerry Jelinek     ACPI_SIZE               Count);
587*cb565728SJerry Jelinek #endif
588*cb565728SJerry Jelinek 
589*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetFileOffset
590*cb565728SJerry Jelinek long
591*cb565728SJerry Jelinek AcpiOsGetFileOffset (
592*cb565728SJerry Jelinek     ACPI_FILE               File);
593*cb565728SJerry Jelinek #endif
594*cb565728SJerry Jelinek 
595*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSetFileOffset
596*cb565728SJerry Jelinek ACPI_STATUS
597*cb565728SJerry Jelinek AcpiOsSetFileOffset (
598*cb565728SJerry Jelinek     ACPI_FILE               File,
599*cb565728SJerry Jelinek     long                    Offset,
600*cb565728SJerry Jelinek     UINT8                   From);
601*cb565728SJerry Jelinek #endif
602*cb565728SJerry Jelinek 
603*cb565728SJerry Jelinek #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
604*cb565728SJerry Jelinek void
605*cb565728SJerry Jelinek AcpiOsTracePoint (
606*cb565728SJerry Jelinek     ACPI_TRACE_EVENT_TYPE   Type,
607*cb565728SJerry Jelinek     BOOLEAN                 Begin,
608*cb565728SJerry Jelinek     UINT8                   *Aml,
609*cb565728SJerry Jelinek     char                    *Pathname);
610*cb565728SJerry Jelinek #endif
6117c478bd9Sstevel@tonic-gate 
6127c478bd9Sstevel@tonic-gate 
6137c478bd9Sstevel@tonic-gate #endif /* __ACPIOSXF_H__ */
614