Fix big-endian related prmt.asl compiler errors

Bugzilla: https://bugzilla.redhat.com/2065349

Running 'iasl -T prmt ; iasl prmt.asl' results in the compilation aborting due
to parser-detected syntax errors, which are big-endian related. This only
occurs on s390x systems.

Resolves: rhbz#2065349

Signed-off-by: Dean Nelson <dnelson@redhat.com>

---
This commit is contained in:
Dean Nelson 2022-10-03 12:23:58 -05:00
parent a9069d4ba2
commit 769eed98e3
2 changed files with 26 additions and 2 deletions

View File

@ -2,7 +2,8 @@ Signed-off-by: Dean Nelson <dnelson@redhat.com>
Reviewed-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump2.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
source/compiler/dttable2.c | 4 ++--
2 files changed, 8 insertions(+), 7 deletions(-)
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
===================================================================
@ -49,3 +50,25 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c
sizeof (ACPI_PRMT_HANDLER_INFO), AcpiDmTableInfoPrmtHandler);
CurrentOffset += sizeof (ACPI_PRMT_HANDLER_INFO);
Index: acpica-unix2-20210604/source/compiler/dttable2.c
===================================================================
--- acpica-unix2-20210604.orig/source/compiler/dttable2.c
+++ acpica-unix2-20210604/source/compiler/dttable2.c
@@ -1278,7 +1278,7 @@ DtCompilePrmt (
DtInsertSubtable (ParentTable, Subtable);
PrmtHeader = ACPI_CAST_PTR (ACPI_TABLE_PRMT_HEADER, Subtable->Buffer);
- for (i = 0; i < PrmtHeader->ModuleInfoCount; i++)
+ for (i = 0; i < AcpiUtReadUint32 (&PrmtHeader->ModuleInfoCount); i++)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtModule,
&Subtable);
@@ -1289,7 +1289,7 @@ DtCompilePrmt (
DtInsertSubtable (ParentTable, Subtable);
PrmtModuleInfo = ACPI_CAST_PTR (ACPI_PRMT_MODULE_INFO, Subtable->Buffer);
- for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; j++)
+ for (j = 0; j < AcpiUtReadUint16 (&PrmtModuleInfo->HandlerInfoCount); j++)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoPrmtHandler,
&Subtable);

View File

@ -260,6 +260,7 @@ fi
%changelog
* Mon Oct 03 2022 Dean Nelson <dnelson@redhat.com> - 20210604-4
- Add in big-endian patches for PRMT, RGRT and SVKL tables.
- Fix big-endian related prmt.asl compiler errors.
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 20210604-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags