xref: /freebsd/sys/contrib/dev/acpica/compiler/aslstubs.c (revision 640235e2c2ba32947f7c59d168437ffa1280f1e6)
1 /******************************************************************************
2  *
3  * Module Name: aslstubs - Stubs used to link to Aml interpreter
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2016, 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 #include <contrib/dev/acpica/compiler/aslcompiler.h>
45 #include <contrib/dev/acpica/include/acdispat.h>
46 #include <contrib/dev/acpica/include/actables.h>
47 #include <contrib/dev/acpica/include/acevents.h>
48 #include <contrib/dev/acpica/include/acinterp.h>
49 #include <contrib/dev/acpica/include/acnamesp.h>
50 
51 #define _COMPONENT          ACPI_COMPILER
52         ACPI_MODULE_NAME    ("aslstubs")
53 
54 
55 /*
56  * Stubs to simplify linkage to the ACPICA core subsystem.
57  * Things like Events, Global Lock, etc. are not used
58  * by the compiler, so they are stubbed out here.
59  */
60 void
61 AcpiNsExecModuleCodeList (
62     void)
63 {
64 }
65 
66 ACPI_STATUS
67 AcpiNsInitializeObjects (
68     void)
69 {
70     return (AE_OK);
71 }
72 
73 ACPI_STATUS
74 AcpiHwReadPort (
75     ACPI_IO_ADDRESS         Address,
76     UINT32                  *Value,
77     UINT32                  Width)
78 {
79     return (AE_OK);
80 }
81 
82 ACPI_STATUS
83 AcpiHwWritePort (
84     ACPI_IO_ADDRESS         Address,
85     UINT32                  Value,
86     UINT32                  Width)
87 {
88     return (AE_OK);
89 }
90 
91 ACPI_STATUS
92 AcpiDsMethodError (
93     ACPI_STATUS             Status,
94     ACPI_WALK_STATE         *WalkState)
95 {
96     return (Status);
97 }
98 
99 ACPI_STATUS
100 AcpiDsMethodDataGetValue (
101     UINT8                   Type,
102     UINT32                  Index,
103     ACPI_WALK_STATE         *WalkState,
104     ACPI_OPERAND_OBJECT     **DestDesc)
105 {
106     return (AE_OK);
107 }
108 
109 ACPI_STATUS
110 AcpiDsMethodDataGetNode (
111     UINT8                   Type,
112     UINT32                  Index,
113     ACPI_WALK_STATE         *WalkState,
114     ACPI_NAMESPACE_NODE     **Node)
115 {
116     return (AE_OK);
117 }
118 
119 ACPI_STATUS
120 AcpiDsStoreObjectToLocal (
121     UINT8                   Type,
122     UINT32                  Index,
123     ACPI_OPERAND_OBJECT     *SrcDesc,
124     ACPI_WALK_STATE         *WalkState)
125 {
126     return (AE_OK);
127 }
128 
129 ACPI_STATUS
130 AcpiEvInstallRegionHandlers (
131     void)
132 {
133     return (AE_OK);
134 }
135 
136 ACPI_STATUS
137 AcpiEvQueueNotifyRequest (
138     ACPI_NAMESPACE_NODE     *Node,
139     UINT32                  NotifyValue)
140 {
141     return (AE_OK);
142 }
143 
144 BOOLEAN
145 AcpiEvIsNotifyObject (
146     ACPI_NAMESPACE_NODE     *Node)
147 {
148     return (FALSE);
149 }
150 
151 #if (!ACPI_REDUCED_HARDWARE)
152 ACPI_STATUS
153 AcpiEvDeleteGpeBlock (
154     ACPI_GPE_BLOCK_INFO     *GpeBlock)
155 {
156     return (AE_OK);
157 }
158 
159 ACPI_STATUS
160 AcpiEvAcquireGlobalLock (
161     UINT16                  Timeout)
162 {
163     return (AE_OK);
164 }
165 
166 ACPI_STATUS
167 AcpiEvReleaseGlobalLock (
168     void)
169 {
170     return (AE_OK);
171 }
172 #endif /* !ACPI_REDUCED_HARDWARE */
173 
174 ACPI_STATUS
175 AcpiEvInitializeRegion (
176     ACPI_OPERAND_OBJECT     *RegionObj,
177     BOOLEAN                 AcpiNsLocked)
178 {
179     return (AE_OK);
180 }
181 
182 ACPI_STATUS
183 AcpiExReadDataFromField (
184     ACPI_WALK_STATE         *WalkState,
185     ACPI_OPERAND_OBJECT     *ObjDesc,
186     ACPI_OPERAND_OBJECT     **RetBufferDesc)
187 {
188     return (AE_SUPPORT);
189 }
190 
191 ACPI_STATUS
192 AcpiExWriteDataToField (
193     ACPI_OPERAND_OBJECT     *SourceDesc,
194     ACPI_OPERAND_OBJECT     *ObjDesc,
195     ACPI_OPERAND_OBJECT     **ResultDesc)
196 {
197     return (AE_SUPPORT);
198 }
199 
200 ACPI_STATUS
201 AcpiExLoadTableOp (
202     ACPI_WALK_STATE         *WalkState,
203     ACPI_OPERAND_OBJECT     **ReturnDesc)
204 {
205     return (AE_SUPPORT);
206 }
207 
208 ACPI_STATUS
209 AcpiExUnloadTable (
210     ACPI_OPERAND_OBJECT     *DdbHandle)
211 {
212     return (AE_SUPPORT);
213 }
214 
215 ACPI_STATUS
216 AcpiExLoadOp (
217     ACPI_OPERAND_OBJECT     *ObjDesc,
218     ACPI_OPERAND_OBJECT     *Target,
219     ACPI_WALK_STATE         *WalkState)
220 {
221     return (AE_SUPPORT);
222 }
223 
224 void
225 AcpiExDoDebugObject (
226     ACPI_OPERAND_OBJECT     *SourceDesc,
227     UINT32                  Level,
228     UINT32                  Index)
229 {
230     return;
231 }
232 
233 void
234 AcpiExStartTraceMethod (
235     ACPI_NAMESPACE_NODE     *MethodNode,
236     ACPI_OPERAND_OBJECT     *ObjDesc,
237     ACPI_WALK_STATE         *WalkState)
238 {
239     return;
240 }
241 
242 void
243 AcpiExStopTraceMethod (
244     ACPI_NAMESPACE_NODE     *MethodNode,
245     ACPI_OPERAND_OBJECT     *ObjDesc,
246     ACPI_WALK_STATE         *WalkState)
247 {
248     return;
249 }
250 
251 void
252 AcpiExStartTraceOpcode (
253     ACPI_PARSE_OBJECT       *Op,
254     ACPI_WALK_STATE         *WalkState)
255 {
256     return;
257 }
258 
259 void
260 AcpiExStopTraceOpcode (
261     ACPI_PARSE_OBJECT       *Op,
262     ACPI_WALK_STATE         *WalkState)
263 
264 {
265     return;
266 }
267 
268 void
269 AcpiExTracePoint (
270     ACPI_TRACE_EVENT_TYPE   Type,
271     BOOLEAN                 Begin,
272     UINT8                   *Aml,
273     char                    *Pathname)
274 {
275     return;
276 }
277 
278 ACPI_STATUS
279 AcpiTbFindTable (
280     char                    *Signature,
281     char                    *OemId,
282     char                    *OemTableId,
283     UINT32                  *TableIndex)
284 {
285     return (AE_SUPPORT);
286 }
287 
288 ACPI_STATUS
289 AcpiNsLoadTable (
290     UINT32                  TableIndex,
291     ACPI_NAMESPACE_NODE     *Node)
292 {
293     return (AE_NOT_IMPLEMENTED);
294 }
295 
296 ACPI_STATUS
297 AcpiDsRestartControlMethod (
298     ACPI_WALK_STATE         *WalkState,
299     ACPI_OPERAND_OBJECT     *ReturnDesc)
300 {
301     return (AE_OK);
302 }
303 
304 void
305 AcpiDsTerminateControlMethod (
306     ACPI_OPERAND_OBJECT     *MethodDesc,
307     ACPI_WALK_STATE         *WalkState)
308 {
309     return;
310 }
311 
312 ACPI_STATUS
313 AcpiDsCallControlMethod (
314     ACPI_THREAD_STATE       *Thread,
315     ACPI_WALK_STATE         *WalkState,
316     ACPI_PARSE_OBJECT       *Op)
317 {
318     return (AE_OK);
319 }
320 
321 ACPI_STATUS
322 AcpiDsMethodDataInitArgs (
323     ACPI_OPERAND_OBJECT     **Params,
324     UINT32                  MaxParamCount,
325     ACPI_WALK_STATE         *WalkState)
326 {
327     return (AE_OK);
328 }
329