psxface.c revision 193341
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Module Name: psxface - Parser external interfaces
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
767754Smsmith/******************************************************************************
867754Smsmith *
967754Smsmith * 1. Copyright Notice
1067754Smsmith *
11193267Sjkim * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
1270243Smsmith * All rights reserved.
1367754Smsmith *
1467754Smsmith * 2. License
1567754Smsmith *
1667754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property
1767754Smsmith * rights.  You may have additional license terms from the party that provided
1867754Smsmith * you this software, covering your right to use that party's intellectual
1967754Smsmith * property rights.
2067754Smsmith *
2167754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
2267754Smsmith * copy of the source code appearing in this file ("Covered Code") an
2367754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the
2467754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy,
2567754Smsmith * make derivatives, distribute, use and display any portion of the Covered
2667754Smsmith * Code in any form, with the right to sublicense such rights; and
2767754Smsmith *
2867754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
2967754Smsmith * license (with the right to sublicense), under only those claims of Intel
3067754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell,
3167754Smsmith * offer to sell, and import the Covered Code and derivative works thereof
3267754Smsmith * solely to the minimum extent necessary to exercise the above copyright
3367754Smsmith * license, and in no event shall the patent license extend to any additions
3467754Smsmith * to or modifications of the Original Intel Code.  No other license or right
3567754Smsmith * is granted directly or by implication, estoppel or otherwise;
3667754Smsmith *
3767754Smsmith * The above copyright and patent license is granted only if the following
3867754Smsmith * conditions are met:
3967754Smsmith *
4067754Smsmith * 3. Conditions
4167754Smsmith *
4267754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source.
4367754Smsmith * Redistribution of source code of any substantial portion of the Covered
4467754Smsmith * Code or modification with rights to further distribute source must include
4567754Smsmith * the above Copyright Notice, the above License, this list of Conditions,
4667754Smsmith * and the following Disclaimer and Export Compliance provision.  In addition,
4767754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to
4867754Smsmith * contain a file documenting the changes Licensee made to create that Covered
4967754Smsmith * Code and the date of any change.  Licensee must include in that file the
5067754Smsmith * documentation of any changes made by any predecessor Licensee.  Licensee
5167754Smsmith * must include a prominent statement that the modification is derived,
5267754Smsmith * directly or indirectly, from Original Intel Code.
5367754Smsmith *
5467754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
5567754Smsmith * Redistribution of source code of any substantial portion of the Covered
5667754Smsmith * Code or modification without rights to further distribute source must
5767754Smsmith * include the following Disclaimer and Export Compliance provision in the
5867754Smsmith * documentation and/or other materials provided with distribution.  In
5967754Smsmith * addition, Licensee may not authorize further sublicense of source of any
6067754Smsmith * portion of the Covered Code, and must include terms to the effect that the
6167754Smsmith * license from Licensee to its licensee is limited to the intellectual
6267754Smsmith * property embodied in the software Licensee provides to its licensee, and
6367754Smsmith * not to intellectual property embodied in modifications its licensee may
6467754Smsmith * make.
6567754Smsmith *
6667754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any
6767754Smsmith * substantial portion of the Covered Code or modification must reproduce the
6867754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance
6967754Smsmith * provision in the documentation and/or other materials provided with the
7067754Smsmith * distribution.
7167754Smsmith *
7267754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original
7367754Smsmith * Intel Code.
7467754Smsmith *
7567754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by
7667754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or
7767754Smsmith * other dealings in products derived from or relating to the Covered Code
7867754Smsmith * without prior written authorization from Intel.
7967754Smsmith *
8067754Smsmith * 4. Disclaimer and Export Compliance
8167754Smsmith *
8267754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
8367754Smsmith * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
8467754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
8567754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
8667754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
8767754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
8867754Smsmith * PARTICULAR PURPOSE.
8967754Smsmith *
9067754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
9167754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
9267754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
9367754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
9467754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
9567754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
9667754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
9767754Smsmith * LIMITED REMEDY.
9867754Smsmith *
9967754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this
10067754Smsmith * software or system incorporating such software without first obtaining any
10167754Smsmith * required license or other approval from the U. S. Department of Commerce or
10267754Smsmith * any other agency or department of the United States Government.  In the
10367754Smsmith * event Licensee exports any such software from the United States or
10467754Smsmith * re-exports any such software from a foreign destination, Licensee shall
10567754Smsmith * ensure that the distribution and export/re-export of the software is in
10667754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the
10767754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor
10867754Smsmith * any of its subsidiaries will export/re-export any technical data, process,
10967754Smsmith * software, or service, directly or indirectly, to any country for which the
11067754Smsmith * United States government or any agency thereof requires an export license,
11167754Smsmith * other governmental approval, or letter of assurance, without first obtaining
11267754Smsmith * such license, approval or letter.
11367754Smsmith *
11467754Smsmith *****************************************************************************/
11567754Smsmith
11667754Smsmith#define __PSXFACE_C__
11767754Smsmith
118193341Sjkim#include <contrib/dev/acpica/include/acpi.h>
119193341Sjkim#include <contrib/dev/acpica/include/accommon.h>
120193341Sjkim#include <contrib/dev/acpica/include/acparser.h>
121193341Sjkim#include <contrib/dev/acpica/include/acdispat.h>
122193341Sjkim#include <contrib/dev/acpica/include/acinterp.h>
123193341Sjkim#include <contrib/dev/acpica/include/amlcode.h>
12467754Smsmith
12567754Smsmith
12677424Smsmith#define _COMPONENT          ACPI_PARSER
12791116Smsmith        ACPI_MODULE_NAME    ("psxface")
12867754Smsmith
129151937Sjkim/* Local Prototypes */
13067754Smsmith
131151937Sjkimstatic void
132151937SjkimAcpiPsStartTrace (
133167802Sjkim    ACPI_EVALUATE_INFO      *Info);
134151937Sjkim
135151937Sjkimstatic void
136151937SjkimAcpiPsStopTrace (
137167802Sjkim    ACPI_EVALUATE_INFO      *Info);
138151937Sjkim
139151937Sjkimstatic void
140151937SjkimAcpiPsUpdateParameterList (
141167802Sjkim    ACPI_EVALUATE_INFO      *Info,
142151937Sjkim    UINT16                  Action);
143151937Sjkim
144151937Sjkim
14580062Smsmith/*******************************************************************************
14667754Smsmith *
147151937Sjkim * FUNCTION:    AcpiDebugTrace
14867754Smsmith *
149151937Sjkim * PARAMETERS:  MethodName      - Valid ACPI name string
150151937Sjkim *              DebugLevel      - Optional level mask. 0 to use default
151151937Sjkim *              DebugLayer      - Optional layer mask. 0 to use default
152151937Sjkim *              Flags           - bit 1: one shot(1) or persistent(0)
15367754Smsmith *
15467754Smsmith * RETURN:      Status
15567754Smsmith *
156151937Sjkim * DESCRIPTION: External interface to enable debug tracing during control
157151937Sjkim *              method execution
15867754Smsmith *
15980062Smsmith ******************************************************************************/
16067754Smsmith
16167754SmsmithACPI_STATUS
162151937SjkimAcpiDebugTrace (
163151937Sjkim    char                    *Name,
164151937Sjkim    UINT32                  DebugLevel,
165151937Sjkim    UINT32                  DebugLayer,
166151937Sjkim    UINT32                  Flags)
167151937Sjkim{
168151937Sjkim    ACPI_STATUS             Status;
169151937Sjkim
170151937Sjkim
171151937Sjkim    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
172151937Sjkim    if (ACPI_FAILURE (Status))
173151937Sjkim    {
174151937Sjkim        return (Status);
175151937Sjkim    }
176151937Sjkim
177151937Sjkim    /* TBDs: Validate name, allow full path or just nameseg */
178151937Sjkim
179167802Sjkim    AcpiGbl_TraceMethodName = *ACPI_CAST_PTR (UINT32, Name);
180151937Sjkim    AcpiGbl_TraceFlags = Flags;
181151937Sjkim
182151937Sjkim    if (DebugLevel)
183151937Sjkim    {
184151937Sjkim        AcpiGbl_TraceDbgLevel = DebugLevel;
185151937Sjkim    }
186151937Sjkim    if (DebugLayer)
187151937Sjkim    {
188151937Sjkim        AcpiGbl_TraceDbgLayer = DebugLayer;
189151937Sjkim    }
190151937Sjkim
191151937Sjkim    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
192151937Sjkim    return (AE_OK);
193151937Sjkim}
194151937Sjkim
195151937Sjkim
196151937Sjkim/*******************************************************************************
197151937Sjkim *
198151937Sjkim * FUNCTION:    AcpiPsStartTrace
199151937Sjkim *
200151937Sjkim * PARAMETERS:  Info        - Method info struct
201151937Sjkim *
202151937Sjkim * RETURN:      None
203151937Sjkim *
204151937Sjkim * DESCRIPTION: Start control method execution trace
205151937Sjkim *
206151937Sjkim ******************************************************************************/
207151937Sjkim
208151937Sjkimstatic void
209151937SjkimAcpiPsStartTrace (
210167802Sjkim    ACPI_EVALUATE_INFO      *Info)
21167754Smsmith{
21267754Smsmith    ACPI_STATUS             Status;
21367754Smsmith
21467754Smsmith
215151937Sjkim    ACPI_FUNCTION_ENTRY ();
21667754Smsmith
21767754Smsmith
218151937Sjkim    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
219151937Sjkim    if (ACPI_FAILURE (Status))
220151937Sjkim    {
221151937Sjkim        return;
222151937Sjkim    }
22367754Smsmith
224151937Sjkim    if ((!AcpiGbl_TraceMethodName) ||
225167802Sjkim        (AcpiGbl_TraceMethodName != Info->ResolvedNode->Name.Integer))
22667754Smsmith    {
227151937Sjkim        goto Exit;
22867754Smsmith    }
22967754Smsmith
230151937Sjkim    AcpiGbl_OriginalDbgLevel = AcpiDbgLevel;
231151937Sjkim    AcpiGbl_OriginalDbgLayer = AcpiDbgLayer;
232151937Sjkim
233151937Sjkim    AcpiDbgLevel = 0x00FFFFFF;
234151937Sjkim    AcpiDbgLayer = ACPI_UINT32_MAX;
235151937Sjkim
236151937Sjkim    if (AcpiGbl_TraceDbgLevel)
23767754Smsmith    {
238151937Sjkim        AcpiDbgLevel = AcpiGbl_TraceDbgLevel;
23967754Smsmith    }
240151937Sjkim    if (AcpiGbl_TraceDbgLayer)
241151937Sjkim    {
242151937Sjkim        AcpiDbgLayer = AcpiGbl_TraceDbgLayer;
243151937Sjkim    }
24467754Smsmith
24567754Smsmith
246151937SjkimExit:
247151937Sjkim    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
248151937Sjkim}
249151937Sjkim
250151937Sjkim
251151937Sjkim/*******************************************************************************
252151937Sjkim *
253151937Sjkim * FUNCTION:    AcpiPsStopTrace
254151937Sjkim *
255151937Sjkim * PARAMETERS:  Info        - Method info struct
256151937Sjkim *
257151937Sjkim * RETURN:      None
258151937Sjkim *
259151937Sjkim * DESCRIPTION: Stop control method execution trace
260151937Sjkim *
261151937Sjkim ******************************************************************************/
262151937Sjkim
263151937Sjkimstatic void
264151937SjkimAcpiPsStopTrace (
265167802Sjkim    ACPI_EVALUATE_INFO      *Info)
266151937Sjkim{
267151937Sjkim    ACPI_STATUS             Status;
268151937Sjkim
269151937Sjkim
270151937Sjkim    ACPI_FUNCTION_ENTRY ();
271151937Sjkim
272151937Sjkim
273151937Sjkim    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
27467754Smsmith    if (ACPI_FAILURE (Status))
27567754Smsmith    {
276151937Sjkim        return;
27767754Smsmith    }
27867754Smsmith
279151937Sjkim    if ((!AcpiGbl_TraceMethodName) ||
280167802Sjkim        (AcpiGbl_TraceMethodName != Info->ResolvedNode->Name.Integer))
28167754Smsmith    {
282151937Sjkim        goto Exit;
28367754Smsmith    }
28467754Smsmith
285151937Sjkim    /* Disable further tracing if type is one-shot */
28667754Smsmith
287151937Sjkim    if (AcpiGbl_TraceFlags & 1)
28867754Smsmith    {
289151937Sjkim        AcpiGbl_TraceMethodName = 0;
290151937Sjkim        AcpiGbl_TraceDbgLevel = 0;
291151937Sjkim        AcpiGbl_TraceDbgLayer = 0;
29267754Smsmith    }
29367754Smsmith
294151937Sjkim    AcpiDbgLevel = AcpiGbl_OriginalDbgLevel;
295151937Sjkim    AcpiDbgLayer = AcpiGbl_OriginalDbgLayer;
29691116Smsmith
297151937SjkimExit:
298151937Sjkim    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
299151937Sjkim}
30084491Smsmith
301151937Sjkim
302151937Sjkim/*******************************************************************************
303151937Sjkim *
304151937Sjkim * FUNCTION:    AcpiPsExecuteMethod
305151937Sjkim *
306151937Sjkim * PARAMETERS:  Info            - Method info block, contains:
307151937Sjkim *                  Node            - Method Node to execute
308151937Sjkim *                  ObjDesc         - Method object
309151937Sjkim *                  Parameters      - List of parameters to pass to the method,
310151937Sjkim *                                    terminated by NULL. Params itself may be
311151937Sjkim *                                    NULL if no parameters are being passed.
312151937Sjkim *                  ReturnObject    - Where to put method's return value (if
313151937Sjkim *                                    any). If NULL, no value is returned.
314151937Sjkim *                  ParameterType   - Type of Parameter list
315151937Sjkim *                  ReturnObject    - Where to put method's return value (if
316151937Sjkim *                                    any). If NULL, no value is returned.
317151937Sjkim *                  PassNumber      - Parse or execute pass
318151937Sjkim *
319151937Sjkim * RETURN:      Status
320151937Sjkim *
321151937Sjkim * DESCRIPTION: Execute a control method
322151937Sjkim *
323151937Sjkim ******************************************************************************/
324151937Sjkim
325151937SjkimACPI_STATUS
326151937SjkimAcpiPsExecuteMethod (
327167802Sjkim    ACPI_EVALUATE_INFO      *Info)
328151937Sjkim{
329151937Sjkim    ACPI_STATUS             Status;
330167802Sjkim    ACPI_PARSE_OBJECT       *Op;
331167802Sjkim    ACPI_WALK_STATE         *WalkState;
332151937Sjkim
333151937Sjkim
334167802Sjkim    ACPI_FUNCTION_TRACE (PsExecuteMethod);
335151937Sjkim
336151937Sjkim
337151937Sjkim    /* Validate the Info and method Node */
338151937Sjkim
339167802Sjkim    if (!Info || !Info->ResolvedNode)
34084491Smsmith    {
341151937Sjkim        return_ACPI_STATUS (AE_NULL_ENTRY);
34284491Smsmith    }
34384491Smsmith
344151937Sjkim    /* Init for new method, wait on concurrency semaphore */
345151937Sjkim
346167802Sjkim    Status = AcpiDsBeginMethodExecution (Info->ResolvedNode, Info->ObjDesc, NULL);
34784491Smsmith    if (ACPI_FAILURE (Status))
34884491Smsmith    {
349151937Sjkim        return_ACPI_STATUS (Status);
35084491Smsmith    }
35184491Smsmith
352151937Sjkim    /*
353167802Sjkim     * The caller "owns" the parameters, so give each one an extra reference
354151937Sjkim     */
355151937Sjkim    AcpiPsUpdateParameterList (Info, REF_INCREMENT);
35684491Smsmith
357151937Sjkim    /* Begin tracing if requested */
358151937Sjkim
359151937Sjkim    AcpiPsStartTrace (Info);
360151937Sjkim
361151937Sjkim    /*
362167802Sjkim     * Execute the method. Performs parse simultaneously
363151937Sjkim     */
364151937Sjkim    ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
365167802Sjkim        "**** Begin Method Parse/Execute [%4.4s] **** Node=%p Obj=%p\n",
366167802Sjkim        Info->ResolvedNode->Name.Ascii, Info->ResolvedNode, Info->ObjDesc));
367151937Sjkim
368167802Sjkim    /* Create and init a Root Node */
369167802Sjkim
370167802Sjkim    Op = AcpiPsCreateScopeOp ();
371167802Sjkim    if (!Op)
372167802Sjkim    {
373167802Sjkim        Status = AE_NO_MEMORY;
374167802Sjkim        goto Cleanup;
375167802Sjkim    }
376167802Sjkim
377167802Sjkim    /* Create and initialize a new walk state */
378167802Sjkim
379167802Sjkim    Info->PassNumber = ACPI_IMODE_EXECUTE;
380167802Sjkim    WalkState = AcpiDsCreateWalkState (
381167802Sjkim                    Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
382167802Sjkim    if (!WalkState)
383167802Sjkim    {
384167802Sjkim        Status = AE_NO_MEMORY;
385167802Sjkim        goto Cleanup;
386167802Sjkim    }
387167802Sjkim
388167802Sjkim    Status = AcpiDsInitAmlWalk (WalkState, Op, Info->ResolvedNode,
389167802Sjkim                Info->ObjDesc->Method.AmlStart,
390167802Sjkim                Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
391123315Snjl    if (ACPI_FAILURE (Status))
392123315Snjl    {
393167802Sjkim        AcpiDsDeleteWalkState (WalkState);
394151937Sjkim        goto Cleanup;
395123315Snjl    }
396123315Snjl
397193267Sjkim    /* Invoke an internal method if necessary */
398193267Sjkim
399193267Sjkim    if (Info->ObjDesc->Method.MethodFlags & AML_METHOD_INTERNAL_ONLY)
400193267Sjkim    {
401193267Sjkim        Status = Info->ObjDesc->Method.Implementation (WalkState);
402193267Sjkim        Info->ReturnObject = WalkState->ReturnDesc;
403193267Sjkim
404193267Sjkim        /* Cleanup states */
405193267Sjkim
406193267Sjkim        AcpiDsScopeStackClear (WalkState);
407193267Sjkim        AcpiPsCleanupScope (&WalkState->ParserState);
408193267Sjkim        AcpiDsTerminateControlMethod (WalkState->MethodDesc, WalkState);
409193267Sjkim        AcpiDsDeleteWalkState (WalkState);
410193267Sjkim        goto Cleanup;
411193267Sjkim    }
412193267Sjkim
413193267Sjkim    /*
414193267Sjkim     * Start method evaluation with an implicit return of zero. This is done
415193267Sjkim     * for Windows compatibility.
416193267Sjkim     */
417193267Sjkim    if (AcpiGbl_EnableInterpreterSlack)
418193267Sjkim    {
419193267Sjkim        WalkState->ImplicitReturnObj =
420193267Sjkim            AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
421193267Sjkim        if (!WalkState->ImplicitReturnObj)
422193267Sjkim        {
423193267Sjkim            Status = AE_NO_MEMORY;
424193267Sjkim            AcpiDsDeleteWalkState (WalkState);
425193267Sjkim            goto Cleanup;
426193267Sjkim        }
427193267Sjkim
428193267Sjkim        WalkState->ImplicitReturnObj->Integer.Value = 0;
429193267Sjkim    }
430193267Sjkim
431167802Sjkim    /* Parse the AML */
43284491Smsmith
433167802Sjkim    Status = AcpiPsParseAml (WalkState);
43467754Smsmith
435167802Sjkim    /* WalkState was deleted by ParseAml */
43667754Smsmith
437151937SjkimCleanup:
438167802Sjkim    AcpiPsDeleteParseTree (Op);
439167802Sjkim
440151937Sjkim    /* End optional tracing */
44171867Smsmith
442151937Sjkim    AcpiPsStopTrace (Info);
44371867Smsmith
444151937Sjkim    /* Take away the extra reference that we gave the parameters above */
44584491Smsmith
446151937Sjkim    AcpiPsUpdateParameterList (Info, REF_DECREMENT);
44784491Smsmith
448151937Sjkim    /* Exit now if error above */
449151937Sjkim
45084491Smsmith    if (ACPI_FAILURE (Status))
45184491Smsmith    {
452151937Sjkim        return_ACPI_STATUS (Status);
45384491Smsmith    }
45484491Smsmith
45567754Smsmith    /*
456151937Sjkim     * If the method has returned an object, signal this to the caller with
457151937Sjkim     * a control exception code
45867754Smsmith     */
459151937Sjkim    if (Info->ReturnObject)
460151937Sjkim    {
461151937Sjkim        ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Method returned ObjDesc=%p\n",
462151937Sjkim            Info->ReturnObject));
463151937Sjkim        ACPI_DUMP_STACK_ENTRY (Info->ReturnObject);
464123315Snjl
465151937Sjkim        Status = AE_CTRL_RETURN_VALUE;
466151937Sjkim    }
467123315Snjl
468151937Sjkim    return_ACPI_STATUS (Status);
469151937Sjkim}
470123315Snjl
47167754Smsmith
472151937Sjkim/*******************************************************************************
473151937Sjkim *
474151937Sjkim * FUNCTION:    AcpiPsUpdateParameterList
475151937Sjkim *
476167802Sjkim * PARAMETERS:  Info            - See ACPI_EVALUATE_INFO
477151937Sjkim *                                (Used: ParameterType and Parameters)
478151937Sjkim *              Action          - Add or Remove reference
479151937Sjkim *
480151937Sjkim * RETURN:      Status
481151937Sjkim *
482151937Sjkim * DESCRIPTION: Update reference count on all method parameter objects
483151937Sjkim *
484151937Sjkim ******************************************************************************/
485151937Sjkim
486151937Sjkimstatic void
487151937SjkimAcpiPsUpdateParameterList (
488167802Sjkim    ACPI_EVALUATE_INFO      *Info,
489151937Sjkim    UINT16                  Action)
490151937Sjkim{
491193267Sjkim    UINT32                  i;
492151937Sjkim
493151937Sjkim
494193267Sjkim    if (Info->Parameters)
49567754Smsmith    {
496151937Sjkim        /* Update reference count for each parameter */
49767754Smsmith
498129684Snjl        for (i = 0; Info->Parameters[i]; i++)
49967754Smsmith        {
50099679Siwasaki            /* Ignore errors, just do them all */
50199679Siwasaki
502151937Sjkim            (void) AcpiUtUpdateObjectReference (Info->Parameters[i], Action);
50367754Smsmith        }
50467754Smsmith    }
505151937Sjkim}
50667754Smsmith
507151937Sjkim
508