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