dsargs.c revision 7b1019a6d29ccb7999dc76cba3dde1c627e8e609
/******************************************************************************
*
* Module Name: dsargs - Support for execution of dynamic arguments for static
* objects (regions, fields, buffer fields, etc.)
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
#include "amlcode.h"
#include "acdispat.h"
#include "acnamesp.h"
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dsargs")
/* Local prototypes */
static ACPI_STATUS
/*******************************************************************************
*
* FUNCTION: AcpiDsExecuteArguments
*
* PARAMETERS: Node - Object NS node
* ScopeNode - Parent NS node
* AmlLength - Length of executable AML
* AmlStart - Pointer to the AML
*
* RETURN: Status.
*
* DESCRIPTION: Late (deferred) execution of region or field arguments
*
******************************************************************************/
static ACPI_STATUS
{
/* Allocate a new parser op to be the root of the parsed tree */
if (!Op)
{
}
/* Save the Node for use in AcpiPsParseAml */
/* Create and initialize a new parser state */
if (!WalkState)
{
goto Cleanup;
}
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
/* Mark this parse as a deferred opcode */
/* Pass1: Parse the entire declaration */
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
/* Get and init the Op created above */
/* Evaluate the deferred arguments */
if (!Op)
{
}
/* Create and initialize a new parser state */
if (!WalkState)
{
goto Cleanup;
}
/* Execute the opcode and arguments */
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
/* Mark this execution as a deferred opcode */
}
/*******************************************************************************
*
* FUNCTION: AcpiDsGetBufferFieldArguments
*
* PARAMETERS: ObjDesc - A valid BufferField object
*
* RETURN: Status.
*
* DESCRIPTION: Get BufferField Buffer and Index. This implements the late
* evaluation of these field attributes.
*
******************************************************************************/
{
{
}
/* Get the AML pointer (method object) and BufferField node */
AcpiUtGetNodeName (Node)));
/* Execute the AML code for the TermArg arguments */
}
/*******************************************************************************
*
* FUNCTION: AcpiDsGetBankFieldArguments
*
* PARAMETERS: ObjDesc - A valid BankField object
*
* RETURN: Status.
*
* DESCRIPTION: Get BankField BankValue. This implements the late
* evaluation of these field attributes.
*
******************************************************************************/
{
{
}
/* Get the AML pointer (method object) and BankField node */
AcpiUtGetNodeName (Node)));
/* Execute the AML code for the TermArg arguments */
}
/*******************************************************************************
*
* FUNCTION: AcpiDsGetBufferArguments
*
* PARAMETERS: ObjDesc - A valid Buffer object
*
* RETURN: Status.
*
* DESCRIPTION: Get Buffer length and initializer byte list. This implements
* the late evaluation of these attributes.
*
******************************************************************************/
{
{
}
/* Get the Buffer node */
if (!Node)
{
"No pointer back to namespace node in buffer object %p",
ObjDesc));
}
/* Execute the AML code for the TermArg arguments */
}
/*******************************************************************************
*
* FUNCTION: AcpiDsGetPackageArguments
*
* PARAMETERS: ObjDesc - A valid Package object
*
* RETURN: Status.
*
* DESCRIPTION: Get Package length and initializer byte list. This implements
* the late evaluation of these attributes.
*
******************************************************************************/
{
{
}
/* Get the Package node */
if (!Node)
{
"No pointer back to namespace node in package %p", ObjDesc));
}
/* Execute the AML code for the TermArg arguments */
}
/*******************************************************************************
*
* FUNCTION: AcpiDsGetRegionArguments
*
* PARAMETERS: ObjDesc - A valid region object
*
* RETURN: Status.
*
* DESCRIPTION: Get region address and length. This implements the late
* evaluation of these region attributes.
*
******************************************************************************/
{
{
}
if (!ExtraDesc)
{
}
/* Get the Region node */
"[%4.4s] OpRegion Arg Init at AML %p\n",
/* Execute the argument AML */
if (ACPI_FAILURE (Status))
{
}
}