patch-2.4.6 linux/drivers/acpi/include/acobject.h
Next file: linux/drivers/acpi/include/acoutput.h
Previous file: linux/drivers/acpi/include/acnamesp.h
Back to the patch index
Back to the overall index
- Lines: 269
- Date:
Wed Jun 20 17:47:40 2001
- Orig file:
v2.4.5/linux/drivers/acpi/include/acobject.h
- Orig date:
Mon Jan 22 13:23:42 2001
diff -u --recursive --new-file v2.4.5/linux/drivers/acpi/include/acobject.h linux/drivers/acpi/include/acobject.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
- * $Revision: 78 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -58,7 +58,7 @@
*/
-#define ACPI_OBJECT_COMMON_HEADER /* 32-bits plus 8-bit flag */\
+#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32-bits plus trailing 8-bit flag */\
u8 data_type; /* To differentiate various internal objs */\
u8 type; /* ACPI_OBJECT_TYPE */\
u16 reference_count; /* For object deletion management */\
@@ -73,16 +73,27 @@
/*
* 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 /* Three 32-bit values plus 8*/\
- u8 granularity;\
- u16 length; \
- u32 offset; /* Byte offset within containing object */\
- u8 bit_offset; /* Bit offset within min read/write data unit */\
- u8 access; /* Access_type */\
- u8 lock_rule;\
- u8 update_rule;\
- u8 access_attribute;
+#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
+ u8 access_flags;\
+ u16 bit_length; /* Length of field in bits */\
+ u32 base_byte_offset; /* Byte offset within containing object */\
+ u8 access_bit_width; /* Read/Write size in bits (from ASL Access_type)*/\
+ u8 access_byte_width; /* Read/Write size in bytes */\
+ u8 update_rule; /* How neighboring field bits are handled */\
+ u8 lock_rule; /* Global Lock: 1 = "Must Lock" */\
+ u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
+ u8 datum_valid_bits; /* Valid bit in first "Field datum" */\
+ u8 end_field_valid_bits; /* Valid bits in the last "field datum" */\
+ u8 end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
+ u32 value; /* Value to store into the Bank or Index register */
+
+
+/* Access flag bits */
+
+#define AFIELD_SINGLE_DATUM 0x1
/******************************************************************************
@@ -121,7 +132,7 @@
ACPI_OBJECT_COMMON_HEADER
u32 length;
- NATIVE_CHAR *pointer; /* String value in AML stream or in allocated space */
+ NATIVE_CHAR *pointer; /* String value in AML stream or in allocated space */
} ACPI_OBJECT_STRING;
@@ -131,7 +142,7 @@
ACPI_OBJECT_COMMON_HEADER
u32 length;
- u8 *pointer; /* points to the buffer in allocated space */
+ u8 *pointer; /* points to the buffer in allocated space */
} ACPI_OBJECT_BUFFER;
@@ -140,27 +151,14 @@
{
ACPI_OBJECT_COMMON_HEADER
- u32 count; /* # of elements in package */
+ u32 count; /* # of elements in package */
- union acpi_operand_obj **elements; /* Array of pointers to Acpi_objects */
- union acpi_operand_obj **next_element; /* used only while initializing */
+ union acpi_operand_obj **elements; /* Array of pointers to Acpi_objects */
+ union acpi_operand_obj **next_element; /* 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
@@ -175,7 +173,6 @@
typedef struct /* EVENT */
{
ACPI_OBJECT_COMMON_HEADER
-
void *semaphore;
} ACPI_OBJECT_EVENT;
@@ -201,12 +198,16 @@
} ACPI_OBJECT_METHOD;
-typedef struct /* MUTEX */
+typedef struct acpi_obj_mutex /* MUTEX */
{
ACPI_OBJECT_COMMON_HEADER
u16 sync_level;
+ u16 acquisition_depth;
void *semaphore;
+ void *owner;
+ union acpi_operand_obj *prev; /* Link for list of acquired mutexes */
+ union acpi_operand_obj *next; /* Link for list of acquired mutexes */
} ACPI_OBJECT_MUTEX;
@@ -267,57 +268,78 @@
/*
- * Internal types
+ * Fields. All share a common header/info field.
*/
-
-typedef struct /* FIELD */
+typedef struct /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
{
ACPI_OBJECT_COMMON_HEADER
-
ACPI_COMMON_FIELD_INFO
+ union acpi_operand_obj *region_obj; /* Containing Operation Region object */
+ /* (REGION/BANK fields only) */
+} ACPI_OBJECT_FIELD_COMMON;
- union acpi_operand_obj *container; /* Containing object */
-} ACPI_OBJECT_FIELD;
+typedef struct /* REGION FIELD */
+{
+ ACPI_OBJECT_COMMON_HEADER
+ ACPI_COMMON_FIELD_INFO
+ union acpi_operand_obj *region_obj; /* Containing Op_region object */
+
+} ACPI_OBJECT_REGION_FIELD;
typedef struct /* BANK FIELD */
{
ACPI_OBJECT_COMMON_HEADER
-
ACPI_COMMON_FIELD_INFO
- u32 value; /* Value to store into Bank_select */
- ACPI_HANDLE bank_select; /* Bank select register */
- union acpi_operand_obj *container; /* Containing object */
+ union acpi_operand_obj *region_obj; /* Containing Op_region object */
+ union acpi_operand_obj *bank_register_obj; /* Bank_select Register object */
} ACPI_OBJECT_BANK_FIELD;
typedef struct /* INDEX FIELD */
{
+ ACPI_OBJECT_COMMON_HEADER
+ ACPI_COMMON_FIELD_INFO
+
/*
- * No container pointer needed since the index and data register definitions
- * will define how to access the respective registers
+ * No "Region_obj" pointer needed since the Index and Data registers
+ * are each field definitions unto themselves.
*/
- ACPI_OBJECT_COMMON_HEADER
+ union acpi_operand_obj *index_obj; /* Index register */
+ union acpi_operand_obj *data_obj; /* Data register */
+
+
+} ACPI_OBJECT_INDEX_FIELD;
+
+/* The Buffer_field is different in that it is part of a Buffer, not an Op_region */
+
+typedef struct /* BUFFER FIELD */
+{
+ ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- u32 value; /* Value to store into Index register */
- ACPI_HANDLE index; /* Index register */
- ACPI_HANDLE data; /* Data register */
+ union acpi_operand_obj *extra; /* Pointer to executable AML (in field definition) */
+ ACPI_NAMESPACE_NODE *node; /* Parent (containing) object node */
+ union acpi_operand_obj *buffer_obj; /* Containing Buffer object */
+
+} ACPI_OBJECT_BUFFER_FIELD;
-} ACPI_OBJECT_INDEX_FIELD;
+/*
+ * Handlers
+ */
typedef struct /* NOTIFY HANDLER */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_NAMESPACE_NODE *node; /* Parent device */
- NOTIFY_HANDLER handler;
+ ACPI_NOTIFY_HANDLER handler;
void *context;
} ACPI_OBJECT_NOTIFY_HANDLER;
@@ -334,11 +356,11 @@
u8 space_id;
u16 hflags;
- ADDRESS_SPACE_HANDLER handler;
+ ACPI_ADR_SPACE_HANDLER handler;
ACPI_NAMESPACE_NODE *node; /* Parent device */
void *context;
- ADDRESS_SPACE_SETUP setup;
+ ACPI_ADR_SPACE_SETUP setup;
union acpi_operand_obj *region_list; /* regions using this handler */
union acpi_operand_obj *next;
@@ -355,7 +377,7 @@
ACPI_OBJECT_COMMON_HEADER
u8 target_type; /* Used for Index_op */
- u16 op_code;
+ u16 opcode;
u32 offset; /* Used for Arg_op, Local_op, and Index_op */
void *object; /* Name_op=>HANDLE to obj, Index_op=>ACPI_OPERAND_OBJECT */
@@ -400,7 +422,7 @@
ACPI_OBJECT_STRING string;
ACPI_OBJECT_BUFFER buffer;
ACPI_OBJECT_PACKAGE package;
- ACPI_OBJECT_FIELD_UNIT field_unit;
+ ACPI_OBJECT_BUFFER_FIELD buffer_field;
ACPI_OBJECT_DEVICE device;
ACPI_OBJECT_EVENT event;
ACPI_OBJECT_METHOD method;
@@ -409,7 +431,8 @@
ACPI_OBJECT_POWER_RESOURCE power_resource;
ACPI_OBJECT_PROCESSOR processor;
ACPI_OBJECT_THERMAL_ZONE thermal_zone;
- ACPI_OBJECT_FIELD field;
+ ACPI_OBJECT_FIELD_COMMON common_field;
+ ACPI_OBJECT_REGION_FIELD field;
ACPI_OBJECT_BANK_FIELD bank_field;
ACPI_OBJECT_INDEX_FIELD index_field;
ACPI_OBJECT_REFERENCE reference;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)