Al Stone 6061af
Additional fixup for the compiler/disassembler to support big-endian.
Al Stone 6061af
Al Stone 6061af
Signed-off-by: Al Stone <ahs3@redhat.com>
Al Stone 6061af
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/compiler/aslrestype2.c acpica-unix2-20160930-s390/source/compiler/aslrestype2.c
Al Stone 6061af
--- acpica-unix2-20160930/source/compiler/aslrestype2.c	2016-12-06 19:25:49.283453253 -0700
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/compiler/aslrestype2.c	2016-12-08 15:50:38.783785207 -0700
Al Stone 6061af
@@ -98,21 +98,33 @@
Al Stone 6061af
         {
Al Stone 6061af
         case 0: /* Address space */
Al Stone 6061af
 
Al Stone 6061af
+	    /*
Al Stone 6061af
             Descriptor->GenericReg.AddressSpaceId = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone 6061af
+	    */
Al Stone 6061af
+            ACPI_MOVE_64_TO_8(&Descriptor->GenericReg.AddressSpaceId,
Al Stone 6061af
+			      &InitializerOp->Asl.Value.Integer);
Al Stone 6061af
             RsCreateByteField (InitializerOp, ACPI_RESTAG_ADDRESSSPACE,
Al Stone 6061af
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.AddressSpaceId));
Al Stone 6061af
            break;
Al Stone 6061af
 
Al Stone 6061af
         case 1: /* Register Bit Width */
Al Stone 6061af
 
Al Stone 6061af
+	    /*
Al Stone 6061af
             Descriptor->GenericReg.BitWidth = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone 6061af
+	    */
Al Stone 6061af
+            ACPI_MOVE_64_TO_8(&Descriptor->GenericReg.BitWidth,
Al Stone 6061af
+			      &InitializerOp->Asl.Value.Integer);
Al Stone 6061af
             RsCreateByteField (InitializerOp, ACPI_RESTAG_REGISTERBITWIDTH,
Al Stone 6061af
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.BitWidth));
Al Stone 6061af
             break;
Al Stone 6061af
 
Al Stone 6061af
         case 2: /* Register Bit Offset */
Al Stone 6061af
 
Al Stone 6061af
+	    /*
Al Stone 6061af
             Descriptor->GenericReg.BitOffset = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone 6061af
+	    */
Al Stone 6061af
+            ACPI_MOVE_64_TO_8(&Descriptor->GenericReg.BitOffset,
Al Stone 6061af
+			      &InitializerOp->Asl.Value.Integer);
Al Stone 6061af
             RsCreateByteField (InitializerOp, ACPI_RESTAG_REGISTERBITOFFSET,
Al Stone 6061af
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.BitOffset));
Al Stone 6061af
             break;
Al Stone 6061af
@@ -127,7 +139,11 @@
Al Stone 6061af
 
Al Stone 6061af
         case 4: /* Access Size (ACPI 3.0) */
Al Stone 6061af
 
Al Stone 6061af
+	    /*
Al Stone 6061af
             Descriptor->GenericReg.AccessSize = (UINT8) InitializerOp->Asl.Value.Integer;
Al Stone 6061af
+	    */
Al Stone 6061af
+	    ACPI_MOVE_64_TO_8(&Descriptor->GenericReg.AccessSize,
Al Stone 6061af
+			      &InitializerOp->Asl.Value.Integer);
Al Stone 6061af
             RsCreateByteField (InitializerOp, ACPI_RESTAG_ACCESSSIZE,
Al Stone 6061af
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.AccessSize));
Al Stone 6061af
 
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/compiler/dtfield.c acpica-unix2-20160930-s390/source/compiler/dtfield.c
Al Stone 6061af
--- acpica-unix2-20160930/source/compiler/dtfield.c	2016-09-30 10:43:57.000000000 -0600
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/compiler/dtfield.c	2016-12-06 11:26:37.483785207 -0700
Al Stone 6061af
@@ -360,7 +360,27 @@
Al Stone 6061af
         DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, MsgBuffer);
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
-    memcpy (Buffer, &Value, ByteLength);
Al Stone 6061af
+    switch (ByteLength) {
Al Stone 6061af
+    case 1:
Al Stone 6061af
+	ACPI_MOVE_64_TO_8(Buffer, &Value);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    case 2:
Al Stone 6061af
+	ACPI_MOVE_64_TO_16(Buffer, &Value);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    case 4:
Al Stone 6061af
+	ACPI_MOVE_64_TO_32(Buffer, &Value);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    case 8:
Al Stone 6061af
+	ACPI_MOVE_64_TO_64(Buffer, &Value);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    default:
Al Stone 6061af
+	memcpy (Buffer, &Value, ByteLength);
Al Stone 6061af
+	break;
Al Stone 6061af
+    }
Al Stone 6061af
     return;
Al Stone 6061af
 }
Al Stone 6061af
 
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/compiler/dtsubtable.c acpica-unix2-20160930-s390/source/compiler/dtsubtable.c
Al Stone 6061af
--- acpica-unix2-20160930/source/compiler/dtsubtable.c	2016-09-30 10:43:57.000000000 -0600
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/compiler/dtsubtable.c	2016-12-06 15:30:17.993785207 -0700
Al Stone 6061af
@@ -379,6 +379,21 @@
Al Stone 6061af
         return;
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
-    memcpy (Subtable->LengthField, &Subtable->TotalLength,
Al Stone 6061af
-        Subtable->SizeOfLengthField);
Al Stone 6061af
+    switch(Subtable->SizeOfLengthField) {
Al Stone 6061af
+    case 1:
Al Stone 6061af
+	ACPI_MOVE_32_TO_8(Subtable->LengthField, &Subtable->TotalLength);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    case 2:
Al Stone 6061af
+	ACPI_MOVE_32_TO_16(Subtable->LengthField, &Subtable->TotalLength);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    case 4:
Al Stone 6061af
+	ACPI_MOVE_32_TO_32(Subtable->LengthField, &Subtable->TotalLength);
Al Stone 6061af
+	break;
Al Stone 6061af
+
Al Stone 6061af
+    default:
Al Stone 6061af
+    	memcpy (Subtable->LengthField, &Subtable->TotalLength,
Al Stone 6061af
+        	Subtable->SizeOfLengthField);
Al Stone 6061af
+    }
Al Stone 6061af
 }
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/compiler/dttable1.c acpica-unix2-20160930-s390/source/compiler/dttable1.c
Al Stone 6061af
--- acpica-unix2-20160930/source/compiler/dttable1.c	2016-09-30 10:43:57.000000000 -0600
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/compiler/dttable1.c	2016-12-08 11:58:07.353785207 -0700
Al Stone 6061af
@@ -282,6 +282,8 @@
Al Stone 6061af
     DT_FIELD                **PFieldList = (DT_FIELD **) List;
Al Stone 6061af
     UINT32                  DescriptorCount;
Al Stone 6061af
     UINT32                  GroupLength;
Al Stone 6061af
+    ACPI_CSRT_GROUP	    *Pgrp;
Al Stone 6061af
+    UINT32		    Tmp32;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Subtables (Resource Groups) */
Al Stone 6061af
@@ -300,12 +302,20 @@
Al Stone 6061af
 
Al Stone 6061af
         /* Compute the number of resource descriptors */
Al Stone 6061af
 
Al Stone 6061af
+	/*
Al Stone 6061af
         GroupLength =
Al Stone 6061af
             (ACPI_CAST_PTR (ACPI_CSRT_GROUP,
Al Stone 6061af
                 Subtable->Buffer))->Length -
Al Stone 6061af
             (ACPI_CAST_PTR (ACPI_CSRT_GROUP,
Al Stone 6061af
                 Subtable->Buffer))->SharedInfoLength -
Al Stone 6061af
             sizeof (ACPI_CSRT_GROUP);
Al Stone 6061af
+	*/
Al Stone 6061af
+	Pgrp = ACPI_CAST_PTR(ACPI_CSRT_GROUP, Subtable->Buffer);
Al Stone 6061af
+	ACPI_MOVE_32_TO_32(&Tmp32, &Pgrp->Length);
Al Stone 6061af
+	GroupLength = Tmp32;
Al Stone 6061af
+	ACPI_MOVE_32_TO_32(&Tmp32, &Pgrp->SharedInfoLength);
Al Stone 6061af
+	GroupLength -= Tmp32;
Al Stone 6061af
+        GroupLength -= sizeof (ACPI_CSRT_GROUP);
Al Stone 6061af
 
Al Stone 6061af
         DescriptorCount = (GroupLength  /
Al Stone 6061af
             sizeof (ACPI_CSRT_DESCRIPTOR));
Al Stone 6061af
@@ -393,6 +403,8 @@
Al Stone 6061af
     ACPI_DBG2_DEVICE        *DeviceInfo;
Al Stone 6061af
     UINT16                  CurrentOffset;
Al Stone 6061af
     UINT32                  i;
Al Stone 6061af
+    UINT16                  Tmp16;
Al Stone 6061af
+    UINT32                  Tmp32;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Main table */
Al Stone 6061af
@@ -409,10 +421,11 @@
Al Stone 6061af
     /* Main table fields */
Al Stone 6061af
 
Al Stone 6061af
     Dbg2Header = ACPI_CAST_PTR (ACPI_DBG2_HEADER, Subtable->Buffer);
Al Stone 6061af
-    Dbg2Header->InfoOffset = sizeof (ACPI_TABLE_HEADER) + ACPI_PTR_DIFF (
Al Stone 6061af
+    Tmp32 = sizeof (ACPI_TABLE_HEADER) + ACPI_PTR_DIFF (
Al Stone 6061af
         ACPI_ADD_PTR (UINT8, Dbg2Header, sizeof (ACPI_DBG2_HEADER)), Dbg2Header);
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&Dbg2Header->InfoOffset, &Tmp32);
Al Stone 6061af
 
Al Stone 6061af
-    SubtableCount = Dbg2Header->InfoCount;
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&SubtableCount, &Dbg2Header->InfoCount);
Al Stone 6061af
     DtPushSubtable (Subtable);
Al Stone 6061af
 
Al Stone 6061af
     /* Process all Device Information subtables (Count = InfoCount) */
Al Stone 6061af
@@ -439,7 +452,7 @@
Al Stone 6061af
 
Al Stone 6061af
         /* BaseAddressRegister GAS array (Required, size is RegisterCount) */
Al Stone 6061af
 
Al Stone 6061af
-        DeviceInfo->BaseAddressOffset = CurrentOffset;
Al Stone 6061af
+        ACPI_MOVE_16_TO_16(&DeviceInfo->BaseAddressOffset, &CurrentOffset);
Al Stone 6061af
         for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++)
Al Stone 6061af
         {
Al Stone 6061af
             Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Addr,
Al Stone 6061af
@@ -455,7 +468,7 @@
Al Stone 6061af
 
Al Stone 6061af
         /* AddressSize array (Required, size = RegisterCount) */
Al Stone 6061af
 
Al Stone 6061af
-        DeviceInfo->AddressSizeOffset = CurrentOffset;
Al Stone 6061af
+        ACPI_MOVE_16_TO_16(&DeviceInfo->AddressSizeOffset, &CurrentOffset);
Al Stone 6061af
         for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++)
Al Stone 6061af
         {
Al Stone 6061af
             Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Size,
Al Stone 6061af
@@ -471,7 +484,7 @@
Al Stone 6061af
 
Al Stone 6061af
         /* NamespaceString device identifier (Required, size = NamePathLength) */
Al Stone 6061af
 
Al Stone 6061af
-        DeviceInfo->NamepathOffset = CurrentOffset;
Al Stone 6061af
+        ACPI_MOVE_16_TO_16(&DeviceInfo->NamepathOffset, &CurrentOffset);
Al Stone 6061af
         Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Name,
Al Stone 6061af
             &Subtable, TRUE);
Al Stone 6061af
         if (ACPI_FAILURE (Status))
Al Stone 6061af
@@ -481,8 +494,9 @@
Al Stone 6061af
 
Al Stone 6061af
         /* Update the device info header */
Al Stone 6061af
 
Al Stone 6061af
-        DeviceInfo->NamepathLength = (UINT16) Subtable->Length;
Al Stone 6061af
-        CurrentOffset += (UINT16) DeviceInfo->NamepathLength;
Al Stone 6061af
+        ACPI_MOVE_32_TO_16(&DeviceInfo->NamepathLength, &Subtable->Length);
Al Stone 6061af
+        ACPI_MOVE_16_TO_16(&Tmp16, &DeviceInfo->NamepathLength);
Al Stone 6061af
+        CurrentOffset += Tmp16;
Al Stone 6061af
         DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
 
Al Stone 6061af
         /* OemData - Variable-length data (Optional, size = OemDataLength) */
Al Stone 6061af
@@ -503,8 +517,8 @@
Al Stone 6061af
 
Al Stone 6061af
         if (Subtable && Subtable->Length)
Al Stone 6061af
         {
Al Stone 6061af
-            DeviceInfo->OemDataOffset = CurrentOffset;
Al Stone 6061af
-            DeviceInfo->OemDataLength = (UINT16) Subtable->Length;
Al Stone 6061af
+            ACPI_MOVE_16_TO_16(&DeviceInfo->OemDataOffset, &CurrentOffset);
Al Stone 6061af
+            ACPI_MOVE_32_TO_16(&DeviceInfo->OemDataLength, &Subtable->Length);
Al Stone 6061af
 
Al Stone 6061af
             DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
         }
Al Stone 6061af
@@ -544,6 +558,8 @@
Al Stone 6061af
     ACPI_DMAR_DEVICE_SCOPE  *DmarDeviceScope;
Al Stone 6061af
     UINT32                  DeviceScopeLength;
Al Stone 6061af
     UINT32                  PciPathLength;
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
+    UINT16		    HdrType;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmar, &Subtable, TRUE);
Al Stone 6061af
@@ -573,8 +589,11 @@
Al Stone 6061af
         DtPushSubtable (Subtable);
Al Stone 6061af
 
Al Stone 6061af
         DmarHeader = ACPI_CAST_PTR (ACPI_DMAR_HEADER, Subtable->Buffer);
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &DmarHeader->Length);
Al Stone 6061af
+	DmarHeader->Length = Tmp16;
Al Stone 6061af
 
Al Stone 6061af
-        switch (DmarHeader->Type)
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&HdrType, &DmarHeader->Type);
Al Stone 6061af
+        switch (HdrType)
Al Stone 6061af
         {
Al Stone 6061af
         case ACPI_DMAR_TYPE_HARDWARE_UNIT:
Al Stone 6061af
 
Al Stone 6061af
@@ -621,8 +640,8 @@
Al Stone 6061af
         /*
Al Stone 6061af
          * Optional Device Scope subtables
Al Stone 6061af
          */
Al Stone 6061af
-        if ((DmarHeader->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) ||
Al Stone 6061af
-            (DmarHeader->Type == ACPI_DMAR_TYPE_NAMESPACE))
Al Stone 6061af
+        if ((HdrType == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) ||
Al Stone 6061af
+            (HdrType == ACPI_DMAR_TYPE_NAMESPACE))
Al Stone 6061af
         {
Al Stone 6061af
             /* These types do not support device scopes */
Al Stone 6061af
 
Al Stone 6061af
@@ -631,8 +650,8 @@
Al Stone 6061af
         }
Al Stone 6061af
 
Al Stone 6061af
         DtPushSubtable (Subtable);
Al Stone 6061af
-        DeviceScopeLength = DmarHeader->Length - Subtable->Length -
Al Stone 6061af
-            ParentTable->Length;
Al Stone 6061af
+        DeviceScopeLength = DmarHeader->Length - Subtable->Length - 
Al Stone 6061af
+		ParentTable->Length;
Al Stone 6061af
         while (DeviceScopeLength)
Al Stone 6061af
         {
Al Stone 6061af
             Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmarScope,
Al Stone 6061af
@@ -757,7 +776,7 @@
Al Stone 6061af
         Count++;
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
-    DrtmVtl->ValidatedTableCount = Count;
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&DrtmVtl->ValidatedTableCount, &Count);
Al Stone 6061af
     DtPopSubtable ();
Al Stone 6061af
     ParentTable = DtPeekSubtable ();
Al Stone 6061af
 
Al Stone 6061af
@@ -795,7 +814,7 @@
Al Stone 6061af
         Count++;
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
-    DrtmRl->ResourceCount = Count;
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&DrtmRl->ResourceCount, &Count);
Al Stone 6061af
     DtPopSubtable ();
Al Stone 6061af
     ParentTable = DtPeekSubtable ();
Al Stone 6061af
 
Al Stone 6061af
@@ -889,6 +908,7 @@
Al Stone 6061af
     ACPI_SUBTABLE_HEADER    *GtdtHeader;
Al Stone 6061af
     ACPI_DMTABLE_INFO       *InfoTable;
Al Stone 6061af
     UINT32                  GtCount;
Al Stone 6061af
+    ACPI_GTDT_TIMER_BLOCK   *TimerBlock;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoGtdt,
Al Stone 6061af
@@ -955,8 +975,9 @@
Al Stone 6061af
             DtPushSubtable (Subtable);
Al Stone 6061af
             ParentTable = DtPeekSubtable ();
Al Stone 6061af
 
Al Stone 6061af
-            GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
Al Stone 6061af
-                Subtable->Buffer - sizeof(ACPI_GTDT_HEADER)))->TimerCount;
Al Stone 6061af
+	    TimerBlock = ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
Al Stone 6061af
+                Subtable->Buffer - sizeof(ACPI_GTDT_HEADER));
Al Stone 6061af
+	    ACPI_MOVE_32_TO_32(&GtCount, &TimerBlock->TimerCount);
Al Stone 6061af
 
Al Stone 6061af
             while (GtCount)
Al Stone 6061af
             {
Al Stone 6061af
@@ -1009,6 +1030,7 @@
Al Stone 6061af
     ACPI_DMTABLE_INFO       *InfoTable;
Al Stone 6061af
     DT_FIELD                **PFieldList = (DT_FIELD **) List;
Al Stone 6061af
     DT_FIELD                *SubtableStart;
Al Stone 6061af
+    UINT16		    HdrType;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     while (*PFieldList)
Al Stone 6061af
@@ -1027,7 +1049,8 @@
Al Stone 6061af
 
Al Stone 6061af
         FpdtHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer);
Al Stone 6061af
 
Al Stone 6061af
-        switch (FpdtHeader->Type)
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&HdrType, &FpdtHeader->Type);
Al Stone 6061af
+        switch (HdrType)
Al Stone 6061af
         {
Al Stone 6061af
         case ACPI_FPDT_TYPE_BOOT:
Al Stone 6061af
 
Al Stone 6061af
@@ -1085,6 +1108,7 @@
Al Stone 6061af
     ACPI_DMTABLE_INFO       *InfoTable;
Al Stone 6061af
     UINT16                  Type;
Al Stone 6061af
     UINT32                  BankCount;
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoHest,
Al Stone 6061af
@@ -1102,8 +1126,9 @@
Al Stone 6061af
         /* Get subtable type */
Al Stone 6061af
 
Al Stone 6061af
         SubtableStart = *PFieldList;
Al Stone 6061af
-        DtCompileInteger ((UINT8 *) &Type, *PFieldList, 2, 0);
Al Stone 6061af
+        DtCompileInteger ((UINT8 *) &Tmp16, *PFieldList, 2, 0);
Al Stone 6061af
 
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Type, &Tmp16);
Al Stone 6061af
         switch (Type)
Al Stone 6061af
         {
Al Stone 6061af
         case ACPI_HEST_TYPE_IA32_CHECK:
Al Stone 6061af
@@ -1225,11 +1250,13 @@
Al Stone 6061af
     ACPI_IORT_SMMU          *IortSmmu;
Al Stone 6061af
     UINT32                  NodeNumber;
Al Stone 6061af
     UINT32                  NodeLength;
Al Stone 6061af
+    UINT32                  NodeOffset;
Al Stone 6061af
     UINT32                  IdMappingNumber;
Al Stone 6061af
     UINT32                  ItsNumber;
Al Stone 6061af
     UINT32                  ContextIrptNumber;
Al Stone 6061af
     UINT32                  PmuIrptNumber;
Al Stone 6061af
     UINT32                  PaddingLength;
Al Stone 6061af
+    UINT32                  MappingOffset;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     ParentTable = DtPeekSubtable ();
Al Stone 6061af
@@ -1255,7 +1282,7 @@
Al Stone 6061af
      * Optionally allows the generic data types to be used for filling
Al Stone 6061af
      * this field.
Al Stone 6061af
      */
Al Stone 6061af
-    Iort->NodeOffset = sizeof (ACPI_TABLE_IORT);
Al Stone 6061af
+    NodeOffset = sizeof (ACPI_TABLE_IORT);
Al Stone 6061af
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortPad,
Al Stone 6061af
         &Subtable, TRUE);
Al Stone 6061af
     if (ACPI_FAILURE (Status))
Al Stone 6061af
@@ -1265,7 +1292,7 @@
Al Stone 6061af
     if (Subtable)
Al Stone 6061af
     {
Al Stone 6061af
         DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
-        Iort->NodeOffset += Subtable->Length;
Al Stone 6061af
+        NodeOffset += Subtable->Length;
Al Stone 6061af
     }
Al Stone 6061af
     else
Al Stone 6061af
     {
Al Stone 6061af
@@ -1275,8 +1302,9 @@
Al Stone 6061af
         {
Al Stone 6061af
             return (Status);
Al Stone 6061af
         }
Al Stone 6061af
-        Iort->NodeOffset += PaddingLength;
Al Stone 6061af
+        NodeOffset += PaddingLength;
Al Stone 6061af
     }
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&Iort->NodeOffset, &NodeOffset);
Al Stone 6061af
 
Al Stone 6061af
     NodeNumber = 0;
Al Stone 6061af
     while (*PFieldList)
Al Stone 6061af
@@ -1330,7 +1358,7 @@
Al Stone 6061af
                 ItsNumber++;
Al Stone 6061af
             }
Al Stone 6061af
 
Al Stone 6061af
-            IortItsGroup->ItsCount = ItsNumber;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&IortItsGroup->ItsCount, &ItsNumber);
Al Stone 6061af
             break;
Al Stone 6061af
 
Al Stone 6061af
         case ACPI_IORT_NODE_NAMED_COMPONENT:
Al Stone 6061af
@@ -1364,15 +1392,16 @@
Al Stone 6061af
             }
Al Stone 6061af
             else
Al Stone 6061af
             {
Al Stone 6061af
-                if (NodeLength > IortNode->MappingOffset)
Al Stone 6061af
+		ACPI_MOVE_32_TO_32(&MappingOffset, &IortNode->MappingOffset);
Al Stone 6061af
+                if (NodeLength > MappingOffset)
Al Stone 6061af
                 {
Al Stone 6061af
                     return (AE_BAD_DATA);
Al Stone 6061af
                 }
Al Stone 6061af
 
Al Stone 6061af
-                if (NodeLength < IortNode->MappingOffset)
Al Stone 6061af
+                if (NodeLength < MappingOffset)
Al Stone 6061af
                 {
Al Stone 6061af
                     Status = DtCompilePadding (
Al Stone 6061af
-                        IortNode->MappingOffset - NodeLength,
Al Stone 6061af
+                        MappingOffset - NodeLength,
Al Stone 6061af
                         &Subtable);
Al Stone 6061af
                     if (ACPI_FAILURE (Status))
Al Stone 6061af
                     {
Al Stone 6061af
@@ -1380,7 +1409,8 @@
Al Stone 6061af
                     }
Al Stone 6061af
 
Al Stone 6061af
                     DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
-                    NodeLength = IortNode->MappingOffset;
Al Stone 6061af
+		    ACPI_MOVE_32_TO_32(&MappingOffset, &IortNode->MappingOffset);
Al Stone 6061af
+                    NodeLength = MappingOffset;
Al Stone 6061af
                 }
Al Stone 6061af
             }
Al Stone 6061af
             break;
Al Stone 6061af
@@ -1413,7 +1443,7 @@
Al Stone 6061af
 
Al Stone 6061af
             /* Compile global interrupt array */
Al Stone 6061af
 
Al Stone 6061af
-            IortSmmu->GlobalInterruptOffset = NodeLength;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&IortSmmu->GlobalInterruptOffset, &NodeLength);
Al Stone 6061af
             Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3a,
Al Stone 6061af
                 &Subtable, TRUE);
Al Stone 6061af
             if (ACPI_FAILURE (Status))
Al Stone 6061af
@@ -1427,7 +1457,7 @@
Al Stone 6061af
             /* Compile context interrupt array */
Al Stone 6061af
 
Al Stone 6061af
             ContextIrptNumber = 0;
Al Stone 6061af
-            IortSmmu->ContextInterruptOffset = NodeLength;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&IortSmmu->ContextInterruptOffset, &NodeLength);
Al Stone 6061af
             while (*PFieldList)
Al Stone 6061af
             {
Al Stone 6061af
                 Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3b,
Al Stone 6061af
@@ -1447,12 +1477,12 @@
Al Stone 6061af
                 ContextIrptNumber++;
Al Stone 6061af
             }
Al Stone 6061af
 
Al Stone 6061af
-            IortSmmu->ContextInterruptCount = ContextIrptNumber;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&IortSmmu->ContextInterruptCount, &ContextIrptNumber);
Al Stone 6061af
 
Al Stone 6061af
             /* Compile PMU interrupt array */
Al Stone 6061af
 
Al Stone 6061af
             PmuIrptNumber = 0;
Al Stone 6061af
-            IortSmmu->PmuInterruptOffset = NodeLength;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&IortSmmu->PmuInterruptOffset, &NodeLength);
Al Stone 6061af
             while (*PFieldList)
Al Stone 6061af
             {
Al Stone 6061af
                 Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3c,
Al Stone 6061af
@@ -1472,7 +1502,7 @@
Al Stone 6061af
                 PmuIrptNumber++;
Al Stone 6061af
             }
Al Stone 6061af
 
Al Stone 6061af
-            IortSmmu->PmuInterruptCount = PmuIrptNumber;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&IortSmmu->PmuInterruptCount, &PmuIrptNumber);
Al Stone 6061af
             break;
Al Stone 6061af
 
Al Stone 6061af
         case ACPI_IORT_NODE_SMMU_V3:
Al Stone 6061af
@@ -1496,7 +1526,7 @@
Al Stone 6061af
 
Al Stone 6061af
         /* Compile Array of ID mappings */
Al Stone 6061af
 
Al Stone 6061af
-        IortNode->MappingOffset = NodeLength;
Al Stone 6061af
+        ACPI_MOVE_32_TO_32(&IortNode->MappingOffset, &NodeLength);
Al Stone 6061af
         IdMappingNumber = 0;
Al Stone 6061af
         while (*PFieldList)
Al Stone 6061af
         {
Al Stone 6061af
@@ -1517,7 +1547,7 @@
Al Stone 6061af
             IdMappingNumber++;
Al Stone 6061af
         }
Al Stone 6061af
 
Al Stone 6061af
-        IortNode->MappingCount = IdMappingNumber;
Al Stone 6061af
+        ACPI_MOVE_32_TO_32(&IortNode->MappingCount, &IdMappingNumber);
Al Stone 6061af
 
Al Stone 6061af
         /*
Al Stone 6061af
          * Node length can be determined by DT_LENGTH option
Al Stone 6061af
@@ -1528,7 +1558,7 @@
Al Stone 6061af
         NodeNumber++;
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
-    Iort->NodeCount = NodeNumber;
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&Iort->NodeCount, &NodeNumber);
Al Stone 6061af
     return (AE_OK);
Al Stone 6061af
 }
Al Stone 6061af
 
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/compiler/dttable2.c acpica-unix2-20160930-s390/source/compiler/dttable2.c
Al Stone 6061af
--- acpica-unix2-20160930/source/compiler/dttable2.c	2016-09-30 10:43:57.000000000 -0600
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/compiler/dttable2.c	2016-12-09 17:35:52.483785207 -0700
Al Stone 6061af
@@ -346,7 +346,7 @@
Al Stone 6061af
     DtPushSubtable (Subtable);
Al Stone 6061af
 
Al Stone 6061af
     MpstChannelInfo = ACPI_CAST_PTR (ACPI_MPST_CHANNEL, Subtable->Buffer);
Al Stone 6061af
-    SubtableCount = MpstChannelInfo->PowerNodeCount;
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&SubtableCount, &MpstChannelInfo->PowerNodeCount);
Al Stone 6061af
 
Al Stone 6061af
     while (*PFieldList && SubtableCount)
Al Stone 6061af
     {
Al Stone 6061af
@@ -364,8 +364,8 @@
Al Stone 6061af
         DtPushSubtable (Subtable);
Al Stone 6061af
 
Al Stone 6061af
         MpstPowerNode = ACPI_CAST_PTR (ACPI_MPST_POWER_NODE, Subtable->Buffer);
Al Stone 6061af
-        PowerStateCount = MpstPowerNode->NumPowerStates;
Al Stone 6061af
-        ComponentCount = MpstPowerNode->NumPhysicalComponents;
Al Stone 6061af
+        ACPI_MOVE_32_TO_32(&PowerStateCount, &MpstPowerNode->NumPowerStates);
Al Stone 6061af
+        ACPI_MOVE_32_TO_32(&ComponentCount, &MpstPowerNode->NumPhysicalComponents);
Al Stone 6061af
 
Al Stone 6061af
         ParentTable = DtPeekSubtable ();
Al Stone 6061af
 
Al Stone 6061af
@@ -518,6 +518,7 @@
Al Stone 6061af
     UINT32                  Count;
Al Stone 6061af
     ACPI_NFIT_INTERLEAVE    *Interleave = NULL;
Al Stone 6061af
     ACPI_NFIT_FLUSH_ADDRESS *Hint = NULL;
Al Stone 6061af
+    UINT16		    SubType;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Main table */
Al Stone 6061af
@@ -551,7 +552,8 @@
Al Stone 6061af
 
Al Stone 6061af
         NfitHeader = ACPI_CAST_PTR (ACPI_NFIT_HEADER, Subtable->Buffer);
Al Stone 6061af
 
Al Stone 6061af
-        switch (NfitHeader->Type)
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&SubType, &NfitHeader->Type);
Al Stone 6061af
+        switch (SubType)
Al Stone 6061af
         {
Al Stone 6061af
         case ACPI_NFIT_TYPE_SYSTEM_ADDRESS:
Al Stone 6061af
 
Al Stone 6061af
@@ -606,7 +608,7 @@
Al Stone 6061af
         DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
         DtPopSubtable ();
Al Stone 6061af
 
Al Stone 6061af
-        switch (NfitHeader->Type)
Al Stone 6061af
+        switch (SubType)
Al Stone 6061af
         {
Al Stone 6061af
         case ACPI_NFIT_TYPE_INTERLEAVE:
Al Stone 6061af
 
Al Stone 6061af
@@ -632,7 +634,7 @@
Al Stone 6061af
                 Count++;
Al Stone 6061af
             }
Al Stone 6061af
 
Al Stone 6061af
-            Interleave->LineCount = Count;
Al Stone 6061af
+            ACPI_MOVE_32_TO_32(&Interleave->LineCount, &Count);
Al Stone 6061af
             DtPopSubtable ();
Al Stone 6061af
             break;
Al Stone 6061af
 
Al Stone 6061af
@@ -678,7 +680,7 @@
Al Stone 6061af
                 Count++;
Al Stone 6061af
             }
Al Stone 6061af
 
Al Stone 6061af
-            Hint->HintCount = (UINT16) Count;
Al Stone 6061af
+            ACPI_MOVE_32_TO_16(&Hint->HintCount, &Count);
Al Stone 6061af
             DtPopSubtable ();
Al Stone 6061af
             break;
Al Stone 6061af
 
Al Stone 6061af
@@ -885,7 +887,7 @@
Al Stone 6061af
 
Al Stone 6061af
             PmttController = ACPI_CAST_PTR (ACPI_PMTT_CONTROLLER,
Al Stone 6061af
                 (Subtable->Buffer - sizeof (ACPI_PMTT_HEADER)));
Al Stone 6061af
-            DomainCount = PmttController->DomainCount;
Al Stone 6061af
+            ACPI_MOVE_16_TO_16(&DomainCount, &PmttController->DomainCount);
Al Stone 6061af
 
Al Stone 6061af
             while (DomainCount)
Al Stone 6061af
             {
Al Stone 6061af
@@ -986,6 +988,7 @@
Al Stone 6061af
     DT_SUBTABLE             *ParentTable;
Al Stone 6061af
     ACPI_DMTABLE_INFO       *InfoTable;
Al Stone 6061af
     DT_FIELD                *SubtableStart;
Al Stone 6061af
+    UINT16		    HdrType;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3pt,
Al Stone 6061af
@@ -1013,7 +1016,8 @@
Al Stone 6061af
 
Al Stone 6061af
         S3ptHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer);
Al Stone 6061af
 
Al Stone 6061af
-        switch (S3ptHeader->Type)
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&HdrType, &S3ptHeader->Type);
Al Stone 6061af
+        switch (HdrType)
Al Stone 6061af
         {
Al Stone 6061af
         case ACPI_S3PT_TYPE_RESUME:
Al Stone 6061af
 
Al Stone 6061af
@@ -1110,6 +1114,7 @@
Al Stone 6061af
     DT_FIELD                *FieldList;
Al Stone 6061af
     UINT32                  Localities;
Al Stone 6061af
     UINT8                   *LocalityBuffer;
Al Stone 6061af
+    UINT32		    Tmp;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlit,
Al Stone 6061af
@@ -1122,7 +1127,8 @@
Al Stone 6061af
     ParentTable = DtPeekSubtable ();
Al Stone 6061af
     DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
 
Al Stone 6061af
-    Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
Al Stone 6061af
+    Tmp = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&Localities, &Tmp);
Al Stone 6061af
     LocalityBuffer = UtLocalCalloc (Localities);
Al Stone 6061af
 
Al Stone 6061af
     /* Compile each locality buffer */
Al Stone 6061af
@@ -1311,6 +1317,7 @@
Al Stone 6061af
     ACPI_TABLE_TCPA_HDR     *TcpaHeader;
Al Stone 6061af
     DT_SUBTABLE             *ParentTable;
Al Stone 6061af
     ACPI_STATUS             Status;
Al Stone 6061af
+    UINT16		    PlatClass;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Compile the main table */
Al Stone 6061af
@@ -1331,7 +1338,8 @@
Al Stone 6061af
      */
Al Stone 6061af
     TcpaHeader = ACPI_CAST_PTR (ACPI_TABLE_TCPA_HDR, ParentTable->Buffer);
Al Stone 6061af
 
Al Stone 6061af
-    switch (TcpaHeader->PlatformClass)
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&PlatClass, &TcpaHeader->PlatformClass);
Al Stone 6061af
+    switch (PlatClass)
Al Stone 6061af
     {
Al Stone 6061af
     case ACPI_TCPA_CLIENT_TABLE:
Al Stone 6061af
 
Al Stone 6061af
@@ -1527,6 +1535,9 @@
Al Stone 6061af
     ACPI_TABLE_WPBT         *Table;
Al Stone 6061af
     ACPI_STATUS             Status;
Al Stone 6061af
     UINT16                  Length;
Al Stone 6061af
+    UINT16                  Tmp16;
Al Stone 6061af
+    UINT16		    *Ptr16;
Al Stone 6061af
+    UINT32		    ii;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Compile the main table */
Al Stone 6061af
@@ -1554,7 +1565,16 @@
Al Stone 6061af
 
Al Stone 6061af
     Length = (UINT16) Subtable->TotalLength;
Al Stone 6061af
     Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
Al Stone 6061af
-    Table->ArgumentsLength = Length;
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Table->ArgumentsLength, &Length);
Al Stone 6061af
+
Al Stone 6061af
+    /* The arguments are in Unicode, so make sure the byte order is correct */
Al Stone 6061af
+    Ptr16 = (UINT16 *)Subtable->Buffer;
Al Stone 6061af
+    for (ii = 0; ii < Length; ii++)
Al Stone 6061af
+    {
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, Ptr16);
Al Stone 6061af
+	*Ptr16 = Tmp16;
Al Stone 6061af
+        Ptr16++;
Al Stone 6061af
+    }
Al Stone 6061af
 
Al Stone 6061af
     ParentTable = DtPeekSubtable ();
Al Stone 6061af
     DtInsertSubtable (ParentTable, Subtable);
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/components/disassembler/dmbuffer.c acpica-unix2-20160930-s390/source/components/disassembler/dmbuffer.c
Al Stone 6061af
--- acpica-unix2-20160930/source/components/disassembler/dmbuffer.c	2016-12-06 19:25:49.303453108 -0700
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/components/disassembler/dmbuffer.c	2016-12-09 14:27:06.193785207 -0700
Al Stone 6061af
@@ -425,7 +425,8 @@
Al Stone 6061af
     /* Extract the byte list info */
Al Stone 6061af
 
Al Stone 6061af
     ByteData = NextOp->Named.Data;
Al Stone 6061af
-    ByteCount = (UINT32) NextOp->Common.Value.Integer;
Al Stone 6061af
+    /* ByteCount = (UINT32) NextOp->Common.Value.Integer; */
Al Stone 6061af
+    ByteCount = (UINT32) NextOp->Common.Value.Size;
Al Stone 6061af
     WordCount = ACPI_DIV_2 (ByteCount);
Al Stone 6061af
 
Al Stone 6061af
     /*
Al Stone 6061af
@@ -834,19 +835,22 @@
Al Stone 6061af
     UINT32                  WordCount;
Al Stone 6061af
     UINT32                  i;
Al Stone 6061af
     int                     OutputValue;
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Extract the buffer info as a WORD buffer */
Al Stone 6061af
 
Al Stone 6061af
     WordData = ACPI_CAST_PTR (UINT16, Op->Named.Data);
Al Stone 6061af
-    WordCount = ACPI_DIV_2 (((UINT32) Op->Common.Value.Integer));
Al Stone 6061af
+    WordCount = ACPI_DIV_2 (((UINT32) Op->Common.Value.Size));
Al Stone 6061af
 
Al Stone 6061af
     /* Write every other byte as an ASCII character */
Al Stone 6061af
 
Al Stone 6061af
     AcpiOsPrintf ("\"");
Al Stone 6061af
     for (i = 0; i < (WordCount - 1); i++)
Al Stone 6061af
     {
Al Stone 6061af
-        OutputValue = (int) WordData[i];
Al Stone 6061af
+        /* OutputValue = (int) WordData[i]; */
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &WordData[i]);
Al Stone 6061af
+	OutputValue = (int) Tmp16;
Al Stone 6061af
 
Al Stone 6061af
         /* Handle values that must be escaped */
Al Stone 6061af
 
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/components/disassembler/dmresrcl2.c acpica-unix2-20160930-s390/source/components/disassembler/dmresrcl2.c
Al Stone 6061af
--- acpica-unix2-20160930/source/components/disassembler/dmresrcl2.c	2016-09-30 10:43:58.000000000 -0600
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/components/disassembler/dmresrcl2.c	2016-12-09 16:23:07.283785207 -0700
Al Stone 6061af
@@ -191,22 +191,24 @@
Al Stone 6061af
     char                    *DeviceName = NULL;
Al Stone 6061af
     UINT32                  PinCount;
Al Stone 6061af
     UINT32                  i;
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* ResourceSource, ResourceSourceIndex, ResourceType */
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level + 1);
Al Stone 6061af
-    if (Resource->Gpio.ResSourceOffset)
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.ResSourceOffset);
Al Stone 6061af
+    if (Tmp16)
Al Stone 6061af
     {
Al Stone 6061af
-        DeviceName = ACPI_ADD_PTR (char,
Al Stone 6061af
-            Resource, Resource->Gpio.ResSourceOffset),
Al Stone 6061af
+        DeviceName = ACPI_ADD_PTR (char, Resource, Tmp16),
Al Stone 6061af
         AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
     AcpiOsPrintf (", ");
Al Stone 6061af
     AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.ResSourceIndex);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.Flags);
Al Stone 6061af
     AcpiOsPrintf ("%s, ",
Al Stone 6061af
-        AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.Flags)]);
Al Stone 6061af
+        AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Tmp16)]);
Al Stone 6061af
 
Al Stone 6061af
     /* Insert a descriptor name */
Al Stone 6061af
 
Al Stone 6061af
@@ -215,15 +217,16 @@
Al Stone 6061af
 
Al Stone 6061af
     /* Dump the vendor data */
Al Stone 6061af
 
Al Stone 6061af
-    if (Resource->Gpio.VendorOffset)
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.VendorOffset);
Al Stone 6061af
+    if (Tmp16)
Al Stone 6061af
     {
Al Stone 6061af
         AcpiOsPrintf ("\n");
Al Stone 6061af
         AcpiDmIndent (Level + 1);
Al Stone 6061af
-        VendorData = ACPI_ADD_PTR (UINT8, Resource,
Al Stone 6061af
-            Resource->Gpio.VendorOffset);
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.VendorOffset);
Al Stone 6061af
+        VendorData = ACPI_ADD_PTR (UINT8, Resource, Tmp16);
Al Stone 6061af
 
Al Stone 6061af
-        AcpiDmDumpRawDataBuffer (VendorData,
Al Stone 6061af
-            Resource->Gpio.VendorLength, Level);
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.VendorLength);
Al Stone 6061af
+        AcpiDmDumpRawDataBuffer (VendorData, Tmp16, Level);
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
     AcpiOsPrintf (")\n");
Al Stone 6061af
@@ -233,17 +236,25 @@
Al Stone 6061af
     AcpiDmIndent (Level + 1);
Al Stone 6061af
     AcpiOsPrintf ("{   // Pin list\n");
Al Stone 6061af
 
Al Stone 6061af
+    /*
Al Stone 6061af
     PinCount = ((UINT32) (Resource->Gpio.ResSourceOffset -
Al Stone 6061af
         Resource->Gpio.PinTableOffset)) /
Al Stone 6061af
         sizeof (UINT16);
Al Stone 6061af
+    */
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.ResSourceOffset);
Al Stone 6061af
+    PinCount = (UINT32) Tmp16;
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.PinTableOffset);
Al Stone 6061af
+    PinCount -= (UINT32) Tmp16;
Al Stone 6061af
+    PinCount /= sizeof (UINT16);
Al Stone 6061af
 
Al Stone 6061af
-    PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
Al Stone 6061af
-        Resource->Gpio.PinTableOffset);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.PinTableOffset);
Al Stone 6061af
+    PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, Tmp16);
Al Stone 6061af
 
Al Stone 6061af
     for (i = 0; i < PinCount; i++)
Al Stone 6061af
     {
Al Stone 6061af
         AcpiDmIndent (Level + 2);
Al Stone 6061af
-        AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &PinList[i]);
Al Stone 6061af
+        AcpiOsPrintf ("0x%4.4X%s\n", Tmp16,
Al Stone 6061af
             ((i + 1) < PinCount) ? "," : "");
Al Stone 6061af
     }
Al Stone 6061af
 
Al Stone 6061af
@@ -277,16 +288,18 @@
Al Stone 6061af
     UINT32                  Length,
Al Stone 6061af
     UINT32                  Level)
Al Stone 6061af
 {
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
 
Al Stone 6061af
     /* Dump the GpioInt-specific portion of the descriptor */
Al Stone 6061af
 
Al Stone 6061af
     /* EdgeLevel, ActiveLevel, Shared */
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.IntFlags);
Al Stone 6061af
     AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
Al Stone 6061af
-        AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.IntFlags)],
Al Stone 6061af
-        AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 1)],
Al Stone 6061af
-        AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
Al Stone 6061af
+        AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Tmp16)],
Al Stone 6061af
+        AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 1)],
Al Stone 6061af
+        AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 3)]);
Al Stone 6061af
 
Al Stone 6061af
     /* PinConfig, DebounceTimeout */
Al Stone 6061af
 
Al Stone 6061af
@@ -299,7 +312,8 @@
Al Stone 6061af
     {
Al Stone 6061af
         AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
Al Stone 6061af
     }
Al Stone 6061af
-    AcpiOsPrintf ("0x%4.4X,\n", Resource->Gpio.DebounceTimeout);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.DebounceTimeout);
Al Stone 6061af
+    AcpiOsPrintf ("0x%4.4X,\n", Tmp16);
Al Stone 6061af
 
Al Stone 6061af
     /* Dump the GpioInt/GpioIo common portion of the descriptor */
Al Stone 6061af
 
Al Stone 6061af
@@ -329,14 +343,16 @@
Al Stone 6061af
     UINT32                  Length,
Al Stone 6061af
     UINT32                  Level)
Al Stone 6061af
 {
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
 
Al Stone 6061af
     /* Dump the GpioIo-specific portion of the descriptor */
Al Stone 6061af
 
Al Stone 6061af
     /* Shared, PinConfig */
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.IntFlags);
Al Stone 6061af
     AcpiOsPrintf ("GpioIo (%s, ",
Al Stone 6061af
-        AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
Al Stone 6061af
+        AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 3)]);
Al Stone 6061af
 
Al Stone 6061af
     if (Resource->Gpio.PinConfig <= 3)
Al Stone 6061af
     {
Al Stone 6061af
@@ -350,10 +366,13 @@
Al Stone 6061af
 
Al Stone 6061af
     /* DebounceTimeout, DriveStrength, IoRestriction */
Al Stone 6061af
 
Al Stone 6061af
-    AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DebounceTimeout);
Al Stone 6061af
-    AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DriveStrength);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.DebounceTimeout);
Al Stone 6061af
+    AcpiOsPrintf ("0x%4.4X, ", Tmp16);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.DriveStrength);
Al Stone 6061af
+    AcpiOsPrintf ("0x%4.4X, ", Tmp16);
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->Gpio.IntFlags);
Al Stone 6061af
     AcpiOsPrintf ("%s,\n",
Al Stone 6061af
-        AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Resource->Gpio.IntFlags)]);
Al Stone 6061af
+        AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Tmp16)]);
Al Stone 6061af
 
Al Stone 6061af
     /* Dump the GpioInt/GpioIo common portion of the descriptor */
Al Stone 6061af
 
Al Stone 6061af
@@ -427,6 +446,7 @@
Al Stone 6061af
 {
Al Stone 6061af
     UINT8                   *VendorData;
Al Stone 6061af
     UINT32                  VendorLength;
Al Stone 6061af
+    UINT16                  Tmp16;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* Get the (optional) vendor data and length */
Al Stone 6061af
@@ -435,8 +455,8 @@
Al Stone 6061af
     {
Al Stone 6061af
     case AML_RESOURCE_I2C_SERIALBUSTYPE:
Al Stone 6061af
 
Al Stone 6061af
-        VendorLength = Resource->CommonSerialBus.TypeDataLength -
Al Stone 6061af
-            AML_RESOURCE_I2C_MIN_DATA_LEN;
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &Resource->CommonSerialBus.TypeDataLength);
Al Stone 6061af
+        VendorLength = Tmp16 - AML_RESOURCE_I2C_MIN_DATA_LEN;
Al Stone 6061af
 
Al Stone 6061af
         VendorData = ACPI_ADD_PTR (UINT8, Resource,
Al Stone 6061af
             sizeof (AML_RESOURCE_I2C_SERIALBUS));
Al Stone 6061af
@@ -444,8 +464,8 @@
Al Stone 6061af
 
Al Stone 6061af
     case AML_RESOURCE_SPI_SERIALBUSTYPE:
Al Stone 6061af
 
Al Stone 6061af
-        VendorLength = Resource->CommonSerialBus.TypeDataLength -
Al Stone 6061af
-            AML_RESOURCE_SPI_MIN_DATA_LEN;
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &Resource->CommonSerialBus.TypeDataLength);
Al Stone 6061af
+        VendorLength = Tmp16 - AML_RESOURCE_SPI_MIN_DATA_LEN;
Al Stone 6061af
 
Al Stone 6061af
         VendorData = ACPI_ADD_PTR (UINT8, Resource,
Al Stone 6061af
             sizeof (AML_RESOURCE_SPI_SERIALBUS));
Al Stone 6061af
@@ -453,8 +473,8 @@
Al Stone 6061af
 
Al Stone 6061af
     case AML_RESOURCE_UART_SERIALBUSTYPE:
Al Stone 6061af
 
Al Stone 6061af
-        VendorLength = Resource->CommonSerialBus.TypeDataLength -
Al Stone 6061af
-            AML_RESOURCE_UART_MIN_DATA_LEN;
Al Stone 6061af
+	ACPI_MOVE_16_TO_16(&Tmp16, &Resource->CommonSerialBus.TypeDataLength);
Al Stone 6061af
+        VendorLength = Tmp16 - AML_RESOURCE_UART_MIN_DATA_LEN;
Al Stone 6061af
 
Al Stone 6061af
         VendorData = ACPI_ADD_PTR (UINT8, Resource,
Al Stone 6061af
             sizeof (AML_RESOURCE_UART_SERIALBUS));
Al Stone 6061af
@@ -495,15 +515,19 @@
Al Stone 6061af
 {
Al Stone 6061af
     UINT32                  ResourceSourceOffset;
Al Stone 6061af
     char                    *DeviceName;
Al Stone 6061af
+    UINT16		    Tmp16;
Al Stone 6061af
+    UINT32		    Tmp32;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     /* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
Al Stone 6061af
 
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->I2cSerialBus.SlaveAddress);
Al Stone 6061af
+    ACPI_MOVE_32_TO_32(&Tmp32, &Resource->I2cSerialBus.ConnectionSpeed);
Al Stone 6061af
     AcpiDmIndent (Level);
Al Stone 6061af
     AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
Al Stone 6061af
-        Resource->I2cSerialBus.SlaveAddress,
Al Stone 6061af
+        Tmp16,
Al Stone 6061af
         AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
Al Stone 6061af
-        Resource->I2cSerialBus.ConnectionSpeed);
Al Stone 6061af
+        Tmp32);
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level + 1);
Al Stone 6061af
     AcpiOsPrintf ("%s, ",
Al Stone 6061af
@@ -511,8 +535,8 @@
Al Stone 6061af
 
Al Stone 6061af
     /* ResourceSource is a required field */
Al Stone 6061af
 
Al Stone 6061af
-    ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
Al Stone 6061af
-        Resource->CommonSerialBus.TypeDataLength;
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->CommonSerialBus.TypeDataLength);
Al Stone 6061af
+    ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) + Tmp16;
Al Stone 6061af
 
Al Stone 6061af
     DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset);
Al Stone 6061af
     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/components/disassembler/dmresrcl.c acpica-unix2-20160930-s390/source/components/disassembler/dmresrcl.c
Al Stone 6061af
--- acpica-unix2-20160930/source/components/disassembler/dmresrcl.c	2016-12-06 19:25:49.303453108 -0700
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/components/disassembler/dmresrcl.c	2016-12-08 16:33:58.673785207 -0700
Al Stone 6061af
@@ -917,6 +917,7 @@
Al Stone 6061af
     UINT32                  Length,
Al Stone 6061af
     UINT32                  Level)
Al Stone 6061af
 {
Al Stone 6061af
+    UINT64		    Tmp64;
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level);
Al Stone 6061af
     AcpiOsPrintf ("Register (");
Al Stone 6061af
@@ -930,7 +931,9 @@
Al Stone 6061af
     AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset");
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level + 1);
Al Stone 6061af
-    AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address");
Al Stone 6061af
+    /* AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address"); */
Al Stone 6061af
+    ACPI_MOVE_64_TO_64(&Tmp64, &Resource->GenericReg.Address);
Al Stone 6061af
+    AcpiDmDumpInteger64 (Tmp64, "Address");
Al Stone 6061af
 
Al Stone 6061af
     /* Optional field for ACPI 3.0 */
Al Stone 6061af
 
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/components/disassembler/dmresrcs.c acpica-unix2-20160930-s390/source/components/disassembler/dmresrcs.c
Al Stone 6061af
--- acpica-unix2-20160930/source/components/disassembler/dmresrcs.c	2016-12-06 19:25:49.304453101 -0700
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/components/disassembler/dmresrcs.c	2016-12-09 16:56:26.153785207 -0700
Al Stone 6061af
@@ -256,12 +256,14 @@
Al Stone 6061af
     UINT32                  Length,
Al Stone 6061af
     UINT32                  Level)
Al Stone 6061af
 {
Al Stone 6061af
+    UINT16                  Tmp16;
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level);
Al Stone 6061af
     AcpiOsPrintf ("FixedIO (\n");
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level + 1);
Al Stone 6061af
-    AcpiDmDumpInteger16 (Resource->FixedIo.Address, "Address");
Al Stone 6061af
+    ACPI_MOVE_16_TO_16(&Tmp16, &Resource->FixedIo.Address);
Al Stone 6061af
+    AcpiDmDumpInteger16 (Tmp16, "Address");
Al Stone 6061af
 
Al Stone 6061af
     AcpiDmIndent (Level + 1);
Al Stone 6061af
     AcpiDmDumpInteger8 (Resource->FixedIo.AddressLength, "Length");
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/components/namespace/nsaccess.c acpica-unix2-20160930-s390/source/components/namespace/nsaccess.c
Al Stone 6061af
--- acpica-unix2-20160930/source/components/namespace/nsaccess.c	2016-09-30 10:43:59.000000000 -0600
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/components/namespace/nsaccess.c	2016-12-08 17:11:07.563785207 -0700
Al Stone 6061af
@@ -309,6 +309,7 @@
Al Stone 6061af
     ACPI_OBJECT_TYPE        ThisSearchType;
Al Stone 6061af
     UINT32                  SearchParentFlag = ACPI_NS_SEARCH_PARENT;
Al Stone 6061af
     UINT32                  LocalFlags;
Al Stone 6061af
+    UINT32		    Tmp32;
Al Stone 6061af
 
Al Stone 6061af
 
Al Stone 6061af
     ACPI_FUNCTION_TRACE (NsLookup);
Al Stone 6061af
@@ -657,9 +658,10 @@
Al Stone 6061af
             {
Al Stone 6061af
                 /* Complain about a type mismatch */
Al Stone 6061af
 
Al Stone 6061af
+		ACPI_MOVE_32_TO_32(&Tmp32, &SimpleName);
Al Stone 6061af
                 ACPI_WARNING ((AE_INFO,
Al Stone 6061af
                     "NsLookup: Type mismatch on %4.4s (%s), searching for (%s)",
Al Stone 6061af
-                    ACPI_CAST_PTR (char, &SimpleName),
Al Stone 6061af
+                    ACPI_CAST_PTR (char, &Tmp32),
Al Stone 6061af
                     AcpiUtGetTypeName (ThisNode->Type),
Al Stone 6061af
                     AcpiUtGetTypeName (TypeToCheckFor)));
Al Stone 6061af
             }
Al Stone 6061af
diff -Naur acpica-unix2-20160930/source/include/acmacros.h acpica-unix2-20160930-s390/source/include/acmacros.h
Al Stone 6061af
--- acpica-unix2-20160930/source/include/acmacros.h	2016-12-06 19:25:49.285453239 -0700
Al Stone 6061af
+++ acpica-unix2-20160930-s390/source/include/acmacros.h	2016-12-06 11:58:04.563785207 -0700
Al Stone 6061af
@@ -98,7 +98,9 @@
Al Stone 6061af
                                            ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
Al Stone 6061af
                                            ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
Al Stone 6061af
 
Al Stone 6061af
-/* 32-bit source, 16/32/64 destination */
Al Stone 6061af
+/* 32-bit source, 8/16/32/64 destination */
Al Stone 6061af
+
Al Stone 6061af
+#define ACPI_MOVE_32_TO_8(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];}
Al Stone 6061af
 
Al Stone 6061af
 #define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
Al Stone 6061af
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
Al Stone 6061af
@@ -114,7 +116,9 @@
Al Stone 6061af
                                            ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
Al Stone 6061af
                                            ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
Al Stone 6061af
 
Al Stone 6061af
-/* 64-bit source, 16/32/64 destination */
Al Stone 6061af
+/* 64-bit source, 8/16/32/64 destination */
Al Stone 6061af
+
Al Stone 6061af
+#define ACPI_MOVE_64_TO_8(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];}
Al Stone 6061af
 
Al Stone 6061af
 #define ACPI_MOVE_64_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
Al Stone 6061af
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
Al Stone 6061af
@@ -141,13 +145,16 @@
Al Stone 6061af
 
Al Stone 6061af
 /* The hardware supports unaligned transfers, just do the little-endian move */
Al Stone 6061af
 
Al Stone 6061af
-/* 16-bit source, 16/32/64 destination */
Al Stone 6061af
+/* 16-bit source, 8/16/32/64 destination */
Al Stone 6061af
 
Al Stone 6061af
+#define ACPI_MOVE_16_TO_8(d, s)         *(UINT8 *)(void *)(d) = *(UINT16 *)(void *)(s)
Al Stone 6061af
 #define ACPI_MOVE_16_TO_16(d, s)        *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
Al Stone 6061af
 #define ACPI_MOVE_16_TO_32(d, s)        *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
Al Stone 6061af
 #define ACPI_MOVE_16_TO_64(d, s)        *(UINT64 *)(void *)(d) = *(UINT16 *)(void *)(s)
Al Stone 6061af
 
Al Stone 6061af
-/* 32-bit source, 16/32/64 destination */
Al Stone 6061af
+/* 32-bit source, 8/16/32/64 destination */
Al Stone 6061af
+
Al Stone 6061af
+#define ACPI_MOVE_32_TO_8(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];}
Al Stone 6061af
 
Al Stone 6061af
 #define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
Al Stone 6061af
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
Al Stone 6061af
@@ -155,8 +162,9 @@
Al Stone 6061af
 #define ACPI_MOVE_32_TO_32(d, s)        *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
Al Stone 6061af
 #define ACPI_MOVE_32_TO_64(d, s)        *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
Al Stone 6061af
 
Al Stone 6061af
-/* 64-bit source, 16/32/64 destination */
Al Stone 6061af
+/* 64-bit source, 8/16/32/64 destination */
Al Stone 6061af
 
Al Stone 6061af
+#define ACPI_MOVE_64_TO_8(d, s)         ACPI_MOVE_16_TO_8(d, s)    /* Truncate to 8 */
Al Stone 6061af
 #define ACPI_MOVE_64_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
Al Stone 6061af
 #define ACPI_MOVE_64_TO_32(d, s)        ACPI_MOVE_32_TO_32(d, s)    /* Truncate to 32 */
Al Stone 6061af
 #define ACPI_MOVE_64_TO_64(d, s)        *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s)
Al Stone 6061af
@@ -176,7 +184,9 @@
Al Stone 6061af
 #define ACPI_MOVE_16_TO_32(d, s)        {(*(UINT32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
Al Stone 6061af
 #define ACPI_MOVE_16_TO_64(d, s)        {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
Al Stone 6061af
 
Al Stone 6061af
-/* 32-bit source, 16/32/64 destination */
Al Stone 6061af
+/* 32-bit source, 8/16/32/64 destination */
Al Stone 6061af
+
Al Stone 6061af
+#define ACPI_MOVE_32_TO_8(d, s)         ACPI_MOVE_16_TO_8(d, s)    /* Truncate to 8 */
Al Stone 6061af
 
Al Stone 6061af
 #define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
Al Stone 6061af