]> git.pld-linux.org Git - packages/acpica.git/blame - 0018-Support-GTDT-in-a-big-endian-world.patch
- added verbose patch not to hide compiler command line, disable stripping on install
[packages/acpica.git] / 0018-Support-GTDT-in-a-big-endian-world.patch
CommitLineData
b643ab7e
JB
1From 492e41a24fd088c7ab609ee8ad518f69c9cd29e3 Mon Sep 17 00:00:00 2001
2From: Al Stone <ahs3@redhat.com>
3Date: Tue, 22 Sep 2020 18:12:01 -0600
4Subject: [PATCH 18/45] Support GTDT in a big-endian world
5
6Signed-off-by: Al Stone <ahs3@redhat.com>
7---
8 source/common/dmtbdump1.c | 13 +++++++++----
9 source/compiler/dttable1.c | 9 +++++++--
10 2 files changed, 16 insertions(+), 6 deletions(-)
11
12Index: acpica-unix2-20220331/source/common/dmtbdump1.c
13===================================================================
14--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c
15+++ acpica-unix2-20220331/source/common/dmtbdump1.c
16@@ -1376,7 +1376,7 @@ AcpiDmDumpGtdt (
17 {
18 ACPI_STATUS Status;
19 ACPI_GTDT_HEADER *Subtable;
20- UINT32 Length = Table->Length;
21+ UINT32 Length = AcpiUtReadUint32 (&Table->Length);
22 UINT32 Offset = sizeof (ACPI_TABLE_GTDT);
23 ACPI_DMTABLE_INFO *InfoTable;
24 UINT32 SubtableLength;
25@@ -1412,7 +1412,7 @@ AcpiDmDumpGtdt (
26
27 /* Subtables */
28
29- while (Offset < Table->Length)
30+ while (Offset < Length)
31 {
32 /* Common subtable header */
33
34@@ -1430,8 +1430,13 @@ AcpiDmDumpGtdt (
35 case ACPI_GTDT_TYPE_TIMER_BLOCK:
36
37 SubtableLength = sizeof (ACPI_GTDT_TIMER_BLOCK);
38- GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
39- Subtable))->TimerCount;
40+ {
41+ UINT32 Tmp32;
42+
43+ Tmp32 = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
44+ Subtable))->TimerCount;
45+ GtCount = AcpiUtReadUint32 (&Tmp32);
46+ }
47
48 InfoTable = AcpiDmTableInfoGtdt0;
49 break;
50Index: acpica-unix2-20220331/source/compiler/dttable1.c
51===================================================================
52--- acpica-unix2-20220331.orig/source/compiler/dttable1.c
53+++ acpica-unix2-20220331/source/compiler/dttable1.c
54@@ -1439,8 +1439,13 @@ DtCompileGtdt (
55 DtPushSubtable (Subtable);
56 ParentTable = DtPeekSubtable ();
57
58- GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
59- Subtable->Buffer - sizeof(ACPI_GTDT_HEADER)))->TimerCount;
60+ {
61+ UINT32 Tmp32;
62+
63+ Tmp32 = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK,
64+ Subtable->Buffer - sizeof (ACPI_GTDT_HEADER)))->TimerCount;
65+ GtCount = AcpiUtReadUint32 (&Tmp32);
66+ }
67
68 while (GtCount)
69 {
This page took 0.113838 seconds and 4 git commands to generate.