]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/include/actables.h
Import ACPICA 20140214.
[FreeBSD/FreeBSD.git] / source / include / actables.h
1 /******************************************************************************
2  *
3  * Name: actables.h - ACPI table management
4  *
5  *****************************************************************************/
6
7 /*
8  * Copyright (C) 2000 - 2014, Intel Corp.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions, and the following disclaimer,
16  *    without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  *    substantially similar to the "NO WARRANTY" disclaimer below
19  *    ("Disclaimer") and any redistribution must be conditioned upon
20  *    including a substantially similar Disclaimer requirement for further
21  *    binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  *    of any contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43
44 #ifndef __ACTABLES_H__
45 #define __ACTABLES_H__
46
47
48 #pragma pack(push) /* Set default struct packing */
49
50 ACPI_STATUS
51 AcpiAllocateRootTable (
52     UINT32                  InitialTableCount);
53
54 /*
55  * tbxfroot - Root pointer utilities
56  */
57 ACPI_STATUS
58 AcpiTbValidateRsdp (
59     ACPI_TABLE_RSDP         *Rsdp);
60
61 UINT8 *
62 AcpiTbScanMemoryForRsdp (
63     UINT8                   *StartAddress,
64     UINT32                  Length);
65
66
67 /*
68  * tbfadt - FADT parse/convert/validate
69  */
70 void
71 AcpiTbParseFadt (
72     UINT32                  TableIndex);
73
74 void
75 AcpiTbCreateLocalFadt (
76     ACPI_TABLE_HEADER       *Table,
77     UINT32                  Length);
78
79
80 /*
81  * tbfind - find ACPI table
82  */
83 ACPI_STATUS
84 AcpiTbFindTable (
85     char                    *Signature,
86     char                    *OemId,
87     char                    *OemTableId,
88     UINT32                  *TableIndex);
89
90
91 /*
92  * tbinstal - Table removal and deletion
93  */
94 ACPI_STATUS
95 AcpiTbResizeRootTableList (
96     void);
97
98 ACPI_STATUS
99 AcpiTbVerifyTable (
100     ACPI_TABLE_DESC         *TableDesc);
101
102 ACPI_TABLE_HEADER *
103 AcpiTbTableOverride (
104     ACPI_TABLE_HEADER       *TableHeader,
105     ACPI_TABLE_DESC         *TableDesc);
106
107 ACPI_STATUS
108 AcpiTbAddTable (
109     ACPI_TABLE_DESC         *TableDesc,
110     UINT32                  *TableIndex);
111
112 ACPI_STATUS
113 AcpiTbStoreTable (
114     ACPI_PHYSICAL_ADDRESS   Address,
115     ACPI_TABLE_HEADER       *Table,
116     UINT32                  Length,
117     UINT8                   Flags,
118     UINT32                  *TableIndex);
119
120 void
121 AcpiTbDeleteTable (
122     ACPI_TABLE_DESC        *TableDesc);
123
124 void
125 AcpiTbTerminate (
126     void);
127
128 ACPI_STATUS
129 AcpiTbDeleteNamespaceByOwner (
130     UINT32                  TableIndex);
131
132 ACPI_STATUS
133 AcpiTbAllocateOwnerId (
134     UINT32                  TableIndex);
135
136 ACPI_STATUS
137 AcpiTbReleaseOwnerId (
138     UINT32                  TableIndex);
139
140 ACPI_STATUS
141 AcpiTbGetOwnerId (
142     UINT32                  TableIndex,
143     ACPI_OWNER_ID           *OwnerId);
144
145 BOOLEAN
146 AcpiTbIsTableLoaded (
147     UINT32                  TableIndex);
148
149 void
150 AcpiTbSetTableLoadedFlag (
151     UINT32                  TableIndex,
152     BOOLEAN                 IsLoaded);
153
154
155 /*
156  * tbutils - table manager utilities
157  */
158 ACPI_STATUS
159 AcpiTbInitializeFacs (
160     void);
161
162 BOOLEAN
163 AcpiTbTablesLoaded (
164     void);
165
166 void
167 AcpiTbPrintTableHeader(
168     ACPI_PHYSICAL_ADDRESS   Address,
169     ACPI_TABLE_HEADER       *Header);
170
171 UINT8
172 AcpiTbChecksum (
173     UINT8                   *Buffer,
174     UINT32                  Length);
175
176 ACPI_STATUS
177 AcpiTbVerifyChecksum (
178     ACPI_TABLE_HEADER       *Table,
179     UINT32                  Length);
180
181 void
182 AcpiTbCheckDsdtHeader (
183     void);
184
185 ACPI_TABLE_HEADER *
186 AcpiTbCopyDsdt (
187     UINT32                  TableIndex);
188
189 void
190 AcpiTbInstallTable (
191     ACPI_PHYSICAL_ADDRESS   Address,
192     char                    *Signature,
193     UINT32                  TableIndex);
194
195 ACPI_STATUS
196 AcpiTbParseRootTable (
197     ACPI_PHYSICAL_ADDRESS   RsdpAddress);
198
199 #pragma pack(pop) /* Restore original struct packing */
200
201 #endif /* __ACTABLES_H__ */