2005-04-17 02:20:36 +04:00
/******************************************************************************
*
2006-03-18 00:44:00 +03:00
* Name : acobject . h - Definition of union acpi_operand_object ( Internal object only )
2005-04-17 02:20:36 +04:00
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
2008-04-24 07:00:13 +04:00
* Copyright ( C ) 2000 - 2008 , Intel Corp .
2005-04-17 02:20:36 +04:00
* 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 .
*/
# ifndef _ACOBJECT_H
# define _ACOBJECT_H
2006-03-18 00:44:00 +03:00
/* acpisrc:struct_defs -- for acpisrc conversion */
2005-04-17 02:20:36 +04:00
/*
2006-03-18 00:44:00 +03:00
* The union acpi_operand_object is used to pass AML operands from the dispatcher
2005-04-17 02:20:36 +04:00
* to the interpreter , and to keep track of the various handlers such as
2006-03-18 00:44:00 +03:00
* address space handlers and notify handlers . The object is a constant
2005-04-17 02:20:36 +04:00
* size in order to allow it to be cached and reused .
2007-02-02 19:48:23 +03:00
*
* Note : The object is optimized to be aligned and will not work if it is
* byte - packed .
2005-04-17 02:20:36 +04:00
*/
2007-02-02 19:48:23 +03:00
# if ACPI_MACHINE_WIDTH == 64
# pragma pack(8)
# else
# pragma pack(4)
# endif
2005-04-17 02:20:36 +04:00
/*******************************************************************************
*
* Common Descriptors
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Common area for all objects .
*
2006-03-18 00:44:00 +03:00
* descriptor_type is used to differentiate between internal descriptors , and
* must be in the same place across all descriptors
ACPI: ACPICA 20060331
Implemented header file support for the following
additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR,
SPMI, TCPA, and WDRT. With this support, all current and
known ACPI tables are now defined in the ACPICA headers and
are available for use by device drivers and other software.
Implemented support to allow tables that contain ACPI
names with invalid characters to be loaded. Previously,
this would cause the table load to fail, but since
there are several known cases of such tables on
existing machines, this change was made to enable
ACPI support for them. Also, this matches the
behavior of the Microsoft ACPI implementation.
https://bugzilla.novell.com/show_bug.cgi?id=147621
Fixed a couple regressions introduced during the memory
optimization in the 20060317 release. The namespace
node definition required additional reorganization and
an internal datatype that had been changed to 8-bit was
restored to 32-bit. (Valery Podrezov)
Fixed a problem where a null pointer passed to
acpi_ut_delete_generic_state() could be passed through
to acpi_os_release_object which is unexpected. Such
null pointers are now trapped and ignored, matching
the behavior of the previous implementation before the
deployment of acpi_os_release_object(). (Valery Podrezov,
Fiodor Suietov)
Fixed a memory mapping leak during the deletion of
a SystemMemory operation region where a cached memory
mapping was not deleted. This became a noticeable problem
for operation regions that are defined within frequently
used control methods. (Dana Meyers)
Reorganized the ACPI table header files into two main
files: one for the ACPI tables consumed by the ACPICA core,
and another for the miscellaneous ACPI tables that are
consumed by the drivers and other software. The various
FADT definitions were merged into one common section and
three different tables (ACPI 1.0, 1.0+, and 2.0)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 09:00:00 +04:00
*
* Note : The descriptor_type and Type fields must appear in the identical
* position in both the struct acpi_namespace_node and union acpi_operand_object
* structures .
2005-04-17 02:20:36 +04:00
*/
2006-03-18 00:44:00 +03:00
# define ACPI_OBJECT_COMMON_HEADER \
union acpi_operand_object * next_object ; /* Objects linked to parent NS node */ \
u8 descriptor_type ; /* To differentiate various internal objs */ \
u8 type ; /* acpi_object_type */ \
u16 reference_count ; /* For object deletion management */ \
u8 flags ;
/*
* Note : There are 3 bytes available here before the
* next natural alignment boundary ( for both 32 / 64 cases )
*/
/* Values for Flag byte above */
2005-04-17 02:20:36 +04:00
# define AOPOBJ_AML_CONSTANT 0x01
# define AOPOBJ_STATIC_POINTER 0x02
# define AOPOBJ_DATA_VALID 0x04
# define AOPOBJ_OBJECT_INITIALIZED 0x08
# define AOPOBJ_SETUP_COMPLETE 0x10
# define AOPOBJ_SINGLE_DATUM 0x20
2009-07-28 02:42:38 +04:00
# define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */
2009-08-13 10:03:15 +04:00
# define AOPOBJ_MODULE_LEVEL 0x80
2005-04-17 02:20:36 +04:00
/******************************************************************************
*
* Basic data types
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2005-08-05 08:44:28 +04:00
struct acpi_object_common {
ACPI_OBJECT_COMMON_HEADER } ;
2005-04-17 02:20:36 +04:00
2005-08-05 08:44:28 +04:00
struct acpi_object_integer {
2007-02-02 19:48:23 +03:00
ACPI_OBJECT_COMMON_HEADER u8 fill [ 3 ] ; /* Prevent warning on some compilers */
acpi_integer value ;
2005-04-17 02:20:36 +04:00
} ;
/*
* Note : The String and Buffer object must be identical through the Pointer
2006-03-18 00:44:00 +03:00
* and length elements . There is code that depends on this .
*
* Fields common to both Strings and Buffers
2005-04-17 02:20:36 +04:00
*/
2006-03-18 00:44:00 +03:00
# define ACPI_COMMON_BUFFER_INFO(_type) \
_type * pointer ; \
u32 length ;
2005-08-05 08:44:28 +04:00
struct acpi_object_string { /* Null terminated, ASCII characters only */
2006-03-18 00:44:00 +03:00
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO ( char ) /* String in AML stream or allocated string */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_buffer {
2006-03-18 00:44:00 +03:00
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO ( u8 ) /* Buffer in AML stream or allocated buffer */
2005-08-05 08:44:28 +04:00
u32 aml_length ;
2006-03-18 00:44:00 +03:00
u8 * aml_start ;
struct acpi_namespace_node * node ; /* Link back to parent node */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_package {
2006-03-18 00:44:00 +03:00
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node * node ; /* Link back to parent node */
2005-08-05 08:44:28 +04:00
union acpi_operand_object * * elements ; /* Array of pointers to acpi_objects */
2006-03-18 00:44:00 +03:00
u8 * aml_start ;
u32 aml_length ;
u32 count ; /* # of elements in package */
2005-04-17 02:20:36 +04:00
} ;
/******************************************************************************
*
* Complex data types
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2005-08-05 08:44:28 +04:00
struct acpi_object_event {
2006-06-24 01:04:00 +04:00
ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore ; /* Actual OS synchronization object */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_mutex {
ACPI_OBJECT_COMMON_HEADER u8 sync_level ; /* 0-15, specified in Mutex() call */
u16 acquisition_depth ; /* Allow multiple Acquires, same thread */
2006-06-24 01:04:00 +04:00
acpi_mutex os_mutex ; /* Actual OS synchronization object */
2008-04-10 19:06:37 +04:00
acpi_thread_id thread_id ; /* Current owner of the mutex */
struct acpi_thread_state * owner_thread ; /* Current owner of the mutex */
2005-08-05 08:44:28 +04:00
union acpi_operand_object * prev ; /* Link for list of acquired mutexes */
union acpi_operand_object * next ; /* Link for list of acquired mutexes */
struct acpi_namespace_node * node ; /* Containing namespace node */
u8 original_sync_level ; /* Owner's original sync level (0-15) */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_region {
ACPI_OBJECT_COMMON_HEADER u8 space_id ;
struct acpi_namespace_node * node ; /* Containing namespace node */
2006-03-18 00:44:00 +03:00
union acpi_operand_object * handler ; /* Handler for region access */
2005-08-05 08:44:28 +04:00
union acpi_operand_object * next ;
acpi_physical_address address ;
2006-03-18 00:44:00 +03:00
u32 length ;
} ;
struct acpi_object_method {
ACPI_OBJECT_COMMON_HEADER u8 method_flags ;
u8 param_count ;
2006-06-24 01:04:00 +04:00
u8 sync_level ;
union acpi_operand_object * mutex ;
2006-03-18 00:44:00 +03:00
u8 * aml_start ;
2009-12-11 10:28:27 +03:00
union {
ACPI_INTERNAL_METHOD implementation ;
union acpi_operand_object * handler ;
} extra ;
2006-03-18 00:44:00 +03:00
u32 aml_length ;
u8 thread_count ;
acpi_owner_id owner_id ;
2005-04-17 02:20:36 +04:00
} ;
/******************************************************************************
*
* Objects that can be notified . All share a common notify_info area .
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2006-03-18 00:44:00 +03:00
/*
* Common fields for objects that support ASL notifications
*/
# define ACPI_COMMON_NOTIFY_INFO \
union acpi_operand_object * system_notify ; /* Handler for system notifies */ \
union acpi_operand_object * device_notify ; /* Handler for driver notifies */ \
union acpi_operand_object * handler ; /* Handler for Address space */
2005-08-05 08:44:28 +04:00
struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO } ;
2005-04-17 02:20:36 +04:00
2005-08-05 08:44:28 +04:00
struct acpi_object_device {
2005-04-17 02:20:36 +04:00
ACPI_OBJECT_COMMON_HEADER
2005-08-05 08:44:28 +04:00
ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info * gpe_block ;
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_power_resource {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level ;
u32 resource_order ;
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_processor {
2007-02-02 19:48:23 +03:00
ACPI_OBJECT_COMMON_HEADER
/* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
u8 proc_id ;
2006-03-18 00:44:00 +03:00
u8 length ;
2007-05-10 07:34:35 +04:00
ACPI_COMMON_NOTIFY_INFO acpi_io_address address ;
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_thermal_zone {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO } ;
2005-04-17 02:20:36 +04:00
/******************************************************************************
*
* Fields . All share a common header / info field .
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2006-03-18 00:44:00 +03:00
/*
* Common bitfield for the field objects
* " Field Datum " - - a datum from the actual field object
* " Buffer Datum " - - a datum from a user buffer , read from or to be written to the field
*/
# define ACPI_COMMON_FIELD_INFO \
u8 field_flags ; /* Access, update, and lock bits */ \
u8 attribute ; /* From access_as keyword */ \
u8 access_byte_width ; /* Read/Write size in bytes */ \
struct acpi_namespace_node * node ; /* Link back to parent node */ \
u32 bit_length ; /* Length of field in bits */ \
u32 base_byte_offset ; /* Byte offset within containing object */ \
u32 value ; /* Value to store into the Bank or Index register */ \
u8 start_field_bit_offset ; /* Bit offset within first field datum (0-63) */ \
u8 access_bit_width ; /* Read/Write size in bits (8-64) */
2005-08-05 08:44:28 +04:00
struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
2006-03-18 00:44:00 +03:00
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object * region_obj ; /* Parent Operation Region object (REGION/BANK fields only) */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_region_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object * region_obj ; /* Containing op_region object */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_bank_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object * region_obj ; /* Containing op_region object */
union acpi_operand_object * bank_obj ; /* bank_select Register object */
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_index_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO
/*
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)
Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)
Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.
Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)
Defined and deployed a new OSL interface,
acpi_os_validate_address(). This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)
Defined and deployed a new OSL interface,
acpi_os_validate_interface(). This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)
Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)
Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.
The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-22 01:15:00 +04:00
* No " RegionObj " pointer needed since the Index and Data registers
2005-08-05 08:44:28 +04:00
* are each field definitions unto themselves .
*/
union acpi_operand_object * index_obj ; /* Index register */
union acpi_operand_object * data_obj ; /* Data register */
2005-04-17 02:20:36 +04:00
} ;
/* The buffer_field is different in that it is part of a Buffer, not an op_region */
2005-08-05 08:44:28 +04:00
struct acpi_object_buffer_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object * buffer_obj ; /* Containing Buffer object */
2005-04-17 02:20:36 +04:00
} ;
/******************************************************************************
*
* Objects for handlers
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2005-08-05 08:44:28 +04:00
struct acpi_object_notify_handler {
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node * node ; /* Parent device */
2010-02-18 01:42:59 +03:00
u32 handler_type ;
2005-08-05 08:44:28 +04:00
acpi_notify_handler handler ;
void * context ;
2010-02-18 01:42:59 +03:00
struct acpi_object_notify_handler * next ;
2005-04-17 02:20:36 +04:00
} ;
2005-08-05 08:44:28 +04:00
struct acpi_object_addr_handler {
ACPI_OBJECT_COMMON_HEADER u8 space_id ;
2006-03-18 00:44:00 +03:00
u8 handler_flags ;
2005-08-05 08:44:28 +04:00
acpi_adr_space_handler handler ;
struct acpi_namespace_node * node ; /* Parent device */
void * context ;
acpi_adr_space_setup setup ;
union acpi_operand_object * region_list ; /* regions using this handler */
union acpi_operand_object * next ;
2005-04-17 02:20:36 +04:00
} ;
2006-03-18 00:44:00 +03:00
/* Flags for address handler (handler_flags) */
# define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01
2005-04-17 02:20:36 +04:00
/******************************************************************************
*
* Special internal objects
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
2008-09-27 07:08:41 +04:00
* The Reference object is used for these opcodes :
* Arg [ 0 - 6 ] , Local [ 0 - 7 ] , index_op , name_op , ref_of_op , load_op , load_table_op , debug_op
* The Reference . Class differentiates these types .
2005-04-17 02:20:36 +04:00
*/
2005-08-05 08:44:28 +04:00
struct acpi_object_reference {
2008-09-27 07:08:41 +04:00
ACPI_OBJECT_COMMON_HEADER u8 class ; /* Reference Class */
u8 target_type ; /* Used for Index Op */
u8 reserved ;
2006-03-18 00:44:00 +03:00
void * object ; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
2008-09-27 07:08:41 +04:00
struct acpi_namespace_node * node ; /* ref_of or Namepath */
union acpi_operand_object * * where ; /* Target of Index */
u32 value ; /* Used for Local/Arg/Index/ddb_handle */
2005-04-17 02:20:36 +04:00
} ;
2008-09-27 07:08:41 +04:00
/* Values for Reference.Class above */
typedef enum {
ACPI_REFCLASS_LOCAL = 0 , /* Method local */
ACPI_REFCLASS_ARG = 1 , /* Method argument */
ACPI_REFCLASS_REFOF = 2 , /* Result of ref_of() TBD: Split to Ref/Node and Ref/operand_obj? */
ACPI_REFCLASS_INDEX = 3 , /* Result of Index() */
ACPI_REFCLASS_TABLE = 4 , /* ddb_handle - Load(), load_table() */
ACPI_REFCLASS_NAME = 5 , /* Reference to a named object */
ACPI_REFCLASS_DEBUG = 6 , /* Debug object */
ACPI_REFCLASS_MAX = 6
} ACPI_REFERENCE_CLASSES ;
2005-04-17 02:20:36 +04:00
/*
* Extra object is used as additional storage for types that
* have AML code in their declarations ( term_args ) that must be
* evaluated at run time .
*
* Currently : Region and field_unit types
*/
2005-08-05 08:44:28 +04:00
struct acpi_object_extra {
2006-03-18 00:44:00 +03:00
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node * method_REG ; /* _REG method for this region (if any) */
2005-08-05 08:44:28 +04:00
void * region_context ; /* Region-specific data */
2006-03-18 00:44:00 +03:00
u8 * aml_start ;
u32 aml_length ;
2005-04-17 02:20:36 +04:00
} ;
/* Additional data that can be attached to namespace nodes */
2005-08-05 08:44:28 +04:00
struct acpi_object_data {
ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler ;
void * pointer ;
2005-04-17 02:20:36 +04:00
} ;
/* Structure used when objects are cached for reuse */
2005-08-05 08:44:28 +04:00
struct acpi_object_cache_list {
ACPI_OBJECT_COMMON_HEADER union acpi_operand_object * next ; /* Link for object cache and internal lists */
2005-04-17 02:20:36 +04:00
} ;
/******************************************************************************
*
* union acpi_operand_object Descriptor - a giant union of all of the above
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2005-08-05 08:44:28 +04:00
union acpi_operand_object {
struct acpi_object_common common ;
struct acpi_object_integer integer ;
struct acpi_object_string string ;
struct acpi_object_buffer buffer ;
struct acpi_object_package package ;
struct acpi_object_event event ;
struct acpi_object_method method ;
struct acpi_object_mutex mutex ;
struct acpi_object_region region ;
struct acpi_object_notify_common common_notify ;
struct acpi_object_device device ;
struct acpi_object_power_resource power_resource ;
struct acpi_object_processor processor ;
struct acpi_object_thermal_zone thermal_zone ;
struct acpi_object_field_common common_field ;
struct acpi_object_region_field field ;
struct acpi_object_buffer_field buffer_field ;
struct acpi_object_bank_field bank_field ;
struct acpi_object_index_field index_field ;
struct acpi_object_notify_handler notify ;
struct acpi_object_addr_handler address_space ;
struct acpi_object_reference reference ;
struct acpi_object_extra extra ;
struct acpi_object_data data ;
struct acpi_object_cache_list cache ;
2008-09-27 06:22:09 +04:00
/*
* Add namespace node to union in order to simplify code that accepts both
* ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs . The structures share
* a common descriptor_type field in order to differentiate them .
*/
struct acpi_namespace_node node ;
2005-04-17 02:20:36 +04:00
} ;
/******************************************************************************
*
* union acpi_descriptor - objects that share a common descriptor identifier
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Object descriptor types */
2005-08-05 08:44:28 +04:00
# define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
2005-04-17 02:20:36 +04:00
# define ACPI_DESC_TYPE_STATE 0x02
# define ACPI_DESC_TYPE_STATE_UPDATE 0x03
# define ACPI_DESC_TYPE_STATE_PACKAGE 0x04
# define ACPI_DESC_TYPE_STATE_CONTROL 0x05
# define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06
# define ACPI_DESC_TYPE_STATE_PSCOPE 0x07
# define ACPI_DESC_TYPE_STATE_WSCOPE 0x08
# define ACPI_DESC_TYPE_STATE_RESULT 0x09
# define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A
# define ACPI_DESC_TYPE_STATE_THREAD 0x0B
# define ACPI_DESC_TYPE_WALK 0x0C
# define ACPI_DESC_TYPE_PARSER 0x0D
# define ACPI_DESC_TYPE_OPERAND 0x0E
# define ACPI_DESC_TYPE_NAMED 0x0F
# define ACPI_DESC_TYPE_MAX 0x0F
2006-03-18 00:44:00 +03:00
struct acpi_common_descriptor {
void * common_pointer ;
u8 descriptor_type ; /* To differentiate various internal objs */
} ;
2005-08-05 08:44:28 +04:00
union acpi_descriptor {
2006-03-18 00:44:00 +03:00
struct acpi_common_descriptor common ;
2005-08-05 08:44:28 +04:00
union acpi_operand_object object ;
struct acpi_namespace_node node ;
union acpi_parse_object op ;
2005-04-17 02:20:36 +04:00
} ;
2007-02-02 19:48:23 +03:00
# pragma pack()
2005-08-05 08:44:28 +04:00
# endif /* _ACOBJECT_H */