aslrestype1.c revision 199767f8919635c4928607450d9e0abb932109ce
/******************************************************************************
*
* Module Name: aslrestype1 - Miscellaneous small resource descriptors
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, 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 "aslcompiler.y.h"
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("aslrestype1")
/*
* This module contains miscellaneous small resource descriptors:
*
* EndTag
* EndDependentFn
* Memory24
* Memory32
* Memory32Fixed
* StartDependentFn
* StartDependentFnNoPri
* VendorShort
*/
/*******************************************************************************
*
* FUNCTION: RsDoEndTagDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "EndDependentFn" descriptor
*
******************************************************************************/
{
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoEndDependentDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "EndDependentFn" descriptor
*
******************************************************************************/
{
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoMemory24Descriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "Memory24" descriptor
*
******************************************************************************/
{
UINT32 i;
/* Process all child initialization nodes */
for (i = 0; InitializerOp; i++)
{
switch (i)
{
break;
case 1: /* Min Address */
break;
case 2: /* Max Address */
break;
case 3: /* Alignment */
break;
case 4: /* Length */
break;
case 5: /* Name */
break;
default:
break;
}
}
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoMemory32Descriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "Memory32" descriptor
*
******************************************************************************/
{
UINT32 i;
/* Process all child initialization nodes */
for (i = 0; InitializerOp; i++)
{
switch (i)
{
break;
case 1: /* Min Address */
break;
case 2: /* Max Address */
break;
case 3: /* Alignment */
break;
case 4: /* Length */
break;
case 5: /* Name */
break;
default:
break;
}
}
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoMemory32FixedDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "Memory32Fixed" descriptor
*
******************************************************************************/
{
UINT32 i;
/* Process all child initialization nodes */
for (i = 0; InitializerOp; i++)
{
switch (i)
{
break;
case 1: /* Address */
break;
case 2: /* Length */
break;
case 3: /* Name */
break;
default:
break;
}
}
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoStartDependentDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "StartDependentFn" descriptor
*
******************************************************************************/
{
UINT32 i;
/* Increment offset past StartDependent descriptor */
CurrentByteOffset += sizeof (AML_RESOURCE_START_DEPENDENT);
/* Descriptor has priority byte */
(ASL_RDESC_ST_DEPEND_SIZE + 0x01);
/* Process all child initialization nodes */
for (i = 0; InitializerOp; i++)
{
switch (i)
{
case 0: /* Compatibility Priority */
{
}
break;
case 1: /* Performance/Robustness Priority */
{
}
break;
default:
/*
* Update current byte offset to indicate the number of bytes from the
* start of the buffer. Buffer can include multiple descriptors, we
* must keep track of the offset of not only each descriptor, but each
* element (field) within each descriptor as well.
*/
break;
}
}
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoStartDependentNoPriDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "StartDependentNoPri" descriptor
*
******************************************************************************/
{
/* Increment offset past StartDependentNoPri descriptor */
CurrentByteOffset += sizeof (AML_RESOURCE_START_DEPENDENT_NOPRIO);
/* Process all child initialization nodes */
while (InitializerOp)
{
/*
* Update current byte offset to indicate the number of bytes from the
* start of the buffer. Buffer can include multiple descriptors, we
* must keep track of the offset of not only each descriptor, but each
* element (field) within each descriptor as well.
*/
}
return (Rnode);
}
/*******************************************************************************
*
* FUNCTION: RsDoVendorSmallDescriptor
*
* PARAMETERS: Info - Parse Op and resource template offset
*
* RETURN: Completed resource node
*
* DESCRIPTION: Construct a short "VendorShort" descriptor
*
******************************************************************************/
{
UINT32 i;
/* Allocate worst case - 7 vendor bytes */
/* Process all child initialization nodes */
for (i = 0; InitializerOp; i++)
{
{
break;
}
/* Maximum 7 vendor data bytes allowed (0-6) */
if (i >= 7)
{
/* Eat the excess initializers */
while (InitializerOp)
{
}
break;
}
}
/* Adjust the Rnode buffer size, so correct number of bytes are emitted */
/* Set the length in the Type Tag */
return (Rnode);
}