]> git.pld-linux.org Git - packages/acpica.git/blame - 0033-Support-TCPA-in-a-big-endian-world.patch
- updated to 20220331 + current Fedora patch set; acpinames is gone
[packages/acpica.git] / 0033-Support-TCPA-in-a-big-endian-world.patch
CommitLineData
b643ab7e
JB
1From b69b833f5a9205080b27d83379a31fad7fca1575 Mon Sep 17 00:00:00 2001
2From: Al Stone <ahs3@redhat.com>
3Date: Sun, 27 Sep 2020 12:09:28 -0600
4Subject: [PATCH 33/45] Support TCPA in a big-endian world
5
6Signed-off-by: Al Stone <ahs3@redhat.com>
7---
8 source/common/dmtbdump3.c | 13 ++++++++-----
9 source/compiler/dttable2.c | 4 +++-
10 2 files changed, 11 insertions(+), 6 deletions(-)
11
12Index: acpica-unix2-20220331/source/common/dmtbdump3.c
13===================================================================
14--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c
15+++ acpica-unix2-20220331/source/common/dmtbdump3.c
16@@ -406,11 +406,13 @@ AcpiDmDumpTcpa (
17 ACPI_TABLE_TCPA_HDR *Subtable = ACPI_ADD_PTR (
18 ACPI_TABLE_TCPA_HDR, Table, Offset);
19 ACPI_STATUS Status;
20+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
21+ UINT16 PlatformClass;
22
23
24 /* Main table */
25
26- Status = AcpiDmDumpTable (Table->Length, 0, Table,
27+ Status = AcpiDmDumpTable (TableLength, 0, Table,
28 0, AcpiDmTableInfoTcpaHdr);
29 if (ACPI_FAILURE (Status))
30 {
31@@ -421,18 +423,19 @@ AcpiDmDumpTcpa (
32 * Examine the PlatformClass field to determine the table type.
33 * Either a client or server table. Only one.
34 */
35- switch (CommonHeader->PlatformClass)
36+ PlatformClass = AcpiUtReadUint16 (&CommonHeader->PlatformClass);
37+ switch (PlatformClass)
38 {
39 case ACPI_TCPA_CLIENT_TABLE:
40
41- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
42+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
43 Table->Length - Offset, AcpiDmTableInfoTcpaClient);
44 break;
45
46 case ACPI_TCPA_SERVER_TABLE:
47
48- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
49- Table->Length - Offset, AcpiDmTableInfoTcpaServer);
50+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
51+ TableLength - Offset, AcpiDmTableInfoTcpaServer);
52 break;
53
54 default:
55Index: acpica-unix2-20220331/source/compiler/dttable2.c
56===================================================================
57--- acpica-unix2-20220331.orig/source/compiler/dttable2.c
58+++ acpica-unix2-20220331/source/compiler/dttable2.c
59@@ -2540,6 +2540,7 @@ DtCompileTcpa (
60 ACPI_TABLE_TCPA_HDR *TcpaHeader;
61 DT_SUBTABLE *ParentTable;
62 ACPI_STATUS Status;
63+ UINT16 PlatformClass;
64
65
66 /* Compile the main table */
67@@ -2560,7 +2561,8 @@ DtCompileTcpa (
68 */
69 TcpaHeader = ACPI_CAST_PTR (ACPI_TABLE_TCPA_HDR, ParentTable->Buffer);
70
71- switch (TcpaHeader->PlatformClass)
72+ PlatformClass = AcpiUtReadUint16 (&TcpaHeader->PlatformClass);
73+ switch (PlatformClass)
74 {
75 case ACPI_TCPA_CLIENT_TABLE:
76
This page took 0.066855 seconds and 4 git commands to generate.