80dc240519
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/acpica-tools.git#defe2b64332fc44bf9915c8f57d2614c529cdb43
76 lines
2.5 KiB
Diff
76 lines
2.5 KiB
Diff
From 1104928443b11ff1c0446ed1604882c0e6ae4dc1 Mon Sep 17 00:00:00 2001
|
|
From: Al Stone <ahs3@redhat.com>
|
|
Date: Wed, 23 Sep 2020 11:54:49 -0600
|
|
Subject: [PATCH 16/40] Support HEST in a big-endian world
|
|
|
|
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(-)
|
|
|
|
Index: acpica-unix2-20200925/source/common/dmtbdump1.c
|
|
===================================================================
|
|
--- acpica-unix2-20200925.orig/source/common/dmtbdump1.c
|
|
+++ acpica-unix2-20200925/source/common/dmtbdump1.c
|
|
@@ -1138,12 +1138,13 @@ AcpiDmDumpHest (
|
|
{
|
|
ACPI_STATUS Status;
|
|
ACPI_HEST_HEADER *Subtable;
|
|
- UINT32 Length = Table->Length;
|
|
+ UINT32 Length = AcpiUtReadUint32(&Table->Length);
|
|
UINT32 Offset = sizeof (ACPI_TABLE_HEST);
|
|
ACPI_DMTABLE_INFO *InfoTable;
|
|
UINT32 SubtableLength;
|
|
UINT32 BankCount;
|
|
ACPI_HEST_IA_ERROR_BANK *BankTable;
|
|
+ UINT16 SubtableType;
|
|
|
|
|
|
/* Main table */
|
|
@@ -1157,10 +1158,11 @@ AcpiDmDumpHest (
|
|
/* Subtables */
|
|
|
|
Subtable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset);
|
|
- while (Offset < Table->Length)
|
|
+ while (Offset < Length)
|
|
{
|
|
BankCount = 0;
|
|
- switch (Subtable->Type)
|
|
+ SubtableType = Subtable->Type;
|
|
+ switch (SubtableType)
|
|
{
|
|
case ACPI_HEST_TYPE_IA32_CHECK:
|
|
|
|
@@ -1227,7 +1229,7 @@ AcpiDmDumpHest (
|
|
/* Cannot continue on unknown type - no length */
|
|
|
|
AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n",
|
|
- Subtable->Type);
|
|
+ SubtableType);
|
|
return;
|
|
}
|
|
|
|
Index: acpica-unix2-20200925/source/compiler/dttable1.c
|
|
===================================================================
|
|
--- acpica-unix2-20200925.orig/source/compiler/dttable1.c
|
|
+++ acpica-unix2-20200925/source/compiler/dttable1.c
|
|
@@ -1133,6 +1133,7 @@ DtCompileHest (
|
|
DT_FIELD *SubtableStart;
|
|
ACPI_DMTABLE_INFO *InfoTable;
|
|
UINT16 Type;
|
|
+ UINT16 Tmp16;
|
|
UINT32 BankCount;
|
|
|
|
|
|
@@ -1151,7 +1152,8 @@ DtCompileHest (
|
|
/* Get subtable type */
|
|
|
|
SubtableStart = *PFieldList;
|
|
- DtCompileInteger ((UINT8 *) &Type, *PFieldList, 2, 0);
|
|
+ DtCompileInteger ((UINT8 *) &Tmp16, *PFieldList, 2, 0);
|
|
+ Type = AcpiUtReadUint32(&Tmp16);
|
|
|
|
switch (Type)
|
|
{
|