]> git.pld-linux.org Git - packages/acpica.git/blobdiff - 0018-Support-GTDT-in-a-big-endian-world.patch
- updated to 20220331 + current Fedora patch set; acpinames is gone
[packages/acpica.git] / 0018-Support-GTDT-in-a-big-endian-world.patch
diff --git a/0018-Support-GTDT-in-a-big-endian-world.patch b/0018-Support-GTDT-in-a-big-endian-world.patch
new file mode 100644 (file)
index 0000000..4bdb9bc
--- /dev/null
@@ -0,0 +1,69 @@
+From 492e41a24fd088c7ab609ee8ad518f69c9cd29e3 Mon Sep 17 00:00:00 2001
+From: Al Stone <ahs3@redhat.com>
+Date: Tue, 22 Sep 2020 18:12:01 -0600
+Subject: [PATCH 18/45] Support GTDT in a big-endian world
+
+Signed-off-by: Al Stone <ahs3@redhat.com>
+---
+ source/common/dmtbdump1.c  | 13 +++++++++----
+ source/compiler/dttable1.c |  9 +++++++--
+ 2 files changed, 16 insertions(+), 6 deletions(-)
+
+Index: acpica-unix2-20220331/source/common/dmtbdump1.c
+===================================================================
+--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c
++++ acpica-unix2-20220331/source/common/dmtbdump1.c
+@@ -1376,7 +1376,7 @@ AcpiDmDumpGtdt (
+ {
+     ACPI_STATUS             Status;
+     ACPI_GTDT_HEADER        *Subtable;
+-    UINT32                  Length = Table->Length;
++    UINT32                  Length = AcpiUtReadUint32 (&Table->Length);
+     UINT32                  Offset = sizeof (ACPI_TABLE_GTDT);
+     ACPI_DMTABLE_INFO       *InfoTable;
+     UINT32                  SubtableLength;
+@@ -1412,7 +1412,7 @@ AcpiDmDumpGtdt (
+     /* Subtables */
+-    while (Offset < Table->Length)
++    while (Offset < Length)
+     {
+         /* Common subtable header */
+@@ -1430,8 +1430,13 @@ AcpiDmDumpGtdt (
+         case ACPI_GTDT_TYPE_TIMER_BLOCK:
+             SubtableLength = sizeof (ACPI_GTDT_TIMER_BLOCK);
+-            GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
+-                Subtable))->TimerCount;
++            {
++                UINT32 Tmp32;
++
++                Tmp32 = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
++                    Subtable))->TimerCount;
++                GtCount = AcpiUtReadUint32 (&Tmp32);
++            }
+             InfoTable = AcpiDmTableInfoGtdt0;
+             break;
+Index: acpica-unix2-20220331/source/compiler/dttable1.c
+===================================================================
+--- acpica-unix2-20220331.orig/source/compiler/dttable1.c
++++ acpica-unix2-20220331/source/compiler/dttable1.c
+@@ -1439,8 +1439,13 @@ DtCompileGtdt (
+             DtPushSubtable (Subtable);
+             ParentTable = DtPeekSubtable ();
+-            GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
+-                Subtable->Buffer - sizeof(ACPI_GTDT_HEADER)))->TimerCount;
++            {
++                UINT32 Tmp32;
++
++                Tmp32 = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
++                    Subtable->Buffer - sizeof (ACPI_GTDT_HEADER)))->TimerCount;
++                GtCount = AcpiUtReadUint32 (&Tmp32);
++            }
+             while (GtCount)
+             {
This page took 0.827714 seconds and 4 git commands to generate.