aslstubs.c revision 1.1.1.3 1
2 /******************************************************************************
3 *
4 * Module Name: aslstubs - Stubs used to link to Aml interpreter
5 *
6 *****************************************************************************/
7
8 /*
9 * Copyright (C) 2000 - 2011, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45 #include "aslcompiler.h"
46 #include "acdispat.h"
47 #include "actables.h"
48 #include "acevents.h"
49 #include "acinterp.h"
50 #include "acnamesp.h"
51
52 #define _COMPONENT ACPI_COMPILER
53 ACPI_MODULE_NAME ("aslstubs")
54
55
56 /*
57 * Stubs to simplify linkage to the ACPI CA core subsystem.
58 * Things like Events, Global Lock, etc. are not used
59 * by the compiler, so they are stubbed out here.
60 */
61 ACPI_PHYSICAL_ADDRESS
62 AeLocalGetRootPointer (
63 void)
64 {
65 return 0;
66 }
67
68 void
69 AcpiNsExecModuleCodeList (
70 void)
71 {
72 }
73
74 ACPI_STATUS
75 AcpiHwReadPort (
76 ACPI_IO_ADDRESS Address,
77 UINT32 *Value,
78 UINT32 Width)
79 {
80 return (AE_OK);
81 }
82
83 ACPI_STATUS
84 AcpiHwWritePort (
85 ACPI_IO_ADDRESS Address,
86 UINT32 Value,
87 UINT32 Width)
88 {
89 return (AE_OK);
90 }
91
92 ACPI_STATUS
93 AcpiDsMethodError (
94 ACPI_STATUS Status,
95 ACPI_WALK_STATE *WalkState)
96 {
97 return (Status);
98 }
99
100 ACPI_STATUS
101 AcpiDsMethodDataGetValue (
102 UINT8 Type,
103 UINT32 Index,
104 ACPI_WALK_STATE *WalkState,
105 ACPI_OPERAND_OBJECT **DestDesc)
106 {
107 return (AE_OK);
108 }
109
110 ACPI_STATUS
111 AcpiDsMethodDataGetNode (
112 UINT8 Type,
113 UINT32 Index,
114 ACPI_WALK_STATE *WalkState,
115 ACPI_NAMESPACE_NODE **Node)
116 {
117 return (AE_OK);
118 }
119
120 ACPI_STATUS
121 AcpiDsStoreObjectToLocal (
122 UINT8 Type,
123 UINT32 Index,
124 ACPI_OPERAND_OBJECT *SrcDesc,
125 ACPI_WALK_STATE *WalkState)
126 {
127 return (AE_OK);
128 }
129
130 ACPI_STATUS
131 AcpiEvDeleteGpeBlock (
132 ACPI_GPE_BLOCK_INFO *GpeBlock)
133 {
134 return (AE_OK);
135 }
136
137 ACPI_STATUS
138 AcpiEvQueueNotifyRequest (
139 ACPI_NAMESPACE_NODE *Node,
140 UINT32 NotifyValue)
141 {
142 return (AE_OK);
143 }
144
145 BOOLEAN
146 AcpiEvIsNotifyObject (
147 ACPI_NAMESPACE_NODE *Node)
148 {
149 return (FALSE);
150 }
151
152 ACPI_STATUS
153 AcpiEvAcquireGlobalLock (
154 UINT16 Timeout)
155 {
156 return (AE_OK);
157 }
158
159 ACPI_STATUS
160 AcpiEvReleaseGlobalLock (
161 void)
162 {
163 return (AE_OK);
164 }
165
166 ACPI_STATUS
167 AcpiEvInitializeRegion (
168 ACPI_OPERAND_OBJECT *RegionObj,
169 BOOLEAN AcpiNsLocked)
170 {
171 return (AE_OK);
172 }
173
174 void
175 AcpiExDoDebugObject (
176 ACPI_OPERAND_OBJECT *SourceDesc,
177 UINT32 Level,
178 UINT32 Index)
179 {
180 return;
181 }
182
183 ACPI_STATUS
184 AcpiExReadDataFromField (
185 ACPI_WALK_STATE *WalkState,
186 ACPI_OPERAND_OBJECT *ObjDesc,
187 ACPI_OPERAND_OBJECT **RetBufferDesc)
188 {
189 return (AE_SUPPORT);
190 }
191
192 ACPI_STATUS
193 AcpiExWriteDataToField (
194 ACPI_OPERAND_OBJECT *SourceDesc,
195 ACPI_OPERAND_OBJECT *ObjDesc,
196 ACPI_OPERAND_OBJECT **ResultDesc)
197 {
198 return (AE_SUPPORT);
199 }
200
201 ACPI_STATUS
202 AcpiExLoadTableOp (
203 ACPI_WALK_STATE *WalkState,
204 ACPI_OPERAND_OBJECT **ReturnDesc)
205 {
206 return (AE_SUPPORT);
207 }
208
209 ACPI_STATUS
210 AcpiExUnloadTable (
211 ACPI_OPERAND_OBJECT *DdbHandle)
212 {
213 return (AE_SUPPORT);
214 }
215
216 ACPI_STATUS
217 AcpiExLoadOp (
218 ACPI_OPERAND_OBJECT *ObjDesc,
219 ACPI_OPERAND_OBJECT *Target,
220 ACPI_WALK_STATE *WalkState)
221 {
222 return (AE_SUPPORT);
223 }
224
225 ACPI_STATUS
226 AcpiTbFindTable (
227 char *Signature,
228 char *OemId,
229 char *OemTableId,
230 UINT32 *TableIndex)
231 {
232 return (AE_SUPPORT);
233 }
234
235 /* OSL interfaces */
236
237 ACPI_THREAD_ID
238 AcpiOsGetThreadId (
239 void)
240 {
241 return (0xFFFF);
242 }
243
244 ACPI_STATUS
245 AcpiOsExecute (
246 ACPI_EXECUTE_TYPE Type,
247 ACPI_OSD_EXEC_CALLBACK Function,
248 void *Context)
249 {
250 return (AE_SUPPORT);
251 }
252