diff options
| author | Andy Grover <agrover@groveronline.com> | 2003-04-18 02:28:03 -0700 |
|---|---|---|
| committer | Andy Grover <agrover@groveronline.com> | 2003-04-18 02:28:03 -0700 |
| commit | 4b83d8cbb2abe2097b49bfe0824a911fca549dd1 (patch) | |
| tree | 61df3775bd351d562da8c9c1cd422d4beded5693 /include/acpi | |
| parent | 8f44c5c2a379c847e823624f7c2da0039bbc0f2f (diff) | |
ACPI: interpreter update to 20030418
- Fix for big-endian arcitectures
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/acconfig.h | 48 | ||||
| -rw-r--r-- | include/acpi/acinterp.h | 6 | ||||
| -rw-r--r-- | include/acpi/aclocal.h | 37 | ||||
| -rw-r--r-- | include/acpi/acmacros.h | 233 | ||||
| -rw-r--r-- | include/acpi/acpiosxf.h | 8 | ||||
| -rw-r--r-- | include/acpi/actbl.h | 10 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 6 |
7 files changed, 229 insertions, 119 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 2a8c7f85d2f7..f7532f979c7f 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -47,7 +47,7 @@ /****************************************************************************** * - * Compile-time options + * Configuration options * *****************************************************************************/ @@ -62,21 +62,9 @@ * */ - -/****************************************************************************** - * - * Subsystem Constants - * - *****************************************************************************/ - - /* Version string */ -#define ACPI_CA_VERSION 0x20030328 - -/* Version of ACPI supported */ - -#define ACPI_CA_SUPPORT_LEVEL 2 +#define ACPI_CA_VERSION 0x20030418 /* Maximum objects in the various object caches */ @@ -86,6 +74,23 @@ #define ACPI_MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */ #define ACPI_MAX_WALK_CACHE_DEPTH 4 /* Objects for parse tree walks */ +/* + * Should the subystem abort the loading of an ACPI table if the + * table checksum is incorrect? + */ +#define ACPI_CHECKSUM_ABORT FALSE + + +/****************************************************************************** + * + * Subsystem Constants + * + *****************************************************************************/ + +/* Version of ACPI supported */ + +#define ACPI_CA_SUPPORT_LEVEL 2 + /* String size constants */ #define ACPI_MAX_STRING_LENGTH 512 @@ -106,20 +111,6 @@ /****************************************************************************** * - * Configuration of subsystem behavior - * - *****************************************************************************/ - - -/* - * Should the subystem abort the loading of an ACPI table if the - * table checksum is incorrect? - */ -#define ACPI_CHECKSUM_ABORT FALSE - - -/****************************************************************************** - * * ACPI Specification constants (Do not change unless the specification changes) * *****************************************************************************/ @@ -196,7 +187,6 @@ * *****************************************************************************/ - #define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ #define ACPI_DEBUGGER_COMMAND_PROMPT '-' diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 502bd03e2452..59ea7c88eb5d 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h @@ -164,15 +164,17 @@ void acpi_ex_get_buffer_datum( acpi_integer *datum, void *buffer, + u32 buffer_length, u32 byte_granularity, - u32 offset); + u32 buffer_offset); void acpi_ex_set_buffer_datum ( acpi_integer merged_datum, void *buffer, + u32 buffer_length, u32 byte_granularity, - u32 offset); + u32 buffer_offset); acpi_status acpi_ex_read_data_from_field ( diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 911283ffed90..fffbddc8f532 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h @@ -196,7 +196,7 @@ struct acpi_namespace_node union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */ - struct acpi_namespace_node *child; /* first child */ + struct acpi_namespace_node *child; /* First child */ struct acpi_namespace_node *peer; /* Next peer*/ u16 reference_count; /* Current count of references and children */ u8 flags; @@ -476,10 +476,10 @@ struct acpi_scope_state struct acpi_pscope_state { ACPI_STATE_COMMON - union acpi_parse_object *op; /* current op being parsed */ - u8 *arg_end; /* current argument end */ - u8 *pkg_end; /* current package end */ - u32 arg_list; /* next argument to parse */ + union acpi_parse_object *op; /* Current op being parsed */ + u8 *arg_end; /* Current argument end */ + u8 *pkg_end; /* Current package end */ + u32 arg_list; /* Next argument to parse */ u32 arg_count; /* Number of fixed arguments */ }; @@ -585,11 +585,8 @@ struct acpi_opcode_info union acpi_parse_value { - acpi_integer integer; /* integer constant (Up to 64 bits) */ + acpi_integer integer; /* Integer constant (Up to 64 bits) */ struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */ - u32 integer32; /* integer constant, 32 bits only */ - u16 integer16; /* integer constant, 16 bits only */ - u8 integer8; /* integer constant, 8 bits only */ u32 size; /* bytelist or field size */ char *string; /* NULL terminated string */ u8 *buffer; /* buffer or string */ @@ -602,15 +599,15 @@ union acpi_parse_value u8 data_type; /* To differentiate various internal objs */\ u8 flags; /* Type of Op */\ u16 aml_opcode; /* AML opcode */\ - u32 aml_offset; /* offset of declaration in AML */\ - union acpi_parse_object *parent; /* parent op */\ - union acpi_parse_object *next; /* next op */\ + u32 aml_offset; /* Offset of declaration in AML */\ + union acpi_parse_object *parent; /* Parent op */\ + union acpi_parse_object *next; /* Next op */\ ACPI_DISASM_ONLY_MEMBERS (\ u8 disasm_flags; /* Used during AML disassembly */\ u8 disasm_opcode; /* Subtype used for disassembly */\ - char aml_op_name[16]) /* op name (debug only) */\ + char aml_op_name[16]) /* Op name (debug only) */\ /* NON-DEBUG members below: */\ - struct acpi_namespace_node *node; /* for use by interpreter */\ + struct acpi_namespace_node *node; /* For use by interpreter */\ union acpi_parse_value value; /* Value or args associated with the opcode */\ @@ -691,14 +688,14 @@ union acpi_parse_object struct acpi_parse_state { u32 aml_size; - u8 *aml_start; /* first AML byte */ - u8 *aml; /* next AML byte */ + u8 *aml_start; /* First AML byte */ + u8 *aml; /* Next AML byte */ u8 *aml_end; /* (last + 1) AML byte */ - u8 *pkg_start; /* current package begin */ - u8 *pkg_end; /* current package end */ - union acpi_parse_object *start_op; /* root of parse tree */ + u8 *pkg_start; /* Current package begin */ + u8 *pkg_end; /* Current package end */ + union acpi_parse_object *start_op; /* Root of parse tree */ struct acpi_namespace_node *start_node; - union acpi_generic_state *scope; /* current scope */ + union acpi_generic_state *scope; /* Current scope */ union acpi_parse_object *start_scope; }; diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 09a34a479859..7b0f65b84394 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h @@ -116,7 +116,7 @@ #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p)) #if ACPI_MACHINE_WIDTH == 16 -#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_UNALIGNED32_TO_32(d,s) +#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) #define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) #define ACPI_PTR_TO_PHYSADDR(i) (u32) (char *)(i) #else @@ -130,41 +130,169 @@ * Otherwise, we have to move one byte at a time. */ -#ifdef _HW_ALIGNMENT_SUPPORT +#ifdef ACPI_BIG_ENDIAN +/* + * Macros for big-endian machines + */ + +/* This macro sets a buffer index, starting from the end of the buffer */ + +#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) ((buf_len) - (((buf_offset)+1) * (byte_gran))) + +/* These macros reverse the bytes during the move, converting little-endian to big endian */ + + /* Big Endian <== Little Endian */ + /* Hi...Lo Lo...Hi */ +/* 16-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_16_TO_16(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\ + (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];} + +#define ACPI_MOVE_16_TO_32(d,s) {(*(u32 *)(void *)(d))=0;\ + ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\ + ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];} + +#define ACPI_MOVE_16_TO_64(d,s) {(*(u64 *)(void *)(d))=0;\ + ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ + ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];} + +/* 32-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ + +#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\ + (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\ + (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\ + (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];} + +#define ACPI_MOVE_32_TO_64(d,s) {(*(u64 *)(void *)(d))=0;\ + ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\ + ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\ + ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ + ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];} + +/* 64-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ + +#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ + +#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\ + (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\ + (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\ + (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\ + (( u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\ + (( u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\ + (( u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ + (( u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];} +#else +/* + * Macros for little-endian machines + */ + +/* This macro sets a buffer index, starting from the beginning of the buffer */ + +#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset) + +#ifdef ACPI_MISALIGNED_TRANSFERS + +/* The hardware supports unaligned transfers, just do the little-endian move */ + +#if ACPI_MACHINE_WIDTH == 16 + +/* No 64-bit integers */ +/* 16-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) +#define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s) +#define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s) + +/* 32-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ +#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) +#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) -/* The hardware supports unaligned transfers, just do the move */ +/* 64-bit source, 16/32/64 destination */ -#define ACPI_MOVE_UNALIGNED16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) -#define ACPI_MOVE_UNALIGNED32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) -#define ACPI_MOVE_UNALIGNED16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s) -#define ACPI_MOVE_UNALIGNED64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) +#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ +#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ +#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) + +#else +/* 16-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) +#define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s) +#define ACPI_MOVE_16_TO_64(d,s) *(u64 *)(void *)(d) = *(u16 *)(void *)(s) + +/* 32-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ +#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) +#define ACPI_MOVE_32_TO_64(d,s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s) + +/* 64-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ +#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ +#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) +#endif #else /* * The hardware does not support unaligned transfers. We must move the * data one byte at a time. These macros work whether the source or - * the destination (or both) is/are unaligned. + * the destination (or both) is/are unaligned. (Little-endian move) */ -#define ACPI_MOVE_UNALIGNED16_TO_16(d,s) {((u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ - ((u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];} +/* 16-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_16_TO_16(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ + (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];} + +#define ACPI_MOVE_16_TO_32(d,s) {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} +#define ACPI_MOVE_16_TO_64(d,s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} + +/* 32-bit source, 16/32/64 destination */ + +#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ + +#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ + (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ + (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ + (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];} + +#define ACPI_MOVE_32_TO_64(d,s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);} + +/* 64-bit source, 16/32/64 destination */ -#define ACPI_MOVE_UNALIGNED32_TO_32(d,s) {((u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ - ((u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ - ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ - ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];} +#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ +#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ +#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ + (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ + (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ + (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\ + (( u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[4];\ + (( u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[5];\ + (( u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[6];\ + (( u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[7];} +#endif +#endif + +/* Macros based on machine integer width */ + +#if ACPI_MACHINE_WIDTH == 16 +#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) -#define ACPI_MOVE_UNALIGNED16_TO_32(d,s) {(*(u32*)(void *)(d)) = 0; ACPI_MOVE_UNALIGNED16_TO_16(d,s);} +#elif ACPI_MACHINE_WIDTH == 32 +#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s) -#define ACPI_MOVE_UNALIGNED64_TO_64(d,s) {((u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ - ((u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ - ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ - ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\ - ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[4];\ - ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[5];\ - ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[6];\ - ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[7];} +#elif ACPI_MACHINE_WIDTH == 64 +#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_64_TO_16(d,s) +#else +#error unknown ACPI_MACHINE_WIDTH #endif @@ -232,21 +360,6 @@ #if ACPI_MACHINE_WIDTH != 16 -#define ACPI_PCI_DEVICE_MASK (u64) 0x0000FFFF00000000 -#define ACPI_PCI_FUNCTION_MASK (u64) 0x00000000FFFF0000 -#define ACPI_PCI_REGISTER_MASK (u64) 0x000000000000FFFF - -/* - * Obsolete - */ - -/* -#define ACPI_PCI_FUNCTION(a) (u16) ((((u64)((u64)(a) & ACPI_PCI_FUNCTION_MASK)) >> 16)) -#define ACPI_PCI_DEVICE(a) (u16) ((((u64)((u64)(a) & ACPI_PCI_DEVICE_MASK)) >> 32)) -#define ACPI_PCI_REGISTER(a) (u16) (((u64)((u64)(a) & ACPI_PCI_REGISTER_MASK))) -*/ - - #define ACPI_PCI_DEVICE(a) (u16) ((ACPI_HIDWORD ((a))) & 0x0000FFFF) #define ACPI_PCI_FUNCTION(a) (u16) ((ACPI_LODWORD ((a))) >> 16) #define ACPI_PCI_REGISTER(a) (u16) ((ACPI_LODWORD ((a))) & 0x0000FFFF) @@ -337,10 +450,10 @@ * 5) Expand address to 64 bits */ #define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) do {a.address_space_id = (u8) d;\ - a.register_bit_width = (u8) ACPI_MUL_8 (b);\ - a.register_bit_offset = 0;\ - a.reserved = 0;\ - ACPI_STORE_ADDRESS (a.address,(acpi_physical_address) c);} while (0) + a.register_bit_width = (u8) ACPI_MUL_8 (b);\ + a.register_bit_offset = 0;\ + a.reserved = 0;\ + ACPI_STORE_ADDRESS (a.address,(acpi_physical_address) c);} while (0) /* ACPI V1.0 entries -- address space is always I/O */ @@ -351,7 +464,7 @@ * Reporting macros that are never compiled out */ -#define ACPI_PARAM_LIST(pl) pl +#define ACPI_PARAM_LIST(pl) pl /* * Error reporting. These versions add callers module and line#. Since @@ -362,9 +475,9 @@ #ifdef ACPI_DEBUG_OUTPUT #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_THIS_MODULE,__LINE__,_COMPONENT); \ - acpi_os_printf ACPI_PARAM_LIST(fp);} + acpi_os_printf ACPI_PARAM_LIST(fp);} #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_THIS_MODULE,__LINE__,_COMPONENT); \ - acpi_os_printf ACPI_PARAM_LIST(fp);} + acpi_os_printf ACPI_PARAM_LIST(fp);} #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_THIS_MODULE,__LINE__,_COMPONENT); \ acpi_os_printf ACPI_PARAM_LIST(fp);} #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_THIS_MODULE,__LINE__,_COMPONENT, s, e); @@ -408,21 +521,21 @@ * as a local string ("_proc_name) so that it can be also used by the function exit macros below. */ -#define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _dbg; \ - _dbg.component_id = _COMPONENT; \ - _dbg.proc_name = a; \ - _dbg.module_name = _THIS_MODULE; - -#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a)\ - acpi_ut_trace(__LINE__,&_dbg) -#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a)\ - acpi_ut_trace_ptr(__LINE__,&_dbg,(void *)b) -#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a)\ - acpi_ut_trace_u32(__LINE__,&_dbg,(u32)b) -#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a)\ - acpi_ut_trace_str(__LINE__,&_dbg,(char *)b) - -#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr() +#define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _dbg; \ + _dbg.component_id = _COMPONENT; \ + _dbg.proc_name = a; \ + _dbg.module_name = _THIS_MODULE; + +#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ + acpi_ut_trace(__LINE__,&_dbg) +#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ + acpi_ut_trace_ptr(__LINE__,&_dbg,(void *)b) +#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ + acpi_ut_trace_u32(__LINE__,&_dbg,(u32)b) +#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \ + acpi_ut_trace_str(__LINE__,&_dbg,(char *)b) + +#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr() /* * Function exit tracing. diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 58c6d1500417..928b5f49030a 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -229,13 +229,13 @@ acpi_os_stall ( acpi_status acpi_os_read_port ( acpi_io_address address, - void *value, + u32 *value, u32 width); acpi_status acpi_os_write_port ( acpi_io_address address, - acpi_integer value, + u32 value, u32 width); @@ -246,13 +246,13 @@ acpi_os_write_port ( acpi_status acpi_os_read_memory ( acpi_physical_address address, - void *value, + u32 *value, u32 width); acpi_status acpi_os_write_memory ( acpi_physical_address address, - acpi_integer value, + u32 value, u32 width); diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 56282d0bf1fb..de509b9fd4ec 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -181,7 +181,15 @@ struct smart_battery_description_table u32 critical_level; }; - +struct hpet_description_table +{ + struct acpi_table_header header; + u32 hardware_id; + u32 base_address[3]; + u8 hpet_number; + u16 clock_tick; + u8 attributes; +}; #pragma pack() diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index d19ff567b92f..7ffa0b226c31 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -154,7 +154,7 @@ typedef char *acpi_physical_address; typedef u16 acpi_size; #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 -#define _HW_ALIGNMENT_SUPPORT +#define ACPI_MISALIGNED_TRANSFERS #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ #define ACPI_MAX_PTR ACPI_UINT16_MAX #define ACPI_SIZE_MAX ACPI_UINT16_MAX @@ -192,7 +192,7 @@ typedef u64 acpi_physical_address; typedef u32 acpi_size; #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 -#define _HW_ALIGNMENT_SUPPORT +#define ACPI_MISALIGNED_TRANSFERS #define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX @@ -1194,7 +1194,7 @@ struct acpi_resource #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) -#ifdef _HW_ALIGNMENT_SUPPORT +#ifdef ACPI_MISALIGNED_TRANSFERS #define ACPI_ALIGN_RESOURCE_SIZE(length) (length) #else #define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) |
