xref: /illumos-gate/usr/src/uts/intel/sys/acpi/acpiosxf.h (revision aa2aa9a6)
17c478bd9Sstevel@tonic-gate 
27c478bd9Sstevel@tonic-gate /******************************************************************************
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL).  These
57c478bd9Sstevel@tonic-gate  *                    interfaces must be implemented by OSL to interface the
67c478bd9Sstevel@tonic-gate  *                    ACPI components to the host operating system.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  *****************************************************************************/
97c478bd9Sstevel@tonic-gate 
107c478bd9Sstevel@tonic-gate 
117c478bd9Sstevel@tonic-gate /******************************************************************************
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * 1. Copyright Notice
147c478bd9Sstevel@tonic-gate  *
15*aa2aa9a6SDana Myers  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
167c478bd9Sstevel@tonic-gate  * All rights reserved.
177c478bd9Sstevel@tonic-gate  *
187c478bd9Sstevel@tonic-gate  * 2. License
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * 2.1. This is your license from Intel Corp. under its intellectual property
217c478bd9Sstevel@tonic-gate  * rights.  You may have additional license terms from the party that provided
227c478bd9Sstevel@tonic-gate  * you this software, covering your right to use that party's intellectual
237c478bd9Sstevel@tonic-gate  * property rights.
247c478bd9Sstevel@tonic-gate  *
257c478bd9Sstevel@tonic-gate  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
267c478bd9Sstevel@tonic-gate  * copy of the source code appearing in this file ("Covered Code") an
277c478bd9Sstevel@tonic-gate  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
287c478bd9Sstevel@tonic-gate  * base code distributed originally by Intel ("Original Intel Code") to copy,
297c478bd9Sstevel@tonic-gate  * make derivatives, distribute, use and display any portion of the Covered
307c478bd9Sstevel@tonic-gate  * Code in any form, with the right to sublicense such rights; and
317c478bd9Sstevel@tonic-gate  *
327c478bd9Sstevel@tonic-gate  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
337c478bd9Sstevel@tonic-gate  * license (with the right to sublicense), under only those claims of Intel
347c478bd9Sstevel@tonic-gate  * patents that are infringed by the Original Intel Code, to make, use, sell,
357c478bd9Sstevel@tonic-gate  * offer to sell, and import the Covered Code and derivative works thereof
367c478bd9Sstevel@tonic-gate  * solely to the minimum extent necessary to exer
377c478bd9Sstevel@tonic-gate  se the above copyright
387c478bd9Sstevel@tonic-gate  * license, and in no event shall the patent license extend to any additions
397c478bd9Sstevel@tonic-gate  * to or modifications of the Original Intel Code.  No other license or right
407c478bd9Sstevel@tonic-gate  * is granted directly or by implication, estoppel or otherwise;
417c478bd9Sstevel@tonic-gate  *
427c478bd9Sstevel@tonic-gate  * The above copyright and patent license is granted only if the following
437c478bd9Sstevel@tonic-gate  * conditions are met:
447c478bd9Sstevel@tonic-gate  *
457c478bd9Sstevel@tonic-gate  * 3. Conditions
467c478bd9Sstevel@tonic-gate  *
477c478bd9Sstevel@tonic-gate  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
487c478bd9Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
497c478bd9Sstevel@tonic-gate  * Code or modification with rights to further distribute source must include
507c478bd9Sstevel@tonic-gate  * the above Copyright Notice, the above License, this list of Conditions,
517c478bd9Sstevel@tonic-gate  * and the following Disclaimer and Export Compliance provision.  In addition,
527c478bd9Sstevel@tonic-gate  * Licensee must cause all Covered Code to which Licensee contributes to
537c478bd9Sstevel@tonic-gate  * contain a file documenting the changes Licensee made to create that Covered
547c478bd9Sstevel@tonic-gate  * Code and the date of any change.  Licensee must include in that file the
557c478bd9Sstevel@tonic-gate  * documentation of any changes made by any predecessor Licensee.  Licensee
567c478bd9Sstevel@tonic-gate  * must include a prominent statement that the modification is derived,
577c478bd9Sstevel@tonic-gate  * directly or indirectly, from Original Intel Code.
587c478bd9Sstevel@tonic-gate  *
597c478bd9Sstevel@tonic-gate  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
607c478bd9Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
617c478bd9Sstevel@tonic-gate  * Code or modification without rights to further distribute source must
627c478bd9Sstevel@tonic-gate  * include the following Disclaimer and Export Compliance provision in the
637c478bd9Sstevel@tonic-gate  * documentation and/or other materials provided with distribution.  In
647c478bd9Sstevel@tonic-gate  * addition, Licensee may not authorize further sublicense of source of any
657c478bd9Sstevel@tonic-gate  * portion of the Covered Code, and must include terms to the effect that the
667c478bd9Sstevel@tonic-gate  * license from Licensee to its licensee is limited to the intellectual
677c478bd9Sstevel@tonic-gate  * property embodied in the software Licensee provides to its licensee, and
687c478bd9Sstevel@tonic-gate  * not to intellectual property embodied in modifications its licensee may
697c478bd9Sstevel@tonic-gate  * make.
707c478bd9Sstevel@tonic-gate  *
717c478bd9Sstevel@tonic-gate  * 3.3. Redistribution of Executable. Redistribution in executable form of any
727c478bd9Sstevel@tonic-gate  * substantial portion of the Covered Code or modification must reproduce the
737c478bd9Sstevel@tonic-gate  * above Copyright Notice, and the following Disclaimer and Export Compliance
747c478bd9Sstevel@tonic-gate  * provision in the documentation and/or other materials provided with the
757c478bd9Sstevel@tonic-gate  * distribution.
767c478bd9Sstevel@tonic-gate  *
777c478bd9Sstevel@tonic-gate  * 3.4. Intel retains all right, title, and interest in and to the Original
787c478bd9Sstevel@tonic-gate  * Intel Code.
797c478bd9Sstevel@tonic-gate  *
807c478bd9Sstevel@tonic-gate  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
817c478bd9Sstevel@tonic-gate  * Intel shall be used in advertising or otherwise to promote the sale, use or
827c478bd9Sstevel@tonic-gate  * other dealings in products derived from or relating to the Covered Code
837c478bd9Sstevel@tonic-gate  * without prior written authorization from Intel.
847c478bd9Sstevel@tonic-gate  *
857c478bd9Sstevel@tonic-gate  * 4. Disclaimer and Export Compliance
867c478bd9Sstevel@tonic-gate  *
877c478bd9Sstevel@tonic-gate  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
887c478bd9Sstevel@tonic-gate  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
897c478bd9Sstevel@tonic-gate  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
907c478bd9Sstevel@tonic-gate  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
917c478bd9Sstevel@tonic-gate  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
927c478bd9Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
937c478bd9Sstevel@tonic-gate  * PARTICULAR PURPOSE.
947c478bd9Sstevel@tonic-gate  *
957c478bd9Sstevel@tonic-gate  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
967c478bd9Sstevel@tonic-gate  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
977c478bd9Sstevel@tonic-gate  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
987c478bd9Sstevel@tonic-gate  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
997c478bd9Sstevel@tonic-gate  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
1007c478bd9Sstevel@tonic-gate  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
1017c478bd9Sstevel@tonic-gate  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
1027c478bd9Sstevel@tonic-gate  * LIMITED REMEDY.
1037c478bd9Sstevel@tonic-gate  *
1047c478bd9Sstevel@tonic-gate  * 4.3. Licensee shall not export, either directly or indirectly, any of this
1057c478bd9Sstevel@tonic-gate  * software or system incorporating such software without first obtaining any
1067c478bd9Sstevel@tonic-gate  * required license or other approval from the U. S. Department of Commerce or
1077c478bd9Sstevel@tonic-gate  * any other agency or department of the United States Government.  In the
1087c478bd9Sstevel@tonic-gate  * event Licensee exports any such software from the United States or
1097c478bd9Sstevel@tonic-gate  * re-exports any such software from a foreign destination, Licensee shall
1107c478bd9Sstevel@tonic-gate  * ensure that the distribution and export/re-export of the software is in
1117c478bd9Sstevel@tonic-gate  * compliance with all laws, regulations, orders, or other restrictions of the
1127c478bd9Sstevel@tonic-gate  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
1137c478bd9Sstevel@tonic-gate  * any of its subsidiaries will export/re-export any technical data, process,
1147c478bd9Sstevel@tonic-gate  * software, or service, directly or indirectly, to any country for which the
1157c478bd9Sstevel@tonic-gate  * United States government or any agency thereof requires an export license,
1167c478bd9Sstevel@tonic-gate  * other governmental approval, or letter of assurance, without first obtaining
1177c478bd9Sstevel@tonic-gate  * such license, approval or letter.
1187c478bd9Sstevel@tonic-gate  *
1197c478bd9Sstevel@tonic-gate  *****************************************************************************/
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate #ifndef __ACPIOSXF_H__
1227c478bd9Sstevel@tonic-gate #define __ACPIOSXF_H__
1237c478bd9Sstevel@tonic-gate 
1247c478bd9Sstevel@tonic-gate #include "platform/acenv.h"
1257c478bd9Sstevel@tonic-gate #include "actypes.h"
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate 
12827f7c583Smyers /* Types for AcpiOsExecute */
1297c478bd9Sstevel@tonic-gate 
13027f7c583Smyers typedef enum
13127f7c583Smyers {
13227f7c583Smyers     OSL_GLOBAL_LOCK_HANDLER,
13327f7c583Smyers     OSL_NOTIFY_HANDLER,
13427f7c583Smyers     OSL_GPE_HANDLER,
13527f7c583Smyers     OSL_DEBUGGER_THREAD,
13627f7c583Smyers     OSL_EC_POLL_HANDLER,
13727f7c583Smyers     OSL_EC_BURST_HANDLER
13827f7c583Smyers 
13927f7c583Smyers } ACPI_EXECUTE_TYPE;
1407c478bd9Sstevel@tonic-gate 
1417c478bd9Sstevel@tonic-gate #define ACPI_NO_UNIT_LIMIT          ((UINT32) -1)
1427c478bd9Sstevel@tonic-gate #define ACPI_MUTEX_SEM              1
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate 
1457c478bd9Sstevel@tonic-gate /* Functions for AcpiOsSignal */
1467c478bd9Sstevel@tonic-gate 
1477c478bd9Sstevel@tonic-gate #define ACPI_SIGNAL_FATAL           0
1487c478bd9Sstevel@tonic-gate #define ACPI_SIGNAL_BREAKPOINT      1
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate typedef struct acpi_signal_fatal_info
1517c478bd9Sstevel@tonic-gate {
1527c478bd9Sstevel@tonic-gate     UINT32                  Type;
1537c478bd9Sstevel@tonic-gate     UINT32                  Code;
1547c478bd9Sstevel@tonic-gate     UINT32                  Argument;
1557c478bd9Sstevel@tonic-gate 
1567c478bd9Sstevel@tonic-gate } ACPI_SIGNAL_FATAL_INFO;
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate 
1597c478bd9Sstevel@tonic-gate /*
1607c478bd9Sstevel@tonic-gate  * OSL Initialization and shutdown primitives
1617c478bd9Sstevel@tonic-gate  */
1627c478bd9Sstevel@tonic-gate ACPI_STATUS
1637c478bd9Sstevel@tonic-gate AcpiOsInitialize (
1647c478bd9Sstevel@tonic-gate     void);
1657c478bd9Sstevel@tonic-gate 
1667c478bd9Sstevel@tonic-gate ACPI_STATUS
1677c478bd9Sstevel@tonic-gate AcpiOsTerminate (
1687c478bd9Sstevel@tonic-gate     void);
1697c478bd9Sstevel@tonic-gate 
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate /*
1727c478bd9Sstevel@tonic-gate  * ACPI Table interfaces
1737c478bd9Sstevel@tonic-gate  */
174db2bae30SDana Myers ACPI_PHYSICAL_ADDRESS
1757c478bd9Sstevel@tonic-gate AcpiOsGetRootPointer (
176db2bae30SDana Myers     void);
1777c478bd9Sstevel@tonic-gate 
1787c478bd9Sstevel@tonic-gate ACPI_STATUS
1797c478bd9Sstevel@tonic-gate AcpiOsPredefinedOverride (
1807c478bd9Sstevel@tonic-gate     const ACPI_PREDEFINED_NAMES *InitVal,
1817c478bd9Sstevel@tonic-gate     ACPI_STRING                 *NewVal);
1827c478bd9Sstevel@tonic-gate 
1837c478bd9Sstevel@tonic-gate ACPI_STATUS
1847c478bd9Sstevel@tonic-gate AcpiOsTableOverride (
1857c478bd9Sstevel@tonic-gate     ACPI_TABLE_HEADER       *ExistingTable,
1867c478bd9Sstevel@tonic-gate     ACPI_TABLE_HEADER       **NewTable);
1877c478bd9Sstevel@tonic-gate 
1887c478bd9Sstevel@tonic-gate 
1897c478bd9Sstevel@tonic-gate /*
19027f7c583Smyers  * Spinlock primitives
19127f7c583Smyers  */
19227f7c583Smyers ACPI_STATUS
19327f7c583Smyers AcpiOsCreateLock (
19427f7c583Smyers     ACPI_SPINLOCK           *OutHandle);
19527f7c583Smyers 
19627f7c583Smyers void
19727f7c583Smyers AcpiOsDeleteLock (
19827f7c583Smyers     ACPI_SPINLOCK           Handle);
19927f7c583Smyers 
20027f7c583Smyers ACPI_CPU_FLAGS
20127f7c583Smyers AcpiOsAcquireLock (
20227f7c583Smyers     ACPI_SPINLOCK           Handle);
20327f7c583Smyers 
20427f7c583Smyers void
20527f7c583Smyers AcpiOsReleaseLock (
20627f7c583Smyers     ACPI_SPINLOCK           Handle,
20727f7c583Smyers     ACPI_CPU_FLAGS          Flags);
20827f7c583Smyers 
20927f7c583Smyers 
21027f7c583Smyers /*
21127f7c583Smyers  * Semaphore primitives
2127c478bd9Sstevel@tonic-gate  */
2137c478bd9Sstevel@tonic-gate ACPI_STATUS
2147c478bd9Sstevel@tonic-gate AcpiOsCreateSemaphore (
2157c478bd9Sstevel@tonic-gate     UINT32                  MaxUnits,
2167c478bd9Sstevel@tonic-gate     UINT32                  InitialUnits,
21727f7c583Smyers     ACPI_SEMAPHORE          *OutHandle);
2187c478bd9Sstevel@tonic-gate 
2197c478bd9Sstevel@tonic-gate ACPI_STATUS
2207c478bd9Sstevel@tonic-gate AcpiOsDeleteSemaphore (
22127f7c583Smyers     ACPI_SEMAPHORE          Handle);
2227c478bd9Sstevel@tonic-gate 
2237c478bd9Sstevel@tonic-gate ACPI_STATUS
2247c478bd9Sstevel@tonic-gate AcpiOsWaitSemaphore (
22527f7c583Smyers     ACPI_SEMAPHORE          Handle,
2267c478bd9Sstevel@tonic-gate     UINT32                  Units,
2277c478bd9Sstevel@tonic-gate     UINT16                  Timeout);
2287c478bd9Sstevel@tonic-gate 
2297c478bd9Sstevel@tonic-gate ACPI_STATUS
2307c478bd9Sstevel@tonic-gate AcpiOsSignalSemaphore (
23127f7c583Smyers     ACPI_SEMAPHORE          Handle,
2327c478bd9Sstevel@tonic-gate     UINT32                  Units);
2337c478bd9Sstevel@tonic-gate 
23427f7c583Smyers 
23527f7c583Smyers /*
236*aa2aa9a6SDana Myers  * Mutex primitives. May be configured to use semaphores instead via
237*aa2aa9a6SDana Myers  * ACPI_MUTEX_TYPE (see platform/acenv.h)
23827f7c583Smyers  */
239*aa2aa9a6SDana Myers #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
240*aa2aa9a6SDana Myers 
2417c478bd9Sstevel@tonic-gate ACPI_STATUS
24227f7c583Smyers AcpiOsCreateMutex (
24327f7c583Smyers     ACPI_MUTEX              *OutHandle);
2447c478bd9Sstevel@tonic-gate 
2457c478bd9Sstevel@tonic-gate void
24627f7c583Smyers AcpiOsDeleteMutex (
24727f7c583Smyers     ACPI_MUTEX              Handle);
2487c478bd9Sstevel@tonic-gate 
24927f7c583Smyers ACPI_STATUS
25027f7c583Smyers AcpiOsAcquireMutex (
25127f7c583Smyers     ACPI_MUTEX              Handle,
25227f7c583Smyers     UINT16                  Timeout);
2537c478bd9Sstevel@tonic-gate 
2547c478bd9Sstevel@tonic-gate void
25527f7c583Smyers AcpiOsReleaseMutex (
25627f7c583Smyers     ACPI_MUTEX              Handle);
257*aa2aa9a6SDana Myers #endif
2587c478bd9Sstevel@tonic-gate 
2597c478bd9Sstevel@tonic-gate 
2607c478bd9Sstevel@tonic-gate /*
2617c478bd9Sstevel@tonic-gate  * Memory allocation and mapping
2627c478bd9Sstevel@tonic-gate  */
2637c478bd9Sstevel@tonic-gate void *
2647c478bd9Sstevel@tonic-gate AcpiOsAllocate (
2657c478bd9Sstevel@tonic-gate     ACPI_SIZE               Size);
2667c478bd9Sstevel@tonic-gate 
2677c478bd9Sstevel@tonic-gate void
2687c478bd9Sstevel@tonic-gate AcpiOsFree (
2697c478bd9Sstevel@tonic-gate     void *                  Memory);
2707c478bd9Sstevel@tonic-gate 
271db2bae30SDana Myers void *
2727c478bd9Sstevel@tonic-gate AcpiOsMapMemory (
273db2bae30SDana Myers     ACPI_PHYSICAL_ADDRESS   Where,
274db2bae30SDana Myers     ACPI_SIZE               Length);
2757c478bd9Sstevel@tonic-gate 
2767c478bd9Sstevel@tonic-gate void
2777c478bd9Sstevel@tonic-gate AcpiOsUnmapMemory (
2787c478bd9Sstevel@tonic-gate     void                    *LogicalAddress,
2797c478bd9Sstevel@tonic-gate     ACPI_SIZE               Size);
2807c478bd9Sstevel@tonic-gate 
2817c478bd9Sstevel@tonic-gate ACPI_STATUS
2827c478bd9Sstevel@tonic-gate AcpiOsGetPhysicalAddress (
2837c478bd9Sstevel@tonic-gate     void                    *LogicalAddress,
2847c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS   *PhysicalAddress);
2857c478bd9Sstevel@tonic-gate 
2867c478bd9Sstevel@tonic-gate 
287450d6964Smyers /*
288450d6964Smyers  * Memory/Object Cache
289450d6964Smyers  */
290450d6964Smyers ACPI_STATUS
291450d6964Smyers AcpiOsCreateCache (
292450d6964Smyers     char                    *CacheName,
293450d6964Smyers     UINT16                  ObjectSize,
294450d6964Smyers     UINT16                  MaxDepth,
295450d6964Smyers     ACPI_CACHE_T            **ReturnCache);
296450d6964Smyers 
297450d6964Smyers ACPI_STATUS
298450d6964Smyers AcpiOsDeleteCache (
299450d6964Smyers     ACPI_CACHE_T            *Cache);
300450d6964Smyers 
301450d6964Smyers ACPI_STATUS
302450d6964Smyers AcpiOsPurgeCache (
303450d6964Smyers     ACPI_CACHE_T            *Cache);
304450d6964Smyers 
305450d6964Smyers void *
306450d6964Smyers AcpiOsAcquireObject (
307450d6964Smyers     ACPI_CACHE_T            *Cache);
308450d6964Smyers 
309450d6964Smyers ACPI_STATUS
310450d6964Smyers AcpiOsReleaseObject (
311450d6964Smyers     ACPI_CACHE_T            *Cache,
312450d6964Smyers     void                    *Object);
313450d6964Smyers 
314450d6964Smyers 
3157c478bd9Sstevel@tonic-gate /*
3167c478bd9Sstevel@tonic-gate  * Interrupt handlers
3177c478bd9Sstevel@tonic-gate  */
3187c478bd9Sstevel@tonic-gate ACPI_STATUS
3197c478bd9Sstevel@tonic-gate AcpiOsInstallInterruptHandler (
3207c478bd9Sstevel@tonic-gate     UINT32                  InterruptNumber,
3217c478bd9Sstevel@tonic-gate     ACPI_OSD_HANDLER        ServiceRoutine,
3227c478bd9Sstevel@tonic-gate     void                    *Context);
3237c478bd9Sstevel@tonic-gate 
3247c478bd9Sstevel@tonic-gate ACPI_STATUS
3257c478bd9Sstevel@tonic-gate AcpiOsRemoveInterruptHandler (
3267c478bd9Sstevel@tonic-gate     UINT32                  InterruptNumber,
3277c478bd9Sstevel@tonic-gate     ACPI_OSD_HANDLER        ServiceRoutine);
3287c478bd9Sstevel@tonic-gate 
3297c478bd9Sstevel@tonic-gate 
3307c478bd9Sstevel@tonic-gate /*
3317c478bd9Sstevel@tonic-gate  * Threads and Scheduling
3327c478bd9Sstevel@tonic-gate  */
33327f7c583Smyers ACPI_THREAD_ID
3347c478bd9Sstevel@tonic-gate AcpiOsGetThreadId (
3357c478bd9Sstevel@tonic-gate     void);
3367c478bd9Sstevel@tonic-gate 
3377c478bd9Sstevel@tonic-gate ACPI_STATUS
33827f7c583Smyers AcpiOsExecute (
33927f7c583Smyers     ACPI_EXECUTE_TYPE       Type,
3407c478bd9Sstevel@tonic-gate     ACPI_OSD_EXEC_CALLBACK  Function,
3417c478bd9Sstevel@tonic-gate     void                    *Context);
3427c478bd9Sstevel@tonic-gate 
3437c478bd9Sstevel@tonic-gate void
3447c478bd9Sstevel@tonic-gate AcpiOsWaitEventsComplete (
3457c478bd9Sstevel@tonic-gate     void                    *Context);
3467c478bd9Sstevel@tonic-gate 
3477c478bd9Sstevel@tonic-gate void
3487c478bd9Sstevel@tonic-gate AcpiOsSleep (
3497c478bd9Sstevel@tonic-gate     ACPI_INTEGER            Milliseconds);
3507c478bd9Sstevel@tonic-gate 
3517c478bd9Sstevel@tonic-gate void
3527c478bd9Sstevel@tonic-gate AcpiOsStall (
3537c478bd9Sstevel@tonic-gate     UINT32                  Microseconds);
3547c478bd9Sstevel@tonic-gate 
3557c478bd9Sstevel@tonic-gate 
3567c478bd9Sstevel@tonic-gate /*
3577c478bd9Sstevel@tonic-gate  * Platform and hardware-independent I/O interfaces
3587c478bd9Sstevel@tonic-gate  */
3597c478bd9Sstevel@tonic-gate ACPI_STATUS
3607c478bd9Sstevel@tonic-gate AcpiOsReadPort (
3617c478bd9Sstevel@tonic-gate     ACPI_IO_ADDRESS         Address,
3627c478bd9Sstevel@tonic-gate     UINT32                  *Value,
3637c478bd9Sstevel@tonic-gate     UINT32                  Width);
3647c478bd9Sstevel@tonic-gate 
3657c478bd9Sstevel@tonic-gate ACPI_STATUS
3667c478bd9Sstevel@tonic-gate AcpiOsWritePort (
3677c478bd9Sstevel@tonic-gate     ACPI_IO_ADDRESS         Address,
3687c478bd9Sstevel@tonic-gate     UINT32                  Value,
3697c478bd9Sstevel@tonic-gate     UINT32                  Width);
3707c478bd9Sstevel@tonic-gate 
3717c478bd9Sstevel@tonic-gate 
3727c478bd9Sstevel@tonic-gate /*
3737c478bd9Sstevel@tonic-gate  * Platform and hardware-independent physical memory interfaces
3747c478bd9Sstevel@tonic-gate  */
3757c478bd9Sstevel@tonic-gate ACPI_STATUS
3767c478bd9Sstevel@tonic-gate AcpiOsReadMemory (
3777c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS   Address,
3787c478bd9Sstevel@tonic-gate     UINT32                  *Value,
3797c478bd9Sstevel@tonic-gate     UINT32                  Width);
3807c478bd9Sstevel@tonic-gate 
3817c478bd9Sstevel@tonic-gate ACPI_STATUS
3827c478bd9Sstevel@tonic-gate AcpiOsWriteMemory (
3837c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS   Address,
3847c478bd9Sstevel@tonic-gate     UINT32                  Value,
3857c478bd9Sstevel@tonic-gate     UINT32                  Width);
3867c478bd9Sstevel@tonic-gate 
3877c478bd9Sstevel@tonic-gate 
3887c478bd9Sstevel@tonic-gate /*
3897c478bd9Sstevel@tonic-gate  * Platform and hardware-independent PCI configuration space access
3907c478bd9Sstevel@tonic-gate  * Note: Can't use "Register" as a parameter, changed to "Reg" --
3917c478bd9Sstevel@tonic-gate  * certain compilers complain.
3927c478bd9Sstevel@tonic-gate  */
3937c478bd9Sstevel@tonic-gate ACPI_STATUS
3947c478bd9Sstevel@tonic-gate AcpiOsReadPciConfiguration (
3957c478bd9Sstevel@tonic-gate     ACPI_PCI_ID             *PciId,
3967c478bd9Sstevel@tonic-gate     UINT32                  Reg,
3977c478bd9Sstevel@tonic-gate     void                    *Value,
3987c478bd9Sstevel@tonic-gate     UINT32                  Width);
3997c478bd9Sstevel@tonic-gate 
4007c478bd9Sstevel@tonic-gate ACPI_STATUS
4017c478bd9Sstevel@tonic-gate AcpiOsWritePciConfiguration (
4027c478bd9Sstevel@tonic-gate     ACPI_PCI_ID             *PciId,
4037c478bd9Sstevel@tonic-gate     UINT32                  Reg,
4047c478bd9Sstevel@tonic-gate     ACPI_INTEGER            Value,
4057c478bd9Sstevel@tonic-gate     UINT32                  Width);
4067c478bd9Sstevel@tonic-gate 
40727f7c583Smyers 
4087c478bd9Sstevel@tonic-gate /*
4097c478bd9Sstevel@tonic-gate  * Interim function needed for PCI IRQ routing
4107c478bd9Sstevel@tonic-gate  */
4117c478bd9Sstevel@tonic-gate void
4127c478bd9Sstevel@tonic-gate AcpiOsDerivePciId(
4137c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Rhandle,
4147c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Chandle,
4157c478bd9Sstevel@tonic-gate     ACPI_PCI_ID             **PciId);
4167c478bd9Sstevel@tonic-gate 
41727f7c583Smyers 
4187c478bd9Sstevel@tonic-gate /*
4197c478bd9Sstevel@tonic-gate  * Miscellaneous
4207c478bd9Sstevel@tonic-gate  */
42127f7c583Smyers ACPI_STATUS
42227f7c583Smyers AcpiOsValidateInterface (
42327f7c583Smyers     char                    *Interface);
42427f7c583Smyers 
4257c478bd9Sstevel@tonic-gate BOOLEAN
4267c478bd9Sstevel@tonic-gate AcpiOsReadable (
4277c478bd9Sstevel@tonic-gate     void                    *Pointer,
4287c478bd9Sstevel@tonic-gate     ACPI_SIZE               Length);
4297c478bd9Sstevel@tonic-gate 
4307c478bd9Sstevel@tonic-gate BOOLEAN
4317c478bd9Sstevel@tonic-gate AcpiOsWritable (
4327c478bd9Sstevel@tonic-gate     void                    *Pointer,
4337c478bd9Sstevel@tonic-gate     ACPI_SIZE               Length);
4347c478bd9Sstevel@tonic-gate 
4357c478bd9Sstevel@tonic-gate UINT64
4367c478bd9Sstevel@tonic-gate AcpiOsGetTimer (
4377c478bd9Sstevel@tonic-gate     void);
4387c478bd9Sstevel@tonic-gate 
4397c478bd9Sstevel@tonic-gate ACPI_STATUS
4407c478bd9Sstevel@tonic-gate AcpiOsSignal (
4417c478bd9Sstevel@tonic-gate     UINT32                  Function,
4427c478bd9Sstevel@tonic-gate     void                    *Info);
4437c478bd9Sstevel@tonic-gate 
44427f7c583Smyers 
4457c478bd9Sstevel@tonic-gate /*
4467c478bd9Sstevel@tonic-gate  * Debug print routines
4477c478bd9Sstevel@tonic-gate  */
4487c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE
4497c478bd9Sstevel@tonic-gate AcpiOsPrintf (
4507c478bd9Sstevel@tonic-gate     const char              *Format,
4517c478bd9Sstevel@tonic-gate     ...);
4527c478bd9Sstevel@tonic-gate 
4537c478bd9Sstevel@tonic-gate void
4547c478bd9Sstevel@tonic-gate AcpiOsVprintf (
4557c478bd9Sstevel@tonic-gate     const char              *Format,
4567c478bd9Sstevel@tonic-gate     va_list                 Args);
4577c478bd9Sstevel@tonic-gate 
4587c478bd9Sstevel@tonic-gate void
4597c478bd9Sstevel@tonic-gate AcpiOsRedirectOutput (
4607c478bd9Sstevel@tonic-gate     void                    *Destination);
4617c478bd9Sstevel@tonic-gate 
4627c478bd9Sstevel@tonic-gate 
4637c478bd9Sstevel@tonic-gate /*
4647c478bd9Sstevel@tonic-gate  * Debug input
4657c478bd9Sstevel@tonic-gate  */
4667c478bd9Sstevel@tonic-gate UINT32
4677c478bd9Sstevel@tonic-gate AcpiOsGetLine (
4687c478bd9Sstevel@tonic-gate     char                    *Buffer);
4697c478bd9Sstevel@tonic-gate 
4707c478bd9Sstevel@tonic-gate 
4717c478bd9Sstevel@tonic-gate /*
4727c478bd9Sstevel@tonic-gate  * Directory manipulation
4737c478bd9Sstevel@tonic-gate  */
4747c478bd9Sstevel@tonic-gate void *
4757c478bd9Sstevel@tonic-gate AcpiOsOpenDirectory (
4767c478bd9Sstevel@tonic-gate     char                    *Pathname,
4777c478bd9Sstevel@tonic-gate     char                    *WildcardSpec,
4787c478bd9Sstevel@tonic-gate     char                    RequestedFileType);
4797c478bd9Sstevel@tonic-gate 
4807c478bd9Sstevel@tonic-gate /* RequesteFileType values */
4817c478bd9Sstevel@tonic-gate 
4827c478bd9Sstevel@tonic-gate #define REQUEST_FILE_ONLY                   0
4837c478bd9Sstevel@tonic-gate #define REQUEST_DIR_ONLY                    1
4847c478bd9Sstevel@tonic-gate 
4857c478bd9Sstevel@tonic-gate 
4867c478bd9Sstevel@tonic-gate char *
4877c478bd9Sstevel@tonic-gate AcpiOsGetNextFilename (
4887c478bd9Sstevel@tonic-gate     void                    *DirHandle);
4897c478bd9Sstevel@tonic-gate 
4907c478bd9Sstevel@tonic-gate void
4917c478bd9Sstevel@tonic-gate AcpiOsCloseDirectory (
4927c478bd9Sstevel@tonic-gate     void                    *DirHandle);
4937c478bd9Sstevel@tonic-gate 
4947c478bd9Sstevel@tonic-gate 
4957c478bd9Sstevel@tonic-gate #endif /* __ACPIOSXF_H__ */
496