Home | History | Annotate | Line # | Download | only in include
acpiosxf.h revision 1.18.6.1
      1       1.1    jruoho /******************************************************************************
      2       1.1    jruoho  *
      3       1.5  christos  * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These
      4       1.1    jruoho  *                    interfaces must be implemented by OSL to interface the
      5       1.1    jruoho  *                    ACPI components to the host operating system.
      6       1.1    jruoho  *
      7       1.1    jruoho  *****************************************************************************/
      8       1.1    jruoho 
      9  1.18.6.1  perseant /******************************************************************************
     10  1.18.6.1  perseant  *
     11  1.18.6.1  perseant  * 1. Copyright Notice
     12  1.18.6.1  perseant  *
     13  1.18.6.1  perseant  * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
     14       1.1    jruoho  * All rights reserved.
     15       1.1    jruoho  *
     16  1.18.6.1  perseant  * 2. License
     17  1.18.6.1  perseant  *
     18  1.18.6.1  perseant  * 2.1. This is your license from Intel Corp. under its intellectual property
     19  1.18.6.1  perseant  * rights. You may have additional license terms from the party that provided
     20  1.18.6.1  perseant  * you this software, covering your right to use that party's intellectual
     21  1.18.6.1  perseant  * property rights.
     22  1.18.6.1  perseant  *
     23  1.18.6.1  perseant  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
     24  1.18.6.1  perseant  * copy of the source code appearing in this file ("Covered Code") an
     25  1.18.6.1  perseant  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
     26  1.18.6.1  perseant  * base code distributed originally by Intel ("Original Intel Code") to copy,
     27  1.18.6.1  perseant  * make derivatives, distribute, use and display any portion of the Covered
     28  1.18.6.1  perseant  * Code in any form, with the right to sublicense such rights; and
     29  1.18.6.1  perseant  *
     30  1.18.6.1  perseant  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
     31  1.18.6.1  perseant  * license (with the right to sublicense), under only those claims of Intel
     32  1.18.6.1  perseant  * patents that are infringed by the Original Intel Code, to make, use, sell,
     33  1.18.6.1  perseant  * offer to sell, and import the Covered Code and derivative works thereof
     34  1.18.6.1  perseant  * solely to the minimum extent necessary to exercise the above copyright
     35  1.18.6.1  perseant  * license, and in no event shall the patent license extend to any additions
     36  1.18.6.1  perseant  * to or modifications of the Original Intel Code. No other license or right
     37  1.18.6.1  perseant  * is granted directly or by implication, estoppel or otherwise;
     38  1.18.6.1  perseant  *
     39  1.18.6.1  perseant  * The above copyright and patent license is granted only if the following
     40  1.18.6.1  perseant  * conditions are met:
     41  1.18.6.1  perseant  *
     42  1.18.6.1  perseant  * 3. Conditions
     43  1.18.6.1  perseant  *
     44  1.18.6.1  perseant  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
     45  1.18.6.1  perseant  * Redistribution of source code of any substantial portion of the Covered
     46  1.18.6.1  perseant  * Code or modification with rights to further distribute source must include
     47  1.18.6.1  perseant  * the above Copyright Notice, the above License, this list of Conditions,
     48  1.18.6.1  perseant  * and the following Disclaimer and Export Compliance provision. In addition,
     49  1.18.6.1  perseant  * Licensee must cause all Covered Code to which Licensee contributes to
     50  1.18.6.1  perseant  * contain a file documenting the changes Licensee made to create that Covered
     51  1.18.6.1  perseant  * Code and the date of any change. Licensee must include in that file the
     52  1.18.6.1  perseant  * documentation of any changes made by any predecessor Licensee. Licensee
     53  1.18.6.1  perseant  * must include a prominent statement that the modification is derived,
     54  1.18.6.1  perseant  * directly or indirectly, from Original Intel Code.
     55  1.18.6.1  perseant  *
     56  1.18.6.1  perseant  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
     57  1.18.6.1  perseant  * Redistribution of source code of any substantial portion of the Covered
     58  1.18.6.1  perseant  * Code or modification without rights to further distribute source must
     59  1.18.6.1  perseant  * include the following Disclaimer and Export Compliance provision in the
     60  1.18.6.1  perseant  * documentation and/or other materials provided with distribution. In
     61  1.18.6.1  perseant  * addition, Licensee may not authorize further sublicense of source of any
     62  1.18.6.1  perseant  * portion of the Covered Code, and must include terms to the effect that the
     63  1.18.6.1  perseant  * license from Licensee to its licensee is limited to the intellectual
     64  1.18.6.1  perseant  * property embodied in the software Licensee provides to its licensee, and
     65  1.18.6.1  perseant  * not to intellectual property embodied in modifications its licensee may
     66  1.18.6.1  perseant  * make.
     67  1.18.6.1  perseant  *
     68  1.18.6.1  perseant  * 3.3. Redistribution of Executable. Redistribution in executable form of any
     69  1.18.6.1  perseant  * substantial portion of the Covered Code or modification must reproduce the
     70  1.18.6.1  perseant  * above Copyright Notice, and the following Disclaimer and Export Compliance
     71  1.18.6.1  perseant  * provision in the documentation and/or other materials provided with the
     72  1.18.6.1  perseant  * distribution.
     73  1.18.6.1  perseant  *
     74  1.18.6.1  perseant  * 3.4. Intel retains all right, title, and interest in and to the Original
     75  1.18.6.1  perseant  * Intel Code.
     76  1.18.6.1  perseant  *
     77  1.18.6.1  perseant  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
     78  1.18.6.1  perseant  * Intel shall be used in advertising or otherwise to promote the sale, use or
     79  1.18.6.1  perseant  * other dealings in products derived from or relating to the Covered Code
     80  1.18.6.1  perseant  * without prior written authorization from Intel.
     81  1.18.6.1  perseant  *
     82  1.18.6.1  perseant  * 4. Disclaimer and Export Compliance
     83  1.18.6.1  perseant  *
     84  1.18.6.1  perseant  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
     85  1.18.6.1  perseant  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
     86  1.18.6.1  perseant  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
     87  1.18.6.1  perseant  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
     88  1.18.6.1  perseant  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
     89  1.18.6.1  perseant  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
     90  1.18.6.1  perseant  * PARTICULAR PURPOSE.
     91  1.18.6.1  perseant  *
     92  1.18.6.1  perseant  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
     93  1.18.6.1  perseant  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
     94  1.18.6.1  perseant  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
     95  1.18.6.1  perseant  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
     96  1.18.6.1  perseant  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
     97  1.18.6.1  perseant  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
     98  1.18.6.1  perseant  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
     99  1.18.6.1  perseant  * LIMITED REMEDY.
    100  1.18.6.1  perseant  *
    101  1.18.6.1  perseant  * 4.3. Licensee shall not export, either directly or indirectly, any of this
    102  1.18.6.1  perseant  * software or system incorporating such software without first obtaining any
    103  1.18.6.1  perseant  * required license or other approval from the U. S. Department of Commerce or
    104  1.18.6.1  perseant  * any other agency or department of the United States Government. In the
    105  1.18.6.1  perseant  * event Licensee exports any such software from the United States or
    106  1.18.6.1  perseant  * re-exports any such software from a foreign destination, Licensee shall
    107  1.18.6.1  perseant  * ensure that the distribution and export/re-export of the software is in
    108  1.18.6.1  perseant  * compliance with all laws, regulations, orders, or other restrictions of the
    109  1.18.6.1  perseant  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
    110  1.18.6.1  perseant  * any of its subsidiaries will export/re-export any technical data, process,
    111  1.18.6.1  perseant  * software, or service, directly or indirectly, to any country for which the
    112  1.18.6.1  perseant  * United States government or any agency thereof requires an export license,
    113  1.18.6.1  perseant  * other governmental approval, or letter of assurance, without first obtaining
    114  1.18.6.1  perseant  * such license, approval or letter.
    115  1.18.6.1  perseant  *
    116  1.18.6.1  perseant  *****************************************************************************
    117  1.18.6.1  perseant  *
    118  1.18.6.1  perseant  * Alternatively, you may choose to be licensed under the terms of the
    119  1.18.6.1  perseant  * following license:
    120  1.18.6.1  perseant  *
    121       1.3    jruoho  * Redistribution and use in source and binary forms, with or without
    122       1.3    jruoho  * modification, are permitted provided that the following conditions
    123       1.3    jruoho  * are met:
    124       1.3    jruoho  * 1. Redistributions of source code must retain the above copyright
    125       1.3    jruoho  *    notice, this list of conditions, and the following disclaimer,
    126       1.3    jruoho  *    without modification.
    127       1.3    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
    128       1.3    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
    129       1.3    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
    130       1.3    jruoho  *    including a substantially similar Disclaimer requirement for further
    131       1.3    jruoho  *    binary redistribution.
    132       1.3    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
    133       1.3    jruoho  *    of any contributors may be used to endorse or promote products derived
    134       1.3    jruoho  *    from this software without specific prior written permission.
    135       1.3    jruoho  *
    136       1.3    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    137       1.3    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    138      1.16  christos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    139       1.3    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    140  1.18.6.1  perseant  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    141  1.18.6.1  perseant  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    142  1.18.6.1  perseant  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    143  1.18.6.1  perseant  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    144  1.18.6.1  perseant  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    145  1.18.6.1  perseant  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    146  1.18.6.1  perseant  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    147  1.18.6.1  perseant  *
    148  1.18.6.1  perseant  * Alternatively, you may choose to be licensed under the terms of the
    149  1.18.6.1  perseant  * GNU General Public License ("GPL") version 2 as published by the Free
    150  1.18.6.1  perseant  * Software Foundation.
    151  1.18.6.1  perseant  *
    152  1.18.6.1  perseant  *****************************************************************************/
    153       1.1    jruoho 
    154       1.1    jruoho #ifndef __ACPIOSXF_H__
    155       1.1    jruoho #define __ACPIOSXF_H__
    156       1.1    jruoho 
    157       1.1    jruoho #include "platform/acenv.h"
    158       1.1    jruoho #include "actypes.h"
    159       1.1    jruoho 
    160       1.1    jruoho 
    161       1.1    jruoho /* Types for AcpiOsExecute */
    162       1.1    jruoho 
    163       1.1    jruoho typedef enum
    164       1.1    jruoho {
    165       1.1    jruoho     OSL_GLOBAL_LOCK_HANDLER,
    166       1.1    jruoho     OSL_NOTIFY_HANDLER,
    167       1.1    jruoho     OSL_GPE_HANDLER,
    168       1.9  christos     OSL_DEBUGGER_MAIN_THREAD,
    169       1.9  christos     OSL_DEBUGGER_EXEC_THREAD,
    170       1.1    jruoho     OSL_EC_POLL_HANDLER,
    171       1.1    jruoho     OSL_EC_BURST_HANDLER
    172       1.1    jruoho 
    173       1.1    jruoho } ACPI_EXECUTE_TYPE;
    174       1.1    jruoho 
    175       1.1    jruoho #define ACPI_NO_UNIT_LIMIT          ((UINT32) -1)
    176       1.1    jruoho #define ACPI_MUTEX_SEM              1
    177       1.1    jruoho 
    178       1.1    jruoho 
    179       1.1    jruoho /* Functions for AcpiOsSignal */
    180       1.1    jruoho 
    181       1.1    jruoho #define ACPI_SIGNAL_FATAL           0
    182       1.1    jruoho #define ACPI_SIGNAL_BREAKPOINT      1
    183       1.1    jruoho 
    184       1.1    jruoho typedef struct acpi_signal_fatal_info
    185       1.1    jruoho {
    186       1.1    jruoho     UINT32                  Type;
    187       1.1    jruoho     UINT32                  Code;
    188       1.1    jruoho     UINT32                  Argument;
    189       1.1    jruoho 
    190       1.1    jruoho } ACPI_SIGNAL_FATAL_INFO;
    191       1.1    jruoho 
    192       1.1    jruoho 
    193       1.1    jruoho /*
    194       1.1    jruoho  * OSL Initialization and shutdown primitives
    195       1.1    jruoho  */
    196       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitialize
    197       1.1    jruoho ACPI_STATUS
    198       1.1    jruoho AcpiOsInitialize (
    199       1.1    jruoho     void);
    200       1.5  christos #endif
    201       1.1    jruoho 
    202       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminate
    203       1.1    jruoho ACPI_STATUS
    204       1.1    jruoho AcpiOsTerminate (
    205       1.1    jruoho     void);
    206       1.5  christos #endif
    207       1.1    jruoho 
    208       1.1    jruoho 
    209       1.1    jruoho /*
    210       1.1    jruoho  * ACPI Table interfaces
    211       1.1    jruoho  */
    212       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetRootPointer
    213       1.1    jruoho ACPI_PHYSICAL_ADDRESS
    214       1.1    jruoho AcpiOsGetRootPointer (
    215       1.1    jruoho     void);
    216       1.5  christos #endif
    217       1.1    jruoho 
    218       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPredefinedOverride
    219       1.1    jruoho ACPI_STATUS
    220       1.1    jruoho AcpiOsPredefinedOverride (
    221       1.1    jruoho     const ACPI_PREDEFINED_NAMES *InitVal,
    222       1.1    jruoho     ACPI_STRING                 *NewVal);
    223       1.5  christos #endif
    224       1.1    jruoho 
    225       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTableOverride
    226       1.1    jruoho ACPI_STATUS
    227       1.1    jruoho AcpiOsTableOverride (
    228       1.1    jruoho     ACPI_TABLE_HEADER       *ExistingTable,
    229       1.1    jruoho     ACPI_TABLE_HEADER       **NewTable);
    230       1.5  christos #endif
    231       1.5  christos 
    232       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPhysicalTableOverride
    233       1.5  christos ACPI_STATUS
    234       1.5  christos AcpiOsPhysicalTableOverride (
    235       1.5  christos     ACPI_TABLE_HEADER       *ExistingTable,
    236       1.5  christos     ACPI_PHYSICAL_ADDRESS   *NewAddress,
    237       1.5  christos     UINT32                  *NewTableLength);
    238       1.5  christos #endif
    239       1.1    jruoho 
    240       1.1    jruoho 
    241       1.1    jruoho /*
    242       1.1    jruoho  * Spinlock primitives
    243       1.1    jruoho  */
    244       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateLock
    245       1.1    jruoho ACPI_STATUS
    246       1.1    jruoho AcpiOsCreateLock (
    247       1.1    jruoho     ACPI_SPINLOCK           *OutHandle);
    248       1.5  christos #endif
    249       1.1    jruoho 
    250       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteLock
    251       1.1    jruoho void
    252       1.1    jruoho AcpiOsDeleteLock (
    253       1.1    jruoho     ACPI_SPINLOCK           Handle);
    254       1.5  christos #endif
    255       1.1    jruoho 
    256       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireLock
    257       1.1    jruoho ACPI_CPU_FLAGS
    258       1.1    jruoho AcpiOsAcquireLock (
    259       1.1    jruoho     ACPI_SPINLOCK           Handle);
    260       1.5  christos #endif
    261       1.1    jruoho 
    262       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseLock
    263       1.1    jruoho void
    264       1.1    jruoho AcpiOsReleaseLock (
    265       1.1    jruoho     ACPI_SPINLOCK           Handle,
    266       1.1    jruoho     ACPI_CPU_FLAGS          Flags);
    267       1.5  christos #endif
    268       1.1    jruoho 
    269       1.1    jruoho 
    270       1.1    jruoho /*
    271       1.1    jruoho  * Semaphore primitives
    272       1.1    jruoho  */
    273       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateSemaphore
    274       1.1    jruoho ACPI_STATUS
    275       1.1    jruoho AcpiOsCreateSemaphore (
    276       1.1    jruoho     UINT32                  MaxUnits,
    277       1.1    jruoho     UINT32                  InitialUnits,
    278       1.1    jruoho     ACPI_SEMAPHORE          *OutHandle);
    279       1.5  christos #endif
    280       1.1    jruoho 
    281       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteSemaphore
    282       1.1    jruoho ACPI_STATUS
    283       1.1    jruoho AcpiOsDeleteSemaphore (
    284       1.1    jruoho     ACPI_SEMAPHORE          Handle);
    285       1.5  christos #endif
    286       1.1    jruoho 
    287       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitSemaphore
    288       1.1    jruoho ACPI_STATUS
    289       1.1    jruoho AcpiOsWaitSemaphore (
    290       1.1    jruoho     ACPI_SEMAPHORE          Handle,
    291       1.1    jruoho     UINT32                  Units,
    292       1.1    jruoho     UINT16                  Timeout);
    293       1.5  christos #endif
    294       1.1    jruoho 
    295       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignalSemaphore
    296       1.1    jruoho ACPI_STATUS
    297       1.1    jruoho AcpiOsSignalSemaphore (
    298       1.1    jruoho     ACPI_SEMAPHORE          Handle,
    299       1.1    jruoho     UINT32                  Units);
    300       1.5  christos #endif
    301       1.1    jruoho 
    302       1.1    jruoho 
    303       1.1    jruoho /*
    304       1.1    jruoho  * Mutex primitives. May be configured to use semaphores instead via
    305       1.1    jruoho  * ACPI_MUTEX_TYPE (see platform/acenv.h)
    306       1.1    jruoho  */
    307       1.1    jruoho #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
    308       1.1    jruoho 
    309       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateMutex
    310       1.1    jruoho ACPI_STATUS
    311       1.1    jruoho AcpiOsCreateMutex (
    312       1.1    jruoho     ACPI_MUTEX              *OutHandle);
    313       1.5  christos #endif
    314       1.1    jruoho 
    315       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteMutex
    316       1.1    jruoho void
    317       1.1    jruoho AcpiOsDeleteMutex (
    318       1.1    jruoho     ACPI_MUTEX              Handle);
    319       1.5  christos #endif
    320       1.1    jruoho 
    321       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireMutex
    322       1.1    jruoho ACPI_STATUS
    323       1.1    jruoho AcpiOsAcquireMutex (
    324       1.1    jruoho     ACPI_MUTEX              Handle,
    325       1.1    jruoho     UINT16                  Timeout);
    326       1.5  christos #endif
    327       1.1    jruoho 
    328       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseMutex
    329       1.1    jruoho void
    330       1.1    jruoho AcpiOsReleaseMutex (
    331       1.1    jruoho     ACPI_MUTEX              Handle);
    332       1.1    jruoho #endif
    333       1.1    jruoho 
    334       1.5  christos #endif
    335       1.5  christos 
    336       1.1    jruoho 
    337       1.1    jruoho /*
    338       1.1    jruoho  * Memory allocation and mapping
    339       1.1    jruoho  */
    340       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocate
    341       1.1    jruoho void *
    342       1.1    jruoho AcpiOsAllocate (
    343       1.1    jruoho     ACPI_SIZE               Size);
    344       1.5  christos #endif
    345       1.5  christos 
    346       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocateZeroed
    347       1.5  christos void *
    348       1.5  christos AcpiOsAllocateZeroed (
    349       1.5  christos     ACPI_SIZE               Size);
    350       1.5  christos #endif
    351       1.1    jruoho 
    352       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsFree
    353       1.1    jruoho void
    354       1.1    jruoho AcpiOsFree (
    355       1.1    jruoho     void *                  Memory);
    356       1.5  christos #endif
    357       1.1    jruoho 
    358       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsMapMemory
    359       1.1    jruoho void *
    360       1.1    jruoho AcpiOsMapMemory (
    361       1.1    jruoho     ACPI_PHYSICAL_ADDRESS   Where,
    362       1.1    jruoho     ACPI_SIZE               Length);
    363       1.5  christos #endif
    364       1.1    jruoho 
    365       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsUnmapMemory
    366       1.1    jruoho void
    367       1.1    jruoho AcpiOsUnmapMemory (
    368       1.1    jruoho     void                    *LogicalAddress,
    369       1.1    jruoho     ACPI_SIZE               Size);
    370       1.5  christos #endif
    371       1.1    jruoho 
    372       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetPhysicalAddress
    373       1.1    jruoho ACPI_STATUS
    374       1.1    jruoho AcpiOsGetPhysicalAddress (
    375       1.1    jruoho     void                    *LogicalAddress,
    376       1.1    jruoho     ACPI_PHYSICAL_ADDRESS   *PhysicalAddress);
    377       1.5  christos #endif
    378       1.1    jruoho 
    379       1.1    jruoho 
    380       1.1    jruoho /*
    381       1.1    jruoho  * Memory/Object Cache
    382       1.1    jruoho  */
    383       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateCache
    384       1.1    jruoho ACPI_STATUS
    385       1.1    jruoho AcpiOsCreateCache (
    386       1.2    jruoho     const char              *CacheName,
    387       1.1    jruoho     UINT16                  ObjectSize,
    388       1.1    jruoho     UINT16                  MaxDepth,
    389       1.1    jruoho     ACPI_CACHE_T            **ReturnCache);
    390       1.5  christos #endif
    391       1.1    jruoho 
    392       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteCache
    393       1.1    jruoho ACPI_STATUS
    394       1.1    jruoho AcpiOsDeleteCache (
    395       1.1    jruoho     ACPI_CACHE_T            *Cache);
    396       1.5  christos #endif
    397       1.1    jruoho 
    398       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPurgeCache
    399       1.1    jruoho ACPI_STATUS
    400       1.1    jruoho AcpiOsPurgeCache (
    401       1.1    jruoho     ACPI_CACHE_T            *Cache);
    402       1.5  christos #endif
    403       1.1    jruoho 
    404       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireObject
    405       1.1    jruoho void *
    406       1.1    jruoho AcpiOsAcquireObject (
    407       1.1    jruoho     ACPI_CACHE_T            *Cache);
    408       1.5  christos #endif
    409       1.1    jruoho 
    410       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseObject
    411       1.1    jruoho ACPI_STATUS
    412       1.1    jruoho AcpiOsReleaseObject (
    413       1.1    jruoho     ACPI_CACHE_T            *Cache,
    414       1.1    jruoho     void                    *Object);
    415       1.5  christos #endif
    416       1.1    jruoho 
    417       1.1    jruoho 
    418       1.1    jruoho /*
    419       1.1    jruoho  * Interrupt handlers
    420       1.1    jruoho  */
    421       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInstallInterruptHandler
    422       1.1    jruoho ACPI_STATUS
    423       1.1    jruoho AcpiOsInstallInterruptHandler (
    424       1.1    jruoho     UINT32                  InterruptNumber,
    425       1.1    jruoho     ACPI_OSD_HANDLER        ServiceRoutine,
    426       1.1    jruoho     void                    *Context);
    427       1.5  christos #endif
    428       1.1    jruoho 
    429       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRemoveInterruptHandler
    430       1.1    jruoho ACPI_STATUS
    431       1.1    jruoho AcpiOsRemoveInterruptHandler (
    432       1.1    jruoho     UINT32                  InterruptNumber,
    433       1.1    jruoho     ACPI_OSD_HANDLER        ServiceRoutine);
    434       1.5  christos #endif
    435       1.1    jruoho 
    436       1.1    jruoho 
    437       1.1    jruoho /*
    438       1.1    jruoho  * Threads and Scheduling
    439       1.1    jruoho  */
    440       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetThreadId
    441       1.1    jruoho ACPI_THREAD_ID
    442       1.1    jruoho AcpiOsGetThreadId (
    443       1.1    jruoho     void);
    444       1.5  christos #endif
    445       1.1    jruoho 
    446       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsExecute
    447       1.1    jruoho ACPI_STATUS
    448       1.1    jruoho AcpiOsExecute (
    449       1.1    jruoho     ACPI_EXECUTE_TYPE       Type,
    450       1.1    jruoho     ACPI_OSD_EXEC_CALLBACK  Function,
    451       1.1    jruoho     void                    *Context);
    452       1.5  christos #endif
    453       1.1    jruoho 
    454       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitEventsComplete
    455       1.1    jruoho void
    456       1.1    jruoho AcpiOsWaitEventsComplete (
    457       1.5  christos     void);
    458       1.5  christos #endif
    459       1.1    jruoho 
    460       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSleep
    461       1.1    jruoho void
    462       1.1    jruoho AcpiOsSleep (
    463       1.1    jruoho     UINT64                  Milliseconds);
    464       1.5  christos #endif
    465       1.1    jruoho 
    466       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsStall
    467       1.1    jruoho void
    468       1.1    jruoho AcpiOsStall (
    469       1.1    jruoho     UINT32                  Microseconds);
    470       1.5  christos #endif
    471       1.1    jruoho 
    472       1.1    jruoho 
    473       1.1    jruoho /*
    474       1.1    jruoho  * Platform and hardware-independent I/O interfaces
    475       1.1    jruoho  */
    476       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPort
    477       1.1    jruoho ACPI_STATUS
    478       1.1    jruoho AcpiOsReadPort (
    479       1.1    jruoho     ACPI_IO_ADDRESS         Address,
    480       1.1    jruoho     UINT32                  *Value,
    481       1.1    jruoho     UINT32                  Width);
    482       1.5  christos #endif
    483       1.1    jruoho 
    484       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePort
    485       1.1    jruoho ACPI_STATUS
    486       1.1    jruoho AcpiOsWritePort (
    487       1.1    jruoho     ACPI_IO_ADDRESS         Address,
    488       1.1    jruoho     UINT32                  Value,
    489       1.1    jruoho     UINT32                  Width);
    490       1.5  christos #endif
    491       1.1    jruoho 
    492       1.1    jruoho 
    493       1.1    jruoho /*
    494       1.1    jruoho  * Platform and hardware-independent physical memory interfaces
    495       1.1    jruoho  */
    496       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadMemory
    497       1.1    jruoho ACPI_STATUS
    498       1.1    jruoho AcpiOsReadMemory (
    499       1.1    jruoho     ACPI_PHYSICAL_ADDRESS   Address,
    500       1.5  christos     UINT64                  *Value,
    501       1.1    jruoho     UINT32                  Width);
    502       1.5  christos #endif
    503       1.1    jruoho 
    504       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteMemory
    505       1.1    jruoho ACPI_STATUS
    506       1.1    jruoho AcpiOsWriteMemory (
    507       1.1    jruoho     ACPI_PHYSICAL_ADDRESS   Address,
    508       1.5  christos     UINT64                  Value,
    509       1.1    jruoho     UINT32                  Width);
    510       1.5  christos #endif
    511       1.1    jruoho 
    512       1.1    jruoho 
    513       1.1    jruoho /*
    514       1.1    jruoho  * Platform and hardware-independent PCI configuration space access
    515       1.1    jruoho  * Note: Can't use "Register" as a parameter, changed to "Reg" --
    516       1.1    jruoho  * certain compilers complain.
    517       1.1    jruoho  */
    518       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPciConfiguration
    519       1.1    jruoho ACPI_STATUS
    520       1.1    jruoho AcpiOsReadPciConfiguration (
    521       1.1    jruoho     ACPI_PCI_ID             *PciId,
    522       1.1    jruoho     UINT32                  Reg,
    523       1.3    jruoho     UINT64                  *Value,
    524       1.1    jruoho     UINT32                  Width);
    525       1.5  christos #endif
    526       1.1    jruoho 
    527       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePciConfiguration
    528       1.1    jruoho ACPI_STATUS
    529       1.1    jruoho AcpiOsWritePciConfiguration (
    530       1.1    jruoho     ACPI_PCI_ID             *PciId,
    531       1.1    jruoho     UINT32                  Reg,
    532       1.1    jruoho     UINT64                  Value,
    533       1.1    jruoho     UINT32                  Width);
    534       1.5  christos #endif
    535       1.1    jruoho 
    536       1.1    jruoho 
    537       1.1    jruoho /*
    538       1.1    jruoho  * Miscellaneous
    539       1.1    jruoho  */
    540       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadable
    541       1.1    jruoho BOOLEAN
    542       1.1    jruoho AcpiOsReadable (
    543       1.1    jruoho     void                    *Pointer,
    544       1.1    jruoho     ACPI_SIZE               Length);
    545       1.5  christos #endif
    546       1.1    jruoho 
    547       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritable
    548       1.1    jruoho BOOLEAN
    549       1.1    jruoho AcpiOsWritable (
    550       1.1    jruoho     void                    *Pointer,
    551       1.1    jruoho     ACPI_SIZE               Length);
    552       1.5  christos #endif
    553       1.1    jruoho 
    554       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTimer
    555       1.1    jruoho UINT64
    556       1.1    jruoho AcpiOsGetTimer (
    557       1.1    jruoho     void);
    558       1.5  christos #endif
    559       1.1    jruoho 
    560       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignal
    561       1.1    jruoho ACPI_STATUS
    562       1.1    jruoho AcpiOsSignal (
    563       1.1    jruoho     UINT32                  Function,
    564       1.1    jruoho     void                    *Info);
    565       1.5  christos #endif
    566       1.1    jruoho 
    567      1.11  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsEnterSleep
    568      1.11  christos ACPI_STATUS
    569      1.11  christos AcpiOsEnterSleep (
    570      1.11  christos     UINT8                   SleepState,
    571      1.11  christos     UINT32                  RegaValue,
    572      1.11  christos     UINT32                  RegbValue);
    573      1.11  christos #endif
    574      1.11  christos 
    575       1.1    jruoho 
    576       1.1    jruoho /*
    577       1.1    jruoho  * Debug print routines
    578       1.1    jruoho  */
    579       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPrintf
    580      1.14  christos ACPI_PRINTF_LIKE (1)
    581       1.1    jruoho void ACPI_INTERNAL_VAR_XFACE
    582       1.1    jruoho AcpiOsPrintf (
    583       1.1    jruoho     const char              *Format,
    584       1.1    jruoho     ...);
    585       1.5  christos #endif
    586       1.1    jruoho 
    587       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsVprintf
    588       1.1    jruoho void
    589       1.1    jruoho AcpiOsVprintf (
    590       1.1    jruoho     const char              *Format,
    591       1.1    jruoho     va_list                 Args);
    592       1.5  christos #endif
    593       1.1    jruoho 
    594       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRedirectOutput
    595       1.1    jruoho void
    596       1.1    jruoho AcpiOsRedirectOutput (
    597       1.1    jruoho     void                    *Destination);
    598       1.5  christos #endif
    599       1.1    jruoho 
    600       1.1    jruoho 
    601       1.1    jruoho /*
    602      1.11  christos  * Debug IO
    603       1.1    jruoho  */
    604       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetLine
    605       1.4    jruoho ACPI_STATUS
    606       1.1    jruoho AcpiOsGetLine (
    607       1.4    jruoho     char                    *Buffer,
    608       1.4    jruoho     UINT32                  BufferLength,
    609       1.4    jruoho     UINT32                  *BytesRead);
    610       1.5  christos #endif
    611       1.5  christos 
    612      1.11  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitializeDebugger
    613      1.11  christos ACPI_STATUS
    614      1.11  christos AcpiOsInitializeDebugger (
    615      1.11  christos     void);
    616      1.11  christos #endif
    617      1.11  christos 
    618      1.11  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminateDebugger
    619      1.11  christos void
    620      1.11  christos AcpiOsTerminateDebugger (
    621      1.11  christos     void);
    622      1.11  christos #endif
    623      1.11  christos 
    624      1.11  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitCommandReady
    625      1.11  christos ACPI_STATUS
    626      1.11  christos AcpiOsWaitCommandReady (
    627      1.11  christos     void);
    628      1.11  christos #endif
    629      1.11  christos 
    630      1.11  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsNotifyCommandComplete
    631      1.11  christos ACPI_STATUS
    632      1.11  christos AcpiOsNotifyCommandComplete (
    633      1.11  christos     void);
    634      1.11  christos #endif
    635      1.11  christos 
    636      1.10  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
    637      1.10  christos void
    638      1.10  christos AcpiOsTracePoint (
    639      1.10  christos     ACPI_TRACE_EVENT_TYPE   Type,
    640      1.10  christos     BOOLEAN                 Begin,
    641      1.10  christos     UINT8                   *Aml,
    642      1.10  christos     char                    *Pathname);
    643      1.10  christos #endif
    644      1.10  christos 
    645       1.5  christos 
    646       1.5  christos /*
    647       1.5  christos  * Obtain ACPI table(s)
    648       1.5  christos  */
    649       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByName
    650       1.5  christos ACPI_STATUS
    651       1.5  christos AcpiOsGetTableByName (
    652       1.5  christos     char                    *Signature,
    653       1.5  christos     UINT32                  Instance,
    654       1.5  christos     ACPI_TABLE_HEADER       **Table,
    655       1.5  christos     ACPI_PHYSICAL_ADDRESS   *Address);
    656       1.5  christos #endif
    657       1.5  christos 
    658       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByIndex
    659       1.5  christos ACPI_STATUS
    660       1.5  christos AcpiOsGetTableByIndex (
    661       1.5  christos     UINT32                  Index,
    662       1.5  christos     ACPI_TABLE_HEADER       **Table,
    663       1.5  christos     UINT32                  *Instance,
    664       1.5  christos     ACPI_PHYSICAL_ADDRESS   *Address);
    665       1.5  christos #endif
    666       1.5  christos 
    667       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByAddress
    668       1.5  christos ACPI_STATUS
    669       1.5  christos AcpiOsGetTableByAddress (
    670       1.5  christos     ACPI_PHYSICAL_ADDRESS   Address,
    671       1.5  christos     ACPI_TABLE_HEADER       **Table);
    672       1.5  christos #endif
    673       1.1    jruoho 
    674       1.1    jruoho 
    675       1.1    jruoho /*
    676       1.1    jruoho  * Directory manipulation
    677       1.1    jruoho  */
    678       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenDirectory
    679       1.1    jruoho void *
    680       1.1    jruoho AcpiOsOpenDirectory (
    681       1.1    jruoho     char                    *Pathname,
    682       1.1    jruoho     char                    *WildcardSpec,
    683       1.1    jruoho     char                    RequestedFileType);
    684       1.5  christos #endif
    685       1.1    jruoho 
    686       1.1    jruoho /* RequesteFileType values */
    687       1.1    jruoho 
    688       1.1    jruoho #define REQUEST_FILE_ONLY                   0
    689       1.1    jruoho #define REQUEST_DIR_ONLY                    1
    690       1.1    jruoho 
    691       1.1    jruoho 
    692       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetNextFilename
    693       1.1    jruoho char *
    694       1.1    jruoho AcpiOsGetNextFilename (
    695       1.1    jruoho     void                    *DirHandle);
    696       1.5  christos #endif
    697       1.1    jruoho 
    698       1.5  christos #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseDirectory
    699       1.1    jruoho void
    700       1.1    jruoho AcpiOsCloseDirectory (
    701       1.1    jruoho     void                    *DirHandle);
    702       1.5  christos #endif
    703       1.1    jruoho 
    704       1.1    jruoho 
    705       1.1    jruoho #endif /* __ACPIOSXF_H__ */
    706