]> git.pld-linux.org Git - packages/acpica.git/blob - 0017-Support-most-FPDTs-in-a-big-endian-world.patch
- updated tests
[packages/acpica.git] / 0017-Support-most-FPDTs-in-a-big-endian-world.patch
1 From 35f533074fb78d52e87c5a14406a136480a6fe62 Mon Sep 17 00:00:00 2001
2 From: Al Stone <ahs3@redhat.com>
3 Date: Tue, 22 Sep 2020 17:51:45 -0600
4 Subject: [PATCH 17/45] Support most FPDTs in a big-endian world
5
6 NB: there is no support for vendor specific records even in
7 the little-endian version.
8
9 Signed-off-by: Al Stone <ahs3@redhat.com>
10 ---
11  source/common/dmtbdump1.c  | 12 +++++++-----
12  source/compiler/dttable1.c |  4 +++-
13  2 files changed, 10 insertions(+), 6 deletions(-)
14
15 Index: acpica-unix2-20220331/source/common/dmtbdump1.c
16 ===================================================================
17 --- acpica-unix2-20220331.orig/source/common/dmtbdump1.c
18 +++ acpica-unix2-20220331/source/common/dmtbdump1.c
19 @@ -1289,9 +1289,10 @@ AcpiDmDumpFpdt (
20  {
21      ACPI_STATUS             Status;
22      ACPI_FPDT_HEADER        *Subtable;
23 -    UINT32                  Length = Table->Length;
24 +    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
25      UINT32                  Offset = sizeof (ACPI_TABLE_FPDT);
26      ACPI_DMTABLE_INFO       *InfoTable;
27 +    UINT16                  SubtableType;
28  
29  
30      /* There is no main table (other than the standard ACPI header) */
31 @@ -1299,19 +1300,20 @@ AcpiDmDumpFpdt (
32      /* Subtables */
33  
34      Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset);
35 -    while (Offset < Table->Length)
36 +    while (Offset < TableLength)
37      {
38          /* Common subtable header */
39  
40          AcpiOsPrintf ("\n");
41 -        Status = AcpiDmDumpTable (Length, Offset, Subtable,
42 +        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
43              Subtable->Length, AcpiDmTableInfoFpdtHdr);
44          if (ACPI_FAILURE (Status))
45          {
46              return;
47          }
48  
49 -        switch (Subtable->Type)
50 +        SubtableType = AcpiUtReadUint16 (&Subtable->Type);
51 +        switch (SubtableType)
52          {
53          case ACPI_FPDT_TYPE_BOOT:
54  
55 @@ -1338,7 +1340,7 @@ AcpiDmDumpFpdt (
56              goto NextSubtable;
57          }
58  
59 -        Status = AcpiDmDumpTable (Length, Offset, Subtable,
60 +        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
61              Subtable->Length, InfoTable);
62          if (ACPI_FAILURE (Status))
63          {
64 Index: acpica-unix2-20220331/source/compiler/dttable1.c
65 ===================================================================
66 --- acpica-unix2-20220331.orig/source/compiler/dttable1.c
67 +++ acpica-unix2-20220331/source/compiler/dttable1.c
68 @@ -1493,6 +1493,7 @@ DtCompileFpdt (
69      ACPI_DMTABLE_INFO       *InfoTable;
70      DT_FIELD                **PFieldList = (DT_FIELD **) List;
71      DT_FIELD                *SubtableStart;
72 +    UINT16                  SubtableType;
73  
74  
75      while (*PFieldList)
76 @@ -1511,7 +1512,8 @@ DtCompileFpdt (
77  
78          FpdtHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer);
79  
80 -        switch (FpdtHeader->Type)
81 +        SubtableType = AcpiUtReadUint16 (&FpdtHeader->Type);
82 +        switch (SubtableType)
83          {
84          case ACPI_FPDT_TYPE_BOOT:
85  
This page took 0.035643 seconds and 3 git commands to generate.