]> git.pld-linux.org Git - packages/acpica.git/blob - 0019-Support-HEST-in-a-big-endian-world.patch
- updated tests
[packages/acpica.git] / 0019-Support-HEST-in-a-big-endian-world.patch
1 From 6b73a4881e436bb8cf86c05c1cc4b5360efe1c7f Mon Sep 17 00:00:00 2001
2 From: Al Stone <ahs3@redhat.com>
3 Date: Wed, 23 Sep 2020 11:54:49 -0600
4 Subject: [PATCH 19/45] Support HEST in a big-endian world
5
6 Signed-off-by: Al Stone <ahs3@redhat.com>
7 ---
8  source/common/dmtbdump1.c  | 10 ++++++----
9  source/compiler/dttable1.c |  4 +++-
10  2 files changed, 9 insertions(+), 5 deletions(-)
11
12 Index: 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 @@ -1517,12 +1517,13 @@ AcpiDmDumpHest (
17  {
18      ACPI_STATUS             Status;
19      ACPI_HEST_HEADER        *Subtable;
20 -    UINT32                  Length = Table->Length;
21 +    UINT32                  Length = AcpiUtReadUint32 (&Table->Length);
22      UINT32                  Offset = sizeof (ACPI_TABLE_HEST);
23      ACPI_DMTABLE_INFO       *InfoTable;
24      UINT32                  SubtableLength;
25      UINT32                  BankCount;
26      ACPI_HEST_IA_ERROR_BANK *BankTable;
27 +    UINT16                  SubtableType;
28  
29  
30      /* Main table */
31 @@ -1536,10 +1537,11 @@ AcpiDmDumpHest (
32      /* Subtables */
33  
34      Subtable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset);
35 -    while (Offset < Table->Length)
36 +    while (Offset < Length)
37      {
38          BankCount = 0;
39 -        switch (Subtable->Type)
40 +        SubtableType = Subtable->Type;
41 +        switch (SubtableType)
42          {
43          case ACPI_HEST_TYPE_IA32_CHECK:
44  
45 @@ -1606,7 +1608,7 @@ AcpiDmDumpHest (
46              /* Cannot continue on unknown type - no length */
47  
48              AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n",
49 -                Subtable->Type);
50 +                SubtableType);
51              return;
52          }
53  
54 Index: acpica-unix2-20220331/source/compiler/dttable1.c
55 ===================================================================
56 --- acpica-unix2-20220331.orig/source/compiler/dttable1.c
57 +++ acpica-unix2-20220331/source/compiler/dttable1.c
58 @@ -1575,6 +1575,7 @@ DtCompileHest (
59      DT_FIELD                *SubtableStart;
60      ACPI_DMTABLE_INFO       *InfoTable;
61      UINT16                  Type;
62 +    UINT16                  Tmp16;
63      UINT32                  BankCount;
64  
65  
66 @@ -1593,7 +1594,8 @@ DtCompileHest (
67          /* Get subtable type */
68  
69          SubtableStart = *PFieldList;
70 -        DtCompileInteger ((UINT8 *) &Type, *PFieldList, 2, 0);
71 +        DtCompileInteger ((UINT8 *) &Tmp16, *PFieldList, 2, 0);
72 +        Type = AcpiUtReadUint32 (&Tmp16);
73  
74          switch (Type)
75          {
This page took 0.085058 seconds and 3 git commands to generate.