]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI: ACPICA 20060512
authorBob Moore <robert.moore@intel.com>
Fri, 12 May 2006 21:12:00 +0000 (17:12 -0400)
committerLen Brown <len.brown@intel.com>
Wed, 14 Jun 2006 06:34:48 +0000 (02:34 -0400)
Replaced the acpi_os_queue_for_execution() with a new
interface named acpi_os_execute(). The major difference is
that the new interface does not have a Priority parameter,
this appeared to be useless and has been replaced by
a Type parameter. The Type tells the OS what type of
execution is being requested, such as global lock handler,
notify handler, GPE handler, etc. This allows the host
to queue and execute the request as appropriate for the
request type, possibly using different work queues and
different priorities for the various request types. This
enables fixes for multithreading deadlock problems such as
http://bugzilla.kernel.org/show_bug.cgi?id=5534
(Alexey Starikovskiy and Bob Moore)

Fixed a possible memory leak associated with the
support for the so-called "implicit return" ACPI
extension. Reported by FreeBSD  (Fiodor Suietov)
http://bugzilla.kernel.org/show_bug.cgi?id=6514

Fixed a problem with the Load() operator where a table
load from an operation region could overwrite an internal
table buffer by up to 7 bytes and cause alignment faults
on IPF systems. (With assistance from Luming Yu)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
28 files changed:
drivers/acpi/dispatcher/dsmethod.c
drivers/acpi/dispatcher/dsmthdat.c
drivers/acpi/dispatcher/dswload.c
drivers/acpi/events/evgpe.c
drivers/acpi/events/evmisc.c
drivers/acpi/events/evregion.c
drivers/acpi/executer/exconfig.c
drivers/acpi/executer/exstorob.c
drivers/acpi/namespace/nsaccess.c
drivers/acpi/namespace/nssearch.c
drivers/acpi/resources/rscalc.c
drivers/acpi/resources/rscreate.c
drivers/acpi/resources/rsutils.c
drivers/acpi/tables/tbrsdt.c
drivers/acpi/tables/tbxfroot.c
drivers/acpi/utilities/utglobal.c
include/acpi/acconfig.h
include/acpi/acdisasm.h
include/acpi/acevents.h
include/acpi/acglobal.h
include/acpi/aclocal.h
include/acpi/acmacros.h
include/acpi/acnamesp.h
include/acpi/acpiosxf.h
include/acpi/actbl.h
include/acpi/actypes.h
include/acpi/amlcode.h
include/acpi/amlresrc.h

index 651f2b68531bf4edc4d3f9274028146fd2e5717a..e348db0e541e42066b309ee734ae2df90e742f8f 100644 (file)
@@ -385,6 +385,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
                               union acpi_operand_object *return_desc)
 {
        acpi_status status;
+       int same_as_implicit_return;
 
        ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state);
 
@@ -402,6 +403,11 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
 
        if (return_desc) {
 
+               /* Is the implicit return object the same as the return desc? */
+
+               same_as_implicit_return =
+                   (walk_state->implicit_return_obj == return_desc);
+
                /* Are we actually going to use the return value? */
 
                if (walk_state->return_used) {
@@ -422,18 +428,23 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
                }
 
                /*
-                * The following code is the
-                * optional support for a so-called "implicit return". Some AML code
-                * assumes that the last value of the method is "implicitly" returned
-                * to the caller. Just save the last result as the return value.
+                * The following code is the optional support for the so-called
+                * "implicit return". Some AML code assumes that the last value of the
+                * method is "implicitly" returned to the caller, in the absence of an
+                * explicit return value.
+                *
+                * Just save the last result of the method as the return value.
+                *
                 * NOTE: this is optional because the ASL language does not actually
                 * support this behavior.
                 */
                else if (!acpi_ds_do_implicit_return
-                        (return_desc, walk_state, FALSE)) {
+                        (return_desc, walk_state, FALSE)
+                        || same_as_implicit_return) {
                        /*
                         * Delete the return value if it will not be used by the
-                        * calling method
+                        * calling method or remove one reference if the explicit return
+                        * is the same as the implicit return value.
                         */
                        acpi_ut_remove_reference(return_desc);
                }
index b47c54fad86df5d6659749d3c70938fec94448c8..459160ff90585108f6b3689a2b127975500c95b7 100644 (file)
@@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u16 opcode,
         * Increment ref count so object can't be deleted while installed.
         * NOTE: We do not copy the object in order to preserve the call by
         * reference semantics of ACPI Control Method invocation.
-        * (See ACPI specification 2.0_c)
+        * (See ACPI Specification 2.0_c)
         */
        acpi_ut_add_reference(object);
 
@@ -351,7 +351,7 @@ acpi_ds_method_data_set_value(u16 opcode,
  * FUNCTION:    acpi_ds_method_data_get_value
  *
  * PARAMETERS:  Opcode              - Either AML_LOCAL_OP or AML_ARG_OP
- *              Index               - which local_var or argument to get
+ *              Index               - Which local_var or argument to get
  *              walk_state          - Current walk state object
  *              dest_desc           - Where Arg or Local value is returned
  *
@@ -459,7 +459,7 @@ acpi_ds_method_data_get_value(u16 opcode,
  * FUNCTION:    acpi_ds_method_data_delete_value
  *
  * PARAMETERS:  Opcode              - Either AML_LOCAL_OP or AML_ARG_OP
- *              Index               - which local_var or argument to delete
+ *              Index               - Which local_var or argument to delete
  *              walk_state          - Current walk state object
  *
  * RETURN:      None
index a8deb700cf33a82b0d4f1cda2cbe0184c5b03ac5..35074399c6179d83fecd8d81c4a95213a55c43f0 100644 (file)
@@ -178,12 +178,12 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
                         * Target of Scope() not found.  Generate an External for it, and
                         * insert the name into the namespace.
                         */
-                       acpi_dm_add_to_external_list(path);
+                       acpi_dm_add_to_external_list(path, ACPI_TYPE_DEVICE, 0);
                        status =
                            acpi_ns_lookup(walk_state->scope_info, path,
                                           object_type, ACPI_IMODE_LOAD_PASS1,
                                           ACPI_NS_SEARCH_PARENT, walk_state,
-                                          &(node));
+                                          &node);
                }
 #endif
                if (ACPI_FAILURE(status)) {
@@ -301,10 +301,41 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
                status =
                    acpi_ns_lookup(walk_state->scope_info, path, object_type,
                                   ACPI_IMODE_LOAD_PASS1, flags, walk_state,
-                                  &(node));
+                                  &node);
                if (ACPI_FAILURE(status)) {
-                       ACPI_ERROR_NAMESPACE(path, status);
-                       return_ACPI_STATUS(status);
+                       if (status == AE_ALREADY_EXISTS) {
+
+                               /* The name already exists in this scope */
+
+                               if (node->flags & ANOBJ_IS_EXTERNAL) {
+                                       /*
+                                        * Allow one create on an object or segment that was
+                                        * previously declared External
+                                        */
+                                       node->flags &= ~ANOBJ_IS_EXTERNAL;
+                                       node->type = (u8) object_type;
+
+                                       /* Just retyped a node, probably will need to open a scope */
+
+                                       if (acpi_ns_opens_scope(object_type)) {
+                                               status =
+                                                   acpi_ds_scope_stack_push
+                                                   (node, object_type,
+                                                    walk_state);
+                                               if (ACPI_FAILURE(status)) {
+                                                       return_ACPI_STATUS
+                                                           (status);
+                                               }
+                                       }
+                                       status = AE_OK;
+                               }
+                       }
+
+                       if (ACPI_FAILURE(status)) {
+
+                               ACPI_ERROR_NAMESPACE(path, status);
+                               return_ACPI_STATUS(status);
+                       }
                }
                break;
        }
index 25fd12a29a292b756541dbbf8cc0579bff82bf5b..aa179dc78011be4aafada48979f2f241b2567a32 100644 (file)
@@ -489,7 +489,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
  * RETURN:      None
  *
  * DESCRIPTION: Perform the actual execution of a GPE control method.  This
- *              function is called from an invocation of acpi_os_queue_for_execution
+ *              function is called from an invocation of acpi_os_exece
  *              (and therefore does NOT execute at interrupt level) so that
  *              the control method itself is not executed in the context of
  *              an interrupt handler.
@@ -674,9 +674,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
                 * Execute the method associated with the GPE
                 * NOTE: Level-triggered GPEs are cleared after the method completes.
                 */
-               status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
-                                                    acpi_ev_asynch_execute_gpe_method,
-                                                    gpe_event_info);
+               status = acpi_os_execute(OSL_GPE_HANDLER,
+                                        acpi_ev_asynch_execute_gpe_method,
+                                        gpe_event_info);
                if (ACPI_FAILURE(status)) {
                        ACPI_EXCEPTION((AE_INFO, status,
                                        "Unable to queue handler for GPE[%2X] - event disabled",
index 97e05481aa7c8e1941bd321f6a6ea443b0d4aa35..24e0b8d36f3104a4dd07de9f0525c8e8a229292a 100644 (file)
@@ -191,9 +191,8 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
                notify_info->notify.value = (u16) notify_value;
                notify_info->notify.handler_obj = handler_obj;
 
-               status = acpi_os_queue_for_execution(OSD_PRIORITY_HIGH,
-                                                    acpi_ev_notify_dispatch,
-                                                    notify_info);
+               status = acpi_os_execute(OSL_NOTIFY_HANDLER,
+                                        acpi_ev_notify_dispatch, notify_info);
                if (ACPI_FAILURE(status)) {
                        acpi_ut_delete_generic_state(notify_info);
                }
@@ -346,9 +345,8 @@ static u32 acpi_ev_global_lock_handler(void *context)
 
                /* Run the Global Lock thread which will signal all waiting threads */
 
-               status = acpi_os_queue_for_execution(OSD_PRIORITY_HIGH,
-                                                    acpi_ev_global_lock_thread,
-                                                    context);
+               status = acpi_os_execute(OSL_GLOBAL_LOCK_HANDLER,
+                                        acpi_ev_global_lock_thread, context);
                if (ACPI_FAILURE(status)) {
                        ACPI_EXCEPTION((AE_INFO, status,
                                        "Could not queue Global Lock thread"));
index eb29e96f053c99203b1fdf4d348bfdc376783fba..edf9d2e1dff9106c330464e20cf4ee2863b4b4ce 100644 (file)
@@ -261,7 +261,8 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
  *              Function            - Read or Write operation
  *              Address             - Where in the space to read or write
  *              bit_width           - Field width in bits (8, 16, 32, or 64)
- *              Value               - Pointer to in or out value
+ *              Value               - Pointer to in or out value, must be
+ *                                    full 64-bit acpi_integer
  *
  * RETURN:      Status
  *
@@ -274,7 +275,7 @@ acpi_status
 acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
                               u32 function,
                               acpi_physical_address address,
-                              u32 bit_width, void *value)
+                              u32 bit_width, acpi_integer * value)
 {
        acpi_status status;
        acpi_status status2;
@@ -1007,7 +1008,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
  *
  * PARAMETERS:  walk_namespace callback
  *
- * DESCRIPTION: Run _REg method for region objects of the requested space_iD
+ * DESCRIPTION: Run _REG method for region objects of the requested space_iD
  *
  ******************************************************************************/
 
index 9c46f33386400bb097b98546333bf1e562bcfc65..9ae3cb55979b37c6136c61dd9298c99fa1a592af 100644 (file)
@@ -298,6 +298,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
        struct acpi_table_header *table_ptr = NULL;
        acpi_physical_address address;
        struct acpi_table_header table_header;
+       acpi_integer temp;
        u32 i;
 
        ACPI_FUNCTION_TRACE(ex_load_op);
@@ -326,7 +327,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 
                address = obj_desc->region.address;
 
-               /* Get the table length from the table header */
+               /* Get part of the table header to get the table length */
 
                table_header.length = 0;
                for (i = 0; i < 8; i++) {
@@ -334,11 +335,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
                            acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
                                                           (acpi_physical_address)
                                                           (i + address), 8,
-                                                          ((u8 *) &
-                                                           table_header) + i);
+                                                          &temp);
                        if (ACPI_FAILURE(status)) {
                                return_ACPI_STATUS(status);
                        }
+
+                       /* Get the one valid byte of the returned 64-bit value */
+
+                       ACPI_CAST_PTR(u8, &table_header)[i] = (u8) temp;
                }
 
                /* Sanity check the table length */
@@ -361,11 +365,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
                            acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
                                                           (acpi_physical_address)
                                                           (i + address), 8,
-                                                          ((u8 *) table_ptr +
-                                                           i));
+                                                          &temp);
                        if (ACPI_FAILURE(status)) {
                                goto cleanup;
                        }
+
+                       /* Get the one valid byte of the returned 64-bit value */
+
+                       ACPI_CAST_PTR(u8, table_ptr)[i] = (u8) temp;
                }
                break;
 
index 18925f5b313cc9ab699fbb40255f4a29c378d4db..99ebe5adfcda3b585c0eca2c141bc26cfa28d322 100644 (file)
@@ -103,7 +103,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
                 * NOTE: ACPI versions up to 3.0 specified that the buffer must be
                 * truncated if the string is smaller than the buffer.  However, "other"
                 * implementations of ACPI never did this and thus became the defacto
-                * standard. ACPi 3.0_a changes this behavior such that the buffer
+                * standard. ACPI 3.0_a changes this behavior such that the buffer
                 * is no longer truncated.
                 */
 
index 5e3f63a90fb4387e4fc2a4647d005833c6cec47b..ba8ad569188f7d2a5b94a7c58b47545c07202957 100644 (file)
@@ -157,7 +157,7 @@ acpi_status acpi_ns_root_initialize(void)
 
 #if defined (ACPI_ASL_COMPILER)
 
-                               /* save the parameter count for the i_aSL compiler */
+                               /* Save the parameter count for the i_aSL compiler */
 
                                new_node->value = obj_desc->method.param_count;
 #else
@@ -311,8 +311,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
        acpi_object_type type_to_check_for;
        acpi_object_type this_search_type;
        u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
-       u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
-                                   ACPI_NS_SEARCH_PARENT);
+       u32 local_flags;
 
        ACPI_FUNCTION_TRACE(ns_lookup);
 
@@ -320,8 +319,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
                return_ACPI_STATUS(AE_BAD_PARAMETER);
        }
 
-       acpi_gbl_ns_lookup_count++;
+       local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | ACPI_NS_SEARCH_PARENT);
        *return_node = ACPI_ENTRY_NOT_FOUND;
+       acpi_gbl_ns_lookup_count++;
 
        if (!acpi_gbl_root_node) {
                return_ACPI_STATUS(AE_NO_NAMESPACE);
index 34ac512a2d5ed7f1f771aa9366ac5e4b2285db75..d2473476afa5dbb49631489f8cbff8b312b58742 100644 (file)
@@ -299,7 +299,7 @@ acpi_ns_search_and_enter(u32 target_name,
 
        if (!node || !target_name || !return_node) {
                ACPI_ERROR((AE_INFO,
-                           "Null param: Node %p Name %X ReturnNode %p",
+                           "Null parameter: Node %p Name %X ReturnNode %p",
                            node, target_name, return_node));
                return_ACPI_STATUS(AE_BAD_PARAMETER);
        }
@@ -385,6 +385,11 @@ acpi_ns_search_and_enter(u32 target_name,
        if (!new_node) {
                return_ACPI_STATUS(AE_NO_MEMORY);
        }
+#ifdef ACPI_ASL_COMPILER
+       if (flags & ACPI_NS_EXTERNAL) {
+               new_node->flags |= ANOBJ_IS_EXTERNAL;
+       }
+#endif
 
        /* Install the new object into the parent's list of children */
 
index a573ad5d41db5db8fbeebb621ce6f08d96da653f..cf87b0230026db03f58fc2c5885cb8ceaa3ce2fa 100644 (file)
@@ -451,7 +451,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
                 */
                buffer_size = acpi_gbl_resource_struct_sizes[resource_index] +
                    extra_struct_bytes;
-               buffer_size = ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size);
+               buffer_size = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size);
 
                *size_needed += buffer_size;
 
@@ -579,7 +579,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
 
                /* Round up the size since each element must be aligned */
 
-               temp_size_needed = ACPI_ROUND_UP_to_64_bIT(temp_size_needed);
+               temp_size_needed = ACPI_ROUND_UP_TO_64BIT(temp_size_needed);
 
                /* Point to the next union acpi_operand_object */
 
index 4c322daaf8856c1ea5e24513437fb4e0edaf289a..008058acdd39cb0143883d9be1e2454a4fb5b3da 100644 (file)
@@ -335,7 +335,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
                /* Now align the current length */
 
                user_prt->length =
-                   (u32) ACPI_ROUND_UP_to_64_bIT(user_prt->length);
+                   (u32) ACPI_ROUND_UP_TO_64BIT(user_prt->length);
 
                /* 4) Fourth subobject: Dereference the PRT.source_index */
 
index aa98eebc9b78c6a91fcaf90493c66af772ec2881..0e493f2fec4df8dd776bb892386aeb27223d751a 100644 (file)
@@ -354,6 +354,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
                 * Zero the entire area of the buffer.
                 */
                total_length =
+                   (u32)
                    ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) +
                    1;
                total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length);
@@ -528,7 +529,7 @@ acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer)
         */
        status = acpi_rs_create_resource_list(obj_desc, ret_buffer);
 
-       /* on exit, we must delete the object returned by evaluate_object */
+       /* On exit, we must delete the object returned by evaluate_object */
 
        acpi_ut_remove_reference(obj_desc);
        return_ACPI_STATUS(status);
@@ -578,7 +579,7 @@ acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer)
         */
        status = acpi_rs_create_resource_list(obj_desc, ret_buffer);
 
-       /* on exit, we must delete the object returned by evaluate_object */
+       /* On exit, we must delete the object returned by evaluate_object */
 
        acpi_ut_remove_reference(obj_desc);
        return_ACPI_STATUS(status);
index 9e226438a3f67cd9a1d3e6bafb9ad475c8ee8e9b..494965229fa26e62bd4c32079617e45e7b19682b 100644 (file)
@@ -196,10 +196,8 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr)
                ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20);
 
                ACPI_ERROR((AE_INFO,
-                           "RSDT/XSDT signature at %X (%p) is invalid",
-                           acpi_gbl_RSDP->rsdt_physical_address,
-                           (void *)(acpi_native_uint) acpi_gbl_RSDP->
-                           rsdt_physical_address));
+                           "RSDT/XSDT signature at %X is invalid",
+                           acpi_gbl_RSDP->rsdt_physical_address));
 
                if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
                        ACPI_ERROR((AE_INFO, "Looking for RSDT"));
index 3107e741d51082163ec027d48d81b545072b9430..da2648bbdbc013ea1de77775cf37e26671120ced 100644 (file)
@@ -472,10 +472,10 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
  *
  * RETURN:      Status, RSDP physical address
  *
- * DESCRIPTION: search lower 1_mbyte of memory for the root system descriptor
+ * DESCRIPTION: Search lower 1_mbyte of memory for the root system descriptor
  *              pointer structure.  If it is found, set *RSDP to point to it.
  *
- *              NOTE1: The RSDp must be either in the first 1_k of the Extended
+ *              NOTE1: The RSDP must be either in the first 1_k of the Extended
  *              BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.)
  *              Only a 32-bit physical address is necessary.
  *
@@ -525,7 +525,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
 
                if (physical_address > 0x400) {
                        /*
-                        * 1b) Search EBDA paragraphs (EBDa is required to be a
+                        * 1b) Search EBDA paragraphs (EBDA is required to be a
                         *     minimum of 1_k length)
                         */
                        status = acpi_os_map_memory((acpi_physical_address)
@@ -550,7 +550,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
                                /* Return the physical address */
 
                                physical_address +=
-                                   ACPI_PTR_DIFF(mem_rover, table_ptr);
+                                   (u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
 
                                table_info->physical_address =
                                    (acpi_physical_address) physical_address;
@@ -584,9 +584,9 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
 
                        /* Return the physical address */
 
-                       physical_address =
-                           ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF(mem_rover,
-                                                                    table_ptr);
+                       physical_address = (u32)
+                           (ACPI_HI_RSDP_WINDOW_BASE +
+                            ACPI_PTR_DIFF(mem_rover, table_ptr));
 
                        table_info->physical_address =
                            (acpi_physical_address) physical_address;
@@ -607,7 +607,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
 
                if (physical_address > 0x400) {
                        /*
-                        * 1b) Search EBDA paragraphs (EBDa is required to be a minimum of
+                        * 1b) Search EBDA paragraphs (EBDA is required to be a minimum of
                         *     1_k length)
                         */
                        mem_rover =
index e666c71be0bff1ed65fc6f85a2eefc63f2384305..9450f9b5bfb2aa51b3ab3d3af0fa768b12954cbc 100644 (file)
@@ -443,7 +443,6 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
 /* Region type decoding */
 
 const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
-/*! [Begin] no source code translation (keep these ASL Keywords as-is) */
        "SystemMemory",
        "SystemIO",
        "PCI_Config",
@@ -452,7 +451,6 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
        "CMOS",
        "PCIBARTarget",
        "DataTable"
-/*! [End] no source code translation !*/
 };
 
 char *acpi_ut_get_region_name(u8 space_id)
@@ -482,13 +480,11 @@ char *acpi_ut_get_region_name(u8 space_id)
 /* Event type decoding */
 
 static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = {
-/*! [Begin] no source code translation (keep these strings as-is) */
        "PM_Timer",
        "GlobalLock",
        "PowerButton",
        "SleepButton",
        "RealTimeClock",
-/*! [End] no source code translation !*/
 };
 
 char *acpi_ut_get_event_name(u32 event_id)
@@ -526,7 +522,6 @@ static const char acpi_gbl_bad_type[] = "UNDEFINED";
 /* Printable names of the ACPI object types */
 
 static const char *acpi_gbl_ns_type_names[] = {
-/*! [Begin] no source code translation (keep these strings as-is) */
        /* 00 */ "Untyped",
        /* 01 */ "Integer",
        /* 02 */ "String",
@@ -558,7 +553,6 @@ static const char *acpi_gbl_ns_type_names[] = {
        /* 28 */ "Extra",
        /* 29 */ "Data",
        /* 30 */ "Invalid"
-/*! [End] no source code translation !*/
 };
 
 char *acpi_ut_get_type_name(acpi_object_type type)
@@ -641,7 +635,6 @@ char *acpi_ut_get_node_name(void *object)
 /* Printable names of object descriptor types */
 
 static const char *acpi_gbl_desc_type_names[] = {
-/*! [Begin] no source code translation (keep these ASL Keywords as-is) */
        /* 00 */ "Invalid",
        /* 01 */ "Cached",
        /* 02 */ "State-Generic",
@@ -658,7 +651,6 @@ static const char *acpi_gbl_desc_type_names[] = {
        /* 13 */ "Parser",
        /* 14 */ "Operand",
        /* 15 */ "Node"
-/*! [End] no source code translation !*/
 };
 
 char *acpi_ut_get_descriptor_name(void *object)
index 11e72e6cdc01d8a94437425be6ec2ebbb01e1781..0177ed3dc807755a49e35e1b4902ffb0db9997a4 100644 (file)
@@ -63,7 +63,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20060421
+#define ACPI_CA_VERSION                 0x20060512
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
index 6f2556582f05318e89c754adbe6e5bf2c0dac63f..9a7d6921f53424098322b2df79d6ba9b468f90bf 100644 (file)
 
 struct acpi_external_list {
        char *path;
+       char *internal_path;
        struct acpi_external_list *next;
+       u32 value;
+       u16 length;
+       u8 type;
 };
 
 extern struct acpi_external_list *acpi_gbl_external_list;
@@ -108,6 +112,8 @@ struct acpi_dmtable_data {
 
 struct acpi_op_walk_info {
        u32 level;
+       u32 last_level;
+       u32 count;
        u32 bit_offset;
        u32 flags;
        struct acpi_walk_state *walk_state;
@@ -390,7 +396,7 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource,
 /*
  * dmutils
  */
-void acpi_dm_add_to_external_list(char *path);
+void acpi_dm_add_to_external_list(char *path, u8 type, u32 value);
 
 /*
  * dmrestag
index 272bd0480ec7d0c325dcbdf87bf558aeffc3f7a5..234142828e1a7fb44dcdea286dda62f162292a16 100644 (file)
@@ -138,7 +138,7 @@ acpi_status
 acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
                               u32 function,
                               acpi_physical_address address,
-                              u32 bit_width, void *value);
+                              u32 bit_width, acpi_integer * value);
 
 acpi_status
 acpi_ev_attach_region(union acpi_operand_object *handler_obj,
index 5f2daf402ee1c721157d1cbd73f1fd71070c103a..9297f293b2c0f5c521aad21ec7a7ef58c99d12bc 100644 (file)
@@ -290,14 +290,6 @@ ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
 
 ACPI_EXTERN u8 acpi_gbl_cm_single_step;
 
-/*****************************************************************************
- *
- * Parser globals
- *
- ****************************************************************************/
-
-ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
-
 /*****************************************************************************
  *
  * Hardware globals
index 06a9bd0a9ce93703edff23e69943d3f9b7e95af0..98c697e3c486acbe7a32f321ce79fa9ea7916eed 100644 (file)
@@ -207,10 +207,11 @@ struct acpi_namespace_node {
 #define ANOBJ_METHOD_LOCAL              0x08   /* Node is a method local */
 #define ANOBJ_SUBTREE_HAS_INI           0x10   /* Used to optimize device initialization */
 
-#define ANOBJ_METHOD_NO_RETVal          0x10   /* i_aSL only: Method has no return value */
-#define ANOBJ_METHOD_SOME_NO_RETVal     0x20   /* i_aSL only: Method has at least one return value */
-#define ANOBJ_IS_BIT_OFFSet             0x40   /* i_aSL only: Reference is a bit offset */
-#define ANOBJ_IS_REFERENCed             0x80   /* i_aSL only: Object was referenced */
+#define ANOBJ_IS_EXTERNAL               0x08   /* i_aSL only: This object created via External() */
+#define ANOBJ_METHOD_NO_RETVAL          0x10   /* i_aSL only: Method has no return value */
+#define ANOBJ_METHOD_SOME_NO_RETVAL     0x20   /* i_aSL only: Method has at least one return value */
+#define ANOBJ_IS_BIT_OFFSET             0x40   /* i_aSL only: Reference is a bit offset */
+#define ANOBJ_IS_REFERENCED             0x80   /* i_aSL only: Object was referenced */
 
 /*
  * ACPI Table Descriptor.  One per ACPI table
@@ -595,6 +596,9 @@ union acpi_parse_value {
 #define ACPI_DASM_UNICODE               0x03
 #define ACPI_DASM_EISAID                0x04
 #define ACPI_DASM_MATCHOP               0x05
+#define ACPI_DASM_LNOT_PREFIX           0x06
+#define ACPI_DASM_LNOT_SUFFIX           0x07
+#define ACPI_DASM_IGNORE                0x08
 
 /*
  * Generic operation (for example:  If, While, Store)
@@ -613,7 +617,7 @@ struct acpi_parse_obj_named {
        u32 name;               /* 4-byte name or zero if no name */
 };
 
-/* this version is used by the i_aSL compiler only */
+/* This version is used by the i_aSL compiler only */
 
 #define ACPI_MAX_PARSEOP_NAME   20
 
index b7547aba91b9061f85b1ec25b624c63d01341960..38f9aa4bef00468d8771fcd8221260186f873fb1 100644 (file)
  * printf() format helpers
  */
 
-/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
+/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
 
 #define ACPI_FORMAT_UINT64(i)           ACPI_HIDWORD(i),ACPI_LODWORD(i)
 
 
 /* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */
 
-#define ACPI_ROUND_DOWN_to_32_bIT(a)        ACPI_ROUND_DOWN(a,4)
-#define ACPI_ROUND_DOWN_to_64_bIT(a)        ACPI_ROUND_DOWN(a,8)
+#define ACPI_ROUND_DOWN_TO_32BIT(a)         ACPI_ROUND_DOWN(a,4)
+#define ACPI_ROUND_DOWN_TO_64BIT(a)         ACPI_ROUND_DOWN(a,8)
 #define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a)   ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint))
 
-#define ACPI_ROUND_UP_to_32_bIT(a)          ACPI_ROUND_UP(a,4)
-#define ACPI_ROUND_UP_to_64_bIT(a)          ACPI_ROUND_UP(a,8)
+#define ACPI_ROUND_UP_TO_32BIT(a)           ACPI_ROUND_UP(a,4)
+#define ACPI_ROUND_UP_TO_64BIT(a)           ACPI_ROUND_UP(a,8)
 #define ACPI_ROUND_UP_TO_NATIVE_WORD(a)     ACPI_ROUND_UP(a,sizeof(acpi_native_uint))
 
 #define ACPI_ROUND_BITS_UP_TO_BYTES(a)      ACPI_DIV_8((a) + 7)
index 132d64af24fec393ac173a140ecc0ddee7a0b5c2..2ef8540c0fbaacb8bc923f1b77aa4d640b2f3dcc 100644 (file)
@@ -64,6 +64,7 @@
 #define ACPI_NS_NO_PEER_SEARCH      0x04
 #define ACPI_NS_ERROR_IF_FOUND      0x08
 #define ACPI_NS_PREFIX_IS_SCOPE     0x10
+#define ACPI_NS_EXTERNAL            0x20
 
 #define ACPI_NS_WALK_UNLOCK         TRUE
 #define ACPI_NS_WALK_NO_UNLOCK      FALSE
index a5264fac696e14a23b6d1ce228b8f7a0370cbc6d..982e7ea177e36b001c36b1e28bbae3b94c308bbd 100644 (file)
 #include "platform/acenv.h"
 #include "actypes.h"
 
-/* Priorities for acpi_os_queue_for_execution */
+/* Types for acpi_os_execute */
 
-#define OSD_PRIORITY_GPE            1
-#define OSD_PRIORITY_HIGH           2
-#define OSD_PRIORITY_MED            3
-#define OSD_PRIORITY_LO             4
+typedef enum {
+       OSL_GLOBAL_LOCK_HANDLER,
+       OSL_NOTIFY_HANDLER,
+       OSL_GPE_HANDLER,
+       OSL_DEBUGGER_THREAD,
+       OSL_EC_POLL_HANDLER,
+       OSL_EC_BURST_HANDLER,
+
+} acpi_execute_type;
 
 #define ACPI_NO_UNIT_LIMIT          ((u32) -1)
 #define ACPI_MUTEX_SEM              1
@@ -164,8 +169,8 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
 acpi_thread_id acpi_os_get_thread_id(void);
 
 acpi_status
-acpi_os_queue_for_execution(u32 priority,
-                           acpi_osd_exec_callback function, void *context);
+acpi_os_execute(acpi_execute_type type,
+               acpi_osd_exec_callback function, void *context);
 
 void acpi_os_wait_events_complete(void *context);
 
index e1a40135f707b1e3090feb2531db26c3b4c9f67a..b125ceed9cb7696b20e9db6b5fb035f308f636d2 100644 (file)
@@ -206,8 +206,8 @@ struct acpi_common_facs {
        u32                             V1_pm_tmr_blk;      /* Port address of Power Mgt Timer Ctrl Reg Blk */ \
        u32                             V1_gpe0_blk;        /* Port addr of General Purpose acpi_event 0 Reg Blk */ \
        u32                             V1_gpe1_blk;        /* Port addr of General Purpose acpi_event 1 Reg Blk */ \
-       u8                              pm1_evt_len;        /* Byte length of ports at pm1_x_evt_blk */ \
-       u8                              pm1_cnt_len;        /* Byte length of ports at pm1_x_cnt_blk */ \
+       u8                              pm1_evt_len;        /* Byte Length of ports at pm1_x_evt_blk */ \
+       u8                              pm1_cnt_len;        /* Byte Length of ports at pm1_x_cnt_blk */ \
        u8                              pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */ \
        u8                              pm_tm_len;          /* Byte Length of ports at pm_tm_blk */ \
        u8                              gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */ \
@@ -252,7 +252,7 @@ struct fadt_descriptor {
        u8 S4rtc_sts_valid:1;   /* 16:    Contents of RTC_STS valid after S4 wake (ACPI 3.0) */
        u8 remote_power_on_capable:1;   /* 17:    System is compatible with remote power on (ACPI 3.0) */
        u8 force_apic_cluster_model:1;  /* 18:    All local APICs must use cluster model (ACPI 3.0) */
-       u8 force_apic_physical_destination_mode:1;      /* 19:   all local x_aPICs must use physical dest mode (ACPI 3.0) */
+       u8 force_apic_physical_destination_mode:1;      /* 19:   All local x_aPICs must use physical dest mode (ACPI 3.0) */
         u8:4;                  /* 20-23: Reserved, must be zero */
        u8 reserved3;           /* 24-31: Reserved, must be zero */
 
index 6d4e743a753b4576e5ff6a4c7dbc8dc689f74c09..77cf1236b05ac5fe45ddb2851e7c9a936ecd9db8 100644 (file)
@@ -971,7 +971,7 @@ struct acpi_mem_space_context {
  * Definitions for Resource Attributes
  */
 typedef u16 acpi_rs_length;    /* Resource Length field is fixed at 16 bits */
-typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (length+3) = (64_k-1)+3 */
+typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */
 
 /*
  *  Memory Attributes
@@ -986,8 +986,8 @@ typedef u32 acpi_rsdesc_size;       /* Max Resource Descriptor size is (length+3) = (6
 
 /*
  *  IO Attributes
- *  The ISA Io ranges are:     n000-n0_ffh, n400-n4_ffh, n800-n8_ffh, n_c00-n_cFFh.
- *  The non-ISA Io ranges are: n100-n3_ffh, n500-n7_ffh, n900-n_bFfh, n_cd0-n_fFFh.
+ *  The ISA IO ranges are:     n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh.
+ *  The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh.
  */
 #define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
 #define ACPI_ISA_ONLY_RANGES            (u8) 0x02
index 37964a59aef8796daaebf354e5bd0472860ba7a6..cf18426a87b113e22925f687b987987df55b3473 100644 (file)
 #define AML_BANK_FIELD_OP           (u16) 0x5b87
 #define AML_DATA_REGION_OP          (u16) 0x5b88       /* ACPI 2.0 */
 
-/* Bogus opcodes (they are actually two separate opcodes) */
-
+/*
+ * Combination opcodes (actually two one-byte opcodes)
+ * Used by the disassembler and i_aSL compiler
+ */
 #define AML_LGREATEREQUAL_OP        (u16) 0x9295
 #define AML_LLESSEQUAL_OP           (u16) 0x9294
 #define AML_LNOTEQUAL_OP            (u16) 0x9293
index 64736860bdd50a9093540397568eddbaa5f5e51a..be03818af9d19731dec2aa280b8b38ace1526cb8 100644 (file)
@@ -47,8 +47,6 @@
 #ifndef __AMLRESRC_H
 #define __AMLRESRC_H
 
-/*! [Begin] no source code translation */
-
 /*
  * Resource descriptor tags, as defined in the ACPI specification.
  * Used to symbolically reference fields within a descriptor.
 #define ACPI_RESTAG_DMATYPE                     "_TYP" /* Compatible(0), A(1), B(2), F(3) */
 #define ACPI_RESTAG_GRANULARITY                 "_GRA"
 #define ACPI_RESTAG_INTERRUPT                   "_INT"
-#define ACPI_RESTAG_INTERRUPTLEVEL              "_LL_" /* ActiveLo(1), ActiveHi(0) */
-#define ACPI_RESTAG_INTERRUPTSHARE              "_SHR" /* Shareable(1), NoShare(0) */
+#define ACPI_RESTAG_INTERRUPTLEVEL              "_LL_" /* active_lo(1), active_hi(0) */
+#define ACPI_RESTAG_INTERRUPTSHARE              "_SHR" /* Shareable(1), no_share(0) */
 #define ACPI_RESTAG_INTERRUPTTYPE               "_HE_" /* Edge(1), Level(0) */
 #define ACPI_RESTAG_LENGTH                      "_LEN"
 #define ACPI_RESTAG_MEMATTRIBUTES               "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
-#define ACPI_RESTAG_MEMTYPE                     "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
+#define ACPI_RESTAG_MEMTYPE                     "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
 #define ACPI_RESTAG_MAXADDR                     "_MAX"
 #define ACPI_RESTAG_MINADDR                     "_MIN"
 #define ACPI_RESTAG_MAXTYPE                     "_MAF"
 #define ACPI_RESTAG_REGISTERBITOFFSET           "_RBO"
 #define ACPI_RESTAG_REGISTERBITWIDTH            "_RBW"
 #define ACPI_RESTAG_RANGETYPE                   "_RNG"
-#define ACPI_RESTAG_READWRITETYPE               "_RW_" /* ReadOnly(0), Writeable (1) */
+#define ACPI_RESTAG_READWRITETYPE               "_RW_" /* read_only(0), Writeable (1) */
 #define ACPI_RESTAG_TRANSLATION                 "_TRA"
 #define ACPI_RESTAG_TRANSTYPE                   "_TRS" /* Sparse(1), Dense(0) */
 #define ACPI_RESTAG_TYPE                        "_TTP" /* Translation(1), Static (0) */
-#define ACPI_RESTAG_XFERTYPE                    "_SIZ" /* 8(0), 8And16(1), 16(2) */
-/*! [End] no source code translation !*/
+#define ACPI_RESTAG_XFERTYPE                    "_SIZ" /* 8(0), 8_and16(1), 16(2) */
 
 /* Default sizes for "small" resource descriptors */
 
@@ -306,9 +303,9 @@ union aml_resource {
        /* Utility overlays */
 
        struct aml_resource_address address;
-       u32 u32_item;
-       u16 u16_item;
-       u8 U8item;
+       u32 dword_item;
+       u16 word_item;
+       u8 byte_item;
 };
 
 #endif