From bda663d36b94c723153246a4231bbc0f1cd1836e Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Fri, 16 Sep 2005 16:51:15 -0400 Subject: [ACPI] ACPICA 20050916 Fixed a problem within the Resource Manager where support for the Generic Register descriptor was not fully implemented. This descriptor is now fully recognized, parsed, disassembled, and displayed. Restructured the Resource Manager code to utilize table-driven dispatch and lookup, eliminating many of the large switch() statements. This reduces overall subsystem code size and code complexity. Affects the resource parsing and construction, disassembly, and debug dump output. Cleaned up and restructured the debug dump output for all resource descriptors. Improved readability of the output and reduced code size. Fixed a problem where changes to internal data structures caused the optional ACPI_MUTEX_DEBUG code to fail compilation if specified. Signed-off-by: Robert Moore Signed-off-by: Len Brown --- include/acpi/acdisasm.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'include/acpi/acdisasm.h') diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 3d96dcb..759b4cf 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h @@ -187,73 +187,73 @@ void acpi_dm_decode_attribute(u8 attribute); * dmresrcl */ void -acpi_dm_word_descriptor(struct asl_word_address_desc *resource, +acpi_dm_word_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_dword_descriptor(struct asl_dword_address_desc *resource, +acpi_dm_dword_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_extended_descriptor(struct asl_extended_address_desc *resource, +acpi_dm_extended_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_qword_descriptor(struct asl_qword_address_desc *resource, +acpi_dm_qword_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_memory24_descriptor(struct asl_memory_24_desc *resource, +acpi_dm_memory24_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_memory32_descriptor(struct asl_memory_32_desc *resource, +acpi_dm_memory32_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_fixed_mem32_descriptor(struct asl_fixed_memory_32_desc *resource, - u32 length, u32 level); +acpi_dm_fixed_memory32_descriptor(union asl_resource_desc *resource, + u32 length, u32 level); void -acpi_dm_generic_register_descriptor(struct asl_general_register_desc *resource, +acpi_dm_generic_register_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_interrupt_descriptor(struct asl_extended_xrupt_desc *resource, +acpi_dm_interrupt_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_vendor_large_descriptor(struct asl_large_vendor_desc *resource, +acpi_dm_vendor_large_descriptor(union asl_resource_desc *resource, u32 length, u32 level); /* * dmresrcs */ void -acpi_dm_irq_descriptor(struct asl_irq_format_desc *resource, +acpi_dm_irq_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_dma_descriptor(struct asl_dma_format_desc *resource, +acpi_dm_dma_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_io_descriptor(struct asl_io_port_desc *resource, u32 length, u32 level); +acpi_dm_io_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_fixed_io_descriptor(struct asl_fixed_io_port_desc *resource, +acpi_dm_fixed_io_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_start_dependent_descriptor(struct asl_start_dependent_desc *resource, +acpi_dm_start_dependent_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_end_dependent_descriptor(struct asl_start_dependent_desc *resource, +acpi_dm_end_dependent_descriptor(union asl_resource_desc *resource, u32 length, u32 level); void -acpi_dm_vendor_small_descriptor(struct asl_small_vendor_desc *resource, +acpi_dm_vendor_small_descriptor(union asl_resource_desc *resource, u32 length, u32 level); /* -- cgit v1.1 From 50eca3eb89d73d9f0aa070b126c7ee6a616016ab Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 30 Sep 2005 19:03:00 -0400 Subject: [ACPI] ACPICA 20050930 Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/acdisasm.h | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'include/acpi/acdisasm.h') diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 759b4cf..b2921b8 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h @@ -187,73 +187,67 @@ void acpi_dm_decode_attribute(u8 attribute); * dmresrcl */ void -acpi_dm_word_descriptor(union asl_resource_desc *resource, - u32 length, u32 level); +acpi_dm_word_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_dword_descriptor(union asl_resource_desc *resource, - u32 length, u32 level); +acpi_dm_dword_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_extended_descriptor(union asl_resource_desc *resource, +acpi_dm_extended_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_qword_descriptor(union asl_resource_desc *resource, - u32 length, u32 level); +acpi_dm_qword_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_memory24_descriptor(union asl_resource_desc *resource, +acpi_dm_memory24_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_memory32_descriptor(union asl_resource_desc *resource, +acpi_dm_memory32_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_fixed_memory32_descriptor(union asl_resource_desc *resource, +acpi_dm_fixed_memory32_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_generic_register_descriptor(union asl_resource_desc *resource, +acpi_dm_generic_register_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_interrupt_descriptor(union asl_resource_desc *resource, +acpi_dm_interrupt_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_vendor_large_descriptor(union asl_resource_desc *resource, +acpi_dm_vendor_large_descriptor(union aml_resource *resource, u32 length, u32 level); /* * dmresrcs */ void -acpi_dm_irq_descriptor(union asl_resource_desc *resource, - u32 length, u32 level); +acpi_dm_irq_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_dma_descriptor(union asl_resource_desc *resource, - u32 length, u32 level); +acpi_dm_dma_descriptor(union aml_resource *resource, u32 length, u32 level); -void -acpi_dm_io_descriptor(union asl_resource_desc *resource, u32 length, u32 level); +void acpi_dm_io_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_fixed_io_descriptor(union asl_resource_desc *resource, +acpi_dm_fixed_io_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_start_dependent_descriptor(union asl_resource_desc *resource, +acpi_dm_start_dependent_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_end_dependent_descriptor(union asl_resource_desc *resource, +acpi_dm_end_dependent_descriptor(union aml_resource *resource, u32 length, u32 level); void -acpi_dm_vendor_small_descriptor(union asl_resource_desc *resource, +acpi_dm_vendor_small_descriptor(union aml_resource *resource, u32 length, u32 level); /* -- cgit v1.1 From 0897831bb54eb36fd9e2a22da7f0f64be1b20d09 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 21 Oct 2005 00:00:00 -0400 Subject: [ACPI] ACPICA 20051021 Implemented support for the EM64T and other x86_64 processors. This essentially entails recognizing that these processors support non-aligned memory transfers. Previously, all 64-bit processors were assumed to lack hardware support for non-aligned transfers. Completed conversion of the Resource Manager to nearly full table-driven operation. Specifically, the resource conversion code (convert AML to internal format and the reverse) and the debug code to dump internal resource descriptors are fully table-driven, reducing code and data size and improving maintainability. The OSL interfaces for Acquire and Release Lock now use a 64-bit flag word on 64-bit processors instead of a fixed 32-bit word. (Alexey Starikovskiy) Implemented support within the resource conversion code for the Type-Specific byte within the various ACPI 3.0 *WordSpace macros. Fixed some issues within the resource conversion code for the type-specific flags for both Memory and I/O address resource descriptors. For Memory, implemented support for the MTP and TTP flags. For I/O, split the TRS and TTP flags into two separate fields. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/acdisasm.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include/acpi/acdisasm.h') diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index b2921b8..99250ee 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h @@ -60,6 +60,7 @@ extern struct acpi_external_list *acpi_gbl_external_list; extern const char *acpi_gbl_io_decode[2]; extern const char *acpi_gbl_word_decode[4]; extern const char *acpi_gbl_consume_decode[2]; +extern const char *acpi_gbl_config_decode[4]; extern const char *acpi_gbl_min_decode[2]; extern const char *acpi_gbl_max_decode[2]; extern const char *acpi_gbl_DECdecode[2]; @@ -171,11 +172,19 @@ u8 acpi_dm_is_string_buffer(union acpi_parse_object *op); /* * dmresrc */ +void acpi_dm_dump_integer8(u8 value, char *name); + +void acpi_dm_dump_integer16(u16 value, char *name); + +void acpi_dm_dump_integer32(u32 value, char *name); + +void acpi_dm_dump_integer64(u64 value, char *name); + void -acpi_dm_resource_descriptor(struct acpi_op_walk_info *info, - u8 * byte_data, u32 byte_count); +acpi_dm_resource_template(struct acpi_op_walk_info *info, + u8 * byte_data, u32 byte_count); -u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op); +u8 acpi_dm_is_resource_template(union acpi_parse_object *op); void acpi_dm_indent(u32 level); @@ -223,6 +232,8 @@ void acpi_dm_vendor_large_descriptor(union aml_resource *resource, u32 length, u32 level); +void acpi_dm_vendor_common(char *name, u8 * byte_data, u32 length, u32 level); + /* * dmresrcs */ -- cgit v1.1 From defba1d8f233c0d5cf3e1ea6aeb898eca7231860 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 16 Dec 2005 17:05:00 -0500 Subject: [ACPI] ACPICA 20051216 Implemented optional support to allow unresolved names within ASL Package objects. A null object is inserted in the package when a named reference cannot be located in the current namespace. Enabled via the interpreter slack flag which Linux has enabled by default (acpi=strict to disable slack). This should eliminate AE_NOT_FOUND exceptions seen on machines that contain such code. Implemented an optimization to the initialization sequence that can improve boot time. During ACPI device initialization, the _STA method is now run if and only if the _INI method exists. The _STA method is used to determine if the device is present; An _INI can only be run if _STA returns present, but it is a waste of time to run the _STA method if the _INI does not exist. (Prototype and assistance from Dong Wei) Implemented use of the C99 uintptr_t for the pointer casting macros if it is available in the current compiler. Otherwise, the default (void *) cast is used as before. Fixed some possible memory leaks found within the execution path of the Break, Continue, If, and CreateField operators. (Valery Podrezov) Fixed a problem introduced in the 20051202 release where an exception is generated during method execution if a control method attempts to declare another method. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/acdisasm.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'include/acpi/acdisasm.h') diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 99250ee..0a8f49f 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h @@ -57,27 +57,11 @@ struct acpi_external_list { }; extern struct acpi_external_list *acpi_gbl_external_list; -extern const char *acpi_gbl_io_decode[2]; + +/* Strings used for decoding flags to ASL keywords */ + extern const char *acpi_gbl_word_decode[4]; -extern const char *acpi_gbl_consume_decode[2]; -extern const char *acpi_gbl_config_decode[4]; -extern const char *acpi_gbl_min_decode[2]; -extern const char *acpi_gbl_max_decode[2]; -extern const char *acpi_gbl_DECdecode[2]; -extern const char *acpi_gbl_RNGdecode[4]; -extern const char *acpi_gbl_MEMdecode[4]; -extern const char *acpi_gbl_RWdecode[2]; extern const char *acpi_gbl_irq_decode[2]; -extern const char *acpi_gbl_HEdecode[2]; -extern const char *acpi_gbl_LLdecode[2]; -extern const char *acpi_gbl_SHRdecode[2]; -extern const char *acpi_gbl_TYPdecode[4]; -extern const char *acpi_gbl_BMdecode[2]; -extern const char *acpi_gbl_SIZdecode[4]; -extern const char *acpi_gbl_TTPdecode[2]; -extern const char *acpi_gbl_MTPdecode[4]; -extern const char *acpi_gbl_TRSdecode[2]; - extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; -- cgit v1.1 From 4a90c7e86202f46fa9af011bdbcdf36e355d1721 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 13 Jan 2006 16:22:00 -0500 Subject: [ACPI] ACPICA 20060113 Added 2006 copyright. At SuSE's suggestion, enabled all error messages without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively. This preserves all error and warning messages in the non-debug version of the ACPICA code (this has been referred to as the "debug lite" option.) Over 200 cases were converted to create a total of over 380 error/warning messages across the ACPICA code. This increases the code and data size of the default non-debug version by about 13K. Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages. The size of the debug version remains about the same. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- include/acpi/acdisasm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi/acdisasm.h') diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 0a8f49f..11a8fe3 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2005, R. Byron Moore + * Copyright (C) 2000 - 2006, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without -- cgit v1.1