mirror of
https://github.com/acpica/acpica/
synced 2025-01-06 01:22:23 +03:00
16/32/64-bit common data types
date 99.03.10.00.04.00; author rmoore1; state Exp;
This commit is contained in:
parent
55aa96b35a
commit
365860bae3
@ -14,16 +14,19 @@
|
||||
| FILENAME: acpinmsp.h - prototypes for accessing namespace
|
||||
|__________________________________________________________________________
|
||||
|
|
||||
| $Revision: 1.9 $
|
||||
| $Date: 2005/06/29 19:49:35 $
|
||||
| $Revision: 1.10 $
|
||||
| $Date: 2005/06/29 19:49:36 $
|
||||
| $Log: acnamesp.h,v $
|
||||
| Revision 1.9 2005/06/29 19:49:35 aystarik
|
||||
|
|
||||
| Revision 1.10 2005/06/29 19:49:36 aystarik
|
||||
| 16/32/64-bit common data types
|
||||
|
|
||||
|
|
||||
| date 99.02.16.23.36.00; author rmosgrov; state Exp;
|
||||
| date 99.03.10.00.04.00; author rmoore1; state Exp;
|
||||
|
|
||||
*
|
||||
* 10 3/09/99 4:04p Rmoore1
|
||||
* 16/32/64-bit common data types
|
||||
*
|
||||
* 9 2/16/99 3:36p Rmosgrov
|
||||
*
|
||||
* 8 2/16/99 3:04p Rmosgrov
|
||||
@ -61,9 +64,9 @@
|
||||
// Changed vNsPopCurrent() to NsPopCurrent(), returning the number of frames
|
||||
// popped (or an error indication).
|
||||
// Changed empty formal parameter lists to "(void)".
|
||||
// Changed meth.Offset, and other values which are offsets, from (int) to
|
||||
// Changed meth.Offset, and other values which are offsets, from (INT32) to
|
||||
// (ptrdiff_t).
|
||||
// Replaced "int iLoading" parameter of NsEnter() with "OpMode iLE".
|
||||
// Replaced "INT32 iLoading" parameter of NsEnter() with "OpMode iLE".
|
||||
// Removed vReporter() parameter from several functions.
|
||||
// Removed iExistDownstreamSibling() which is now static.
|
||||
//
|
||||
@ -153,11 +156,11 @@
|
||||
*
|
||||
* The first byte of an nte is a character of the name segment, which will
|
||||
* be accepted by NcOK(). The first byte of an OBJECT_DESCRIPTOR is the
|
||||
* ValTyp field, whose (BYTE) value comes from the NsType enumeration.
|
||||
* ValTyp field, whose (UINT8) value comes from the NsType enumeration.
|
||||
* Valid NsType values must not include any character acceptable in a name.
|
||||
*/
|
||||
|
||||
#define IsNsHandle(h) (NcOK((int)*(char *)(h)))
|
||||
#define IsNsHandle(h) (NcOK((INT32)*(char *)(h)))
|
||||
|
||||
|
||||
/* To search the entire name space, pass this as SearchBase */
|
||||
@ -190,373 +193,74 @@ extern char BadType[];
|
||||
extern char *NsTypeNames[];
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: PriUnloadNameSpace
|
||||
*
|
||||
* PARAMETERS: none
|
||||
*
|
||||
* RETURN: E_OK or E_ERROR
|
||||
*
|
||||
* DESCRIPTION: Contracts namespace, typically in response to an undocking
|
||||
* event
|
||||
*
|
||||
****************************************************************************/
|
||||
/* Prototypes */
|
||||
|
||||
int
|
||||
PriUnloadNameSpace(void);
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsPushMethodScope
|
||||
*
|
||||
* PARAMETERS: NsHandle nNewScope, name to be made current
|
||||
*
|
||||
* DESCRIPTION: Push the current scope on the scope stack, and make the
|
||||
* passed nte current.
|
||||
*
|
||||
***************************************************************************/
|
||||
INT32
|
||||
PriUnloadNameSpace (void);
|
||||
|
||||
void
|
||||
NsPushMethodScope(NsHandle nNewScope);
|
||||
NsPushMethodScope (NsHandle nNewScope);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: AcpiExecuteMethod
|
||||
*
|
||||
* PARAMETERS: char *MethodName name of method to execute
|
||||
*
|
||||
* OBJECT_DESCRIPTOR **ReturnValue where to put method's return
|
||||
* value (if any).
|
||||
* ReturnValue must not be
|
||||
* passed in as NULL because
|
||||
* *ReturnValue will always
|
||||
* be set (to NULL if there is
|
||||
* no return value).
|
||||
*
|
||||
* OBJECT_DESCRIPTOR **Params list of parameters to pass to
|
||||
* method, terminated by NULL.
|
||||
* Params itself may be NULL
|
||||
* if no parameters are being
|
||||
* passed.
|
||||
*
|
||||
* RETURN: E_OK or E_ERROR
|
||||
*
|
||||
* DESCRIPTION: Find and execute the requested method passing the given
|
||||
* parameters
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int
|
||||
INT32
|
||||
AcpiExecuteMethod (char * MethodName, OBJECT_DESCRIPTOR **ReturnValue,
|
||||
OBJECT_DESCRIPTOR **Params);
|
||||
|
||||
INT32
|
||||
AcpiLoadNameSpace (INT32 DisplayAmlDuringLoad);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: int AcpiLoadNameSpace
|
||||
*
|
||||
* PARAMETERS: DisplayAmlDuringLoad
|
||||
*
|
||||
* RETURN: none
|
||||
*
|
||||
* DESCRIPTION:
|
||||
*
|
||||
******************************************************************************/
|
||||
INT32
|
||||
AcpiUnloadNameSpace (void);
|
||||
|
||||
int
|
||||
AcpiLoadNameSpace (int DisplayAmlDuringLoad);
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: AcpiUnloadNameSpace
|
||||
*
|
||||
* PARAMETERS: none
|
||||
*
|
||||
* RETURN: E_OK or E_ERROR
|
||||
*
|
||||
* DESCRIPTION: Contracts namespace, typically in response to an undocking
|
||||
* event
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int
|
||||
AcpiUnloadNameSpace(void);
|
||||
|
||||
/******************************************************************************
|
||||
* FUNCTION: void AcpiCleanup (void)
|
||||
*
|
||||
* PARAMETERS: none
|
||||
*
|
||||
* RETURN: none
|
||||
*
|
||||
* DESCRIPTION: Exit function registered by AcpiInit(). This function will
|
||||
* free memory allocated for table storage.
|
||||
*
|
||||
******************************************************************************/
|
||||
void
|
||||
AcpiCleanup (void);
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsValType
|
||||
*
|
||||
* PARAMETERS: NsHandle h Handle of nte to be examined
|
||||
*
|
||||
* RETURN: Type field from nte whose handle is passed
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
NsType
|
||||
NsValType(NsHandle h);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsValPtr
|
||||
*
|
||||
* PARAMETERS: NsHandle h Handle of nte to be examined
|
||||
*
|
||||
* RETURN: Val field from nte whose handle is passed
|
||||
*
|
||||
***************************************************************************/
|
||||
NsValType (NsHandle h);
|
||||
|
||||
void *
|
||||
NsValPtr(NsHandle h);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsSetup
|
||||
*
|
||||
* PARAMETERS: none
|
||||
*
|
||||
* DESCRIPTION: Allocate and initialize the root name table
|
||||
*
|
||||
***************************************************************************/
|
||||
NsValPtr (NsHandle h);
|
||||
|
||||
void
|
||||
NsSetup(void);
|
||||
NsSetup (void);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsPopCurrent
|
||||
*
|
||||
* PARAMETERS: NsType Type The type of frame to be found
|
||||
*
|
||||
* DESCRIPTION: Pop the scope stack until a frame of the requested type
|
||||
* is found.
|
||||
*
|
||||
* RETURN: Count of frames popped. If no frame of the requested type
|
||||
* was found, the count is returned as a negative number and
|
||||
* the scope stack is emptied (which sets the current scope
|
||||
* to the root). If the scope stack was empty at entry, the
|
||||
* function is a no-op and returns 0.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
int
|
||||
NsPopCurrent(NsType Type);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsEnter
|
||||
*
|
||||
* PARAMETERS: char *Name name to be entered, in internal format
|
||||
* as represented in the AML stream
|
||||
* NsType Type type associated with name
|
||||
* OpMode iLE Load => add name if not found
|
||||
*
|
||||
* RETURN: Handle to the nte for the passed name
|
||||
*
|
||||
* DESCRIPTION: Find or enter the passed name in the name space.
|
||||
*
|
||||
***************************************************************************/
|
||||
INT32
|
||||
NsPopCurrent (NsType Type);
|
||||
|
||||
NsHandle
|
||||
NsEnter(char *Name, NsType Type, OpMode iLE);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: GetParentHandle
|
||||
*
|
||||
* PARAMETERS: NsHandle Look - Handle whose parent is to be returned
|
||||
*
|
||||
* RETURN: Parent of parameter. NOTFOUND if Look is invalid
|
||||
* or Look refers to the root.
|
||||
*
|
||||
***************************************************************************/
|
||||
NsEnter (char *Name, NsType Type, OpMode iLE);
|
||||
|
||||
NsHandle
|
||||
GetParentHandle(NsHandle Look);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsNameOfCurrentScope
|
||||
*
|
||||
* PARAMETERS: none
|
||||
*
|
||||
* RETURN: pointer to storage containing the name of the current scope
|
||||
*
|
||||
* DESCRIPTION:
|
||||
*
|
||||
***************************************************************************/
|
||||
GetParentHandle (NsHandle Look);
|
||||
|
||||
char *
|
||||
NsNameOfCurrentScope(void);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsFullyQualifiedName
|
||||
*
|
||||
* PARAMETERS: NsHandle Look handle of nte whose name is to be found
|
||||
*
|
||||
* RETURN: pointer to storage containing the name, in external format
|
||||
*
|
||||
* DESCRIPTION:
|
||||
*
|
||||
***************************************************************************/
|
||||
NsNameOfCurrentScope (void);
|
||||
|
||||
char *
|
||||
NsFullyQualifiedName(NsHandle Look);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsSetMethod
|
||||
*
|
||||
* PARAMETERS: NsHandle h handle of nte to be set
|
||||
* ptrdiff_t Offset value to be set
|
||||
* long Length length associated with value
|
||||
*
|
||||
* DESCRIPTION: Record the given offset and p-code length of the method
|
||||
* whose handle is passed
|
||||
*
|
||||
***************************************************************************/
|
||||
NsFullyQualifiedName (NsHandle Look);
|
||||
|
||||
void
|
||||
NsSetMethod(NsHandle h, ptrdiff_t Offset, long Length);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsSetValue
|
||||
*
|
||||
* PARAMETERS: NsHandle h handle of nte to be set
|
||||
* ACPI_OBJECT_HANDLE v value to be set
|
||||
* BYTE ValTyp type of value,
|
||||
* or Any if not known
|
||||
*
|
||||
* DESCRIPTION: Record the given object as the value associated with the
|
||||
* name whose NsHandle is passed
|
||||
*
|
||||
***************************************************************************/
|
||||
NsSetMethod (NsHandle h, ptrdiff_t Offset, INT32 Length);
|
||||
|
||||
void
|
||||
NsSetValue(NsHandle h, ACPI_OBJECT_HANDLE v, BYTE ValTyp);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsDumpTables
|
||||
*
|
||||
* PARAMETERS: int DisplayBitFlags See definitions of OUTPUT_DATA
|
||||
* and related symbols in display.h
|
||||
* int UseGraphicCharSet 1 => use graphic character set to
|
||||
* draw links in name space tree
|
||||
* 0 => use +, -, and | to draw links
|
||||
* NsHandle SearchBase Root of subtree to be dumped, or
|
||||
* NS_ALL to dump the entire namespace
|
||||
* int MaxDepth Maximum depth of dump. Use INT_MAX
|
||||
* for an effectively unlimited depth.
|
||||
*
|
||||
* DESCRIPTION: Dump the name space, or a portion of it.
|
||||
*
|
||||
***************************************************************************/
|
||||
NsSetValue (NsHandle h, ACPI_OBJECT_HANDLE v, UINT8 ValTyp);
|
||||
|
||||
void
|
||||
NsDumpTables(int DisplayBitFlags, int UseGraphicCharSet,
|
||||
NsHandle SearchBase, int MaxDepth);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsDumpEntry
|
||||
*
|
||||
* PARAMETERS: NsHandle h Entry to be dumped
|
||||
*
|
||||
* DESCRIPTION: Dump a single nte
|
||||
*
|
||||
***************************************************************************/
|
||||
NsDumpTables (INT32 DisplayBitFlags, INT32 UseGraphicCharSet,
|
||||
NsHandle SearchBase, INT32 MaxDepth);
|
||||
|
||||
void
|
||||
NsDumpEntry(NsHandle h, int DisplayBitFlags);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsFindNames
|
||||
*
|
||||
* PARAMETERS: char *SearchFor pattern to be found.
|
||||
* 4 bytes, ? matches any character.
|
||||
* If NULL, "????" will be used.
|
||||
* NsHandle SearchBase Root of subtree to be searched, or
|
||||
* NS_ALL to search the entire namespace
|
||||
* int MaxDepth Maximum depth of search. Use INT_MAX
|
||||
* for an effectively unlimited depth.
|
||||
*
|
||||
* DESCRIPTION: Traverse the name space finding names which match a search
|
||||
* pattern, and return an array of handles. The end of the
|
||||
* array is marked by the value (NsHandle)0. A return value
|
||||
* of (NsHandle *)0 indicates that no matching names were
|
||||
* found or that space for the list could not be allocated.
|
||||
* if SearchBase is NS_ALL (null) search from the root,
|
||||
* else it is a handle whose children are to be searched.
|
||||
*
|
||||
***************************************************************************/
|
||||
NsDumpEntry (NsHandle h, INT32 DisplayBitFlags);
|
||||
|
||||
NsHandle *
|
||||
NsFindNames(char *SearchFor, NsHandle SearchBase, int MaxDepth);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsGetHandle
|
||||
*
|
||||
* PARAMETERS: char *Name Name to be found, in external (ASL)
|
||||
* format. The \ and ^ prefixes, and the
|
||||
* . to separate segments, are supported.
|
||||
*
|
||||
* NsHandle Scope Root of subtree to be searched, or
|
||||
* NS_ALL for the root of the name space.
|
||||
* If Name is fully qualified (first char
|
||||
* is '\'), the passed value of Scope will
|
||||
* not be accessed.
|
||||
*
|
||||
* DESCRIPTION: Look up a name relative to a given scope and return the
|
||||
* corresponding handle, or (NsHandle)NOTFOUND.
|
||||
*
|
||||
***************************************************************************/
|
||||
NsFindNames (char *SearchFor, NsHandle SearchBase, INT32 MaxDepth);
|
||||
|
||||
NsHandle
|
||||
NsGetHandle(char *Name, NsHandle Scope);
|
||||
NsGetHandle (char *Name, NsHandle Scope);
|
||||
|
||||
INT32
|
||||
IsNsValue (OBJECT_DESCRIPTOR *pOD);
|
||||
|
||||
/*****************************************************************************
|
||||
* FUNCTION: IsNsValue
|
||||
*
|
||||
* PARAMETERS: OBJECT_DESCRIPTOR *pOD
|
||||
*
|
||||
* RETURN: TRUE if the passed descriptor is the value of a Name in
|
||||
* the name space, else FALSE
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int
|
||||
IsNsValue(OBJECT_DESCRIPTOR *pOD);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: NsMarkNS
|
||||
*
|
||||
* PARAMETERS: none
|
||||
*
|
||||
* DESCRIPTION: If compiled with bu_plumr.h, traverse the name space
|
||||
* "marking" all name tables and reachable values.
|
||||
*
|
||||
* RETURN: The number of blocks marked
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
int
|
||||
INT32
|
||||
NsMarkNS(void);
|
||||
|
||||
|
||||
@ -569,32 +273,11 @@ NsMarkNS(void);
|
||||
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: RegisterStaticBlockPtr
|
||||
*
|
||||
* PARAMETERS: void **BP Addr of static pointer to be registered
|
||||
*
|
||||
* DESCRIPTION: If compiled with bu_plumr.h, add the pointer whose address
|
||||
* is passed to the registry. MarkStaticBlocks() will then
|
||||
* "mark" each block pointed to by a registered pointer.
|
||||
*
|
||||
***************************************************************************/
|
||||
void
|
||||
RegisterStaticBlockPtr (void **BP);
|
||||
|
||||
void
|
||||
RegisterStaticBlockPtr(void **BP);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION: MarkStaticBlocks
|
||||
*
|
||||
* PARAMETERS: int *Count Count of blocks marked
|
||||
*
|
||||
* DESCRIPTION: "Mark" all blocks pointed to by registered static pointers
|
||||
*
|
||||
***************************************************************************/
|
||||
void
|
||||
MarkStaticBlocks(int *Count)
|
||||
;
|
||||
MarkStaticBlocks (INT32 *Count);
|
||||
|
||||
#endif /* PLUMBER */
|
||||
|
||||
|
@ -1,515 +1,355 @@
|
||||
/*
|
||||
* __________________________________________________________________________
|
||||
*
|
||||
*
|
||||
* Copyright (C) Intel Corporation 1994-1996
|
||||
*
|
||||
* All rights reserved. No part of this program or publication may be
|
||||
* reproduced, transmitted, transcribed, stored in a retrieval system, or
|
||||
* translated into any language or computer language, in any form or by any
|
||||
* means, electronic, mechanical, magnetic, optical, chemical, manual, or
|
||||
* otherwise, without the prior written permission of Intel Corporation.
|
||||
*__________________________________________________________________________
|
||||
*
|
||||
* FILENAME: acpiobj.h - Definition of OBJECT_DESCRIPTOR
|
||||
*__________________________________________________________________________
|
||||
*
|
||||
*
|
||||
*__________________________________________________________________________
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
|
||||
* $Revision: 1.76 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
*
|
||||
* 2.1. This is your license from Intel Corp. under its intellectual property
|
||||
* rights. You may have additional license terms from the party that provided
|
||||
* you this software, covering your right to use that party's intellectual
|
||||
* property rights.
|
||||
*
|
||||
* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
|
||||
* copy of the source code appearing in this file ("Covered Code") an
|
||||
* irrevocable, perpetual, worldwide license under Intel's copyrights in the
|
||||
* base code distributed originally by Intel ("Original Intel Code") to copy,
|
||||
* make derivatives, distribute, use and display any portion of the Covered
|
||||
* Code in any form, with the right to sublicense such rights; and
|
||||
*
|
||||
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
|
||||
* license (with the right to sublicense), under only those claims of Intel
|
||||
* patents that are infringed by the Original Intel Code, to make, use, sell,
|
||||
* offer to sell, and import the Covered Code and derivative works thereof
|
||||
* solely to the minimum extent necessary to exercise the above copyright
|
||||
* license, and in no event shall the patent license extend to any additions
|
||||
* to or modifications of the Original Intel Code. No other license or right
|
||||
* is granted directly or by implication, estoppel or otherwise;
|
||||
*
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
* and the following Disclaimer and Export Compliance provision. In addition,
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
* documentation and/or other materials provided with distribution. In
|
||||
* addition, Licensee may not authorize further sublicense of source of any
|
||||
* portion of the Covered Code, and must include terms to the effect that the
|
||||
* license from Licensee to its licensee is limited to the intellectual
|
||||
* property embodied in the software Licensee provides to its licensee, and
|
||||
* not to intellectual property embodied in modifications its licensee may
|
||||
* make.
|
||||
*
|
||||
* 3.3. Redistribution of Executable. Redistribution in executable form of any
|
||||
* substantial portion of the Covered Code or modification must reproduce the
|
||||
* above Copyright Notice, and the following Disclaimer and Export Compliance
|
||||
* provision in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3.4. Intel retains all right, title, and interest in and to the Original
|
||||
* Intel Code.
|
||||
*
|
||||
* 3.5. Neither the name Intel nor any other trademark owned or controlled by
|
||||
* Intel shall be used in advertising or otherwise to promote the sale, use or
|
||||
* other dealings in products derived from or relating to the Covered Code
|
||||
* without prior written authorization from Intel.
|
||||
*
|
||||
* 4. Disclaimer and Export Compliance
|
||||
*
|
||||
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
|
||||
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
|
||||
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
|
||||
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
|
||||
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
|
||||
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
|
||||
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
|
||||
* LIMITED REMEDY.
|
||||
*
|
||||
* 4.3. Licensee shall not export, either directly or indirectly, any of this
|
||||
* software or system incorporating such software without first obtaining any
|
||||
* required license or other approval from the U. S. Department of Commerce or
|
||||
* any other agency or department of the United States Government. In the
|
||||
* event Licensee exports any such software from the United States or
|
||||
* re-exports any such software from a foreign destination, Licensee shall
|
||||
* ensure that the distribution and export/re-export of the software is in
|
||||
* compliance with all laws, regulations, orders, or other restrictions of the
|
||||
* U.S. Export Administration Regulations. Licensee agrees that neither it nor
|
||||
* any of its subsidiaries will export/re-export any technical data, process,
|
||||
* software, or service, directly or indirectly, to any country for which the
|
||||
* United States government or any agency thereof requires an export license,
|
||||
* other governmental approval, or letter of assurance, without first obtaining
|
||||
* such license, approval or letter.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _ACOBJECT_H
|
||||
#define _ACOBJECT_H
|
||||
#ifndef _ACPIOBJ_H
|
||||
#define _ACPIOBJ_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "datatypes.h"
|
||||
|
||||
/*
|
||||
* The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher
|
||||
* to the interpreter, and to keep track of the various handlers such as
|
||||
* address space handlers and notify handlers. The object is a constant
|
||||
* size in order to allow them to be cached and reused.
|
||||
*
|
||||
* All variants of the ACPI_OPERAND_OBJECT are defined with the same
|
||||
* Some necessary typedefs
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ptrdiff_t Offset; /* offset to MethodFlags in AML pcode block */
|
||||
UINT32 Length; /* length of method code including MethodFlags */
|
||||
} meth;
|
||||
|
||||
/* NsHandle is actually an nte *, which is private to acpinmsp.c */
|
||||
|
||||
typedef void * NsHandle;
|
||||
|
||||
|
||||
/*
|
||||
* Types associated with names
|
||||
* Values correspond to the definition of the ObjectType operator.
|
||||
* Must coordinate with NsProperties and NsTypeNames in acpinmsp.c
|
||||
* The NsType type is also used in OBJECT_DESCRIPTOR defined in amlpriv.h
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
Any = 0,
|
||||
Number = 1, /* Byte/Word/Dword/Zero/One/Ones */
|
||||
String = 2,
|
||||
Buffer = 3,
|
||||
Package = 4, /* ByteConst, multiple DataTerm/Constant/SuperName */
|
||||
FieldUnit = 5,
|
||||
Device = 6, /* Name, multiple NamedObject */
|
||||
Event = 7,
|
||||
Method = 8, /* Name, ByteConst, multiple Code */
|
||||
Mutex = 9,
|
||||
Region = 10,
|
||||
Power = 11, /* Name,ByteConst,WordConst,multi NamedObject */
|
||||
Processor = 12, /* Name,ByteConst,DWordConst,ByteConst,multi NmO */
|
||||
Thermal = 13, /* Name, multiple NamedObject */
|
||||
Alias = 14,
|
||||
|
||||
/*
|
||||
* The remaining values do not relate to the ObjectType operator and are
|
||||
* used for various internal purposes. A gap is provided in case more
|
||||
* official ObjectType's are added in the future. Also, values exceeding
|
||||
* the largest ObjectType need to not overlap with defined AML opcodes.
|
||||
*/
|
||||
DefField = 25,
|
||||
BankField = 26,
|
||||
IndexField = 27,
|
||||
DefFieldDefn = 28, /* Name, ByteConst, multiple FieldElement */
|
||||
BankFieldDefn = 29, /* 2 Name,DWordConst,ByteConst,multi FieldElement */
|
||||
IndexFieldDefn = 30, /* 2 Name, ByteConst, multiple FieldElement */
|
||||
If = 31, /* OpCode, multiple Code */
|
||||
Else = 32, /* multiple Code */
|
||||
While = 33, /* OpCode, multiple Code */
|
||||
Scope = 34, /* Name, multiple NamedObject */
|
||||
DefAny = 35, /* type is Any, suppress search of enclosing scopes */
|
||||
Lvalue = 36 /* Arg#, Local#, Name, Debug; used only in descriptors */
|
||||
} NsType;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* All variants of the OBJECT_DESCRIPTOR are defined with the same
|
||||
* sequence of field types, with fields that are not used in a particular
|
||||
* variant being named "Reserved". This is not strictly necessary, but
|
||||
* may in some circumstances simplify understanding if these structures
|
||||
* need to be displayed in a debugger having limited (or no) support for
|
||||
* union types. It also simplifies some debug code in DumpTable() which
|
||||
* dumps multi-level values: fetching Buffer.Pointer suffices to pick up
|
||||
* union types. It also simplifies some debug code in vNsDumpTable() which
|
||||
* dumps multi-level values: fetching sBuffer.pbBuffer suffices to pick up
|
||||
* the value or next level for any of several types.
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Common Descriptors
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Common area for all objects.
|
||||
*
|
||||
* DataType is used to differentiate between internal descriptors, and MUST
|
||||
* be the first byte in this structure.
|
||||
*/
|
||||
typedef union od /* OBJECT DESCRIPTOR */
|
||||
{
|
||||
UINT8 ValType; /* See NsType in acpinmsp.h for values */
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
UINT32 Number;
|
||||
UINT32 Reserved3;
|
||||
void *Reserved4;
|
||||
void *Reserved5;
|
||||
} Number;
|
||||
|
||||
#define ACPI_OBJECT_COMMON_HEADER /* 32-bits plus 8-bit flag */\
|
||||
UINT8 DataType; /* To differentiate various internal objs */\
|
||||
UINT8 Type; /* ACPI_OBJECT_TYPE */\
|
||||
UINT16 ReferenceCount; /* For object deletion management */\
|
||||
UINT8 Flags; \
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 StrLen; /* # of bytes in string, excluding trailing null */
|
||||
UINT32 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
UINT8 *String; /* points to the string value in the AML stream
|
||||
* or in allocated space
|
||||
*/
|
||||
void *Reserved4;
|
||||
} String;
|
||||
|
||||
/* Defines for flag byte above */
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 BufLen; /* # of bytes in buffer */
|
||||
UINT32 Reserved2;
|
||||
UINT32 Sequence; /* Sequential count of buffers created */
|
||||
UINT8 *Buffer; /* points to the buffer in allocated space */
|
||||
void *Reserved4;
|
||||
} Buffer;
|
||||
|
||||
#define AOPOBJ_STATIC_ALLOCATION 0x1
|
||||
#define AOPOBJ_DATA_VALID 0x2
|
||||
#define AOPOBJ_INITIALIZED 0x4
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 PkgCount; /* # of elements in package */
|
||||
UINT32 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
union od **PackageElems; /* Addr of an allocated array of pointers
|
||||
* to the OBJECT_DESCRIPTORs representing
|
||||
* the elements
|
||||
*/
|
||||
union od **NextElement; /* used only while initializing */
|
||||
} Package;
|
||||
|
||||
struct
|
||||
{
|
||||
/* Using WORD_BIT instead of BYTE_BIT here because the wDatLen field
|
||||
* is larger than a UINT8. It is possible that some implementations
|
||||
* may map this in an unexpected way -- see code and comments in
|
||||
* amlexec.c:iPrep*FieldValue() -- but it works properly in IC386
|
||||
* and in MS Visual C++
|
||||
*/
|
||||
UINT16_BIT ValType : 8;
|
||||
UINT16_BIT Access : 4;
|
||||
UINT16_BIT LockRule : 1;
|
||||
UINT16_BIT UpdateRule : 2;
|
||||
UINT16_BIT Reserved1 : 1;
|
||||
UINT16_BIT DatLen :13; /* # of bits in buffer */
|
||||
UINT16_BIT BitOffset : 3;
|
||||
UINT32 Offset; /* Byte offset within containing object */
|
||||
UINT32 ConSeq; /* Container's sequence number */
|
||||
union od *Container; /* Containing object (Buffer) */
|
||||
void *Reserved3;
|
||||
} FieldUnit;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
UINT32 Reserved4;
|
||||
NsHandle Device;
|
||||
void *Reserved5;
|
||||
} Device;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 SignalCount;
|
||||
UINT32 Semaphore;
|
||||
UINT16 LockCount;
|
||||
UINT16 ThreadId;
|
||||
void *Reserved4;
|
||||
void *Reserved5;
|
||||
} Event;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 NumParam;
|
||||
UINT16 Length;
|
||||
UINT32 AmlOffset;
|
||||
UINT32 Reserved3;
|
||||
UINT8 *AmlBase;
|
||||
void *Reserved4;
|
||||
} Method;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 SyncLevel;
|
||||
UINT16 Reserved2;
|
||||
UINT32 Semaphore;
|
||||
UINT16 LockCount;
|
||||
UINT16 ThreadId;
|
||||
void *Reserved4;
|
||||
void *Reserved5;
|
||||
} Mutex;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 SpaceId;
|
||||
UINT16 AdrLenValid; /* 1 => dAddress & dLength have been set
|
||||
* 0 => dAddress & dLength have not been set,
|
||||
* and should be obtained via sAdrLoc
|
||||
*/
|
||||
UINT32 Address;
|
||||
UINT32 Length;
|
||||
meth AdrLoc; /* Loc of 1st (address) OpCode in AML stream */
|
||||
} Region;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
UINT32 Reserved4;
|
||||
NsHandle PowerResource;
|
||||
void *Reserved5;
|
||||
} PowerResource;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
UINT32 Reserved4;
|
||||
NsHandle Processor;
|
||||
void *Reserved5;
|
||||
} Processor;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
UINT32 Reserved4;
|
||||
NsHandle ThermalZone;
|
||||
void *Reserved5;
|
||||
} ThermalZone;
|
||||
|
||||
struct
|
||||
{
|
||||
/* See comments in sFieldUnit re use of WORD_BIT */
|
||||
|
||||
UINT16_BIT ValType : 8;
|
||||
UINT16_BIT Access : 4;
|
||||
UINT16_BIT LockRule : 1;
|
||||
UINT16_BIT UpdateRule : 2;
|
||||
UINT16_BIT Reserved1 : 1;
|
||||
UINT16_BIT DatLen :13; /* # of bits in buffer */
|
||||
UINT16_BIT BitOffset : 3;
|
||||
UINT32 Offset; /* Byte offset within containing object */
|
||||
UINT32 Reserved2;
|
||||
union od *Container; /* Containing object */
|
||||
void *Reserved3;
|
||||
} Field;
|
||||
|
||||
struct
|
||||
{
|
||||
/* See comments in sFieldUnit re use of WORD_BIT */
|
||||
|
||||
UINT16_BIT ValType : 8;
|
||||
UINT16_BIT Access : 4;
|
||||
UINT16_BIT LockRule : 1;
|
||||
UINT16_BIT UpdateRule : 2;
|
||||
UINT16_BIT Reserved1 : 1;
|
||||
UINT16_BIT DatLen :13; /* # of bits in buffer */
|
||||
UINT16_BIT BitOffset : 3;
|
||||
UINT32 Offset; /* Byte offset within containing object */
|
||||
UINT32 BankVal; /* Value to store into pBankSelect */
|
||||
union od *Container; /* Containing object */
|
||||
NsHandle BankSelect; /* Bank select register */
|
||||
} BankField;
|
||||
|
||||
struct
|
||||
{
|
||||
/* See comments in sFieldUnit re use of WORD_BIT */
|
||||
|
||||
UINT16_BIT ValType : 8;
|
||||
UINT16_BIT Access : 4;
|
||||
UINT16_BIT LockRule : 1;
|
||||
UINT16_BIT UpdateRule : 2;
|
||||
UINT16_BIT Reserved1 : 1;
|
||||
UINT16_BIT DatLen :13; /* # of bits in buffer */
|
||||
UINT16_BIT BitOffset : 3;
|
||||
UINT32 IndexVal; /* Value to store into Index register */
|
||||
UINT32 Reserved2; /* No container pointer needed since the index
|
||||
* and data register definitions will define
|
||||
* how to access the respective registers
|
||||
*/
|
||||
NsHandle Index; /* Index register */
|
||||
NsHandle Data; /* Data register */
|
||||
} IndexField;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 ValType;
|
||||
UINT8 OpCode; /* Arg#, Local#, IndexOp, NameOp,
|
||||
* ZeroOp, OneOp, OnesOp, Debug1 => DebugOp
|
||||
*/
|
||||
UINT16 Reserved1;
|
||||
UINT32 Reserved2;
|
||||
UINT32 Reserved3;
|
||||
void *Ref; /* bOpCode Use of pvRef field
|
||||
* ------- ----------------------------
|
||||
* NameOp NsHandle for referenced name
|
||||
* IndexOp OBJECT_DESCRIPTOR **
|
||||
*/
|
||||
void *Reserved4;
|
||||
} Lvalue;
|
||||
|
||||
} OBJECT_DESCRIPTOR;
|
||||
|
||||
|
||||
/*
|
||||
* Common bitfield for the field objects
|
||||
*/
|
||||
#define ACPI_COMMON_FIELD_INFO /* Three 32-bit values plus 8*/\
|
||||
UINT8 Granularity;\
|
||||
UINT16 Length; \
|
||||
UINT32 Offset; /* Byte offset within containing object */\
|
||||
UINT8 BitOffset; /* Bit offset within min read/write data unit */\
|
||||
UINT8 Access; /* AccessType */\
|
||||
UINT8 LockRule;\
|
||||
UINT8 UpdateRule;\
|
||||
UINT8 AccessAttribute;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Individual Object Descriptors
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
typedef struct /* COMMON */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
} ACPI_OBJECT_COMMON;
|
||||
|
||||
|
||||
typedef struct /* CACHE_LIST */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
union acpi_operand_obj *Next; /* Link for object cache and internal lists*/
|
||||
|
||||
} ACPI_OBJECT_CACHE_LIST;
|
||||
|
||||
|
||||
typedef struct /* NUMBER - has value */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_INTEGER Value;
|
||||
|
||||
} ACPI_OBJECT_NUMBER;
|
||||
|
||||
|
||||
typedef struct /* STRING - has length and pointer */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT32 Length;
|
||||
NATIVE_CHAR *Pointer; /* String value in AML stream or in allocated space */
|
||||
|
||||
} ACPI_OBJECT_STRING;
|
||||
|
||||
|
||||
typedef struct /* BUFFER - has length, sequence, and pointer */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT32 Length;
|
||||
UINT32 Sequence; /* Sequential count of buffers created */
|
||||
|
||||
UINT8 *Pointer; /* points to the buffer in allocated space */
|
||||
|
||||
} ACPI_OBJECT_BUFFER;
|
||||
|
||||
|
||||
typedef struct /* PACKAGE - has count, elements, next element */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT32 Count; /* # of elements in package */
|
||||
|
||||
union acpi_operand_obj **Elements; /* Array of pointers to AcpiObjects */
|
||||
union acpi_operand_obj **NextElement; /* used only while initializing */
|
||||
|
||||
} ACPI_OBJECT_PACKAGE;
|
||||
|
||||
|
||||
typedef struct /* FIELD UNIT */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
|
||||
union acpi_operand_obj *Extra; /* Pointer to executable AML (in field definition) */
|
||||
ACPI_NAMESPACE_NODE *Node; /* containing object */
|
||||
union acpi_operand_obj *Container; /* Containing object (Buffer) */
|
||||
|
||||
} ACPI_OBJECT_FIELD_UNIT;
|
||||
|
||||
|
||||
typedef struct /* DEVICE - has handle and notification handler/context */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
|
||||
} ACPI_OBJECT_DEVICE;
|
||||
|
||||
|
||||
typedef struct /* EVENT */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
void *Semaphore;
|
||||
|
||||
} ACPI_OBJECT_EVENT;
|
||||
|
||||
|
||||
#define INFINITE_CONCURRENCY 0xFF
|
||||
|
||||
typedef struct /* METHOD */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 MethodFlags;
|
||||
UINT8 ParamCount;
|
||||
|
||||
UINT32 PcodeLength;
|
||||
|
||||
void *Semaphore;
|
||||
UINT8 *Pcode;
|
||||
|
||||
UINT8 Concurrency;
|
||||
UINT8 ThreadCount;
|
||||
ACPI_OWNER_ID OwningId;
|
||||
|
||||
} ACPI_OBJECT_METHOD;
|
||||
|
||||
|
||||
typedef struct /* MUTEX */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT16 SyncLevel;
|
||||
|
||||
void *Semaphore;
|
||||
|
||||
} ACPI_OBJECT_MUTEX;
|
||||
|
||||
|
||||
typedef struct /* REGION */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 SpaceId;
|
||||
UINT32 Length;
|
||||
ACPI_PHYSICAL_ADDRESS Address;
|
||||
union acpi_operand_obj *Extra; /* Pointer to executable AML (in region definition) */
|
||||
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for system notifies */
|
||||
ACPI_NAMESPACE_NODE *Node; /* containing object */
|
||||
union acpi_operand_obj *Next;
|
||||
|
||||
} ACPI_OBJECT_REGION;
|
||||
|
||||
|
||||
typedef struct /* POWER RESOURCE - has Handle and notification handler/context*/
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT32 SystemLevel;
|
||||
UINT32 ResourceOrder;
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
|
||||
} ACPI_OBJECT_POWER_RESOURCE;
|
||||
|
||||
|
||||
typedef struct /* PROCESSOR - has Handle and notification handler/context*/
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT32 ProcId;
|
||||
UINT32 Length;
|
||||
ACPI_IO_ADDRESS Address;
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
|
||||
} ACPI_OBJECT_PROCESSOR;
|
||||
|
||||
|
||||
typedef struct /* THERMAL ZONE - has Handle and Handler/Context */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
|
||||
} ACPI_OBJECT_THERMAL_ZONE;
|
||||
|
||||
|
||||
/*
|
||||
* Internal types
|
||||
* This appears to be obsolete!!
|
||||
*/
|
||||
|
||||
|
||||
typedef struct /* FIELD */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
|
||||
union acpi_operand_obj *Container; /* Containing object */
|
||||
|
||||
} ACPI_OBJECT_FIELD;
|
||||
|
||||
|
||||
typedef struct /* BANK FIELD */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
UINT32 Value; /* Value to store into BankSelect */
|
||||
|
||||
ACPI_HANDLE BankSelect; /* Bank select register */
|
||||
union acpi_operand_obj *Container; /* Containing object */
|
||||
|
||||
} ACPI_OBJECT_BANK_FIELD;
|
||||
|
||||
|
||||
typedef struct /* INDEX FIELD */
|
||||
{
|
||||
/*
|
||||
* No container pointer needed since the index and data register definitions
|
||||
* will define how to access the respective registers
|
||||
*/
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
UINT32 Value; /* Value to store into Index register */
|
||||
|
||||
ACPI_HANDLE Index; /* Index register */
|
||||
ACPI_HANDLE Data; /* Data register */
|
||||
|
||||
} ACPI_OBJECT_INDEX_FIELD;
|
||||
|
||||
|
||||
typedef struct /* NOTIFY HANDLER */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_NAMESPACE_NODE *Node; /* Parent device */
|
||||
NOTIFY_HANDLER Handler;
|
||||
void *Context;
|
||||
|
||||
} ACPI_OBJECT_NOTIFY_HANDLER;
|
||||
|
||||
|
||||
/* Flags for address handler */
|
||||
|
||||
#define ADDR_HANDLER_DEFAULT_INSTALLED 0x1
|
||||
|
||||
|
||||
typedef struct /* ADDRESS HANDLER */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 SpaceId;
|
||||
UINT16 Hflags;
|
||||
ADDRESS_SPACE_HANDLER Handler;
|
||||
|
||||
ACPI_NAMESPACE_NODE *Node; /* Parent device */
|
||||
void *Context;
|
||||
ADDRESS_SPACE_SETUP Setup;
|
||||
union acpi_operand_obj *RegionList; /* regions using this handler */
|
||||
union acpi_operand_obj *Next;
|
||||
|
||||
} ACPI_OBJECT_ADDR_HANDLER;
|
||||
|
||||
|
||||
/*
|
||||
* The Reference object type is used for these opcodes:
|
||||
* Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp
|
||||
/*
|
||||
* The sLvalue case of OBJECT_DESCRIPTOR includes a one-byte field which
|
||||
* contains an AML opcode identifying the type of lvalue. Debug1 is used
|
||||
* in this field as a stand-in for the (two-byte) AML encoding of DebugOp.
|
||||
*/
|
||||
|
||||
typedef struct /* Reference - Local object type */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 TargetType; /* Used for IndexOp */
|
||||
UINT16 OpCode;
|
||||
UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */
|
||||
|
||||
void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
union acpi_operand_obj **Where;
|
||||
|
||||
} ACPI_OBJECT_REFERENCE;
|
||||
#define Debug1 0x31
|
||||
|
||||
|
||||
/*
|
||||
* Extra object is used as additional storage for types that
|
||||
* have AML code in their declarations (TermArgs) that must be
|
||||
* evaluated at run time.
|
||||
*
|
||||
* Currently: Region and FieldUnit types
|
||||
*/
|
||||
|
||||
typedef struct /* EXTRA */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 ByteFill1;
|
||||
UINT16 WordFill1;
|
||||
UINT32 PcodeLength;
|
||||
UINT8 *Pcode;
|
||||
ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
|
||||
void *RegionContext; /* Region-specific data */
|
||||
#endif
|
||||
|
||||
} ACPI_OBJECT_EXTRA;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef union acpi_operand_obj
|
||||
{
|
||||
ACPI_OBJECT_COMMON Common;
|
||||
ACPI_OBJECT_CACHE_LIST Cache;
|
||||
ACPI_OBJECT_NUMBER Number;
|
||||
ACPI_OBJECT_STRING String;
|
||||
ACPI_OBJECT_BUFFER Buffer;
|
||||
ACPI_OBJECT_PACKAGE Package;
|
||||
ACPI_OBJECT_FIELD_UNIT FieldUnit;
|
||||
ACPI_OBJECT_DEVICE Device;
|
||||
ACPI_OBJECT_EVENT Event;
|
||||
ACPI_OBJECT_METHOD Method;
|
||||
ACPI_OBJECT_MUTEX Mutex;
|
||||
ACPI_OBJECT_REGION Region;
|
||||
ACPI_OBJECT_POWER_RESOURCE PowerResource;
|
||||
ACPI_OBJECT_PROCESSOR Processor;
|
||||
ACPI_OBJECT_THERMAL_ZONE ThermalZone;
|
||||
ACPI_OBJECT_FIELD Field;
|
||||
ACPI_OBJECT_BANK_FIELD BankField;
|
||||
ACPI_OBJECT_INDEX_FIELD IndexField;
|
||||
ACPI_OBJECT_REFERENCE Reference;
|
||||
ACPI_OBJECT_NOTIFY_HANDLER NotifyHandler;
|
||||
ACPI_OBJECT_ADDR_HANDLER AddrHandler;
|
||||
ACPI_OBJECT_EXTRA Extra;
|
||||
|
||||
} ACPI_OPERAND_OBJECT;
|
||||
|
||||
#endif /* _ACOBJECT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user