Al Stone 938de5
Index: src/source/compiler/aslcodegen.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslcodegen.c
Al Stone 938de5
+++ src/source/compiler/aslcodegen.c
Al Stone fdf675
@@ -246,16 +246,12 @@ CgWriteAmlOpcode (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *Op)
Al Stone afae4e
 {
Al Stone afae4e
     UINT8                   PkgLenFirstByte;
Al Stone afae4e
-    UINT32                  i;
Al Stone afae4e
-    union {
Al Stone afae4e
-        UINT16                  Opcode;
Al Stone afae4e
-        UINT8                   OpcodeBytes[2];
Al Stone afae4e
-    } Aml;
Al Stone afae4e
-    union {
Al Stone afae4e
-        UINT32                  Len;
Al Stone afae4e
-        UINT8                   LenBytes[4];
Al Stone afae4e
-    } PkgLen;
Al Stone afae4e
-
Al Stone afae4e
+    UINT8                   Byte;
Al Stone afae4e
+    UINT16                  Word;
Al Stone afae4e
+    UINT32                  DWord;
Al Stone afae4e
+    UINT64                  QWord;
Al Stone afae4e
+    UINT16                  AmlOpcode;
Al Stone afae4e
+    UINT32                  PkgLen;
Al Stone afae4e
 
Al Stone afae4e
     /* We expect some DEFAULT_ARGs, just ignore them */
Al Stone afae4e
 
Al Stone 938de5
@@ -278,51 +274,52 @@ CgWriteAmlOpcode (
Al Stone afae4e
 
Al Stone afae4e
         /* Special opcodes for within a field definition */
Al Stone afae4e
 
Al Stone afae4e
-        Aml.Opcode = AML_FIELD_OFFSET_OP;
Al Stone afae4e
+        AmlOpcode = AML_FIELD_OFFSET_OP;
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     case AML_INT_ACCESSFIELD_OP:
Al Stone afae4e
 
Al Stone afae4e
-        Aml.Opcode = AML_FIELD_ACCESS_OP;
Al Stone afae4e
+        AmlOpcode = AML_FIELD_ACCESS_OP;
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     case AML_INT_CONNECTION_OP:
Al Stone afae4e
 
Al Stone afae4e
-        Aml.Opcode = AML_FIELD_CONNECTION_OP;
Al Stone afae4e
+        AmlOpcode = AML_FIELD_CONNECTION_OP;
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     default:
Al Stone afae4e
 
Al Stone afae4e
-        Aml.Opcode = Op->Asl.AmlOpcode;
Al Stone afae4e
+        AmlOpcode = Op->Asl.AmlOpcode;
Al Stone afae4e
         break;
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone afae4e
-    switch (Aml.Opcode)
Al Stone afae4e
+    switch (AmlOpcode)
Al Stone afae4e
     {
Al Stone afae4e
     case AML_PACKAGE_LENGTH:
Al Stone afae4e
 
Al Stone afae4e
         /* Value is the length to be encoded (Used in field definitions) */
Al Stone afae4e
 
Al Stone afae4e
-        PkgLen.Len = (UINT32) Op->Asl.Value.Integer;
Al Stone afae4e
+        PkgLen = (UINT32) Op->Asl.Value.Integer;
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     default:
Al Stone afae4e
 
Al Stone afae4e
         /* Check for two-byte opcode */
Al Stone afae4e
 
Al Stone afae4e
-        if (Aml.Opcode > 0x00FF)
Al Stone afae4e
+        if (AmlOpcode > 0x00FF)
Al Stone afae4e
         {
Al Stone afae4e
             /* Write the high byte first */
Al Stone afae4e
-
Al Stone afae4e
-            CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1);
Al Stone afae4e
+	    Byte = ACPI_HIBYTE(AmlOpcode);
Al Stone afae4e
+	    CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
         }
Al Stone afae4e
 
Al Stone afae4e
-        CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1);
Al Stone afae4e
+	Byte = ACPI_LOBYTE(AmlOpcode);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
 
Al Stone afae4e
         /* Subtreelength doesn't include length of package length bytes */
Al Stone afae4e
 
Al Stone afae4e
-        PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
Al Stone afae4e
+        PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
Al Stone afae4e
         break;
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone 938de5
@@ -333,8 +330,8 @@ CgWriteAmlOpcode (
Al Stone afae4e
         if (Op->Asl.AmlPkgLenBytes == 1)
Al Stone afae4e
         {
Al Stone afae4e
             /* Simplest case -- no bytes to follow, just write the count */
Al Stone afae4e
-
Al Stone afae4e
-            CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1);
Al Stone afae4e
+            Byte = ACPI_LOBYTE(PkgLen);
Al Stone afae4e
+            CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
         }
Al Stone afae4e
         else if (Op->Asl.AmlPkgLenBytes != 0)
Al Stone afae4e
         {
Al Stone 938de5
@@ -344,7 +341,7 @@ CgWriteAmlOpcode (
Al Stone afae4e
              */
Al Stone afae4e
             PkgLenFirstByte = (UINT8)
Al Stone afae4e
                 (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
Al Stone afae4e
-                (PkgLen.LenBytes[0] & 0x0F));
Al Stone afae4e
+                (PkgLen & 0x0F));
Al Stone afae4e
 
Al Stone afae4e
             CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
Al Stone afae4e
 
Al Stone 938de5
@@ -352,37 +349,44 @@ CgWriteAmlOpcode (
Al Stone afae4e
              * Shift the length over by the 4 bits we just stuffed
Al Stone afae4e
              * in the first byte
Al Stone afae4e
              */
Al Stone afae4e
-            PkgLen.Len >>= 4;
Al Stone afae4e
+            PkgLen >>= 4;
Al Stone afae4e
 
Al Stone afae4e
             /* Now we can write the remaining bytes - either 1, 2, or 3 bytes */
Al Stone afae4e
-
Al Stone afae4e
-            for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
Al Stone afae4e
+            Byte = ACPI_LOBYTE(PkgLen);
Al Stone afae4e
+            CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
+            if (Op->Asl.AmlPkgLenBytes >= 3)
Al Stone afae4e
+            {
Al Stone afae4e
+                Byte = ACPI_HIBYTE(PkgLen);
Al Stone afae4e
+                CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
+            }
Al Stone afae4e
+            if (Op->Asl.AmlPkgLenBytes >= 4)
Al Stone afae4e
             {
Al Stone afae4e
-                CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
Al Stone afae4e
+                Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen));
Al Stone afae4e
+                CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
             }
Al Stone afae4e
         }
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
-    switch (Aml.Opcode)
Al Stone afae4e
+    switch (AmlOpcode)
Al Stone afae4e
     {
Al Stone afae4e
     case AML_BYTE_OP:
Al Stone afae4e
-
Al Stone afae4e
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1);
Al Stone afae4e
+        Byte = (UINT8) Op->Asl.Value.Integer;
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     case AML_WORD_OP:
Al Stone afae4e
-
Al Stone afae4e
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2);
Al Stone afae4e
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &Word, 2);
Al Stone afae4e
        break;
Al Stone afae4e
 
Al Stone afae4e
     case AML_DWORD_OP:
Al Stone afae4e
-
Al Stone afae4e
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4);
Al Stone afae4e
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &DWord, 4);
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     case AML_QWORD_OP:
Al Stone afae4e
-
Al Stone afae4e
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8);
Al Stone afae4e
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &QWord, 8);
Al Stone afae4e
         break;
Al Stone afae4e
 
Al Stone afae4e
     case AML_STRING_OP:
Al Stone 938de5
@@ -416,6 +420,7 @@ CgWriteTableHeader (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *Op)
Al Stone afae4e
 {
Al Stone afae4e
     ACPI_PARSE_OBJECT       *Child;
Al Stone afae4e
+    UINT32 DWord;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone afae4e
     /* AML filename */
Al Stone 938de5
@@ -452,7 +457,7 @@ CgWriteTableHeader (
Al Stone afae4e
     /* OEM Revision */
Al Stone afae4e
 
Al Stone afae4e
     Child = Child->Asl.Next;
Al Stone afae4e
-    TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
Al Stone afae4e
+    ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer);
Al Stone afae4e
 
Al Stone afae4e
     /* Compiler ID */
Al Stone afae4e
 
Al Stone 938de5
@@ -460,11 +465,12 @@ CgWriteTableHeader (
Al Stone afae4e
 
Al Stone afae4e
     /* Compiler version */
Al Stone afae4e
 
Al Stone 938de5
-    TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
Al Stone 938de5
+    DWord = ACPI_CA_VERSION;
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord);
Al Stone afae4e
 
Al Stone afae4e
     /* Table length. Checksum zero for now, will rewrite later */
Al Stone afae4e
 
Al Stone afae4e
-    TableHeader.Length   = Gbl_TableLength;
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&TableHeader.Length, &Gbl_TableLength);
Al Stone afae4e
     TableHeader.Checksum = 0;
Al Stone afae4e
 
Al Stone afae4e
     CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
Al Stone 938de5
@@ -528,7 +534,10 @@ CgWriteNode (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *Op)
Al Stone afae4e
 {
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
-
Al Stone afae4e
+    UINT8                   Byte;
Al Stone afae4e
+    UINT16                  Word;
Al Stone afae4e
+    UINT32                  DWord;
Al Stone afae4e
+    UINT64                  QWord;
Al Stone afae4e
 
Al Stone afae4e
     /* Always check for DEFAULT_ARG and other "Noop" nodes */
Al Stone afae4e
     /* TBD: this may not be the best place for this check */
Al Stone 938de5
@@ -546,13 +555,24 @@ CgWriteNode (
Al Stone afae4e
     switch (Op->Asl.AmlOpcode)
Al Stone afae4e
     {
Al Stone afae4e
     case AML_RAW_DATA_BYTE:
Al Stone afae4e
+        Byte = (UINT8) Op->Asl.Value.Integer;
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &Byte, 1);
Al Stone afae4e
+        return;
Al Stone afae4e
+
Al Stone afae4e
     case AML_RAW_DATA_WORD:
Al Stone afae4e
-    case AML_RAW_DATA_DWORD:
Al Stone afae4e
-    case AML_RAW_DATA_QWORD:
Al Stone afae4e
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &Word, 2);
Al Stone afae4e
+        return;
Al Stone afae4e
 
Al Stone afae4e
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength);
Al Stone afae4e
+    case AML_RAW_DATA_DWORD:
Al Stone afae4e
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &DWord, 4);
Al Stone afae4e
         return;
Al Stone afae4e
 
Al Stone afae4e
+    case AML_RAW_DATA_QWORD:
Al Stone afae4e
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
Al Stone afae4e
+        CgLocalWriteAmlData (Op, &QWord, 8);
Al Stone afae4e
+        return;
Al Stone afae4e
 
Al Stone afae4e
     case AML_RAW_DATA_BUFFER:
Al Stone afae4e
 
Al Stone 938de5
Index: src/source/compiler/aslopcodes.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslopcodes.c
Al Stone 938de5
+++ src/source/compiler/aslopcodes.c
Al Stone 938de5
@@ -531,6 +531,7 @@ OpcDoUnicode (
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     UINT8                   *AsciiString;
Al Stone afae4e
     UINT16                  *UnicodeString;
Al Stone afae4e
+    UINT16                  UChar;
Al Stone afae4e
     ACPI_PARSE_OBJECT       *BufferLengthOp;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -557,7 +558,8 @@ OpcDoUnicode (
Al Stone afae4e
 
Al Stone afae4e
     for (i = 0; i < Count; i++)
Al Stone afae4e
     {
Al Stone afae4e
-        UnicodeString[i] = (UINT16) AsciiString[i];
Al Stone afae4e
+        UChar = (UINT16) AsciiString[i];
Al Stone afae4e
+        ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
     /*
Al Stone 938de5
Index: src/source/compiler/aslrestype1.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype1.c
Al Stone 938de5
+++ src/source/compiler/aslrestype1.c
Al Stone 938de5
@@ -143,6 +143,11 @@ RsDoMemory24Descriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT16                  Minimum = 0;
Al Stone afae4e
+    UINT16                  Maximum = 0;
Al Stone afae4e
+    UINT16                  AddressLength = 0;
Al Stone afae4e
+    UINT16                  Alignment = 0;
Al Stone afae4e
+    UINT16                  ResourceLength;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -152,7 +157,8 @@ RsDoMemory24Descriptor (
Al Stone afae4e
 
Al Stone afae4e
     Descriptor = Rnode->Buffer;
Al Stone afae4e
     Descriptor->Memory24.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY24;
Al Stone afae4e
-    Descriptor->Memory24.ResourceLength = 9;
Al Stone afae4e
+    ResourceLength = 9;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength);
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone afae4e
 
Al Stone 938de5
@@ -169,7 +175,7 @@ RsDoMemory24Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 1: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -177,7 +183,7 @@ RsDoMemory24Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -185,14 +191,14 @@ RsDoMemory24Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 3: /* Alignment */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 4: /* Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -215,12 +221,17 @@ RsDoMemory24Descriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
Al Stone afae4e
 
Al Stone afae4e
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
Al Stone afae4e
-        Descriptor->Memory24.Minimum,
Al Stone afae4e
-        Descriptor->Memory24.Maximum,
Al Stone afae4e
-        Descriptor->Memory24.AddressLength,
Al Stone afae4e
-        Descriptor->Memory24.Alignment,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Alignment,
Al Stone c32859
         MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment);
Al Stone afae4e
+
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -249,6 +260,11 @@ RsDoMemory32Descriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT32                  Minimum = 0;
Al Stone afae4e
+    UINT32                  Maximum = 0;
Al Stone afae4e
+    UINT32                  AddressLength = 0;
Al Stone afae4e
+    UINT32                  Alignment = 0;
Al Stone afae4e
+    UINT16                  ResourceLength;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -258,7 +274,8 @@ RsDoMemory32Descriptor (
Al Stone afae4e
 
Al Stone afae4e
     Descriptor = Rnode->Buffer;
Al Stone afae4e
     Descriptor->Memory32.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY32;
Al Stone afae4e
-    Descriptor->Memory32.ResourceLength = 17;
Al Stone afae4e
+    ResourceLength = 17;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength);
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone afae4e
 
Al Stone 938de5
@@ -275,7 +292,7 @@ RsDoMemory32Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 1:  /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -283,7 +300,7 @@ RsDoMemory32Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -291,7 +308,7 @@ RsDoMemory32Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 3: /* Alignment */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
Al Stone afae4e
             AlignOp = InitializerOp;
Al Stone 938de5
@@ -299,7 +316,7 @@ RsDoMemory32Descriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 4: /* Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -322,12 +339,17 @@ RsDoMemory32Descriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Align values */
Al Stone afae4e
 
Al Stone afae4e
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
Al Stone afae4e
-        Descriptor->Memory32.Minimum,
Al Stone afae4e
-        Descriptor->Memory32.Maximum,
Al Stone afae4e
-        Descriptor->Memory32.AddressLength,
Al Stone afae4e
-        Descriptor->Memory32.Alignment,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Alignment,
Al Stone c32859
         MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment);
Al Stone afae4e
+
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -352,6 +374,7 @@ RsDoMemory32FixedDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *InitializerOp;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT16                  ResourceLength;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -361,7 +384,8 @@ RsDoMemory32FixedDescriptor (
Al Stone afae4e
 
Al Stone afae4e
     Descriptor = Rnode->Buffer;
Al Stone afae4e
     Descriptor->FixedMemory32.DescriptorType  = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
Al Stone afae4e
-    Descriptor->FixedMemory32.ResourceLength = 9;
Al Stone afae4e
+    ResourceLength = 9;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength);
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone afae4e
 
Al Stone 938de5
@@ -378,14 +402,16 @@ RsDoMemory32FixedDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 1: /* Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address,
Al Stone afae4e
+                &InitializerOp->Asl.Value.Integer);
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength,
Al Stone afae4e
+                &InitializerOp->Asl.Value.Integer);
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
Al Stone afae4e
             break;
Al Stone 938de5
Index: src/source/compiler/aslrestype1i.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype1i.c
Al Stone 938de5
+++ src/source/compiler/aslrestype1i.c
Al Stone 938de5
@@ -198,6 +198,8 @@ RsDoFixedDmaDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *InitializerOp;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT16                  RequestLines = 0;
Al Stone afae4e
+    UINT16                  Channels = 0;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -217,14 +219,14 @@ RsDoFixedDmaDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* DMA Request Lines [WORD] (_DMA) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 1: /* DMA Channel [WORD] (_TYP) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Channels = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -249,6 +251,9 @@ RsDoFixedDmaDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.RequestLines, &RequestLines);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.Channels, &Channels);
Al Stone afae4e
+
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -274,6 +279,7 @@ RsDoFixedIoDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *AddressOp = NULL;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT16                  Address = 0;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -293,8 +299,7 @@ RsDoFixedIoDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* Base Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->FixedIo.Address =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Address = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
Al Stone afae4e
             AddressOp = InitializerOp;
Al Stone 938de5
@@ -324,11 +329,13 @@ RsDoFixedIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
     /* Error checks */
Al Stone afae4e
 
Al Stone afae4e
-    if (Descriptor->FixedIo.Address > 0x03FF)
Al Stone afae4e
+    if (Address > 0x03FF)
Al Stone afae4e
     {
Al Stone afae4e
         AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address);
Al Stone afae4e
+
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -357,6 +364,8 @@ RsDoIoDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT16                  Minimum = 0;
Al Stone afae4e
+    UINT16                  Maximum = 0;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -383,8 +392,7 @@ RsDoIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 1:  /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Io.Minimum =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -392,8 +400,7 @@ RsDoIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Io.Maximum =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -434,12 +441,15 @@ RsDoIoDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Align values */
Al Stone afae4e
 
Al Stone afae4e
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
Al Stone afae4e
-        Descriptor->Io.Minimum,
Al Stone afae4e
-        Descriptor->Io.Maximum,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
         Descriptor->Io.AddressLength,
Al Stone afae4e
         Descriptor->Io.Alignment,
Al Stone c32859
         MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum);
Al Stone afae4e
+
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -559,9 +569,9 @@ RsDoIrqDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
-    /* Now we can set the channel mask */
Al Stone afae4e
+    /* Now we can set the interrupt mask */
Al Stone afae4e
 
Al Stone afae4e
-    Descriptor->Irq.IrqMask = IrqMask;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -660,6 +670,6 @@ RsDoIrqNoFlagsDescriptor (
Al Stone afae4e
 
Al Stone afae4e
     /* Now we can set the interrupt mask */
Al Stone afae4e
 
Al Stone afae4e
-    Descriptor->Irq.IrqMask = IrqMask;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone 938de5
Index: src/source/compiler/aslrestype2.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype2.c
Al Stone 938de5
+++ src/source/compiler/aslrestype2.c
Al Stone 938de5
@@ -76,6 +76,7 @@ RsDoGeneralRegisterDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *InitializerOp;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
+    UINT16                  ResourceLength;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -85,7 +86,9 @@ RsDoGeneralRegisterDescriptor (
Al Stone afae4e
 
Al Stone afae4e
     Descriptor = Rnode->Buffer;
Al Stone afae4e
     Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
Al Stone afae4e
-    Descriptor->GenericReg.ResourceLength = 12;
Al Stone afae4e
+    ResourceLength = 12;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength,
Al Stone afae4e
+		    &ResourceLength);
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone afae4e
 
Al Stone 938de5
@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 3: /* Register Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+	    ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address,
Al Stone afae4e
+			    &InitializerOp->Asl.Value.Integer);
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -171,6 +175,7 @@ RsDoInterruptDescriptor (
Al Stone afae4e
     AML_RESOURCE            *Rover = NULL;
Al Stone afae4e
     ACPI_PARSE_OBJECT       *InitializerOp;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone 938de5
@@ -219,7 +224,7 @@ RsDoInterruptDescriptor (
Al Stone afae4e
      * Initial descriptor length -- may be enlarged if there are
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
-    Descriptor->ExtendedIrq.ResourceLength  = 2;  /* Flags and table length byte */
Al Stone afae4e
+    ResourceLength  = 2;  /* Flags and table length byte */
Al Stone afae4e
     Descriptor->ExtendedIrq.InterruptCount  = 0;
Al Stone afae4e
 
Al Stone afae4e
     Rover = ACPI_CAST_PTR (AML_RESOURCE,
Al Stone 938de5
@@ -327,10 +332,11 @@ RsDoInterruptDescriptor (
Al Stone afae4e
 
Al Stone afae4e
             /* Save the integer and move pointer to the next one */
Al Stone afae4e
 
Al Stone afae4e
-            Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            ACPI_MOVE_64_TO_32(&Rover->DwordItem,
Al Stone afae4e
+                &InitializerOp->Asl.Value.Integer);
Al Stone afae4e
             Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4);
Al Stone afae4e
             Descriptor->ExtendedIrq.InterruptCount++;
Al Stone afae4e
-            Descriptor->ExtendedIrq.ResourceLength += 4;
Al Stone afae4e
+            ResourceLength += 4;
Al Stone afae4e
 
Al Stone afae4e
             /* Case 7: First interrupt number in list */
Al Stone afae4e
 
Al Stone 938de5
@@ -366,7 +372,7 @@ RsDoInterruptDescriptor (
Al Stone afae4e
     {
Al Stone afae4e
         Rover->ByteItem = ResSourceIndex;
Al Stone afae4e
         Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
Al Stone afae4e
-        Descriptor->ExtendedIrq.ResourceLength += 1;
Al Stone afae4e
+        ResourceLength += 1;
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
     /* Add optional ResSource string if present */
Al Stone 938de5
@@ -378,13 +384,14 @@ RsDoInterruptDescriptor (
Al Stone afae4e
         Rover = ACPI_ADD_PTR (
Al Stone afae4e
                     AML_RESOURCE, &(Rover->ByteItem), StringLength);
Al Stone afae4e
 
Al Stone afae4e
-        Descriptor->ExtendedIrq.ResourceLength = (UINT16)
Al Stone afae4e
-            (Descriptor->ExtendedIrq.ResourceLength + StringLength);
Al Stone afae4e
+        ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
     Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
Al Stone afae4e
                            ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
Al Stone afae4e
                            + OptionIndex + StringLength;
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength,
Al Stone afae4e
+		    &ResourceLength);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone afae4e
 
Al Stone 938de5
@@ -432,7 +439,7 @@ RsDoVendorLargeDescriptor (
Al Stone afae4e
 
Al Stone afae4e
     Descriptor = Rnode->Buffer;
Al Stone afae4e
     Descriptor->VendorLarge.DescriptorType  = ACPI_RESOURCE_NAME_VENDOR_LARGE;
Al Stone afae4e
-    Descriptor->VendorLarge.ResourceLength = (UINT16) i;
Al Stone afae4e
+    ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i);
Al Stone afae4e
 
Al Stone afae4e
     /* Point to end-of-descriptor for vendor data */
Al Stone afae4e
 
Al Stone 938de5
Index: src/source/compiler/aslrestype2d.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype2d.c
Al Stone 938de5
+++ src/source/compiler/aslrestype2d.c
Al Stone 938de5
@@ -79,7 +79,13 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *GranOp = NULL;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT32                  Minimum = 0;
Al Stone afae4e
+    UINT32                  Maximum = 0;
Al Stone afae4e
+    UINT32                  AddressLength = 0;
Al Stone afae4e
+    UINT32                  Granularity = 0;
Al Stone afae4e
+    UINT32                  TranslationOffset = 0;
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone 938de5
@@ -102,8 +108,7 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
Al Stone afae4e
-    Descriptor->Address32.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS32) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -147,8 +152,7 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 5: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Granularity =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -156,8 +160,7 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Min */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Minimum =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -165,8 +168,7 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Address Max */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Maximum =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -174,16 +176,14 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.TranslationOffset =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.AddressLength =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone c32859
@@ -197,7 +197,7 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address32.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -211,8 +211,7 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
                 {
Al Stone afae4e
                     /* Found a valid ResourceSource */
Al Stone afae4e
 
Al Stone afae4e
-                    Descriptor->Address32.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address32.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -272,13 +271,20 @@ RsDoDwordIoDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Minimum,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Maximum,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.AddressLength,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address32.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone c32859
@@ -310,7 +316,13 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT32                  Minimum = 0;
Al Stone afae4e
+    UINT32                  Maximum = 0;
Al Stone afae4e
+    UINT32                  AddressLength = 0;
Al Stone afae4e
+    UINT32                  Granularity = 0;
Al Stone afae4e
+    UINT32                  TranslationOffset = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -332,11 +344,9 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
Al Stone afae4e
-    Descriptor->Address32.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS32) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
-
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone afae4e
 
Al Stone afae4e
     for (i = 0; InitializerOp; i++)
Al Stone 938de5
@@ -385,8 +395,7 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Granularity =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -394,8 +403,7 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Minimum =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -403,8 +411,7 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Maximum =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -412,16 +419,14 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.TranslationOffset =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 10: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.AddressLength =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -433,7 +438,7 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address32.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -445,8 +450,8 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address32.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address32.ResourceLength + StringLength);
Al Stone afae4e
+
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -507,13 +512,20 @@ RsDoDwordMemoryDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Minimum,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Maximum,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.AddressLength,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address32.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
@@ -545,7 +557,13 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT32                  Minimum = 0;
Al Stone afae4e
+    UINT32                  Maximum = 0;
Al Stone afae4e
+    UINT32                  AddressLength = 0;
Al Stone afae4e
+    UINT32                  Granularity = 0;
Al Stone afae4e
+    UINT32                  TranslationOffset = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -566,8 +584,7 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
Al Stone afae4e
-    Descriptor->Address32.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS32) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -616,8 +633,7 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Granularity =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -625,8 +641,7 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Minimum =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -634,8 +649,7 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.Maximum =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -643,16 +657,14 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.TranslationOffset =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 10: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address32.AddressLength =
Al Stone afae4e
-                (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -664,7 +676,7 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address32.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -676,8 +688,7 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address32.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address32.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -724,13 +735,20 @@ RsDoDwordSpaceDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Minimum,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Maximum,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.AddressLength,
Al Stone afae4e
-        (UINT64) Descriptor->Address32.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address32.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
Index: src/source/compiler/aslrestype2e.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype2e.c
Al Stone 938de5
+++ src/source/compiler/aslrestype2e.c
Al Stone 938de5
@@ -78,6 +78,13 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
     ACPI_PARSE_OBJECT       *GranOp = NULL;
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
+    UINT64                  Minimum = 0;
Al Stone afae4e
+    UINT64                  Maximum = 0;
Al Stone afae4e
+    UINT64                  AddressLength = 0;
Al Stone afae4e
+    UINT64                  Granularity = 0;
Al Stone afae4e
+    UINT64                  TranslationOffset = 0;
Al Stone afae4e
+    UINT64                  TypeSpecific = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone 938de5
@@ -94,9 +101,10 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
     Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
Al Stone afae4e
     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Al Stone afae4e
 
Al Stone afae4e
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
Al Stone afae4e
+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
Al Stone afae4e
+        &ResourceLength);
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone afae4e
 
Al Stone 938de5
@@ -139,7 +147,7 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 5: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -147,7 +155,7 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Min */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -155,7 +163,7 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Address Max */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -163,14 +171,14 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -178,7 +186,7 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 10: /* Type-Specific Attributes */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -214,13 +222,20 @@ RsDoExtendedIoDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        Descriptor->ExtAddress64.Minimum,
Al Stone afae4e
-        Descriptor->ExtAddress64.Maximum,
Al Stone afae4e
-        Descriptor->ExtAddress64.AddressLength,
Al Stone afae4e
-        Descriptor->ExtAddress64.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->ExtAddress64.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
Al Stone afae4e
+
Al Stone c32859
     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
Al Stone c32859
         StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
Index: src/source/compiler/aslrestype2q.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype2q.c
Al Stone 938de5
+++ src/source/compiler/aslrestype2q.c
Al Stone 938de5
@@ -80,7 +80,13 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT64                  Minimum = 0;
Al Stone afae4e
+    UINT64                  Maximum = 0;
Al Stone afae4e
+    UINT64                  AddressLength = 0;
Al Stone afae4e
+    UINT64                  Granularity = 0;
Al Stone afae4e
+    UINT64                  TranslationOffset = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -102,8 +108,7 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
Al Stone afae4e
-    Descriptor->Address64.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS64) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -147,7 +152,7 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 5: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -155,7 +160,7 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Min */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -163,7 +168,7 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Address Max */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -171,14 +176,14 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -190,7 +195,7 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address64.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -202,8 +207,7 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address64.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address64.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -263,13 +267,20 @@ RsDoQwordIoDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        Descriptor->Address64.Minimum,
Al Stone afae4e
-        Descriptor->Address64.Maximum,
Al Stone afae4e
-        Descriptor->Address64.AddressLength,
Al Stone afae4e
-        Descriptor->Address64.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address64.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
@@ -301,7 +312,13 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT64                  Minimum = 0;
Al Stone afae4e
+    UINT64                  Maximum = 0;
Al Stone afae4e
+    UINT64                  AddressLength = 0;
Al Stone afae4e
+    UINT64                  Granularity = 0;
Al Stone afae4e
+    UINT64                  TranslationOffset = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -323,8 +340,7 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
Al Stone afae4e
-    Descriptor->Address64.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS64) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -375,7 +391,7 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -383,7 +399,7 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -391,7 +407,7 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -399,14 +415,14 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 10: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -418,7 +434,7 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address64.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -430,8 +446,7 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address64.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address64.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -492,13 +507,20 @@ RsDoQwordMemoryDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        Descriptor->Address64.Minimum,
Al Stone afae4e
-        Descriptor->Address64.Maximum,
Al Stone afae4e
-        Descriptor->Address64.AddressLength,
Al Stone afae4e
-        Descriptor->Address64.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address64.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
@@ -530,9 +552,15 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
     ASL_RESOURCE_NODE       *Rnode;
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
+    UINT64                  Minimum = 0;
Al Stone afae4e
+    UINT64                  Maximum = 0;
Al Stone afae4e
+    UINT64                  AddressLength = 0;
Al Stone afae4e
+    UINT64                  Granularity = 0;
Al Stone afae4e
+    UINT64                  TranslationOffset = 0;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone afae4e
 
Al Stone afae4e
 
Al Stone 938de5
@@ -551,8 +579,7 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
Al Stone afae4e
-    Descriptor->Address64.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS64) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -601,7 +628,7 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -609,7 +636,7 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -617,7 +644,7 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -625,14 +652,14 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 10: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -644,7 +671,7 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address64.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -656,8 +683,7 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address64.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address64.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -703,13 +729,20 @@ RsDoQwordSpaceDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        Descriptor->Address64.Minimum,
Al Stone afae4e
-        Descriptor->Address64.Maximum,
Al Stone afae4e
-        Descriptor->Address64.AddressLength,
Al Stone afae4e
-        Descriptor->Address64.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address64.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
Index: src/source/compiler/aslrestype2s.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype2s.c
Al Stone 938de5
+++ src/source/compiler/aslrestype2s.c
Al Stone 938de5
@@ -290,6 +290,9 @@ RsDoGpioIntDescriptor (
Al Stone afae4e
     UINT16                  VendorLength;
Al Stone afae4e
     UINT16                  InterruptLength;
Al Stone afae4e
     UINT16                  DescriptorSize;
Al Stone afae4e
+    UINT16                  IntFlags = 0;
Al Stone afae4e
+    UINT16                  DebounceTimeout = 0;
Al Stone afae4e
+    UINT16                  Flags = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone c32859
     UINT32                  PinCount = 0;
Al Stone afae4e
     UINT32                  i;
Al Stone 938de5
@@ -349,21 +352,21 @@ RsDoGpioIntDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
Al Stone afae4e
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 1: /* Interrupt Polarity - Active high/low [Flags] (_POL) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 1, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 1, 0);
Al Stone afae4e
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_POLARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 1, 2);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Share Type - Default: exclusive (0) [Flags] (_SHR) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
Al Stone afae4e
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -377,7 +380,7 @@ RsDoGpioIntDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 4: /* Debounce Timeout [WORD] (_DBT) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -403,7 +406,7 @@ RsDoGpioIntDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Resource Usage (consumer/producer) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
Al Stone afae4e
+            RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Resource Tag (Descriptor Name) */
Al Stone 938de5
@@ -468,6 +471,10 @@ RsDoGpioIntDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
Al Stone afae4e
+
Al Stone c32859
     MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone 938de5
@@ -500,6 +507,10 @@ RsDoGpioIoDescriptor (
Al Stone afae4e
     UINT16                  VendorLength;
Al Stone afae4e
     UINT16                  InterruptLength;
Al Stone afae4e
     UINT16                  DescriptorSize;
Al Stone afae4e
+    UINT16                  IntFlags = 0;
Al Stone afae4e
+    UINT16                  DebounceTimeout = 0;
Al Stone afae4e
+    UINT16                  DriveStrength = 0;
Al Stone afae4e
+    UINT16                  Flags = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone c32859
     UINT32                  PinCount = 0;
Al Stone afae4e
     UINT32                  i;
Al Stone 938de5
@@ -560,7 +571,7 @@ RsDoGpioIoDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* Share Type [Flags] (_SHR) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
Al Stone afae4e
             RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -574,21 +585,21 @@ RsDoGpioIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Debounce Timeout [WORD] (_DBT) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 3: /* Drive Strength [WORD] (_DRS) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Gpio.DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_DRIVESTRENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DriveStrength));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 4: /* I/O Restriction [Flag] (_IOR) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
Al Stone afae4e
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -614,7 +625,7 @@ RsDoGpioIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Resource Usage (consumer/producer) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
Al Stone afae4e
+            RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Resource Tag (Descriptor Name) */
Al Stone 938de5
@@ -678,6 +689,11 @@ RsDoGpioIoDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
Al Stone afae4e
+
Al Stone c32859
     MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone 938de5
@@ -707,6 +723,9 @@ RsDoI2cSerialBusDescriptor (
Al Stone afae4e
     UINT16                  ResSourceLength;
Al Stone afae4e
     UINT16                  VendorLength;
Al Stone afae4e
     UINT16                  DescriptorSize;
Al Stone afae4e
+    UINT16                  SlaveAddress = 0;
Al Stone afae4e
+    UINT32                  ConnectionSpeed = 0;
Al Stone afae4e
+    UINT16                  TypeSpecificFlags = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone 938de5
@@ -756,7 +775,7 @@ RsDoI2cSerialBusDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* Slave Address [WORD] (_ADR) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -770,14 +789,14 @@ RsDoI2cSerialBusDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Connection Speed [DWORD] (_SPE) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 3: /* Addressing Mode [Flag] (_MOD) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
Al Stone afae4e
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -825,6 +844,9 @@ RsDoI2cSerialBusDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.SlaveAddress, &SlaveAddress);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->I2cSerialBus.ConnectionSpeed, &ConnectionSpeed);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
Al Stone c32859
     MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone 938de5
@@ -854,6 +876,9 @@ RsDoSpiSerialBusDescriptor (
Al Stone afae4e
     UINT16                  ResSourceLength;
Al Stone afae4e
     UINT16                  VendorLength;
Al Stone afae4e
     UINT16                  DescriptorSize;
Al Stone afae4e
+    UINT16                  DeviceSelection = 0;
Al Stone afae4e
+    UINT32                  ConnectionSpeed = 0;
Al Stone afae4e
+    UINT16                  TypeSpecificFlags = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone 938de5
@@ -903,21 +928,21 @@ RsDoSpiSerialBusDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* Device Selection [WORD] (_ADR) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 1: /* Device Polarity [Flag] (_DPL) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 1, 0);
Al Stone afae4e
             RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Wire Mode [Flag] (_MOD) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
Al Stone afae4e
             RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -938,7 +963,7 @@ RsDoSpiSerialBusDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 5: /* Connection Speed [DWORD] (_SPE) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -1000,6 +1025,10 @@ RsDoSpiSerialBusDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.DeviceSelection, &DeviceSelection);
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->SpiSerialBus.ConnectionSpeed, &ConnectionSpeed);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
Al Stone afae4e
+
Al Stone c32859
     MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone 938de5
@@ -1029,6 +1058,10 @@ RsDoUartSerialBusDescriptor (
Al Stone afae4e
     UINT16                  ResSourceLength;
Al Stone afae4e
     UINT16                  VendorLength;
Al Stone afae4e
     UINT16                  DescriptorSize;
Al Stone afae4e
+    UINT32                  DefaultBaudRate = 0;
Al Stone afae4e
+    UINT16                  TypeSpecificFlags = 0;
Al Stone afae4e
+    UINT16                  RxFifoSize = 0;
Al Stone afae4e
+    UINT16                  TxFifoSize = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
 
Al Stone 938de5
@@ -1078,21 +1111,21 @@ RsDoUartSerialBusDescriptor (
Al Stone afae4e
         {
Al Stone afae4e
         case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 1: /* Bits Per Byte [Flags] (_LEN) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 4, 3);
Al Stone afae4e
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 2: /* Stop Bits [Flags] (_STB) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 2, 1);
Al Stone afae4e
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -1106,7 +1139,7 @@ RsDoUartSerialBusDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 4: /* Endianness [Flag] (_END) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 7, 0);
Al Stone afae4e
             RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7);
Al Stone afae4e
             break;
Al Stone 938de5
@@ -1120,21 +1153,21 @@ RsDoUartSerialBusDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Flow Control [Flags] (_FLC) */
Al Stone afae4e
 
Al Stone afae4e
-            RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
Al Stone afae4e
+            RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
Al Stone afae4e
             RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2);
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Rx Buffer Size [WORD] (_RXL) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Tx Buffer Size [WORD] (_TXL) */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize));
Al Stone afae4e
             break;
Al Stone 938de5
@@ -1192,6 +1225,11 @@ RsDoUartSerialBusDescriptor (
Al Stone afae4e
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
Al Stone afae4e
     }
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_32_TO_32(&Descriptor->UartSerialBus.DefaultBaudRate, &DefaultBaudRate);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.RxFifoSize, &RxFifoSize);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TxFifoSize, &TxFifoSize);
Al Stone afae4e
+
Al Stone c32859
     MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
Al Stone afae4e
     return (Rnode);
Al Stone afae4e
 }
Al Stone 938de5
Index: src/source/compiler/aslrestype2w.c
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/compiler/aslrestype2w.c
Al Stone 938de5
+++ src/source/compiler/aslrestype2w.c
Al Stone 938de5
@@ -81,6 +81,12 @@ RsDoWordIoDescriptor (
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
+    UINT16                  Minimum = 0;
Al Stone afae4e
+    UINT16                  Maximum = 0;
Al Stone afae4e
+    UINT16                  AddressLength = 0;
Al Stone afae4e
+    UINT16                  Granularity = 0;
Al Stone afae4e
+    UINT16                  TranslationOffset = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -102,8 +108,7 @@ RsDoWordIoDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
Al Stone afae4e
-    Descriptor->Address16.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS16) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -147,7 +152,7 @@ RsDoWordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 5: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -155,7 +160,7 @@ RsDoWordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Min */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -163,7 +168,7 @@ RsDoWordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Address Max */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -171,14 +176,14 @@ RsDoWordIoDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -190,7 +195,7 @@ RsDoWordIoDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address16.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -202,8 +207,7 @@ RsDoWordIoDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address16.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address16.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -263,13 +267,20 @@ RsDoWordIoDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Minimum,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Maximum,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.AddressLength,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address16.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
@@ -302,6 +313,12 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone afae4e
+    UINT16                  Minimum = 0;
Al Stone afae4e
+    UINT16                  Maximum = 0;
Al Stone afae4e
+    UINT16                  AddressLength = 0;
Al Stone afae4e
+    UINT16                  Granularity = 0;
Al Stone afae4e
+    UINT16                  TranslationOffset = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -323,8 +340,7 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
Al Stone afae4e
-    Descriptor->Address16.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS16) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -361,8 +377,7 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 4: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Granularity =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -370,8 +385,7 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 5: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Minimum =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -379,8 +393,7 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Maximum =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -388,16 +401,14 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.TranslationOffset =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.AddressLength =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -409,7 +420,7 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address16.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -421,8 +432,7 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address16.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address16.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -468,13 +478,20 @@ RsDoWordBusNumberDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Minimum,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Maximum,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.AddressLength,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address16.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
@@ -507,6 +524,12 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
     UINT8                   *OptionalFields;
Al Stone afae4e
     UINT16                  StringLength = 0;
Al Stone afae4e
     UINT32                  OptionIndex = 0;
Al Stone afae4e
+    UINT16                  Minimum = 0;
Al Stone afae4e
+    UINT16                  Maximum = 0;
Al Stone afae4e
+    UINT16                  AddressLength = 0;
Al Stone afae4e
+    UINT16                  Granularity = 0;
Al Stone afae4e
+    UINT16                  TranslationOffset = 0;
Al Stone afae4e
+    UINT16                  ResourceLength = 0;
Al Stone c32859
     UINT32                  CurrentByteOffset;
Al Stone afae4e
     UINT32                  i;
Al Stone afae4e
     BOOLEAN                 ResSourceIndex = FALSE;
Al Stone 938de5
@@ -527,8 +550,7 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
      * optional fields present
Al Stone afae4e
      */
Al Stone afae4e
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
Al Stone afae4e
-    Descriptor->Address16.ResourceLength = (UINT16)
Al Stone afae4e
-        (sizeof (AML_RESOURCE_ADDRESS16) -
Al Stone afae4e
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
Al Stone afae4e
          sizeof (AML_RESOURCE_LARGE_HEADER));
Al Stone afae4e
 
Al Stone afae4e
     /* Process all child initialization nodes */
Al Stone 938de5
@@ -577,8 +599,7 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 6: /* Address Granularity */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Granularity =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
Al Stone afae4e
             GranOp = InitializerOp;
Al Stone 938de5
@@ -586,8 +607,7 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 7: /* Min Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Minimum =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
Al Stone afae4e
             MinOp = InitializerOp;
Al Stone 938de5
@@ -595,8 +615,7 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 8: /* Max Address */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.Maximum =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
Al Stone afae4e
             MaxOp = InitializerOp;
Al Stone 938de5
@@ -604,16 +623,14 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
 
Al Stone afae4e
         case 9: /* Translation Offset */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.TranslationOffset =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
Al Stone afae4e
             break;
Al Stone afae4e
 
Al Stone afae4e
         case 10: /* Address Length */
Al Stone afae4e
 
Al Stone afae4e
-            Descriptor->Address16.AddressLength =
Al Stone afae4e
-                (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
+            AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
             RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
Al Stone afae4e
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
Al Stone afae4e
             LengthOp = InitializerOp;
Al Stone 938de5
@@ -625,7 +642,7 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone afae4e
                 OptionIndex++;
Al Stone afae4e
-                Descriptor->Address16.ResourceLength++;
Al Stone afae4e
+                ResourceLength++;
Al Stone afae4e
                 ResSourceIndex = TRUE;
Al Stone afae4e
             }
Al Stone afae4e
             break;
Al Stone 938de5
@@ -637,8 +654,7 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
             {
Al Stone afae4e
                 if (StringLength)
Al Stone afae4e
                 {
Al Stone afae4e
-                    Descriptor->Address16.ResourceLength = (UINT16)
Al Stone afae4e
-                        (Descriptor->Address16.ResourceLength + StringLength);
Al Stone afae4e
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
Al Stone afae4e
 
Al Stone afae4e
                     strcpy ((char *)
Al Stone afae4e
                         &OptionalFields[OptionIndex],
Al Stone 938de5
@@ -684,13 +700,20 @@ RsDoWordSpaceDescriptor (
Al Stone afae4e
     /* Validate the Min/Max/Len/Gran values */
Al Stone afae4e
 
Al Stone afae4e
     RsLargeAddressCheck (
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Minimum,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Maximum,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.AddressLength,
Al Stone afae4e
-        (UINT64) Descriptor->Address16.Granularity,
Al Stone afae4e
+        Minimum,
Al Stone afae4e
+        Maximum,
Al Stone afae4e
+        AddressLength,
Al Stone afae4e
+        Granularity,
Al Stone afae4e
         Descriptor->Address16.Flags,
Al Stone c32859
         MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
Al Stone afae4e
 
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
Al Stone afae4e
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
Al Stone afae4e
+
Al Stone afae4e
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
Al Stone c32859
         OptionIndex + StringLength;
Al Stone afae4e
     return (Rnode);
Al Stone 938de5
Index: src/source/include/acmacros.h
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/include/acmacros.h
Al Stone 938de5
+++ src/source/include/acmacros.h
Al Stone 938de5
@@ -100,7 +100,8 @@
Al Stone afae4e
 
Al Stone afae4e
 /* 32-bit source, 16/32/64 destination */
Al Stone afae4e
 
Al Stone afae4e
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
Al Stone afae4e
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
Al Stone afae4e
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
Al Stone afae4e
 
Al Stone afae4e
 #define ACPI_MOVE_32_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
Al Stone afae4e
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
Al Stone 938de5
@@ -115,9 +116,13 @@
Al Stone afae4e
 
Al Stone afae4e
 /* 64-bit source, 16/32/64 destination */
Al Stone afae4e
 
Al Stone afae4e
-#define ACPI_MOVE_64_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
Al Stone afae4e
+#define ACPI_MOVE_64_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
Al Stone afae4e
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
Al Stone afae4e
 
Al Stone afae4e
-#define ACPI_MOVE_64_TO_32(d, s)        ACPI_MOVE_32_TO_32(d, s)    /* Truncate to 32 */
Al Stone afae4e
+#define ACPI_MOVE_64_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
Al Stone afae4e
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
Al Stone afae4e
+                                         ((  UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
Al Stone afae4e
+                                         ((  UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];}
Al Stone afae4e
 
Al Stone afae4e
 #define ACPI_MOVE_64_TO_64(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
Al Stone afae4e
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
Al Stone 938de5
@@ -144,7 +149,9 @@
Al Stone afae4e
 
Al Stone afae4e
 /* 32-bit source, 16/32/64 destination */
Al Stone afae4e
 
Al Stone afae4e
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
Al Stone afae4e
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
Al Stone afae4e
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
Al Stone afae4e
+
Al Stone afae4e
 #define ACPI_MOVE_32_TO_32(d, s)        *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
Al Stone afae4e
 #define ACPI_MOVE_32_TO_64(d, s)        *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
Al Stone afae4e
 
Al Stone 938de5
Index: src/source/include/platform/aclinux.h
Al Stone 938de5
===================================================================
Al Stone 938de5
--- src.orig/source/include/platform/aclinux.h
Al Stone 938de5
+++ src/source/include/platform/aclinux.h
Al Stone 4a5eac
@@ -167,6 +167,7 @@
Al Stone afae4e
 #include <stdlib.h>
Al Stone afae4e
 #include <ctype.h>
Al Stone afae4e
 #include <unistd.h>
Al Stone afae4e
+#include <endian.h>
Al Stone afae4e
 
Al Stone 6794d0
 /* Define/disable kernel-specific declarators */
Al Stone 6794d0
 
Al Stone 4a5eac
@@ -179,8 +180,7 @@
Al Stone afae4e
 #define ACPI_FLUSH_CPU_CACHE()
Al Stone a03e60
 #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread))
Al Stone afae4e
 
Dan Horák 54d979
-#if defined(__ia64__)    || defined(__x86_64__) ||\
Dan Horák 54d979
-    defined(__aarch64__) || defined(__PPC64__)
Al Stone afae4e
+#if __SIZEOF_LONG__ == 8
Al Stone afae4e
 #define ACPI_MACHINE_WIDTH          64
Al Stone afae4e
 #define COMPILER_DEPENDENT_INT64    long
Al Stone afae4e
 #define COMPILER_DEPENDENT_UINT64   unsigned long
Al Stone 4a5eac
@@ -191,6 +191,10 @@
Al Stone afae4e
 #define ACPI_USE_NATIVE_DIVIDE
Al Stone afae4e
 #endif
Al Stone afae4e
 
Al Stone afae4e
+#if __BYTE_ORDER == __BIG_ENDIAN
Al Stone afae4e
+#define ACPI_BIG_ENDIAN
Al Stone afae4e
+#endif
Al Stone afae4e
+
Al Stone afae4e
 #ifndef __cdecl
Al Stone afae4e
 #define __cdecl
Al Stone afae4e
 #endif