Al Stone fd1a3d
diff -Naur acpica-unix2-20171110/source/compiler/dttable2.c acpica-unix2-20171110.patched/source/compiler/dttable2.c
Al Stone fd1a3d
--- acpica-unix2-20171110/source/compiler/dttable2.c	2017-11-27 15:20:04.705226128 -0700
Al Stone fd1a3d
+++ acpica-unix2-20171110.patched/source/compiler/dttable2.c	2017-11-27 15:26:29.121734421 -0700
Al Stone fd1a3d
@@ -1797,6 +1797,7 @@
Al Stone fd1a3d
     ACPI_TABLE_TPM2         *Tpm2Header;
Al Stone fd1a3d
     DT_SUBTABLE             *ParentTable;
Al Stone fd1a3d
     ACPI_STATUS             Status = AE_OK;
Al Stone fd1a3d
+    UINT32		    Tmp32;
Al Stone fd1a3d
 
Al Stone fd1a3d
 
Al Stone fd1a3d
     /* Compile the main table */
Al Stone fd1a3d
@@ -1831,7 +1832,8 @@
Al Stone fd1a3d
 
Al Stone fd1a3d
     /* Subtable type depends on the StartMethod */
Al Stone fd1a3d
 
Al Stone fd1a3d
-    switch (Tpm2Header->StartMethod)
Al Stone fd1a3d
+    ACPI_MOVE_32_TO_32(&Tmp32, &Tpm2Header->StartMethod);
Al Stone fd1a3d
+    switch (Tmp32)
Al Stone fd1a3d
     {
Al Stone fd1a3d
     case ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC:
Al Stone fd1a3d
 
Al Stone fd1a3d
@@ -1861,16 +1863,14 @@
Al Stone fd1a3d
     case ACPI_TPM2_RESERVED9:
Al Stone fd1a3d
     case ACPI_TPM2_RESERVED10:
Al Stone fd1a3d
 
Al Stone fd1a3d
-        AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n",
Al Stone fd1a3d
-            Tpm2Header->StartMethod);
Al Stone fd1a3d
+        AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n", Tmp32);
Al Stone fd1a3d
         Status = AE_ERROR;
Al Stone fd1a3d
         break;
Al Stone fd1a3d
 
Al Stone fd1a3d
     case ACPI_TPM2_NOT_ALLOWED:
Al Stone fd1a3d
     default:
Al Stone fd1a3d
 
Al Stone fd1a3d
-        AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n",
Al Stone fd1a3d
-            Tpm2Header->StartMethod);
Al Stone fd1a3d
+        AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n", Tmp32);
Al Stone fd1a3d
         Status = AE_ERROR;
Al Stone fd1a3d
         break;
Al Stone fd1a3d
     }