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