diff options
| author | Len Brown <len.brown@intel.com> | 2004-10-22 18:13:06 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2004-10-22 18:13:06 -0400 |
| commit | 289a395eaaacf6584975e3b89915dad270c7235e (patch) | |
| tree | 3b668882aacfacd55bbc1bd1a28f73b69df8b559 /include | |
| parent | a6cfa26eb7452e2f85f9ccfcccc0e24a6f3f6c85 (diff) | |
| parent | c232f2a1033e9e480d6d73abb6f0d83cc419708f (diff) | |
Merge intel.com:/home/lenb/src/26-stable-dev
into intel.com:/home/lenb/src/26-latest-dev
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
| -rw-r--r-- | include/acpi/acglobal.h | 1 | ||||
| -rw-r--r-- | include/acpi/acinterp.h | 38 | ||||
| -rw-r--r-- | include/acpi/aclocal.h | 2 | ||||
| -rw-r--r-- | include/acpi/acobject.h | 5 | ||||
| -rw-r--r-- | include/acpi/acpiosxf.h | 9 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 9 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 17 | ||||
| -rw-r--r-- | include/acpi/acutils.h | 20 | ||||
| -rw-r--r-- | include/acpi/amlcode.h | 50 | ||||
| -rw-r--r-- | include/acpi/amlresrc.h | 4 | ||||
| -rw-r--r-- | include/acpi/platform/acenv.h | 2 |
12 files changed, 112 insertions, 47 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index e4a0f1e6f814..defb9820a219 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -64,7 +64,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20040816 +#define ACPI_CA_VERSION 0x20041015 /* * OS name, used for the _OS object. The _OS object is essentially obsolete, diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index eb16ee22e3d1..f8449dbb787f 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h @@ -180,6 +180,7 @@ ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX]; ACPI_EXTERN struct acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS]; ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; +ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore; diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index a43e91fb972c..849551744625 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h @@ -83,21 +83,25 @@ acpi_status acpi_ex_convert_to_integer ( union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc, - struct acpi_walk_state *walk_state); + u32 flags); acpi_status acpi_ex_convert_to_buffer ( union acpi_operand_object *obj_desc, - union acpi_operand_object **result_desc, - struct acpi_walk_state *walk_state); + union acpi_operand_object **result_desc); acpi_status acpi_ex_convert_to_string ( union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc, - u32 base, - u32 max_length, - struct acpi_walk_state *walk_state); + u32 type); + +/* Types for ->String conversion */ + +#define ACPI_EXPLICIT_BYTE_COPY 0x00000000 +#define ACPI_EXPLICIT_CONVERT_HEX 0x00000001 +#define ACPI_IMPLICIT_CONVERT_HEX 0x00000002 +#define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003 acpi_status acpi_ex_convert_to_target_type ( @@ -109,7 +113,7 @@ acpi_ex_convert_to_target_type ( u32 acpi_ex_convert_to_ascii ( acpi_integer integer, - u32 base, + u16 base, u8 *string, u8 max_length); @@ -243,11 +247,19 @@ acpi_ex_do_concatenate ( union acpi_operand_object **actual_return_desc, struct acpi_walk_state *walk_state); -u8 +acpi_status +acpi_ex_do_logical_numeric_op ( + u16 opcode, + acpi_integer integer0, + acpi_integer integer1, + u8 *logical_result); + +acpi_status acpi_ex_do_logical_op ( u16 opcode, - union acpi_operand_object *obj_desc, - union acpi_operand_object *obj_desc2); + union acpi_operand_object *operand0, + union acpi_operand_object *operand1, + u8 *logical_result); acpi_integer acpi_ex_do_math_op ( @@ -374,7 +386,7 @@ acpi_ex_system_do_notify_op ( acpi_status acpi_ex_system_do_suspend( - u32 time); + acpi_integer time); acpi_status acpi_ex_system_do_stall ( @@ -413,6 +425,10 @@ acpi_ex_system_wait_semaphore ( */ acpi_status +acpi_ex_opcode_0A_0T_1R ( + struct acpi_walk_state *walk_state); + +acpi_status acpi_ex_opcode_1A_0T_0R ( struct acpi_walk_state *walk_state); diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 2afff1148f0c..da7dbb95a229 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h @@ -53,7 +53,7 @@ typedef u32 acpi_mutex_handle; /* Total number of aml opcodes defined */ -#define AML_NUM_OPCODES 0x7E +#define AML_NUM_OPCODES 0x7F /***************************************************************************** diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 0d479722f4aa..09d6a5af268c 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h @@ -135,7 +135,10 @@ struct acpi_object_integer acpi_integer value; }; - +/* + * Note: The String and Buffer object must be identical through the Pointer + * element. There is code that depends on this. + */ struct acpi_object_string /* Null terminated, ASCII characters only */ { ACPI_OBJECT_COMMON_HEADER diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index a76c952f89af..030d193f979d 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -217,9 +217,12 @@ acpi_os_wait_events_complete( void * context); void +acpi_os_wait_events_complete ( + void *context); + +void acpi_os_sleep ( - u32 seconds, - u32 milliseconds); + acpi_integer milliseconds); void acpi_os_stall ( @@ -304,7 +307,7 @@ acpi_os_writable ( void *pointer, acpi_size length); -u32 +u64 acpi_os_get_timer ( void); diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 54ae84dcfbcd..f4097100288e 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -300,6 +300,15 @@ acpi_install_gpe_handler ( void *context); acpi_status +acpi_install_exception_handler ( + acpi_exception_handler handler); + + +/* + * Event interfaces + */ + +acpi_status acpi_acquire_global_lock ( u16 timeout, u32 *handle); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 8bee457d81d6..9db2f173a834 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -303,7 +303,7 @@ struct uint32_struct typedef u32 acpi_integer; #define ACPI_INTEGER_MAX ACPI_UINT32_MAX #define ACPI_INTEGER_BIT_SIZE 32 -#define ACPI_MAX_DECIMAL_DIGITS 10 +#define ACPI_MAX_DECIMAL_DIGITS 10 /* 2^32 = 4,294,967,296 */ #define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 32-bit divide */ @@ -315,13 +315,18 @@ typedef u32 acpi_integer; typedef u64 acpi_integer; #define ACPI_INTEGER_MAX ACPI_UINT64_MAX #define ACPI_INTEGER_BIT_SIZE 64 -#define ACPI_MAX_DECIMAL_DIGITS 19 +#define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ + #if ACPI_MACHINE_WIDTH == 64 #define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 64-bit divide */ #endif #endif +#define ACPI_MAX64_DECIMAL_DIGITS 20 +#define ACPI_MAX32_DECIMAL_DIGITS 10 +#define ACPI_MAX16_DECIMAL_DIGITS 5 +#define ACPI_MAX8_DECIMAL_DIGITS 3 /* * Constants with special meanings @@ -831,6 +836,14 @@ acpi_status (*acpi_init_handler) ( #define ACPI_INIT_DEVICE_INI 1 +typedef +acpi_status (*acpi_exception_handler) ( + acpi_status aml_status, + acpi_name name, + u16 opcode, + u32 aml_offset, + void *context); + /* Address Spaces (For Operation Regions) */ diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index d786ae5ec820..e3adfa35bb22 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h @@ -178,6 +178,12 @@ acpi_ut_strncpy ( acpi_size count); int +acpi_ut_memcmp ( + const char *buffer1, + const char *buffer2, + acpi_size count); + +int acpi_ut_strncmp ( const char *string1, const char *string2, @@ -577,6 +583,10 @@ union acpi_operand_object * acpi_ut_create_buffer_object ( acpi_size buffer_size); +union acpi_operand_object * +acpi_ut_create_string_object ( + acpi_size string_size); + /* * ut_ref_cnt - Object reference count management @@ -690,14 +700,14 @@ acpi_ut_print_string ( acpi_status acpi_ut_divide ( - acpi_integer *in_dividend, - acpi_integer *in_divisor, + acpi_integer in_dividend, + acpi_integer in_divisor, acpi_integer *out_quotient, acpi_integer *out_remainder); acpi_status acpi_ut_short_divide ( - acpi_integer *in_dividend, + acpi_integer in_dividend, u32 divisor, acpi_integer *out_quotient, u32 *out_remainder); @@ -716,6 +726,10 @@ acpi_ut_strtoul64 ( u32 base, acpi_integer *ret_integer); +/* Values for Base above (16=Hex, 10=Decimal) */ + +#define ACPI_ANY_BASE 0 + char * acpi_ut_strupr ( char *src_string); diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index 0344b94c863d..c4fa67dfec64 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h @@ -170,6 +170,7 @@ #define AML_REVISION_OP (u16) 0x5b30 #define AML_DEBUG_OP (u16) 0x5b31 #define AML_FATAL_OP (u16) 0x5b32 +#define AML_TIMER_OP (u16) 0x5b33 /* ACPI 3.0 */ #define AML_REGION_OP (u16) 0x5b80 #define AML_FIELD_OP (u16) 0x5b81 #define AML_DEVICE_OP (u16) 0x5b82 @@ -305,22 +306,24 @@ /* Opcode flags */ -#define AML_HAS_ARGS 0x0800 -#define AML_HAS_TARGET 0x0400 -#define AML_HAS_RETVAL 0x0200 -#define AML_NSOBJECT 0x0100 -#define AML_NSOPCODE 0x0080 -#define AML_NSNODE 0x0040 -#define AML_NAMED 0x0020 -#define AML_DEFER 0x0010 -#define AML_FIELD 0x0008 -#define AML_CREATE 0x0004 -#define AML_MATH 0x0002 #define AML_LOGICAL 0x0001 -#define AML_CONSTANT 0x1000 +#define AML_LOGICAL_NUMERIC 0x0002 +#define AML_MATH 0x0004 +#define AML_CREATE 0x0008 +#define AML_FIELD 0x0010 +#define AML_DEFER 0x0020 +#define AML_NAMED 0x0040 +#define AML_NSNODE 0x0080 +#define AML_NSOPCODE 0x0100 +#define AML_NSOBJECT 0x0200 +#define AML_HAS_RETVAL 0x0400 +#define AML_HAS_TARGET 0x0800 +#define AML_HAS_ARGS 0x1000 +#define AML_CONSTANT 0x2000 /* Convenient flag groupings */ +#define AML_FLAGS_EXEC_0A_0T_1R AML_HAS_RETVAL #define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */ #define AML_FLAGS_EXEC_1A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Monadic2 */ #define AML_FLAGS_EXEC_1A_1T_0R AML_HAS_ARGS | AML_HAS_TARGET @@ -338,17 +341,18 @@ * The opcode Type is used in a dispatch table, do not change * without updating the table. */ -#define AML_TYPE_EXEC_1A_0T_0R 0x00 /* Monadic1 */ -#define AML_TYPE_EXEC_1A_0T_1R 0x01 /* Monadic2 */ -#define AML_TYPE_EXEC_1A_1T_0R 0x02 -#define AML_TYPE_EXEC_1A_1T_1R 0x03 /* monadic2_r */ -#define AML_TYPE_EXEC_2A_0T_0R 0x04 /* Dyadic1 */ -#define AML_TYPE_EXEC_2A_0T_1R 0x05 /* Dyadic2 */ -#define AML_TYPE_EXEC_2A_1T_1R 0x06 /* dyadic2_r */ -#define AML_TYPE_EXEC_2A_2T_1R 0x07 -#define AML_TYPE_EXEC_3A_0T_0R 0x08 -#define AML_TYPE_EXEC_3A_1T_1R 0x09 -#define AML_TYPE_EXEC_6A_0T_1R 0x0A +#define AML_TYPE_EXEC_0A_0T_1R 0x00 +#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */ +#define AML_TYPE_EXEC_1A_0T_1R 0x02 /* Monadic2 */ +#define AML_TYPE_EXEC_1A_1T_0R 0x03 +#define AML_TYPE_EXEC_1A_1T_1R 0x04 /* monadic2_r */ +#define AML_TYPE_EXEC_2A_0T_0R 0x05 /* Dyadic1 */ +#define AML_TYPE_EXEC_2A_0T_1R 0x06 /* Dyadic2 */ +#define AML_TYPE_EXEC_2A_1T_1R 0x07 /* dyadic2_r */ +#define AML_TYPE_EXEC_2A_2T_1R 0x08 +#define AML_TYPE_EXEC_3A_0T_0R 0x09 +#define AML_TYPE_EXEC_3A_1T_1R 0x0A +#define AML_TYPE_EXEC_6A_0T_1R 0x0B /* End of types used in dispatch table */ #define AML_TYPE_LITERAL 0x0B diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index b28b6905b71e..89a52ddae530 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h @@ -99,7 +99,7 @@ struct asl_resource_node /* * Resource descriptors defined in the ACPI specification. * - * Alignment must be BYTE because these descriptors + * Packing/alignment must be BYTE because these descriptors * are used to overlay the AML byte stream. */ #pragma pack(1) @@ -297,7 +297,7 @@ struct asl_general_register_desc #pragma pack() -/* Union of all resource descriptors, sow we can allocate the worst case */ +/* Union of all resource descriptors, so we can allocate the worst case */ union asl_resource_desc { diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 7964aaf6bc97..fbf38768a838 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -232,6 +232,7 @@ #define ACPI_STRCAT(d,s) (void) strcat((d), (s)) #define ACPI_STRNCAT(d,s,n) strncat((d), (s), (acpi_size)(n)) #define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (acpi_size)(n)) +#define ACPI_MEMCMP(s1,s2,n) memcmp((s1), (s2), (acpi_size)(n)) #define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n)) #define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n)) @@ -295,6 +296,7 @@ typedef char *va_list; #define ACPI_STRCAT(d,s) (void) acpi_ut_strcat ((d), (s)) #define ACPI_STRNCAT(d,s,n) acpi_ut_strncat ((d), (s), (acpi_size)(n)) #define ACPI_STRTOUL(d,s,n) acpi_ut_strtoul ((d), (s), (acpi_size)(n)) +#define ACPI_MEMCMP(s1,s2,n) acpi_ut_memcmp((s1), (s2), (acpi_size)(n)) #define ACPI_MEMCPY(d,s,n) (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n)) #define ACPI_MEMSET(d,v,n) (void) acpi_ut_memset ((d), (v), (acpi_size)(n)) #define ACPI_TOUPPER acpi_ut_to_upper |
