From fd1a3d2421b4f05edcb4690eb88af829ca436ae8 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Nov 27 2017 22:30:47 +0000 Subject: Add new TPM2 patch to fix a big-endian issue. Signed-off-by: Al Stone --- diff --git a/acpica-tools.spec b/acpica-tools.spec index b51cf02..47e0675 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -34,6 +34,7 @@ Patch7: ppc64le.patch Patch8: arm7hl.patch Patch9: big-endian-v2.patch Patch10: simple-64bit.patch +Patch11: be-tpm2.patch BuildRequires: bison patchutils flex @@ -94,6 +95,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f - %patch8 -p1 -b .arm7hl %patch9 -p1 -b .big-endian-v2 %patch10 -p1 -b .simple-64bit +%patch11 -p1 -b .be-tpm2 cp -p %{SOURCE2} README.Fedora cp -p %{SOURCE3} iasl.1 @@ -192,6 +194,7 @@ fi - Update to 20171110 source tree, including patch refeshes - Add patch for mips64el build, should it ever be needed; it also cleans up all 64-bit arches, so nice to have regardless +- Add new patch for a TPM2 big-endian issue. * Fri Oct 6 2017 Al Stone - 20170929-1 - Update to 20170929 source tree, including patch refeshes diff --git a/be-tpm2.patch b/be-tpm2.patch new file mode 100644 index 0000000..c7c286e --- /dev/null +++ b/be-tpm2.patch @@ -0,0 +1,40 @@ +diff -Naur acpica-unix2-20171110/source/compiler/dttable2.c acpica-unix2-20171110.patched/source/compiler/dttable2.c +--- acpica-unix2-20171110/source/compiler/dttable2.c 2017-11-27 15:20:04.705226128 -0700 ++++ acpica-unix2-20171110.patched/source/compiler/dttable2.c 2017-11-27 15:26:29.121734421 -0700 +@@ -1797,6 +1797,7 @@ + ACPI_TABLE_TPM2 *Tpm2Header; + DT_SUBTABLE *ParentTable; + ACPI_STATUS Status = AE_OK; ++ UINT32 Tmp32; + + + /* Compile the main table */ +@@ -1831,7 +1832,8 @@ + + /* Subtable type depends on the StartMethod */ + +- switch (Tpm2Header->StartMethod) ++ ACPI_MOVE_32_TO_32(&Tmp32, &Tpm2Header->StartMethod); ++ switch (Tmp32) + { + case ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC: + +@@ -1861,16 +1863,14 @@ + case ACPI_TPM2_RESERVED9: + case ACPI_TPM2_RESERVED10: + +- AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n", +- Tpm2Header->StartMethod); ++ AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n", Tmp32); + Status = AE_ERROR; + break; + + case ACPI_TPM2_NOT_ALLOWED: + default: + +- AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n", +- Tpm2Header->StartMethod); ++ AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n", Tmp32); + Status = AE_ERROR; + break; + }