xref: /titanic_52/usr/src/uts/intel/sys/acpi/actables.h (revision d14abf155341d55053c76eeec58b787a456b753b)
1 /******************************************************************************
2  *
3  * Name: actables.h - ACPI table management
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2011, 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 ACPI_STATUS
49 AcpiAllocateRootTable (
50     UINT32                  InitialTableCount);
51 
52 /*
53  * tbfadt - FADT parse/convert/validate
54  */
55 void
56 AcpiTbParseFadt (
57     UINT32                  TableIndex);
58 
59 void
60 AcpiTbCreateLocalFadt (
61     ACPI_TABLE_HEADER       *Table,
62     UINT32                  Length);
63 
64 
65 /*
66  * tbfind - find ACPI table
67  */
68 ACPI_STATUS
69 AcpiTbFindTable (
70     char                    *Signature,
71     char                    *OemId,
72     char                    *OemTableId,
73     UINT32                  *TableIndex);
74 
75 
76 /*
77  * tbinstal - Table removal and deletion
78  */
79 ACPI_STATUS
80 AcpiTbResizeRootTableList (
81     void);
82 
83 ACPI_STATUS
84 AcpiTbVerifyTable (
85     ACPI_TABLE_DESC         *TableDesc);
86 
87 ACPI_STATUS
88 AcpiTbAddTable (
89     ACPI_TABLE_DESC         *TableDesc,
90     UINT32                  *TableIndex);
91 
92 ACPI_STATUS
93 AcpiTbStoreTable (
94     ACPI_PHYSICAL_ADDRESS   Address,
95     ACPI_TABLE_HEADER       *Table,
96     UINT32                  Length,
97     UINT8                   Flags,
98     UINT32                  *TableIndex);
99 
100 void
101 AcpiTbDeleteTable (
102     ACPI_TABLE_DESC        *TableDesc);
103 
104 void
105 AcpiTbTerminate (
106     void);
107 
108 ACPI_STATUS
109 AcpiTbDeleteNamespaceByOwner (
110     UINT32                  TableIndex);
111 
112 ACPI_STATUS
113 AcpiTbAllocateOwnerId (
114     UINT32                  TableIndex);
115 
116 ACPI_STATUS
117 AcpiTbReleaseOwnerId (
118     UINT32                  TableIndex);
119 
120 ACPI_STATUS
121 AcpiTbGetOwnerId (
122     UINT32                  TableIndex,
123     ACPI_OWNER_ID           *OwnerId);
124 
125 BOOLEAN
126 AcpiTbIsTableLoaded (
127     UINT32                  TableIndex);
128 
129 void
130 AcpiTbSetTableLoadedFlag (
131     UINT32                  TableIndex,
132     BOOLEAN                 IsLoaded);
133 
134 
135 /*
136  * tbutils - table manager utilities
137  */
138 ACPI_STATUS
139 AcpiTbInitializeFacs (
140     void);
141 
142 BOOLEAN
143 AcpiTbTablesLoaded (
144     void);
145 
146 void
147 AcpiTbPrintTableHeader(
148     ACPI_PHYSICAL_ADDRESS   Address,
149     ACPI_TABLE_HEADER       *Header);
150 
151 UINT8
152 AcpiTbChecksum (
153     UINT8                   *Buffer,
154     UINT32                  Length);
155 
156 ACPI_STATUS
157 AcpiTbVerifyChecksum (
158     ACPI_TABLE_HEADER       *Table,
159     UINT32                  Length);
160 
161 void
162 AcpiTbCheckDsdtHeader (
163     void);
164 
165 ACPI_TABLE_HEADER *
166 AcpiTbCopyDsdt (
167     UINT32                  TableIndex);
168 
169 void
170 AcpiTbInstallTable (
171     ACPI_PHYSICAL_ADDRESS   Address,
172     char                    *Signature,
173     UINT32                  TableIndex);
174 
175 ACPI_STATUS
176 AcpiTbParseRootTable (
177     ACPI_PHYSICAL_ADDRESS   RsdpAddress);
178 
179 #endif /* __ACTABLES_H__ */
180