|
|
9897bb |
From 6b73a4881e436bb8cf86c05c1cc4b5360efe1c7f Mon Sep 17 00:00:00 2001
|
|
|
9897bb |
From: Al Stone <ahs3@redhat.com>
|
|
|
9897bb |
Date: Wed, 23 Sep 2020 11:54:49 -0600
|
|
|
9897bb |
Subject: [PATCH 19/45] Support HEST in a big-endian world
|
|
|
9897bb |
|
|
|
9897bb |
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
9897bb |
---
|
|
|
9897bb |
source/common/dmtbdump1.c | 10 ++++++----
|
|
|
9897bb |
source/compiler/dttable1.c | 4 +++-
|
|
|
9897bb |
2 files changed, 9 insertions(+), 5 deletions(-)
|
|
|
9897bb |
|
|
|
9897bb |
Index: acpica-unix2-20210604/source/common/dmtbdump1.c
|
|
|
9897bb |
===================================================================
|
|
|
9897bb |
--- acpica-unix2-20210604.orig/source/common/dmtbdump1.c
|
|
|
9897bb |
+++ acpica-unix2-20210604/source/common/dmtbdump1.c
|
|
|
9897bb |
@@ -1216,12 +1216,13 @@ AcpiDmDumpHest (
|
|
|
9897bb |
{
|
|
|
9897bb |
ACPI_STATUS Status;
|
|
|
9897bb |
ACPI_HEST_HEADER *Subtable;
|
|
|
9897bb |
- UINT32 Length = Table->Length;
|
|
|
9897bb |
+ UINT32 Length = AcpiUtReadUint32 (&Table->Length);
|
|
|
9897bb |
UINT32 Offset = sizeof (ACPI_TABLE_HEST);
|
|
|
9897bb |
ACPI_DMTABLE_INFO *InfoTable;
|
|
|
9897bb |
UINT32 SubtableLength;
|
|
|
9897bb |
UINT32 BankCount;
|
|
|
9897bb |
ACPI_HEST_IA_ERROR_BANK *BankTable;
|
|
|
9897bb |
+ UINT16 SubtableType;
|
|
|
9897bb |
|
|
|
9897bb |
|
|
|
9897bb |
/* Main table */
|
|
|
9897bb |
@@ -1235,10 +1236,11 @@ AcpiDmDumpHest (
|
|
|
9897bb |
/* Subtables */
|
|
|
9897bb |
|
|
|
9897bb |
Subtable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset);
|
|
|
9897bb |
- while (Offset < Table->Length)
|
|
|
9897bb |
+ while (Offset < Length)
|
|
|
9897bb |
{
|
|
|
9897bb |
BankCount = 0;
|
|
|
9897bb |
- switch (Subtable->Type)
|
|
|
9897bb |
+ SubtableType = Subtable->Type;
|
|
|
9897bb |
+ switch (SubtableType)
|
|
|
9897bb |
{
|
|
|
9897bb |
case ACPI_HEST_TYPE_IA32_CHECK:
|
|
|
9897bb |
|
|
|
9897bb |
@@ -1305,7 +1307,7 @@ AcpiDmDumpHest (
|
|
|
9897bb |
/* Cannot continue on unknown type - no length */
|
|
|
9897bb |
|
|
|
9897bb |
AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n",
|
|
|
9897bb |
- Subtable->Type);
|
|
|
9897bb |
+ SubtableType);
|
|
|
9897bb |
return;
|
|
|
9897bb |
}
|
|
|
9897bb |
|
|
|
9897bb |
Index: acpica-unix2-20210604/source/compiler/dttable1.c
|
|
|
9897bb |
===================================================================
|
|
|
9897bb |
--- acpica-unix2-20210604.orig/source/compiler/dttable1.c
|
|
|
9897bb |
+++ acpica-unix2-20210604/source/compiler/dttable1.c
|
|
|
9897bb |
@@ -1207,6 +1207,7 @@ DtCompileHest (
|
|
|
9897bb |
DT_FIELD *SubtableStart;
|
|
|
9897bb |
ACPI_DMTABLE_INFO *InfoTable;
|
|
|
9897bb |
UINT16 Type;
|
|
|
9897bb |
+ UINT16 Tmp16;
|
|
|
9897bb |
UINT32 BankCount;
|
|
|
9897bb |
|
|
|
9897bb |
|
|
|
9897bb |
@@ -1225,7 +1226,8 @@ DtCompileHest (
|
|
|
9897bb |
/* Get subtable type */
|
|
|
9897bb |
|
|
|
9897bb |
SubtableStart = *PFieldList;
|
|
|
9897bb |
- DtCompileInteger ((UINT8 *) &Type, *PFieldList, 2, 0);
|
|
|
9897bb |
+ DtCompileInteger ((UINT8 *) &Tmp16, *PFieldList, 2, 0);
|
|
|
9897bb |
+ Type = AcpiUtReadUint32 (&Tmp16);
|
|
|
9897bb |
|
|
|
9897bb |
switch (Type)
|
|
|
9897bb |
{
|