1 /******************************************************************************
   2  *
   3  * Module Name: anstubs - Stub routines for the AcpiNames utility
   4  *
   5  *****************************************************************************/
   6 
   7 /*
   8  * Copyright (C) 2000 - 2013, 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 "acpinames.h"
  45 
  46 #include <acutils.h>
  47 #include <acevents.h>
  48 #include <acdispat.h>
  49 
  50 #define _COMPONENT          ACPI_TOOLS
  51         ACPI_MODULE_NAME    ("anstubs")
  52 
  53 
  54 /******************************************************************************
  55  *
  56  * DESCRIPTION: Stubs used to facilitate linkage of the NsDump utility.
  57  *
  58  *****************************************************************************/
  59 
  60 
  61 /* Utilities */
  62 
  63 void
  64 AcpiUtSubsystemShutdown (
  65     void)
  66 {
  67 }
  68 
  69 ACPI_STATUS
  70 AcpiUtExecute_STA (
  71     ACPI_NAMESPACE_NODE     *DeviceNode,
  72     UINT32                  *StatusFlags)
  73 {
  74     return (AE_NOT_IMPLEMENTED);
  75 }
  76 
  77 ACPI_STATUS
  78 AcpiUtExecute_HID (
  79     ACPI_NAMESPACE_NODE     *DeviceNode,
  80     ACPI_PNP_DEVICE_ID      **ReturnId)
  81 {
  82     return (AE_NOT_IMPLEMENTED);
  83 }
  84 
  85 ACPI_STATUS
  86 AcpiUtExecute_CID (
  87     ACPI_NAMESPACE_NODE     *DeviceNode,
  88     ACPI_PNP_DEVICE_ID_LIST **ReturnCidList)
  89 {
  90     return (AE_NOT_IMPLEMENTED);
  91 }
  92 
  93 ACPI_STATUS
  94 AcpiUtExecute_UID (
  95     ACPI_NAMESPACE_NODE     *DeviceNode,
  96     ACPI_PNP_DEVICE_ID      **ReturnId)
  97 {
  98     return (AE_NOT_IMPLEMENTED);
  99 }
 100 
 101 ACPI_STATUS
 102 AcpiUtExecute_SUB (
 103     ACPI_NAMESPACE_NODE     *DeviceNode,
 104     ACPI_PNP_DEVICE_ID      **ReturnId)
 105 {
 106     return (AE_NOT_IMPLEMENTED);
 107 }
 108 
 109 ACPI_STATUS
 110 AcpiUtExecutePowerMethods (
 111     ACPI_NAMESPACE_NODE     *DeviceNode,
 112     const char              **MethodNames,
 113     UINT8                   MethodCount,
 114     UINT8                   *OutValues)
 115 {
 116     return (AE_NOT_IMPLEMENTED);
 117 }
 118 
 119 ACPI_STATUS
 120 AcpiUtEvaluateNumericObject (
 121     char                    *ObjectName,
 122     ACPI_NAMESPACE_NODE     *DeviceNode,
 123     UINT64                  *Value)
 124 {
 125     return (AE_NOT_IMPLEMENTED);
 126 }
 127 
 128 ACPI_STATUS
 129 AcpiUtCopyIobjectToEobject (
 130     ACPI_OPERAND_OBJECT     *Obj,
 131     ACPI_BUFFER             *RetBuffer)
 132 {
 133     return (AE_NOT_IMPLEMENTED);
 134 }
 135 
 136 ACPI_STATUS
 137 AcpiUtCopyEobjectToIobject (
 138     ACPI_OBJECT             *Obj,
 139     ACPI_OPERAND_OBJECT     **InternalObj)
 140 {
 141     return (AE_NOT_IMPLEMENTED);
 142 }
 143 
 144 ACPI_STATUS
 145 AcpiUtCopyIobjectToIobject (
 146     ACPI_OPERAND_OBJECT     *SourceDesc,
 147     ACPI_OPERAND_OBJECT     **DestDesc,
 148     ACPI_WALK_STATE         *WalkState)
 149 {
 150     return (AE_NOT_IMPLEMENTED);
 151 }
 152 
 153 
 154 /* Hardware manager */
 155 
 156 UINT32
 157 AcpiHwGetMode (
 158     void)
 159 {
 160     return (0);
 161 }
 162 
 163 
 164 /* Event manager */
 165 
 166 ACPI_STATUS
 167 AcpiEvInstallXruptHandlers (
 168     void)
 169 {
 170     return (AE_OK);
 171 }
 172 
 173 ACPI_STATUS
 174 AcpiEvInitializeEvents (
 175     void)
 176 {
 177     return (AE_OK);
 178 }
 179 
 180 ACPI_STATUS
 181 AcpiEvInstallRegionHandlers (
 182     void)
 183 {
 184     return (AE_OK);
 185 }
 186 
 187 ACPI_STATUS
 188 AcpiEvInitializeOpRegions (
 189     void)
 190 {
 191     return (AE_OK);
 192 }
 193 
 194 ACPI_STATUS
 195 AcpiEvInitializeRegion (
 196     ACPI_OPERAND_OBJECT     *RegionObj,
 197     BOOLEAN                 AcpiNsLocked)
 198 {
 199     return (AE_OK);
 200 }
 201 
 202 #if (!ACPI_REDUCED_HARDWARE)
 203 ACPI_STATUS
 204 AcpiEvDeleteGpeBlock (
 205     ACPI_GPE_BLOCK_INFO     *GpeBlock)
 206 {
 207     return (AE_OK);
 208 }
 209 
 210 ACPI_STATUS
 211 AcpiEnable (
 212     void)
 213 {
 214     return (AE_OK);
 215 }
 216 #endif /* !ACPI_REDUCED_HARDWARE */
 217 
 218 
 219 /* AML Interpreter */
 220 
 221 void
 222 AcpiExUnlinkMutex (
 223     ACPI_OPERAND_OBJECT     *ObjDesc)
 224 {
 225 }
 226 
 227 void
 228 AcpiExReleaseAllMutexes (
 229     ACPI_THREAD_STATE       *Thread)
 230 {
 231 }
 232 
 233 ACPI_STATUS
 234 AcpiExReadDataFromField (
 235     ACPI_WALK_STATE         *WalkState,
 236     ACPI_OPERAND_OBJECT     *ObjDesc,
 237     ACPI_OPERAND_OBJECT     **RetBufferDesc)
 238 {
 239     return (AE_NOT_IMPLEMENTED);
 240 }
 241 
 242 ACPI_STATUS
 243 AcpiExWriteDataToField (
 244     ACPI_OPERAND_OBJECT     *SourceDesc,
 245     ACPI_OPERAND_OBJECT     *ObjDesc,
 246     ACPI_OPERAND_OBJECT     **ResultDesc)
 247 {
 248     return (AE_NOT_IMPLEMENTED);
 249 }
 250 
 251 ACPI_STATUS
 252 AcpiExPrepFieldValue (
 253     ACPI_CREATE_FIELD_INFO  *Info)
 254 {
 255     return (AE_OK);
 256 }
 257 
 258 ACPI_STATUS
 259 AcpiExAcquireMutexObject (
 260     UINT16                  Timeout,
 261     ACPI_OPERAND_OBJECT     *ObjDesc,
 262     ACPI_THREAD_ID          ThreadId)
 263 {
 264     return (AE_OK);
 265 }
 266 
 267 ACPI_STATUS
 268 AcpiExReleaseMutexObject (
 269     ACPI_OPERAND_OBJECT     *ObjDesc)
 270 {
 271     return (AE_OK);
 272 }
 273 
 274 ACPI_STATUS
 275 AcpiExStoreObjectToNode (
 276     ACPI_OPERAND_OBJECT     *SourceDesc,
 277     ACPI_NAMESPACE_NODE     *Node,
 278     ACPI_WALK_STATE         *WalkState,
 279     UINT8                   ImplicitConversion)
 280 {
 281     return (AE_NOT_IMPLEMENTED);
 282 }
 283 
 284 
 285 /* Namespace manager */
 286 
 287 ACPI_STATUS
 288 AcpiNsEvaluate (
 289     ACPI_EVALUATE_INFO      *Info)
 290 {
 291     return (AE_NOT_IMPLEMENTED);
 292 }
 293 
 294 void
 295 AcpiNsExecModuleCodeList (
 296     void)
 297 {
 298 }
 299 
 300 
 301 /* Dispatcher */
 302 
 303 ACPI_STATUS
 304 AcpiDsInitializeObjects (
 305     UINT32                  TableIndex,
 306     ACPI_NAMESPACE_NODE     *StartNode)
 307 {
 308     return (AE_OK);
 309 }
 310 
 311 ACPI_STATUS
 312 AcpiDsCallControlMethod (
 313     ACPI_THREAD_STATE       *Thread,
 314     ACPI_WALK_STATE         *WalkState,
 315     ACPI_PARSE_OBJECT       *Op)
 316 {
 317     return (AE_NOT_IMPLEMENTED);
 318 }
 319 
 320 ACPI_STATUS
 321 AcpiDsRestartControlMethod (
 322     ACPI_WALK_STATE         *WalkState,
 323     ACPI_OPERAND_OBJECT     *ReturnDesc)
 324 {
 325     return (AE_NOT_IMPLEMENTED);
 326 }
 327 
 328 void
 329 AcpiDsTerminateControlMethod (
 330     ACPI_OPERAND_OBJECT     *MethodDesc,
 331     ACPI_WALK_STATE         *WalkState)
 332 {
 333 }
 334 
 335 ACPI_STATUS
 336 AcpiDsMethodError (
 337     ACPI_STATUS             Status,
 338     ACPI_WALK_STATE         *WalkState)
 339 {
 340     return (AE_NOT_IMPLEMENTED);
 341 }
 342 
 343 ACPI_STATUS
 344 AcpiDsBeginMethodExecution (
 345     ACPI_NAMESPACE_NODE     *MethodNode,
 346     ACPI_OPERAND_OBJECT     *ObjDesc,
 347     ACPI_WALK_STATE         *WalkState)
 348 {
 349     return (AE_NOT_IMPLEMENTED);
 350 }
 351 
 352 ACPI_STATUS
 353 AcpiDsGetPredicateValue (
 354     ACPI_WALK_STATE         *WalkState,
 355     ACPI_OPERAND_OBJECT     *ResultObj)
 356 {
 357     return (AE_NOT_IMPLEMENTED);
 358 }
 359 
 360 ACPI_STATUS
 361 AcpiDsGetBufferFieldArguments (
 362     ACPI_OPERAND_OBJECT     *ObjDesc)
 363 {
 364     return (AE_OK);
 365 }
 366 
 367 ACPI_STATUS
 368 AcpiDsGetBankFieldArguments (
 369     ACPI_OPERAND_OBJECT     *ObjDesc)
 370 {
 371     return (AE_OK);
 372 }
 373 
 374 ACPI_STATUS
 375 AcpiDsGetRegionArguments (
 376     ACPI_OPERAND_OBJECT     *RgnDesc)
 377 {
 378     return (AE_OK);
 379 }
 380 
 381 ACPI_STATUS
 382 AcpiDsGetBufferArguments (
 383     ACPI_OPERAND_OBJECT     *ObjDesc)
 384 {
 385     return (AE_OK);
 386 }
 387 
 388 ACPI_STATUS
 389 AcpiDsGetPackageArguments (
 390     ACPI_OPERAND_OBJECT     *ObjDesc)
 391 {
 392     return (AE_OK);
 393 }
 394 
 395 ACPI_STATUS
 396 AcpiDsExecBeginOp (
 397     ACPI_WALK_STATE         *WalkState,
 398     ACPI_PARSE_OBJECT       **OutOp)
 399 {
 400     return (AE_NOT_IMPLEMENTED);
 401 }
 402 
 403 ACPI_STATUS
 404 AcpiDsExecEndOp (
 405     ACPI_WALK_STATE         *State)
 406 {
 407     return (AE_NOT_IMPLEMENTED);
 408 }
 409 
 410 
 411 /* AML Debugger */
 412 
 413 void
 414 AcpiDbDisplayArgumentObject (
 415     ACPI_OPERAND_OBJECT     *ObjDesc,
 416     ACPI_WALK_STATE         *WalkState)
 417 {
 418 }
 419 
 420 ACPI_STATUS
 421 AcpiDbInitialize (
 422     void)
 423 {
 424     return (AE_OK);
 425 }
 426 
 427 void
 428 AcpiDbTerminate (
 429     void)
 430 {
 431 }
 432 
 433 /* OSL interfaces */
 434 
 435 ACPI_THREAD_ID
 436 AcpiOsGetThreadId (
 437     void)
 438 {
 439     return (0xFFFF);
 440 }
 441 
 442 ACPI_STATUS
 443 AcpiOsExecute (
 444     ACPI_EXECUTE_TYPE       Type,
 445     ACPI_OSD_EXEC_CALLBACK  Function,
 446     void                    *Context)
 447 {
 448     return (AE_SUPPORT);
 449 }