acpica-tools/0049-Support-SVKL-in-a-big-endian-world.patch
Dean Nelson a9069d4ba2 Backport big-endian patches for PRMT, RGRT, and SVKL
Bugzilla: https://bugzilla.redhat.com/2065349
Upstream Status: https://src.fedoraproject.org/rpms/acpica-tools.git
Conflicts: Partial backport of only big-endian patches for PRMT, RGRT, and SVKL
           tables. This required some adjustments since RHEL-9 is based on
           acpica release 20210604, whereas Fedora is based on 20220331.

commit fc3eef63e8
Author: Al Stone <ahs3@redhat.com>
Date:   Sun Apr 3 15:18:02 2022 -0600

    Update to 20220331 upstream sources

    This includes new source tarballs, updated patches, and updated
    expected results for test cases.  In addition, three new tables
    (PRMT, RGRT and SVKL) now have big-endian support.

    Signed-off-by: Al Stone <ahs3@redhat.com>

Resolves: rhbz#2065349

Signed-off-by: Dean Nelson <dnelson@redhat.com>
2022-10-03 12:18:22 -05:00

43 lines
1.5 KiB
Diff

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Reviewed-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump3.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
===================================================================
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
@@ -339,14 +339,14 @@ AcpiDmDumpSvkl (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
- UINT32 Length = Table->Length;
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
UINT32 Offset = sizeof (ACPI_TABLE_SVKL);
ACPI_SVKL_KEY *Subtable;
/* Main table */
- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSvkl);
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSvkl);
if (ACPI_FAILURE (Status))
{
return;
@@ -355,12 +355,12 @@ AcpiDmDumpSvkl (
/* The rest of the table consists of subtables (single type) */
Subtable = ACPI_ADD_PTR (ACPI_SVKL_KEY, Table, Offset);
- while (Offset < Table->Length)
+ while (Offset < TableLength)
{
/* Dump the subtable */
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
sizeof (ACPI_SVKL_KEY), AcpiDmTableInfoSvkl0);
if (ACPI_FAILURE (Status))
{