Home | History | Annotate | Line # | Download | only in include
actables.h revision 1.1.1.4
      1      1.1    jruoho /******************************************************************************
      2      1.1    jruoho  *
      3      1.1    jruoho  * Name: actables.h - ACPI table management
      4      1.1    jruoho  *
      5      1.1    jruoho  *****************************************************************************/
      6      1.1    jruoho 
      7  1.1.1.2    jruoho /*
      8  1.1.1.4  christos  * Copyright (C) 2000 - 2014, Intel Corp.
      9      1.1    jruoho  * All rights reserved.
     10      1.1    jruoho  *
     11  1.1.1.2    jruoho  * Redistribution and use in source and binary forms, with or without
     12  1.1.1.2    jruoho  * modification, are permitted provided that the following conditions
     13  1.1.1.2    jruoho  * are met:
     14  1.1.1.2    jruoho  * 1. Redistributions of source code must retain the above copyright
     15  1.1.1.2    jruoho  *    notice, this list of conditions, and the following disclaimer,
     16  1.1.1.2    jruoho  *    without modification.
     17  1.1.1.2    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18  1.1.1.2    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     19  1.1.1.2    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     20  1.1.1.2    jruoho  *    including a substantially similar Disclaimer requirement for further
     21  1.1.1.2    jruoho  *    binary redistribution.
     22  1.1.1.2    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     23  1.1.1.2    jruoho  *    of any contributors may be used to endorse or promote products derived
     24  1.1.1.2    jruoho  *    from this software without specific prior written permission.
     25  1.1.1.2    jruoho  *
     26  1.1.1.2    jruoho  * Alternatively, this software may be distributed under the terms of the
     27  1.1.1.2    jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     28  1.1.1.2    jruoho  * Software Foundation.
     29  1.1.1.2    jruoho  *
     30  1.1.1.2    jruoho  * NO WARRANTY
     31  1.1.1.2    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32  1.1.1.2    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33  1.1.1.2    jruoho  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34  1.1.1.2    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35  1.1.1.2    jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36  1.1.1.2    jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37  1.1.1.2    jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38  1.1.1.2    jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39  1.1.1.2    jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40  1.1.1.2    jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41  1.1.1.2    jruoho  * POSSIBILITY OF SUCH DAMAGES.
     42  1.1.1.2    jruoho  */
     43      1.1    jruoho 
     44      1.1    jruoho #ifndef __ACTABLES_H__
     45      1.1    jruoho #define __ACTABLES_H__
     46      1.1    jruoho 
     47      1.1    jruoho 
     48      1.1    jruoho ACPI_STATUS
     49      1.1    jruoho AcpiAllocateRootTable (
     50      1.1    jruoho     UINT32                  InitialTableCount);
     51      1.1    jruoho 
     52      1.1    jruoho /*
     53  1.1.1.3  christos  * tbxfroot - Root pointer utilities
     54  1.1.1.3  christos  */
     55  1.1.1.4  christos UINT32
     56  1.1.1.4  christos AcpiTbGetRsdpLength (
     57  1.1.1.4  christos     ACPI_TABLE_RSDP         *Rsdp);
     58  1.1.1.4  christos 
     59  1.1.1.3  christos ACPI_STATUS
     60  1.1.1.3  christos AcpiTbValidateRsdp (
     61  1.1.1.3  christos     ACPI_TABLE_RSDP         *Rsdp);
     62  1.1.1.3  christos 
     63  1.1.1.3  christos UINT8 *
     64  1.1.1.3  christos AcpiTbScanMemoryForRsdp (
     65  1.1.1.3  christos     UINT8                   *StartAddress,
     66  1.1.1.3  christos     UINT32                  Length);
     67  1.1.1.3  christos 
     68  1.1.1.3  christos 
     69  1.1.1.3  christos /*
     70  1.1.1.4  christos  * tbdata - table data structure management
     71  1.1.1.4  christos  */
     72  1.1.1.4  christos ACPI_STATUS
     73  1.1.1.4  christos AcpiTbGetNextRootIndex (
     74  1.1.1.4  christos     UINT32                  *TableIndex);
     75  1.1.1.4  christos 
     76  1.1.1.4  christos void
     77  1.1.1.4  christos AcpiTbInitTableDescriptor (
     78  1.1.1.4  christos     ACPI_TABLE_DESC         *TableDesc,
     79  1.1.1.4  christos     ACPI_PHYSICAL_ADDRESS   Address,
     80  1.1.1.4  christos     UINT8                   Flags,
     81  1.1.1.4  christos     ACPI_TABLE_HEADER       *Table);
     82  1.1.1.4  christos 
     83  1.1.1.4  christos ACPI_STATUS
     84  1.1.1.4  christos AcpiTbAcquireTempTable (
     85  1.1.1.4  christos     ACPI_TABLE_DESC         *TableDesc,
     86  1.1.1.4  christos     ACPI_PHYSICAL_ADDRESS   Address,
     87  1.1.1.4  christos     UINT8                   Flags);
     88  1.1.1.4  christos 
     89  1.1.1.4  christos void
     90  1.1.1.4  christos AcpiTbReleaseTempTable (
     91  1.1.1.4  christos     ACPI_TABLE_DESC         *TableDesc);
     92  1.1.1.4  christos 
     93  1.1.1.4  christos ACPI_STATUS
     94  1.1.1.4  christos AcpiTbValidateTempTable (
     95  1.1.1.4  christos     ACPI_TABLE_DESC         *TableDesc);
     96  1.1.1.4  christos 
     97  1.1.1.4  christos ACPI_STATUS
     98  1.1.1.4  christos AcpiTbVerifyTempTable (
     99  1.1.1.4  christos     ACPI_TABLE_DESC         *TableDesc,
    100  1.1.1.4  christos     char                    *Signature);
    101  1.1.1.4  christos 
    102  1.1.1.4  christos BOOLEAN
    103  1.1.1.4  christos AcpiTbIsTableLoaded (
    104  1.1.1.4  christos     UINT32                  TableIndex);
    105  1.1.1.4  christos 
    106  1.1.1.4  christos void
    107  1.1.1.4  christos AcpiTbSetTableLoadedFlag (
    108  1.1.1.4  christos     UINT32                  TableIndex,
    109  1.1.1.4  christos     BOOLEAN                 IsLoaded);
    110  1.1.1.4  christos 
    111  1.1.1.4  christos 
    112  1.1.1.4  christos /*
    113      1.1    jruoho  * tbfadt - FADT parse/convert/validate
    114      1.1    jruoho  */
    115      1.1    jruoho void
    116      1.1    jruoho AcpiTbParseFadt (
    117      1.1    jruoho     UINT32                  TableIndex);
    118      1.1    jruoho 
    119      1.1    jruoho void
    120      1.1    jruoho AcpiTbCreateLocalFadt (
    121      1.1    jruoho     ACPI_TABLE_HEADER       *Table,
    122      1.1    jruoho     UINT32                  Length);
    123      1.1    jruoho 
    124      1.1    jruoho 
    125      1.1    jruoho /*
    126      1.1    jruoho  * tbfind - find ACPI table
    127      1.1    jruoho  */
    128      1.1    jruoho ACPI_STATUS
    129      1.1    jruoho AcpiTbFindTable (
    130      1.1    jruoho     char                    *Signature,
    131      1.1    jruoho     char                    *OemId,
    132      1.1    jruoho     char                    *OemTableId,
    133      1.1    jruoho     UINT32                  *TableIndex);
    134      1.1    jruoho 
    135      1.1    jruoho 
    136      1.1    jruoho /*
    137      1.1    jruoho  * tbinstal - Table removal and deletion
    138      1.1    jruoho  */
    139      1.1    jruoho ACPI_STATUS
    140      1.1    jruoho AcpiTbResizeRootTableList (
    141      1.1    jruoho     void);
    142      1.1    jruoho 
    143      1.1    jruoho ACPI_STATUS
    144  1.1.1.4  christos AcpiTbValidateTable (
    145      1.1    jruoho     ACPI_TABLE_DESC         *TableDesc);
    146      1.1    jruoho 
    147  1.1.1.4  christos void
    148  1.1.1.4  christos AcpiTbInvalidateTable (
    149  1.1.1.3  christos     ACPI_TABLE_DESC         *TableDesc);
    150  1.1.1.3  christos 
    151  1.1.1.4  christos void
    152  1.1.1.4  christos AcpiTbOverrideTable (
    153  1.1.1.4  christos     ACPI_TABLE_DESC         *OldTableDesc);
    154  1.1.1.4  christos 
    155      1.1    jruoho ACPI_STATUS
    156  1.1.1.4  christos AcpiTbAcquireTable (
    157      1.1    jruoho     ACPI_TABLE_DESC         *TableDesc,
    158  1.1.1.4  christos     ACPI_TABLE_HEADER       **TablePtr,
    159  1.1.1.4  christos     UINT32                  *TableLength,
    160  1.1.1.4  christos     UINT8                   *TableFlags);
    161  1.1.1.4  christos 
    162  1.1.1.4  christos void
    163  1.1.1.4  christos AcpiTbReleaseTable (
    164  1.1.1.4  christos     ACPI_TABLE_HEADER       *Table,
    165  1.1.1.4  christos     UINT32                  TableLength,
    166  1.1.1.4  christos     UINT8                   TableFlags);
    167  1.1.1.4  christos 
    168  1.1.1.4  christos ACPI_STATUS
    169  1.1.1.4  christos AcpiTbInstallStandardTable (
    170  1.1.1.4  christos     ACPI_PHYSICAL_ADDRESS   Address,
    171  1.1.1.4  christos     UINT8                   Flags,
    172  1.1.1.4  christos     BOOLEAN                 Reload,
    173  1.1.1.4  christos     BOOLEAN                 Override,
    174      1.1    jruoho     UINT32                  *TableIndex);
    175      1.1    jruoho 
    176      1.1    jruoho ACPI_STATUS
    177      1.1    jruoho AcpiTbStoreTable (
    178      1.1    jruoho     ACPI_PHYSICAL_ADDRESS   Address,
    179      1.1    jruoho     ACPI_TABLE_HEADER       *Table,
    180      1.1    jruoho     UINT32                  Length,
    181      1.1    jruoho     UINT8                   Flags,
    182      1.1    jruoho     UINT32                  *TableIndex);
    183      1.1    jruoho 
    184      1.1    jruoho void
    185  1.1.1.4  christos AcpiTbUninstallTable (
    186      1.1    jruoho     ACPI_TABLE_DESC        *TableDesc);
    187      1.1    jruoho 
    188      1.1    jruoho void
    189      1.1    jruoho AcpiTbTerminate (
    190      1.1    jruoho     void);
    191      1.1    jruoho 
    192      1.1    jruoho ACPI_STATUS
    193      1.1    jruoho AcpiTbDeleteNamespaceByOwner (
    194      1.1    jruoho     UINT32                  TableIndex);
    195      1.1    jruoho 
    196      1.1    jruoho ACPI_STATUS
    197      1.1    jruoho AcpiTbAllocateOwnerId (
    198      1.1    jruoho     UINT32                  TableIndex);
    199      1.1    jruoho 
    200      1.1    jruoho ACPI_STATUS
    201      1.1    jruoho AcpiTbReleaseOwnerId (
    202      1.1    jruoho     UINT32                  TableIndex);
    203      1.1    jruoho 
    204      1.1    jruoho ACPI_STATUS
    205      1.1    jruoho AcpiTbGetOwnerId (
    206      1.1    jruoho     UINT32                  TableIndex,
    207      1.1    jruoho     ACPI_OWNER_ID           *OwnerId);
    208      1.1    jruoho 
    209      1.1    jruoho 
    210      1.1    jruoho /*
    211      1.1    jruoho  * tbutils - table manager utilities
    212      1.1    jruoho  */
    213      1.1    jruoho ACPI_STATUS
    214      1.1    jruoho AcpiTbInitializeFacs (
    215      1.1    jruoho     void);
    216      1.1    jruoho 
    217      1.1    jruoho BOOLEAN
    218      1.1    jruoho AcpiTbTablesLoaded (
    219      1.1    jruoho     void);
    220      1.1    jruoho 
    221      1.1    jruoho void
    222      1.1    jruoho AcpiTbPrintTableHeader(
    223      1.1    jruoho     ACPI_PHYSICAL_ADDRESS   Address,
    224      1.1    jruoho     ACPI_TABLE_HEADER       *Header);
    225      1.1    jruoho 
    226      1.1    jruoho UINT8
    227      1.1    jruoho AcpiTbChecksum (
    228      1.1    jruoho     UINT8                   *Buffer,
    229      1.1    jruoho     UINT32                  Length);
    230      1.1    jruoho 
    231      1.1    jruoho ACPI_STATUS
    232      1.1    jruoho AcpiTbVerifyChecksum (
    233      1.1    jruoho     ACPI_TABLE_HEADER       *Table,
    234      1.1    jruoho     UINT32                  Length);
    235      1.1    jruoho 
    236      1.1    jruoho void
    237      1.1    jruoho AcpiTbCheckDsdtHeader (
    238      1.1    jruoho     void);
    239      1.1    jruoho 
    240      1.1    jruoho ACPI_TABLE_HEADER *
    241      1.1    jruoho AcpiTbCopyDsdt (
    242      1.1    jruoho     UINT32                  TableIndex);
    243      1.1    jruoho 
    244      1.1    jruoho void
    245  1.1.1.4  christos AcpiTbInstallTableWithOverride (
    246  1.1.1.4  christos     UINT32                  TableIndex,
    247  1.1.1.4  christos     ACPI_TABLE_DESC         *NewTableDesc,
    248  1.1.1.4  christos     BOOLEAN                 Override);
    249  1.1.1.4  christos 
    250  1.1.1.4  christos ACPI_STATUS
    251  1.1.1.4  christos AcpiTbInstallFixedTable (
    252      1.1    jruoho     ACPI_PHYSICAL_ADDRESS   Address,
    253      1.1    jruoho     char                    *Signature,
    254      1.1    jruoho     UINT32                  TableIndex);
    255      1.1    jruoho 
    256      1.1    jruoho ACPI_STATUS
    257      1.1    jruoho AcpiTbParseRootTable (
    258      1.1    jruoho     ACPI_PHYSICAL_ADDRESS   RsdpAddress);
    259      1.1    jruoho 
    260      1.1    jruoho #endif /* __ACTABLES_H__ */
    261