Blame SOURCES/0021-Support-XSDT-in-a-big-endian-world.patch

214d7a
From 75d974e42fefabfd6684d62f58bff678b55f396b Mon Sep 17 00:00:00 2001
214d7a
From: Al Stone <ahs3@redhat.com>
214d7a
Date: Wed, 23 Sep 2020 12:16:37 -0600
214d7a
Subject: [PATCH 21/45] Support XSDT in a big-endian world
214d7a
214d7a
Signed-off-by: Al Stone <ahs3@redhat.com>
214d7a
---
214d7a
 source/common/dmtbdump.c | 6 ++++--
214d7a
 1 file changed, 4 insertions(+), 2 deletions(-)
214d7a
214d7a
Index: acpica-unix2-20210604/source/common/dmtbdump.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20210604.orig/source/common/dmtbdump.c
214d7a
+++ acpica-unix2-20210604/source/common/dmtbdump.c
214d7a
@@ -323,6 +323,7 @@ AcpiDmDumpXsdt (
214d7a
     UINT32                  Entries;
214d7a
     UINT32                  Offset;
214d7a
     UINT32                  i;
214d7a
+    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
214d7a
 
214d7a
 
214d7a
     /* Point to start of table pointer array */
214d7a
@@ -332,12 +333,13 @@ AcpiDmDumpXsdt (
214d7a
 
214d7a
     /* XSDT uses 64-bit pointers */
214d7a
 
214d7a
-    Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64);
214d7a
+    Entries = (TableLength - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64);
214d7a
 
214d7a
     for (i = 0; i < Entries; i++)
214d7a
     {
214d7a
         AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i);
214d7a
-        AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array[i]));
214d7a
+        AcpiOsPrintf ("%8.8X%8.8X\n",
214d7a
+                ACPI_FORMAT_UINT64 (AcpiUtReadUint64 (&Array[i])));
214d7a
         Offset += sizeof (UINT64);
214d7a
     }
214d7a
 }