ChangeSet 1.1938.505.14, 2005/03/01 15:26:20-05:00, [EMAIL PROTECTED]

        [ACPI] ACPICA 20050228 from Bob Moore
        
        Fixed a problem where the result of an Index() operator
        (an object reference) must increment the reference count
        on the target object for the life of the object reference.
        
        Implemented AML Interpreter and Debugger support for
        the new ACPI 3.0 Extended Address (IO, Memory, Space),
        QwordSpace, DwordSpace, and WordSpace resource descriptors.
        
        Implemented support in the _OSI method for the ACPI 3.0
        "Extended Address Space Descriptor" string, indicating
        interpreter support for the descriptors above.
        
        Implemented header support for the new ACPI 3.0 FADT
        flag bits.
        
        Implemented header support for the new ACPI 3.0 PCI Express
        bits for the PM1 status/enable registers.
        
        Updated header support for the MADT processor local Apic
        struct and MADT platform interrupt source struct for new
        ACPI 3.0 fields.
        
        Implemented header support for the SRAT and SLIT ACPI
        tables.
        
        Signed-off-by: Len Brown <[EMAIL PROTECTED]>



 drivers/acpi/executer/exoparg2.c  |    6 +
 drivers/acpi/parser/psopcode.c    |    2 
 drivers/acpi/resources/rsaddr.c   |  146 +++++++++++++++++++++-----------------
 drivers/acpi/resources/rscalc.c   |   14 +++
 drivers/acpi/resources/rsdump.c   |   23 +++--
 drivers/acpi/resources/rslist.c   |    1 
 drivers/acpi/utilities/utdelete.c |   18 ++++
 drivers/acpi/utilities/utglobal.c |   10 ++
 drivers/acpi/utilities/utmisc.c   |   20 +++--
 include/acpi/acconfig.h           |    4 -
 include/acpi/acdisasm.h           |    5 +
 include/acpi/aclocal.h            |    4 +
 include/acpi/actbl.h              |    4 -
 include/acpi/actbl2.h             |   79 +++++++++++++++++---
 include/acpi/actypes.h            |   33 ++++----
 include/acpi/platform/acenv.h     |    2 
 16 files changed, 257 insertions(+), 114 deletions(-)


diff -Nru a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
--- a/drivers/acpi/executer/exoparg2.c  2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/executer/exoparg2.c  2005-04-01 08:09:10 -08:00
@@ -442,6 +442,12 @@
                        return_desc->reference.object    = operand[0];
                }
 
+               /*
+                * Add a reference to the target package/buffer/string for the 
life
+                * of the index.
+                */
+               acpi_ut_add_reference (operand[0]);
+
                /* Complete the Index reference object */
 
                return_desc->reference.opcode    = AML_INDEX_OP;
diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
--- a/drivers/acpi/parser/psopcode.c    2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/parser/psopcode.c    2005-04-01 08:09:10 -08:00
@@ -522,7 +522,7 @@
 /* 2E */ ACPI_OP ("DerefOf",            ARGP_DEREF_OF_OP,          
ARGI_DEREF_OF_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,     
    AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
 /* 2F */ ACPI_OP ("Notify",             ARGP_NOTIFY_OP,            
ARGI_NOTIFY_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,     
    AML_TYPE_EXEC_2A_0T_0R,   AML_FLAGS_EXEC_2A_0T_0R),
 /* 30 */ ACPI_OP ("SizeOf",             ARGP_SIZE_OF_OP,           
ARGI_SIZE_OF_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,     
    AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE),
-/* 31 */ ACPI_OP ("Index",              ARGP_INDEX_OP,             
ARGI_INDEX_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,     
    AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
+/* 31 */ ACPI_OP ("Index",              ARGP_INDEX_OP,             
ARGI_INDEX_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,     
    AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R),
 /* 32 */ ACPI_OP ("Match",              ARGP_MATCH_OP,             
ARGI_MATCH_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,     
    AML_TYPE_EXEC_6A_0T_1R,   AML_FLAGS_EXEC_6A_0T_1R | AML_CONSTANT),
 /* 33 */ ACPI_OP ("CreateDWordField",   
ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD,  
    AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | 
AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
 /* 34 */ ACPI_OP ("CreateWordField",    ARGP_CREATE_WORD_FIELD_OP, 
ARGI_CREATE_WORD_FIELD_OP,  ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,      
    AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | 
AML_DEFER | AML_CREATE),
diff -Nru a/drivers/acpi/resources/rsaddr.c b/drivers/acpi/resources/rsaddr.c
--- a/drivers/acpi/resources/rsaddr.c   2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/resources/rsaddr.c   2005-04-01 08:09:10 -08:00
@@ -110,13 +110,13 @@
        buffer += 2;
        temp8 = *buffer;
 
-       /* Values 0-2 are valid */
+       /* Values 0-2 and 0xC0-0xFF are valid */
 
-       if (temp8 > 2) {
+       if ((temp8 > 2) && (temp8 < 0xC0)) {
                return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
        }
 
-       output_struct->data.address16.resource_type = temp8 & 0x03;
+       output_struct->data.address16.resource_type = temp8;
 
        /*
         * Get the General Flags (Byte4)
@@ -496,12 +496,13 @@
        buffer += 2;
        temp8 = *buffer;
 
-       /* Values 0-2 are valid */
-       if(temp8 > 2) {
+       /* Values 0-2 and 0xC0-0xFF are valid */
+
+       if ((temp8 > 2) && (temp8 < 0xC0)) {
                return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
        }
 
-       output_struct->data.address32.resource_type = temp8 & 0x03;
+       output_struct->data.address32.resource_type = temp8;
 
        /*
         * Get the General Flags (Byte4)
@@ -850,6 +851,7 @@
        struct acpi_resource            *output_struct = (void *) 
*output_buffer;
        u16                             temp16;
        u8                              temp8;
+       u8                              resource_type;
        u8                              *temp_ptr;
        acpi_size                       struct_size;
        u32                             index;
@@ -860,6 +862,7 @@
 
        buffer = byte_stream_buffer;
        struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64);
+       resource_type = *buffer;
 
        /*
         * Point past the Descriptor to get the number of bytes consumed
@@ -882,13 +885,13 @@
        buffer += 2;
        temp8 = *buffer;
 
-       /* Values 0-2 are valid */
+       /* Values 0-2 and 0xC0-0xFF are valid */
 
-       if(temp8 > 2) {
+       if ((temp8 > 2) && (temp8 < 0xC0)) {
                return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
        }
 
-       output_struct->data.address64.resource_type = temp8 & 0x03;
+       output_struct->data.address64.resource_type = temp8;
 
        /*
         * Get the General Flags (Byte4)
@@ -942,98 +945,113 @@
                }
        }
 
+       if (resource_type == ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE) {
+               /* Move past revision_id and Reserved byte */
+
+               buffer += 2;
+       }
+
        /*
-        * Get Granularity (Bytes 6-13)
+        * Get Granularity (Bytes 6-13) or (Bytes 8-15)
         */
        buffer += 1;
        ACPI_MOVE_64_TO_64 (&output_struct->data.address64.granularity, buffer);
 
        /*
-        * Get min_address_range (Bytes 14-21)
+        * Get min_address_range (Bytes 14-21) or (Bytes 16-23)
         */
        buffer += 8;
        ACPI_MOVE_64_TO_64 (&output_struct->data.address64.min_address_range, 
buffer);
 
        /*
-        * Get max_address_range (Bytes 22-29)
+        * Get max_address_range (Bytes 22-29) or (Bytes 24-31)
         */
        buffer += 8;
        ACPI_MOVE_64_TO_64 (&output_struct->data.address64.max_address_range, 
buffer);
 
        /*
-        * Get address_translation_offset (Bytes 30-37)
+        * Get address_translation_offset (Bytes 30-37) or (Bytes 32-39)
         */
        buffer += 8;
        ACPI_MOVE_64_TO_64 
(&output_struct->data.address64.address_translation_offset, buffer);
 
        /*
-        * Get address_length (Bytes 38-45)
+        * Get address_length (Bytes 38-45) or (Bytes 40-47)
         */
        buffer += 8;
        ACPI_MOVE_64_TO_64 (&output_struct->data.address64.address_length, 
buffer);
 
-       /*
-        * Resource Source Index (if present)
-        */
-       buffer += 8;
+       output_struct->data.address64.resource_source.index = 0x00;
+       output_struct->data.address64.resource_source.string_length = 0;
+       output_struct->data.address64.resource_source.string_ptr = NULL;
 
-       /*
-        * This will leave us pointing to the Resource Source Index
-        * If it is present, then save it off and calculate the
-        * pointer to where the null terminated string goes:
-        * Each Interrupt takes 32-bits + the 5 bytes of the
-        * stream that are default.
-        *
-        * Note: Some resource descriptors will have an additional null, so
-        * we add 1 to the length.
-        */
-       if (*bytes_consumed > (46 + 1)) {
-               /* Dereference the Index */
+       if (resource_type == ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE) {
+               /* Get type_specific_attribute (Bytes 48-55) */
 
-               temp8 = *buffer;
-               output_struct->data.address64.resource_source.index =
-                               (u32) temp8;
+               buffer += 8;
+               ACPI_MOVE_64_TO_64 
(&output_struct->data.address64.type_specific_attributes, buffer);
+       }
+       else {
+               output_struct->data.address64.type_specific_attributes = 0;
 
-               /* Point to the String */
+               /*
+                * Resource Source Index (if present)
+                */
+               buffer += 8;
 
-               buffer += 1;
+               /*
+                * This will leave us pointing to the Resource Source Index
+                * If it is present, then save it off and calculate the
+                * pointer to where the null terminated string goes:
+                * Each Interrupt takes 32-bits + the 5 bytes of the
+                * stream that are default.
+                *
+                * Note: Some resource descriptors will have an additional 
null, so
+                * we add 1 to the length.
+                */
+               if (*bytes_consumed > (46 + 1)) {
+                       /* Dereference the Index */
 
-               /* Point the String pointer to the end of this structure */
+                       temp8 = *buffer;
+                       output_struct->data.address64.resource_source.index =
+                                       (u32) temp8;
 
-               output_struct->data.address64.resource_source.string_ptr =
-                               (char *)((u8 *)output_struct + struct_size);
+                       /* Point to the String */
 
-               temp_ptr = (u8 *) 
output_struct->data.address64.resource_source.string_ptr;
+                       buffer += 1;
 
-               /* Copy the string into the buffer */
+                       /* Point the String pointer to the end of this 
structure */
 
-               index = 0;
-               while (0x00 != *buffer) {
-                       *temp_ptr = *buffer;
+                       
output_struct->data.address64.resource_source.string_ptr =
+                                       (char *)((u8 *)output_struct + 
struct_size);
 
-                       temp_ptr += 1;
-                       buffer += 1;
-                       index += 1;
-               }
+                       temp_ptr = (u8 *) 
output_struct->data.address64.resource_source.string_ptr;
 
-               /*
-                * Add the terminating null
-                */
-               *temp_ptr = 0x00;
-               output_struct->data.address64.resource_source.string_length = 
index + 1;
+                       /* Copy the string into the buffer */
 
-               /*
-                * In order for the struct_size to fall on a 32-bit boundary,
-                * calculate the length of the string and expand the
-                * struct_size to the next 32-bit boundary.
-                */
-               temp8 = (u8) (index + 1);
-               struct_size += ACPI_ROUND_UP_to_32_bITS (temp8);
-       }
-       else {
-               output_struct->data.address64.resource_source.index = 0x00;
-               output_struct->data.address64.resource_source.string_length = 0;
-               output_struct->data.address64.resource_source.string_ptr = NULL;
+                       index = 0;
+                       while (0x00 != *buffer) {
+                               *temp_ptr = *buffer;
+
+                               temp_ptr += 1;
+                               buffer += 1;
+                               index += 1;
+                       }
+
+                       /*
+                        * Add the terminating null
+                        */
+                       *temp_ptr = 0x00;
+                       
output_struct->data.address64.resource_source.string_length = index + 1;
+
+                       /*
+                        * In order for the struct_size to fall on a 32-bit 
boundary,
+                        * calculate the length of the string and expand the
+                        * struct_size to the next 32-bit boundary.
+                        */
+                       temp8 = (u8) (index + 1);
+                       struct_size += ACPI_ROUND_UP_to_32_bITS (temp8);
+               }
        }
 
        /*
diff -Nru a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c
--- a/drivers/acpi/resources/rscalc.c   2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/resources/rscalc.c   2005-04-01 08:09:10 -08:00
@@ -376,6 +376,20 @@
                        break;
 
 
+               case ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE:
+                       /*
+                        * 64-Bit Address Resource
+                        */
+                       buffer = byte_stream_buffer;
+
+                       ++buffer;
+                       ACPI_MOVE_16_TO_16 (&temp16, buffer);
+
+                       bytes_consumed = temp16 + 3;
+                       structure_size = ACPI_SIZEOF_RESOURCE (struct 
acpi_resource_address64);
+                       break;
+
+
                case ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE:
                        /*
                         * 64-Bit Address Resource
diff -Nru a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
--- a/drivers/acpi/resources/rsdump.c   2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/resources/rsdump.c   2005-04-01 08:09:10 -08:00
@@ -571,7 +571,7 @@
                        break;
                }
 
-               acpi_os_printf (" Type Specific: %s Translation\n",
+               acpi_os_printf ("  Type Specific: %s Translation\n",
                        ACPI_SPARSE_TRANSLATION ==
                        address16_data->attribute.io.translation_attribute ?
                        "Sparse" : "Dense");
@@ -584,8 +584,8 @@
 
        default:
 
-               acpi_os_printf ("Invalid resource type. Exiting.\n");
-               return;
+               acpi_os_printf ("0x%2.2X\n", address16_data->resource_type);
+               break;
        }
 
        acpi_os_printf ("  Resource %s\n",
@@ -718,7 +718,7 @@
                        break;
                }
 
-               acpi_os_printf (" Type Specific: %s Translation\n",
+               acpi_os_printf ("  Type Specific: %s Translation\n",
                        ACPI_SPARSE_TRANSLATION ==
                        address32_data->attribute.io.translation_attribute ?
                        "Sparse" : "Dense");
@@ -731,8 +731,8 @@
 
        default:
 
-               acpi_os_printf ("  Invalid Resource Type..exiting.\n");
-               return;
+               acpi_os_printf ("  Resource Type: 0x%2.2X\n", 
address32_data->resource_type);
+               break;
        }
 
        acpi_os_printf ("  Resource %s\n",
@@ -865,7 +865,7 @@
                        break;
                }
 
-               acpi_os_printf (" Type Specific: %s Translation\n",
+               acpi_os_printf ("  Type Specific: %s Translation\n",
                        ACPI_SPARSE_TRANSLATION ==
                        address64_data->attribute.io.translation_attribute ?
                        "Sparse" : "Dense");
@@ -878,8 +878,8 @@
 
        default:
 
-               acpi_os_printf ("  Invalid Resource Type..exiting.\n");
-               return;
+               acpi_os_printf ("  Resource Type: 0x%2.2X\n", 
address64_data->resource_type);
+               break;
        }
 
        acpi_os_printf ("  Resource %s\n",
@@ -913,7 +913,10 @@
        acpi_os_printf ("  Address Length: %8.8X%8.8X\n",
                         ACPI_FORMAT_UINT64 (address64_data->address_length));
 
-       if(0xFF != address64_data->resource_source.index) {
+       acpi_os_printf ("  Type Specific Attributes: %8.8X%8.8X\n",
+                        ACPI_FORMAT_UINT64 
(address64_data->type_specific_attributes));
+
+       if (0xFF != address64_data->resource_source.index) {
                acpi_os_printf ("  Resource Source Index: %X\n",
                                 address64_data->resource_source.index);
                acpi_os_printf ("  Resource Source: %s\n",
diff -Nru a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c
--- a/drivers/acpi/resources/rslist.c   2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/resources/rslist.c   2005-04-01 08:09:10 -08:00
@@ -178,6 +178,7 @@
 
 
                case ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE:
+               case ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE:
                        /*
                         * 64-Bit Address Resource
                         */
diff -Nru a/drivers/acpi/utilities/utdelete.c 
b/drivers/acpi/utilities/utdelete.c
--- a/drivers/acpi/utilities/utdelete.c 2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/utilities/utdelete.c 2005-04-01 08:09:10 -08:00
@@ -46,6 +46,7 @@
 #include <acpi/acinterp.h>
 #include <acpi/acnamesp.h>
 #include <acpi/acevents.h>
+#include <acpi/amlcode.h>
 
 #define _COMPONENT          ACPI_UTILITIES
         ACPI_MODULE_NAME    ("utdelete")
@@ -562,8 +563,23 @@
                        break;
 
 
-               case ACPI_TYPE_REGION:
                case ACPI_TYPE_LOCAL_REFERENCE:
+
+                       /*
+                        * The target of an Index (a package, string, or 
buffer) must track
+                        * changes to the ref count of the index.
+                        */
+                       if (object->reference.opcode == AML_INDEX_OP) {
+                               status = acpi_ut_create_update_state_and_push (
+                                                object->reference.object, 
action, &state_list);
+                               if (ACPI_FAILURE (status)) {
+                                       goto error_exit;
+                               }
+                       }
+                       break;
+
+
+               case ACPI_TYPE_REGION:
                default:
 
                        /* No subobjects */
diff -Nru a/drivers/acpi/utilities/utglobal.c 
b/drivers/acpi/utilities/utglobal.c
--- a/drivers/acpi/utilities/utglobal.c 2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/utilities/utglobal.c 2005-04-01 08:09:10 -08:00
@@ -194,6 +194,8 @@
  */
 const char                          
*acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS] =
 {
+       /* Operating System Vendor Strings */
+
        "Linux",
        "Windows 2000",
        "Windows 2001",
@@ -202,7 +204,11 @@
        "Windows 2001 SP1",
        "Windows 2001 SP2",
        "Windows 2001 SP3",
-       "Windows 2001 SP4"
+       "Windows 2001 SP4",
+
+       /* Feature Group Strings */
+
+       "Extended Address Space Descriptor"
 };
 
 
@@ -355,6 +361,7 @@
        /* ACPI_BITREG_SLEEP_BUTTON_STATUS  */   {ACPI_REGISTER_PM1_STATUS,   
ACPI_BITPOSITION_SLEEP_BUTTON_STATUS,   ACPI_BITMASK_SLEEP_BUTTON_STATUS},
        /* ACPI_BITREG_RT_CLOCK_STATUS      */   {ACPI_REGISTER_PM1_STATUS,   
ACPI_BITPOSITION_RT_CLOCK_STATUS,       ACPI_BITMASK_RT_CLOCK_STATUS},
        /* ACPI_BITREG_WAKE_STATUS          */   {ACPI_REGISTER_PM1_STATUS,   
ACPI_BITPOSITION_WAKE_STATUS,           ACPI_BITMASK_WAKE_STATUS},
+       /* ACPI_BITREG_PCIEXP_WAKE_STATUS   */   {ACPI_REGISTER_PM1_STATUS,   
ACPI_BITPOSITION_PCIEXP_WAKE_STATUS,    ACPI_BITMASK_PCIEXP_WAKE_STATUS},
 
        /* ACPI_BITREG_TIMER_ENABLE         */   {ACPI_REGISTER_PM1_ENABLE,   
ACPI_BITPOSITION_TIMER_ENABLE,          ACPI_BITMASK_TIMER_ENABLE},
        /* ACPI_BITREG_GLOBAL_LOCK_ENABLE   */   {ACPI_REGISTER_PM1_ENABLE,   
ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE,    ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
@@ -362,6 +369,7 @@
        /* ACPI_BITREG_SLEEP_BUTTON_ENABLE  */   {ACPI_REGISTER_PM1_ENABLE,   
ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE,   ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
        /* ACPI_BITREG_RT_CLOCK_ENABLE      */   {ACPI_REGISTER_PM1_ENABLE,   
ACPI_BITPOSITION_RT_CLOCK_ENABLE,       ACPI_BITMASK_RT_CLOCK_ENABLE},
        /* ACPI_BITREG_WAKE_ENABLE          */   {ACPI_REGISTER_PM1_ENABLE,   
0,                                      0},
+       /* ACPI_BITREG_PCIEXP_WAKE_DISABLE  */   {ACPI_REGISTER_PM1_ENABLE,   
ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE,   ACPI_BITMASK_PCIEXP_WAKE_DISABLE},
 
        /* ACPI_BITREG_SCI_ENABLE           */   {ACPI_REGISTER_PM1_CONTROL,  
ACPI_BITPOSITION_SCI_ENABLE,            ACPI_BITMASK_SCI_ENABLE},
        /* ACPI_BITREG_BUS_MASTER_RLD       */   {ACPI_REGISTER_PM1_CONTROL,  
ACPI_BITPOSITION_BUS_MASTER_RLD,        ACPI_BITMASK_BUS_MASTER_RLD},
diff -Nru a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
--- a/drivers/acpi/utilities/utmisc.c   2005-04-01 08:09:10 -08:00
+++ b/drivers/acpi/utilities/utmisc.c   2005-04-01 08:09:10 -08:00
@@ -380,6 +380,10 @@
        ACPI_FUNCTION_TRACE ("ut_stroul64");
 
 
+       if ((!string) || !(*string)) {
+               goto error_exit;
+       }
+
        switch (base) {
        case ACPI_ANY_BASE:
        case 10:
@@ -394,7 +398,7 @@
        /* Skip over any white space in the buffer */
 
        while (ACPI_IS_SPACE (*string) || *string == '\t') {
-               ++string;
+               string++;
        }
 
        /*
@@ -403,9 +407,9 @@
         */
        if (base == 0) {
                if ((*string == '0') &&
-                       (ACPI_TOLOWER (*(++string)) == 'x')) {
+                       (ACPI_TOLOWER (*(string + 1)) == 'x')) {
                        base = 16;
-                       ++string;
+                       string += 2;
                }
                else {
                        base = 10;
@@ -416,10 +420,10 @@
         * For hexadecimal base, skip over the leading
         * 0 or 0x, if they are present.
         */
-       if (base == 16 &&
-               *string == '0' &&
-               ACPI_TOLOWER (*(++string)) == 'x') {
-               string++;
+       if ((base == 16) &&
+               (*string == '0') &&
+               (ACPI_TOLOWER (*(string + 1)) == 'x')) {
+               string += 2;
        }
 
        /* Any string left? */
@@ -464,7 +468,7 @@
 
                return_value *= base;
                return_value += this_digit;
-               ++string;
+               string++;
        }
 
        *ret_integer = return_value;
diff -Nru a/include/acpi/acconfig.h b/include/acpi/acconfig.h
--- a/include/acpi/acconfig.h   2005-04-01 08:09:10 -08:00
+++ b/include/acpi/acconfig.h   2005-04-01 08:09:10 -08:00
@@ -64,7 +64,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20050211
+#define ACPI_CA_VERSION                 0x20050228
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
@@ -198,7 +198,7 @@
 
 /* Number of strings associated with the _OSI reserved method */
 
-#define ACPI_NUM_OSI_STRINGS            9
+#define ACPI_NUM_OSI_STRINGS            10
 
 
 /******************************************************************************
diff -Nru a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
--- a/include/acpi/acdisasm.h   2005-04-01 08:09:10 -08:00
+++ b/include/acpi/acdisasm.h   2005-04-01 08:09:10 -08:00
@@ -75,6 +75,11 @@
 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];
diff -Nru a/include/acpi/aclocal.h b/include/acpi/aclocal.h
--- a/include/acpi/aclocal.h    2005-04-01 08:09:10 -08:00
+++ b/include/acpi/aclocal.h    2005-04-01 08:09:10 -08:00
@@ -774,6 +774,7 @@
 #define ACPI_BITMASK_POWER_BUTTON_STATUS        0x0100
 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS        0x0200
 #define ACPI_BITMASK_RT_CLOCK_STATUS            0x0400
+#define ACPI_BITMASK_PCIEXP_WAKE_STATUS         0x4000    /* ACPI 3.0 */
 #define ACPI_BITMASK_WAKE_STATUS                0x8000
 
 #define ACPI_BITMASK_ALL_FIXED_STATUS           (ACPI_BITMASK_TIMER_STATUS     
     | \
@@ -789,6 +790,7 @@
 #define ACPI_BITMASK_POWER_BUTTON_ENABLE        0x0100
 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE        0x0200
 #define ACPI_BITMASK_RT_CLOCK_ENABLE            0x0400
+#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE        0x4000    /* ACPI 3.0 */
 
 #define ACPI_BITMASK_SCI_ENABLE                 0x0001
 #define ACPI_BITMASK_BUS_MASTER_RLD             0x0002
@@ -807,6 +809,7 @@
 #define ACPI_BITPOSITION_POWER_BUTTON_STATUS    0x08
 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS    0x09
 #define ACPI_BITPOSITION_RT_CLOCK_STATUS        0x0A
+#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS     0x0E    /* ACPI 3.0 */
 #define ACPI_BITPOSITION_WAKE_STATUS            0x0F
 
 #define ACPI_BITPOSITION_TIMER_ENABLE           0x00
@@ -814,6 +817,7 @@
 #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE    0x08
 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE    0x09
 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE        0x0A
+#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE    0x0E    /* ACPI 3.0 */
 
 #define ACPI_BITPOSITION_SCI_ENABLE             0x00
 #define ACPI_BITPOSITION_BUS_MASTER_RLD         0x01
diff -Nru a/include/acpi/actbl.h b/include/acpi/actbl.h
--- a/include/acpi/actbl.h      2005-04-01 08:09:10 -08:00
+++ b/include/acpi/actbl.h      2005-04-01 08:09:10 -08:00
@@ -261,6 +261,8 @@
        u8                              local_sapic_eid;        /* SAPIC EID */
        u8                              reserved [3];           /* Reserved - 
must be zero */
        LOCAL_APIC_FLAGS
+       u32                             processor_uID;          /* Numeric UID 
- ACPI 3.0 */
+       char                            processor_uIDstring[1]; /* String UID  
- ACPI 3.0 */
 };
 
 struct madt_interrupt_source
@@ -272,7 +274,7 @@
        u8                              processor_eid;          /* Processor 
EID */
        u8                              io_sapic_vector;        /* Vector value 
for PMI interrupts */
        u32                             interrupt;              /* Global 
system interrupt */
-       u32                             reserved;               /* Reserved - 
must be zero */
+       u32                             flags;                  /* Interrupt 
Source Flags */
 };
 
 
diff -Nru a/include/acpi/actbl2.h b/include/acpi/actbl2.h
--- a/include/acpi/actbl2.h     2005-04-01 08:09:10 -08:00
+++ b/include/acpi/actbl2.h     2005-04-01 08:09:10 -08:00
@@ -108,7 +108,7 @@
 
 
 /*
- * ACPI 2.0 Generic Address Structure (GAS)
+ * ACPI 2.0+ Generic Address Structure (GAS)
  */
 struct acpi_generic_address
 {
@@ -159,7 +159,7 @@
        u16                             iapc_boot_arch;     /* IA-PC Boot 
Architecture Flags. See Table 5-10 for description*/
 
 /*
- * ACPI 2.0 Fixed ACPI Description Table (FADT)
+ * ACPI 2.0+ Fixed ACPI Description Table (FADT)
  */
 struct fadt_descriptor_rev2
 {
@@ -174,17 +174,25 @@
        u32                             sleep_button : 1;   /* Sleep button is 
handled as a generic feature, or not present */
        u32                             fixed_rTC   : 1;    /* RTC wakeup stat 
not in fixed register space */
        u32                             rtcs4       : 1;    /* RTC wakeup stat 
not possible from S4 */
-       u32                             tmr_val_ext : 1;    /* Indicates 
tmr_val is 32 bits 0=24-bits*/
+       u32                             tmr_val_ext : 1;    /* Indicates 
tmr_val is 32 bits 0=24-bits */
        u32                             dock_cap    : 1;    /* Supports Docking 
*/
-       u32                             reset_reg_sup : 1;  /* Indicates system 
supports system reset via the FADT RESET_REG*/
-       u32                             sealed_case : 1;    /* Indicates system 
has no internal expansion capabilities and case is sealed. */
-       u32                             headless    : 1;    /* Indicates system 
does not have local video capabilities or local input devices.*/
+       u32                             reset_reg_sup : 1;  /* Indicates system 
supports system reset via the FADT RESET_REG */
+       u32                             sealed_case : 1;    /* Indicates system 
has no internal expansion capabilities and case is sealed */
+       u32                             headless    : 1;    /* Indicates system 
does not have local video capabilities or local input devices */
        u32                             cpu_sw_sleep : 1;   /* Indicates to 
OSPM that a processor native instruction */
-                          /* Must be executed after writing the SLP_TYPx 
register. */
-       u32                             reserved6   : 18;   /* Reserved - must 
be zero */
+                          /* must be executed after writing the SLP_TYPx 
register */
+       /* ACPI 3.0 flag bits */
+
+       u32                             pci_exp_wak                         : 
1; /* System supports PCIEXP_WAKE (STS/EN) bits */
+       u32                             use_platform_clock                  : 
1; /* OSPM should use platform-provided timer */
+       u32                             S4rtc_sts_valid                     : 
1; /* Contents of RTC_STS valid after S4 wake */
+       u32                             remote_power_on_capable             : 
1; /* System is compatible with remote power on */
+       u32                             force_apic_cluster_model            : 
1; /* All local APICs must use cluster model */
+       u32                             force_apic_physical_destination_mode : 
1; /* all local x_aPICs must use physical dest mode */
+       u32                             reserved6                           : 
12;/* Reserved - must be zero */
 
        struct acpi_generic_address     reset_register;     /* Reset register 
address in GAS format */
-       u8                              reset_value;        /* Value to write 
to the reset_register port to reset the system. */
+       u8                              reset_value;        /* Value to write 
to the reset_register port to reset the system */
        u8                              reserved7[3];       /* These three 
bytes must be zero */
        u64                             xfirmware_ctrl;     /* 64-bit physical 
address of FACS */
        u64                             Xdsdt;              /* 64-bit physical 
address of DSDT */
@@ -199,7 +207,7 @@
 };
 
 
-/* "Downrevved" ACPI 2.0 FADT descriptor */
+/* "Down-revved" ACPI 2.0 FADT descriptor */
 
 struct fadt_descriptor_rev2_minus
 {
@@ -213,7 +221,7 @@
 };
 
 
-/* Embedded Controller */
+/* ECDT - Embedded Controller Boot Resources Table */
 
 struct ec_boot_resources
 {
@@ -223,6 +231,55 @@
        u32                             uid;                /* Unique ID - must 
be same as the EC _UID method */
        u8                              gpe_bit;            /* The GPE for the 
EC */
        u8                              ec_id[1];           /* Full namepath of 
the EC in the ACPI namespace */
+};
+
+
+/* SRAT - System Resource Affinity Table */
+
+struct static_resource_alloc
+{
+       u8                              type;
+       u8                              length;
+       u8                              proximity_domain_lo;
+       u8                              apic_id;
+       u32                             enabled         :1;
+       u32                             reserved3       :31;
+       u8                              local_sapic_eid;
+       u8                              proximity_domain_hi[3];
+       u32                             reserved4;
+};
+
+struct memory_affinity
+{
+       u8                              type;
+       u8                              length;
+       u32                             proximity_domain;
+       u16                             reserved3;
+       u64                             base_address;
+       u64                             address_length;
+       u32                             reserved4;
+       u32                             enabled         :1;
+       u32                             hot_pluggable   :1;
+       u32                             non_volatile    :1;
+       u32                             reserved5       :29;
+       u64                             reserved6;
+};
+
+struct system_resource_affinity
+{
+       ACPI_TABLE_HEADER_DEF
+       u32                             reserved1;          /* Must be value 
'1' */
+       u64                             reserved2;
+};
+
+
+/* SLIT - System Locality Distance Information Table */
+
+struct system_locality_info
+{
+       ACPI_TABLE_HEADER_DEF
+       u64                             locality_count;
+       u8                              entry[1][1];
 };
 
 
diff -Nru a/include/acpi/actypes.h b/include/acpi/actypes.h
--- a/include/acpi/actypes.h    2005-04-01 08:09:10 -08:00
+++ b/include/acpi/actypes.h    2005-04-01 08:09:10 -08:00
@@ -653,24 +653,26 @@
 #define ACPI_BITREG_SLEEP_BUTTON_STATUS         0x04
 #define ACPI_BITREG_RT_CLOCK_STATUS             0x05
 #define ACPI_BITREG_WAKE_STATUS                 0x06
+#define ACPI_BITREG_PCIEXP_WAKE_STATUS          0x07
 
-#define ACPI_BITREG_TIMER_ENABLE                0x07
-#define ACPI_BITREG_GLOBAL_LOCK_ENABLE          0x08
-#define ACPI_BITREG_POWER_BUTTON_ENABLE         0x09
-#define ACPI_BITREG_SLEEP_BUTTON_ENABLE         0x0A
-#define ACPI_BITREG_RT_CLOCK_ENABLE             0x0B
-#define ACPI_BITREG_WAKE_ENABLE                 0x0C
-
-#define ACPI_BITREG_SCI_ENABLE                  0x0D
-#define ACPI_BITREG_BUS_MASTER_RLD              0x0E
-#define ACPI_BITREG_GLOBAL_LOCK_RELEASE         0x0F
-#define ACPI_BITREG_SLEEP_TYPE_A                0x10
-#define ACPI_BITREG_SLEEP_TYPE_B                0x11
-#define ACPI_BITREG_SLEEP_ENABLE                0x12
+#define ACPI_BITREG_TIMER_ENABLE                0x08
+#define ACPI_BITREG_GLOBAL_LOCK_ENABLE          0x09
+#define ACPI_BITREG_POWER_BUTTON_ENABLE         0x0A
+#define ACPI_BITREG_SLEEP_BUTTON_ENABLE         0x0B
+#define ACPI_BITREG_RT_CLOCK_ENABLE             0x0C
+#define ACPI_BITREG_WAKE_ENABLE                 0x0D
+#define ACPI_BITREG_PCIEXP_WAKE_DISABLE         0x0E
+
+#define ACPI_BITREG_SCI_ENABLE                  0x0F
+#define ACPI_BITREG_BUS_MASTER_RLD              0x10
+#define ACPI_BITREG_GLOBAL_LOCK_RELEASE         0x11
+#define ACPI_BITREG_SLEEP_TYPE_A                0x12
+#define ACPI_BITREG_SLEEP_TYPE_B                0x13
+#define ACPI_BITREG_SLEEP_ENABLE                0x14
 
-#define ACPI_BITREG_ARB_DISABLE                 0x13
+#define ACPI_BITREG_ARB_DISABLE                 0x15
 
-#define ACPI_BITREG_MAX                         0x13
+#define ACPI_BITREG_MAX                         0x15
 #define ACPI_NUM_BITREG                         ACPI_BITREG_MAX + 1
 
 
@@ -1206,6 +1208,7 @@
        u64                                 max_address_range;
        u64                                 address_translation_offset;
        u64                                 address_length;
+       u64                                 type_specific_attributes;
        struct acpi_resource_source         resource_source;
 };
 
diff -Nru a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
--- a/include/acpi/platform/acenv.h     2005-04-01 08:09:10 -08:00
+++ b/include/acpi/platform/acenv.h     2005-04-01 08:09:10 -08:00
@@ -226,6 +226,7 @@
  */
 
 #define ACPI_STRSTR(s1,s2)      strstr((s1), (s2))
+#define ACPI_STRCHR(s1,c)       strchr((s1), (c))
 
 #ifdef ACPI_FUTURE_USAGE
 #define ACPI_STRUPR(s)          (void) acpi_ut_strupr ((s))
@@ -294,6 +295,7 @@
 
 
 #define ACPI_STRSTR(s1,s2)      acpi_ut_strstr ((s1), (s2))
+#define ACPI_STRCHR(s1,c)       acpi_ut_strchr ((s1), (c))
 
 #ifdef ACPI_FUTURE_USAGE
 #define ACPI_STRUPR(s)          (void) acpi_ut_strupr ((s))
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to