]>
Commit | Line | Data |
---|---|---|
b643ab7e JB |
1 | From 75d974e42fefabfd6684d62f58bff678b55f396b Mon Sep 17 00:00:00 2001 |
2 | From: Al Stone <ahs3@redhat.com> | |
3 | Date: Wed, 23 Sep 2020 12:16:37 -0600 | |
4 | Subject: [PATCH 21/45] Support XSDT in a big-endian world | |
5 | ||
6 | Signed-off-by: Al Stone <ahs3@redhat.com> | |
7 | --- | |
8 | source/common/dmtbdump.c | 6 ++++-- | |
9 | 1 file changed, 4 insertions(+), 2 deletions(-) | |
10 | ||
11 | Index: acpica-unix2-20220331/source/common/dmtbdump.c | |
12 | =================================================================== | |
13 | --- acpica-unix2-20220331.orig/source/common/dmtbdump.c | |
14 | +++ acpica-unix2-20220331/source/common/dmtbdump.c | |
15 | @@ -377,6 +377,7 @@ AcpiDmDumpXsdt ( | |
16 | UINT32 Entries; | |
17 | UINT32 Offset; | |
18 | UINT32 i; | |
19 | + UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); | |
20 | ||
21 | ||
22 | /* Point to start of table pointer array */ | |
23 | @@ -386,12 +387,13 @@ AcpiDmDumpXsdt ( | |
24 | ||
25 | /* XSDT uses 64-bit pointers */ | |
26 | ||
27 | - Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64); | |
28 | + Entries = (TableLength - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64); | |
29 | ||
30 | for (i = 0; i < Entries; i++) | |
31 | { | |
32 | AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); | |
33 | - AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array[i])); | |
34 | + AcpiOsPrintf ("%8.8X%8.8X\n", | |
35 | + ACPI_FORMAT_UINT64 (AcpiUtReadUint64 (&Array[i]))); | |
36 | Offset += sizeof (UINT64); | |
37 | } | |
38 | } |