union acpi_operand_object *return_desc)
 {
        acpi_status status;
+       int same_as_implicit_return;
 
        ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, 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) {
                }
 
                /*
-                * 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);
                }
 
         * 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);
 
  * 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
  *
  * 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
 
                         * 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)) {
                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;
        }
 
  * 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.
                 * 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",
 
                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);
                }
 
                /* 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"));
 
  *              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
  *
 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;
  *
  * 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
  *
  ******************************************************************************/
 
 
        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);
 
                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++) {
                            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 */
                            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;
 
 
                 * 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.
                 */
 
 
 
 #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
        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);
 
                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);
 
 
        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);
        }
        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 */
 
 
                 */
                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;
 
 
                /* 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 */
 
 
                /* 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 */
 
 
                 * 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);
         */
        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);
         */
        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);
 
                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"));
 
  *
  * 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.
  *
 
                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)
                                /* 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;
 
                        /* 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;
 
                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 =
 
 /* 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",
        "CMOS",
        "PCIBARTarget",
        "DataTable"
-/*! [End] no source code translation !*/
 };
 
 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)
 /* 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",
        /* 28 */ "Extra",
        /* 29 */ "Data",
        /* 30 */ "Invalid"
-/*! [End] no source code translation !*/
 };
 
 char *acpi_ut_get_type_name(acpi_object_type type)
 /* 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",
        /* 13 */ "Parser",
        /* 14 */ "Operand",
        /* 15 */ "Node"
-/*! [End] no source code translation !*/
 };
 
 char *acpi_ut_get_descriptor_name(void *object)
 
 
 /* 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,
 
 
 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;
 
 struct acpi_op_walk_info {
        u32 level;
+       u32 last_level;
+       u32 count;
        u32 bit_offset;
        u32 flags;
        struct acpi_walk_state *walk_state;
 /*
  * dmutils
  */
-void acpi_dm_add_to_external_list(char *path);
+void acpi_dm_add_to_external_list(char *path, u8 type, u32 value);
 
 /*
  * dmrestag
 
 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,
 
 
 ACPI_EXTERN u8 acpi_gbl_cm_single_step;
 
-/*****************************************************************************
- *
- * Parser globals
- *
- ****************************************************************************/
-
-ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
-
 /*****************************************************************************
  *
  * Hardware globals
 
 #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
 #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)
        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
 
 
  * 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)
 
 #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
 
 #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
 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);
 
 
        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 */ \
        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 */
 
 
  * 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
 
 /*
  *  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
 
 #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
 
 #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 */
 
        /* 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