aslstubs.c revision 1.1.1.7 1 /******************************************************************************
2 *
3 * Module Name: aslstubs - Stubs used to link to Aml interpreter
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2015, 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 "aslcompiler.h"
45 #include "acdispat.h"
46 #include "actables.h"
47 #include "acevents.h"
48 #include "acinterp.h"
49 #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 AcpiHwReadPort (
68 ACPI_IO_ADDRESS Address,
69 UINT32 *Value,
70 UINT32 Width)
71 {
72 return (AE_OK);
73 }
74
75 ACPI_STATUS
76 AcpiHwWritePort (
77 ACPI_IO_ADDRESS Address,
78 UINT32 Value,
79 UINT32 Width)
80 {
81 return (AE_OK);
82 }
83
84 ACPI_STATUS
85 AcpiDsMethodError (
86 ACPI_STATUS Status,
87 ACPI_WALK_STATE *WalkState)
88 {
89 return (Status);
90 }
91
92 ACPI_STATUS
93 AcpiDsMethodDataGetValue (
94 UINT8 Type,
95 UINT32 Index,
96 ACPI_WALK_STATE *WalkState,
97 ACPI_OPERAND_OBJECT **DestDesc)
98 {
99 return (AE_OK);
100 }
101
102 ACPI_STATUS
103 AcpiDsMethodDataGetNode (
104 UINT8 Type,
105 UINT32 Index,
106 ACPI_WALK_STATE *WalkState,
107 ACPI_NAMESPACE_NODE **Node)
108 {
109 return (AE_OK);
110 }
111
112 ACPI_STATUS
113 AcpiDsStoreObjectToLocal (
114 UINT8 Type,
115 UINT32 Index,
116 ACPI_OPERAND_OBJECT *SrcDesc,
117 ACPI_WALK_STATE *WalkState)
118 {
119 return (AE_OK);
120 }
121
122 ACPI_STATUS
123 AcpiEvQueueNotifyRequest (
124 ACPI_NAMESPACE_NODE *Node,
125 UINT32 NotifyValue)
126 {
127 return (AE_OK);
128 }
129
130 BOOLEAN
131 AcpiEvIsNotifyObject (
132 ACPI_NAMESPACE_NODE *Node)
133 {
134 return (FALSE);
135 }
136
137 #if (!ACPI_REDUCED_HARDWARE)
138 ACPI_STATUS
139 AcpiEvDeleteGpeBlock (
140 ACPI_GPE_BLOCK_INFO *GpeBlock)
141 {
142 return (AE_OK);
143 }
144
145 ACPI_STATUS
146 AcpiEvAcquireGlobalLock (
147 UINT16 Timeout)
148 {
149 return (AE_OK);
150 }
151
152 ACPI_STATUS
153 AcpiEvReleaseGlobalLock (
154 void)
155 {
156 return (AE_OK);
157 }
158 #endif /* !ACPI_REDUCED_HARDWARE */
159
160 ACPI_STATUS
161 AcpiEvInitializeRegion (
162 ACPI_OPERAND_OBJECT *RegionObj,
163 BOOLEAN AcpiNsLocked)
164 {
165 return (AE_OK);
166 }
167
168 ACPI_STATUS
169 AcpiExReadDataFromField (
170 ACPI_WALK_STATE *WalkState,
171 ACPI_OPERAND_OBJECT *ObjDesc,
172 ACPI_OPERAND_OBJECT **RetBufferDesc)
173 {
174 return (AE_SUPPORT);
175 }
176
177 ACPI_STATUS
178 AcpiExWriteDataToField (
179 ACPI_OPERAND_OBJECT *SourceDesc,
180 ACPI_OPERAND_OBJECT *ObjDesc,
181 ACPI_OPERAND_OBJECT **ResultDesc)
182 {
183 return (AE_SUPPORT);
184 }
185
186 ACPI_STATUS
187 AcpiExLoadTableOp (
188 ACPI_WALK_STATE *WalkState,
189 ACPI_OPERAND_OBJECT **ReturnDesc)
190 {
191 return (AE_SUPPORT);
192 }
193
194 ACPI_STATUS
195 AcpiExUnloadTable (
196 ACPI_OPERAND_OBJECT *DdbHandle)
197 {
198 return (AE_SUPPORT);
199 }
200
201 ACPI_STATUS
202 AcpiExLoadOp (
203 ACPI_OPERAND_OBJECT *ObjDesc,
204 ACPI_OPERAND_OBJECT *Target,
205 ACPI_WALK_STATE *WalkState)
206 {
207 return (AE_SUPPORT);
208 }
209
210 void
211 AcpiExDoDebugObject (
212 ACPI_OPERAND_OBJECT *SourceDesc,
213 UINT32 Level,
214 UINT32 Index)
215 {
216 return;
217 }
218
219 void
220 AcpiExStartTraceMethod (
221 ACPI_NAMESPACE_NODE *MethodNode,
222 ACPI_OPERAND_OBJECT *ObjDesc,
223 ACPI_WALK_STATE *WalkState)
224 {
225 return;
226 }
227
228 void
229 AcpiExStopTraceMethod (
230 ACPI_NAMESPACE_NODE *MethodNode,
231 ACPI_OPERAND_OBJECT *ObjDesc,
232 ACPI_WALK_STATE *WalkState)
233 {
234 return;
235 }
236
237 void
238 AcpiExStartTraceOpcode (
239 ACPI_PARSE_OBJECT *Op,
240 ACPI_WALK_STATE *WalkState)
241 {
242 return;
243 }
244
245 void
246 AcpiExStopTraceOpcode (
247 ACPI_PARSE_OBJECT *Op,
248 ACPI_WALK_STATE *WalkState)
249
250 {
251 return;
252 }
253
254 void
255 AcpiExTracePoint (
256 ACPI_TRACE_EVENT_TYPE Type,
257 BOOLEAN Begin,
258 UINT8 *Aml,
259 char *Pathname)
260 {
261 return;
262 }
263
264 ACPI_STATUS
265 AcpiTbFindTable (
266 char *Signature,
267 char *OemId,
268 char *OemTableId,
269 UINT32 *TableIndex)
270 {
271 return (AE_SUPPORT);
272 }
273