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>
This commit is contained in:
parent
9f9752a432
commit
a9069d4ba2
51
0047-Support-PRMT-in-a-big-endian-world.patch
Normal file
51
0047-Support-PRMT-in-a-big-endian-world.patch
Normal file
@ -0,0 +1,51 @@
|
||||
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(-)
|
||||
|
||||
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
|
||||
===================================================================
|
||||
--- acpica-unix2-20210604.orig/source/common/dmtbdump2.c
|
||||
+++ acpica-unix2-20210604/source/common/dmtbdump2.c
|
||||
@@ -1959,13 +1959,14 @@ AcpiDmDumpPrmt (
|
||||
ACPI_PRMT_MODULE_INFO *PrmtModuleInfo;
|
||||
ACPI_PRMT_HANDLER_INFO *PrmtHandlerInfo;
|
||||
ACPI_STATUS Status;
|
||||
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
||||
UINT32 i, j;
|
||||
|
||||
|
||||
/* Main table header */
|
||||
|
||||
PrmtHeader = ACPI_ADD_PTR (ACPI_TABLE_PRMT_HEADER, Table, CurrentOffset);
|
||||
- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHeader,
|
||||
+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, PrmtHeader,
|
||||
sizeof (ACPI_TABLE_PRMT_HEADER), AcpiDmTableInfoPrmtHdr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@@ -1977,20 +1978,20 @@ AcpiDmDumpPrmt (
|
||||
|
||||
/* PRM Module Information Structure array */
|
||||
|
||||
- for (i = 0; i < PrmtHeader->ModuleInfoCount; ++i)
|
||||
+ for (i = 0; i < AcpiUtReadUint32 (&PrmtHeader->ModuleInfoCount); ++i)
|
||||
{
|
||||
PrmtModuleInfo = ACPI_ADD_PTR (ACPI_PRMT_MODULE_INFO, Table, CurrentOffset);
|
||||
- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtModuleInfo,
|
||||
+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, PrmtModuleInfo,
|
||||
sizeof (ACPI_PRMT_MODULE_INFO), AcpiDmTableInfoPrmtModule);
|
||||
|
||||
CurrentOffset += sizeof (ACPI_PRMT_MODULE_INFO);
|
||||
|
||||
/* PRM handler information structure array */
|
||||
|
||||
- for (j = 0; j < PrmtModuleInfo->HandlerInfoCount; ++j)
|
||||
+ for (j = 0; j < AcpiUtReadUint16 (&PrmtModuleInfo->HandlerInfoCount); ++j)
|
||||
{
|
||||
PrmtHandlerInfo = ACPI_ADD_PTR (ACPI_PRMT_HANDLER_INFO, Table, CurrentOffset);
|
||||
- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, PrmtHandlerInfo,
|
||||
+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, PrmtHandlerInfo,
|
||||
sizeof (ACPI_PRMT_HANDLER_INFO), AcpiDmTableInfoPrmtHandler);
|
||||
|
||||
CurrentOffset += sizeof (ACPI_PRMT_HANDLER_INFO);
|
35
0048-Support-RGRT-in-a-big-endian-world.patch
Normal file
35
0048-Support-RGRT-in-a-big-endian-world.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Signed-off-by: Dean Nelson <dnelson@redhat.com>
|
||||
Reviewed-by: Al Stone <ahs3@redhat.com>
|
||||
---
|
||||
source/common/dmtbdump2.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
|
||||
===================================================================
|
||||
--- acpica-unix2-20210604.orig/source/common/dmtbdump2.c
|
||||
+++ acpica-unix2-20210604/source/common/dmtbdump2.c
|
||||
@@ -2019,11 +2019,12 @@ AcpiDmDumpRgrt (
|
||||
ACPI_STATUS Status;
|
||||
ACPI_TABLE_RGRT *Subtable = ACPI_CAST_PTR (ACPI_TABLE_RGRT, Table);
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_RGRT);
|
||||
+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length);
|
||||
|
||||
|
||||
/* Main table */
|
||||
|
||||
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoRgrt);
|
||||
+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoRgrt);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
@@ -2031,8 +2032,8 @@ AcpiDmDumpRgrt (
|
||||
|
||||
/* Dump the binary image as a subtable */
|
||||
|
||||
- Status = AcpiDmDumpTable (Table->Length, Offset, &Subtable->Image,
|
||||
- Table->Length - Offset, AcpiDmTableInfoRgrt0);
|
||||
+ Status = AcpiDmDumpTable (TableLength, Offset, &Subtable->Image,
|
||||
+ TableLength - Offset, AcpiDmTableInfoRgrt0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
42
0049-Support-SVKL-in-a-big-endian-world.patch
Normal file
42
0049-Support-SVKL-in-a-big-endian-world.patch
Normal file
@ -0,0 +1,42 @@
|
||||
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))
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
Name: acpica-tools
|
||||
Version: 20210604
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: ACPICA tools for the development and debug of ACPI tables
|
||||
|
||||
License: GPLv2
|
||||
@ -70,6 +70,9 @@ Patch42: 0043-Support-DSDT-SSDT-in-a-big-endian-world.patch
|
||||
Patch43: 0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch
|
||||
Patch44: 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch
|
||||
Patch45: 0046-Support-PHAT-in-a-big-endian-world.patch
|
||||
Patch46: 0047-Support-PRMT-in-a-big-endian-world.patch
|
||||
Patch47: 0048-Support-RGRT-in-a-big-endian-world.patch
|
||||
Patch48: 0049-Support-SVKL-in-a-big-endian-world.patch
|
||||
|
||||
# other miscellaneous patches
|
||||
Patch100: unaligned.patch
|
||||
@ -255,6 +258,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 03 2022 Dean Nelson <dnelson@redhat.com> - 20210604-4
|
||||
- Add in big-endian patches for PRMT, RGRT and SVKL tables.
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 20210604-3
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
Loading…
Reference in New Issue
Block a user