From d9b84e63e09e25f6c132be385bae519592faf20e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 12:18:32 +0000 Subject: [PATCH 01/28] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 7f8779a500b0362f11bbd0142427709ae8720b28 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 17:13:39 +0000 Subject: [PATCH 02/28] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 1ba9b54..23d867a 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20210604 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -254,6 +254,9 @@ fi %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 20210604-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Sun Jul 11 2021 Al Stone - 20210604-1 - Update to 20210604 source tree (please note that tarballs for versions between 20200925 and 20210604 have been uploaded for archival reasons From 3ccfccfec1fe9280ae17e878fe817a69dfa886f5 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Tue, 27 Jul 2021 16:47:53 -0600 Subject: [PATCH 03/28] Running 'iasl -T all' would segfault Dumping all the templates worked fine until the PHAT dump, which caused the segfault; removing extraneous assignments from big-endian patch for the table fixes the problem. Signed-off-by: Al Stone --- 0046-Support-PHAT-in-a-big-endian-world.patch | 15 +++++++-------- acpica-tools.spec | 6 +++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/0046-Support-PHAT-in-a-big-endian-world.patch b/0046-Support-PHAT-in-a-big-endian-world.patch index 973286b..011e519 100644 --- a/0046-Support-PHAT-in-a-big-endian-world.patch +++ b/0046-Support-PHAT-in-a-big-endian-world.patch @@ -13,14 +13,15 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c =================================================================== --- acpica-unix2-20210604.orig/source/common/dmtbdump2.c +++ acpica-unix2-20210604/source/common/dmtbdump2.c -@@ -1573,39 +1573,43 @@ AcpiDmDumpPhat ( +@@ -1573,39 +1573,41 @@ AcpiDmDumpPhat ( ACPI_PHAT_HEADER *Subtable; ACPI_PHAT_VERSION_DATA *VersionData; UINT32 RecordCount; - UINT32 Length = Table->Length; + UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); UINT32 Offset = sizeof (ACPI_TABLE_PHAT); - UINT32 SubtableLength; +- UINT32 SubtableLength; ++ UINT16 SubtableLength; UINT32 PathLength; UINT32 VendorLength; + UINT16 SubtableType; @@ -34,9 +35,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c /* Common subtable header */ + SubtableType = AcpiUtReadUint16 (&Subtable->Type); -+ Subtable->Type = SubtableType; + SubtableLength = AcpiUtReadUint16 (&Subtable->Length); -+ Subtable->Length = SubtableLength; + AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, 0, Subtable, @@ -63,7 +62,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c break; default: -@@ -1616,22 +1620,22 @@ AcpiDmDumpPhat ( +@@ -1616,22 +1618,22 @@ AcpiDmDumpPhat ( return; } @@ -90,7 +89,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)), sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a); if (ACPI_FAILURE (Status)) -@@ -1649,7 +1653,7 @@ AcpiDmDumpPhat ( +@@ -1649,7 +1651,7 @@ AcpiDmDumpPhat ( /* account for the null terminator */ PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1; @@ -99,7 +98,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)), PathLength, AcpiDmTableInfoPhat1a); if (ACPI_FAILURE (Status)) -@@ -1660,8 +1664,8 @@ AcpiDmDumpPhat ( +@@ -1660,8 +1662,8 @@ AcpiDmDumpPhat ( /* Get vendor data - data length is the remaining subtable length */ VendorLength = @@ -110,7 +109,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength), VendorLength, AcpiDmTableInfoPhat1b); if (ACPI_FAILURE (Status)) -@@ -1673,15 +1677,15 @@ AcpiDmDumpPhat ( +@@ -1673,15 +1675,15 @@ AcpiDmDumpPhat ( default: AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n", diff --git a/acpica-tools.spec b/acpica-tools.spec index 23d867a..be43d74 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20210604 -Release: 2%{?dist} +Release: 3%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -254,6 +254,10 @@ fi %changelog +* Tue Jul 27 2021 Al Stone - 20210604-3 +- Running 'iasl -T all' would segfault when dumping the PHAT template; + fixed AcpiDmDumpPhat() by removing unnecessary assignments from patch + * Wed Jul 21 2021 Fedora Release Engineering - 20210604-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 22a74012102aab80414b3c879322b6b3f2745315 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Tue, 27 Jul 2021 18:04:30 -0600 Subject: [PATCH 04/28] Fix WPBT processing of zero-length argument lists Signed-off-by: Al Stone --- acpica-tools.spec | 2 + wpbt-unicode.patch | 196 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 wpbt-unicode.patch diff --git a/acpica-tools.spec b/acpica-tools.spec index be43d74..f0db397 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -89,6 +89,7 @@ Patch113: facp.patch Patch114: armv7-str-fixes.patch Patch115: dbtest.patch Patch116: ull-32bit.patch +Patch117: wpbt-unicode.patch BuildRequires: make BuildRequires: bison patchutils flex gcc @@ -257,6 +258,7 @@ fi * Tue Jul 27 2021 Al Stone - 20210604-3 - Running 'iasl -T all' would segfault when dumping the PHAT template; fixed AcpiDmDumpPhat() by removing unnecessary assignments from patch +- Borrowed a patch from upstream to fix Unicode usage in WPBTs * Wed Jul 21 2021 Fedora Release Engineering - 20210604-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/wpbt-unicode.patch b/wpbt-unicode.patch new file mode 100644 index 0000000..1d9c38d --- /dev/null +++ b/wpbt-unicode.patch @@ -0,0 +1,196 @@ +Index: acpica-unix2-20210604/source/common/dmtable.c +=================================================================== +--- acpica-unix2-20210604.orig/source/common/dmtable.c ++++ acpica-unix2-20210604/source/common/dmtable.c +@@ -979,6 +979,12 @@ AcpiDmDumpTable ( + ByteLength = 128; + break; + ++ case ACPI_DMT_WPBT_UNICODE: ++ ++ ByteLength = SubtableLength; ++ CurrentOffset = sizeof (ACPI_TABLE_WPBT); ++ break; ++ + case ACPI_DMT_UNICODE: + case ACPI_DMT_BUFFER: + case ACPI_DMT_RAW_BUFFER: +@@ -1596,6 +1602,7 @@ AcpiDmDumpTable ( + break; + + case ACPI_DMT_UNICODE: ++ case ACPI_DMT_WPBT_UNICODE: + + if (ByteLength == 0) + { +Index: acpica-unix2-20210604/source/common/dmtbdump3.c +=================================================================== +--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210604/source/common/dmtbdump3.c +@@ -753,8 +753,11 @@ AcpiDmDumpWpbt ( + Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); + ArgumentsLength = AcpiUtReadUint16 (&Subtable->ArgumentsLength); + +- /* Dump the arguments buffer */ ++ /* Dump the arguments buffer if present */ + +- (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength, +- AcpiDmTableInfoWpbt0); ++ if (ArgumentsLength) ++ { ++ (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength, ++ AcpiDmTableInfoWpbt0); ++ } + } +Index: acpica-unix2-20210604/source/common/dmtbinfo3.c +=================================================================== +--- acpica-unix2-20210604.orig/source/common/dmtbinfo3.c ++++ acpica-unix2-20210604/source/common/dmtbinfo3.c +@@ -651,7 +651,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI + + ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] = + { +- {ACPI_DMT_UNICODE, sizeof (ACPI_TABLE_WPBT), "Command-line Arguments", 0}, ++ {ACPI_DMT_WPBT_UNICODE, ACPI_WPBT2_OFFSET (UnicodeString), "Command-line Arguments", DT_DESCRIBES_OPTIONAL}, + ACPI_DMT_TERMINATOR + }; + +Index: acpica-unix2-20210604/source/compiler/dttable2.c +=================================================================== +--- acpica-unix2-20210604.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210604/source/compiler/dttable2.c +@@ -2615,13 +2615,11 @@ DtCompileWpbt ( + DT_SUBTABLE *ParentTable; + ACPI_TABLE_WPBT *Table; + ACPI_STATUS Status; +- UINT16 Length; + + + /* Compile the main table */ + +- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, +- &Subtable); ++ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); +@@ -2629,11 +2627,23 @@ DtCompileWpbt ( + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); ++ Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); ++ ++ /* ++ * Exit now if there are no arguments specified. This is indicated by: ++ * The "Command-line Arguments" field has not been specified (if specified, ++ * it will be the last field in the field list -- after the main table). ++ * Set the Argument Length in the main table to zero. ++ */ ++ if (!*PFieldList) ++ { ++ Table->ArgumentsLength = 0; ++ return (AE_OK); ++ } + + /* Compile the argument list subtable */ + +- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, +- &Subtable); ++ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); +@@ -2641,12 +2651,8 @@ DtCompileWpbt ( + + /* Extract the length of the Arguments buffer, insert into main table */ + +- AcpiUtWriteUint (&Length, sizeof (UINT16), ++ AcpiUtWriteUint (&Table->ArgumentsLength, sizeof (UINT16), + &Subtable->TotalLength, sizeof (UINT32)); +- Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); +- Table->ArgumentsLength = AcpiUtReadUint16 (&Length); +- +- ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + return (AE_OK); + } +Index: acpica-unix2-20210604/source/compiler/dtutils.c +=================================================================== +--- acpica-unix2-20210604.orig/source/compiler/dtutils.c ++++ acpica-unix2-20210604/source/compiler/dtutils.c +@@ -344,6 +344,7 @@ DtGetFieldType ( + break; + + case ACPI_DMT_UNICODE: ++ case ACPI_DMT_WPBT_UNICODE: + + Type = DT_FIELD_TYPE_UNICODE; + break; +@@ -626,12 +627,13 @@ DtGetFieldLength ( + break; + + case ACPI_DMT_UNICODE: ++ case ACPI_DMT_WPBT_UNICODE: + + Value = DtGetFieldValue (Field); + + /* TBD: error if Value is NULL? (as below?) */ + +- ByteLength = (strlen (Value) + 1) * sizeof(UINT16); ++ ByteLength = (strlen (Value) + 1) * sizeof (UINT16); + break; + + default: +Index: acpica-unix2-20210604/source/include/acdisasm.h +=================================================================== +--- acpica-unix2-20210604.orig/source/include/acdisasm.h ++++ acpica-unix2-20210604/source/include/acdisasm.h +@@ -175,6 +175,7 @@ typedef enum + ACPI_DMT_SRAT, + ACPI_DMT_TPM2, + ACPI_DMT_VIOT, ++ ACPI_DMT_WPBT_UNICODE, + + /* Special opcodes */ + +Index: acpica-unix2-20210604/source/include/actbinfo.h +=================================================================== +--- acpica-unix2-20210604.orig/source/include/actbinfo.h ++++ acpica-unix2-20210604/source/include/actbinfo.h +@@ -97,6 +97,7 @@ + #define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f) + #define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f) + #define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f) ++#define ACPI_WPBT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WPBT_UNICODE,f) + #define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f) + #define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f) + +Index: acpica-unix2-20210604/source/include/actbl3.h +=================================================================== +--- acpica-unix2-20210604.orig/source/include/actbl3.h ++++ acpica-unix2-20210604/source/include/actbl3.h +@@ -847,6 +847,12 @@ typedef struct acpi_table_wpbt + + } ACPI_TABLE_WPBT; + ++typedef struct acpi_wpbt_unicode ++{ ++ UINT16 *UnicodeString; ++ ++} ACPI_WPBT_UNICODE; ++ + + /******************************************************************************* + * +Index: acpica-unix2-20210604/source/tools/acpisrc/astable.c +=================================================================== +--- acpica-unix2-20210604.orig/source/tools/acpisrc/astable.c ++++ acpica-unix2-20210604/source/tools/acpisrc/astable.c +@@ -772,6 +772,7 @@ ACPI_TYPED_IDENTIFIER_TABLE Ac + {"ACPI_VIOT_VIRTIO_IOMMU_PCI", SRC_TYPE_STRUCT}, + {"ACPI_VIOT_VIRTIO_IOMMU_MMIO", SRC_TYPE_STRUCT}, + {"ACPI_WDAT_ENTRY", SRC_TYPE_STRUCT}, ++ {"ACPI_WPBT_UNICODE", SRC_TYPE_STRUCT}, + + /* Data Table compiler */ + From 6c32bdbf156a78eaf002e49028ad5be05ca672dc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 20:53:44 +0000 Subject: [PATCH 05/28] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index f0db397..07e7481 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -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 @@ -255,6 +255,9 @@ fi %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 20210604-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Jul 27 2021 Al Stone - 20210604-3 - Running 'iasl -T all' would segfault when dumping the PHAT template; fixed AcpiDmDumpPhat() by removing unnecessary assignments from patch From 5a8256ff737606227881bdb755b4a70ffca60f7d Mon Sep 17 00:00:00 2001 From: Al Stone Date: Wed, 9 Mar 2022 19:45:13 -0700 Subject: [PATCH 06/28] Update the patches so they apply Signed-off-by: Al Stone --- .gitignore | 2 + ...nfrastructure-for-big-endian-support.patch | 70 +++---- ...lity-functions-to-be-endian-agnostic.patch | 38 ++-- ...able-header-content-in-human-readabl.patch | 6 +- ...able-support-for-big-endian-machines.patch | 12 +- ...n-ness-problem-when-converting-ASL-t.patch | 6 +- ...e-ACPI_COPY_NAMSEG-in-GPE-name-check.patch | 6 +- ...ing-Unicode-properly-when-big-endian.patch | 6 +- ...-MADT-aka-APIC-in-a-big-endian-world.patch | 6 +- ...ort-ASF-tables-in-a-big-endian-world.patch | 12 +- ...rt-CPEP-tables-in-a-big-endian-world.patch | 10 +- ...ort-DBG2-table-in-a-big-endian-world.patch | 50 ++--- 0012-Support-DMAR-in-a-big-endian-world.patch | 42 ++-- 0013-Support-DRTM-in-a-big-endian-world.patch | 28 +-- 0014-Support-EINJ-in-a-big-endian-world.patch | 10 +- 0015-Support-ERST-in-a-big-endian-world.patch | 10 +- ...-FADT-aka-FACP-in-a-big-endian-world.patch | 12 +- ...ort-most-FPDTs-in-a-big-endian-world.patch | 22 +- 0018-Support-GTDT-in-a-big-endian-world.patch | 20 +- 0019-Support-HEST-in-a-big-endian-world.patch | 22 +- ...t-RSDT-RSD-PTR-in-a-big-endian-world.patch | 6 +- 0021-Support-XSDT-in-a-big-endian-world.patch | 6 +- 0022-Support-SRAT-in-a-big-endian-world.patch | 6 +- 0023-Support-SLIT-in-a-big-endian-world.patch | 12 +- 0024-Support-MSCT-in-a-big-endian-world.patch | 6 +- 0025-Support-MPST-in-a-big-endian-world.patch | 12 +- 0026-Support-NFIT-in-a-big-endian-world.patch | 20 +- 0027-Support-SDEV-in-a-big-endian-world.patch | 12 +- 0028-Support-HMAT-in-a-big-endian-world.patch | 44 ++-- 0029-Support-PDTT-in-a-big-endian-world.patch | 6 +- 0030-Support-PPTT-in-a-big-endian-world.patch | 12 +- 0031-Support-PCCT-in-a-big-endian-world.patch | 6 +- 0032-Support-WDAT-in-a-big-endian-world.patch | 6 +- 0033-Support-TCPA-in-a-big-endian-world.patch | 12 +- 0034-Support-STAO-in-a-big-endian-world.patch | 6 +- ...-SLIC-and-MSDM-in-a-big-endian-world.patch | 6 +- 0036-Support-MCFG-in-a-big-endian-world.patch | 6 +- 0037-Support-LPIT-in-a-big-endian-world.patch | 6 +- 0038-Support-PMTT-in-a-big-endian-world.patch | 6 +- 0039-Support-TPM2-in-a-big-endian-world.patch | 12 +- 0040-Support-S3PT-in-a-big-endian-world.patch | 12 +- 0041-Support-IORT-in-a-big-endian-world.patch | 44 ++-- 0042-Support-IVRS-in-a-big-endian-world.patch | 6 +- ...port-DSDT-SSDT-in-a-big-endian-world.patch | 198 +++++++++--------- ...T-fixed-use-of-optional-ResourceInfo.patch | 34 +-- acpica-tools.spec | 15 +- sources | 4 +- 47 files changed, 458 insertions(+), 453 deletions(-) diff --git a/.gitignore b/.gitignore index 5942001..bd2f67d 100644 --- a/.gitignore +++ b/.gitignore @@ -148,3 +148,5 @@ series /acpica-unix2-20210604.tar_0.gz /acpitests-unix-20210604.tar.gz /acpica-unix2-20210604.tar.gz +/acpica-unix2-20210730.tar.gz +/acpitests-unix-20210730.tar.gz diff --git a/0001-Add-in-basic-infrastructure-for-big-endian-support.patch b/0001-Add-in-basic-infrastructure-for-big-endian-support.patch index 3a667ea..27278a6 100644 --- a/0001-Add-in-basic-infrastructure-for-big-endian-support.patch +++ b/0001-Add-in-basic-infrastructure-for-big-endian-support.patch @@ -35,10 +35,10 @@ Signed-off-by: Al Stone 12 files changed, 275 insertions(+), 87 deletions(-) create mode 100644 source/components/utilities/utendian.c -Index: acpica-unix2-20210604/generate/unix/acpibin/Makefile +Index: acpica-unix2-20210730/generate/unix/acpibin/Makefile =================================================================== ---- acpica-unix2-20210604.orig/generate/unix/acpibin/Makefile -+++ acpica-unix2-20210604/generate/unix/acpibin/Makefile +--- acpica-unix2-20210730.orig/generate/unix/acpibin/Makefile ++++ acpica-unix2-20210730/generate/unix/acpibin/Makefile @@ -37,6 +37,7 @@ OBJECTS = \ $(OBJDIR)/utcache.o\ $(OBJDIR)/utdebug.o\ @@ -47,10 +47,10 @@ Index: acpica-unix2-20210604/generate/unix/acpibin/Makefile $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/utlock.o\ -Index: acpica-unix2-20210604/generate/unix/acpidump/Makefile +Index: acpica-unix2-20210730/generate/unix/acpidump/Makefile =================================================================== ---- acpica-unix2-20210604.orig/generate/unix/acpidump/Makefile -+++ acpica-unix2-20210604/generate/unix/acpidump/Makefile +--- acpica-unix2-20210730.orig/generate/unix/acpidump/Makefile ++++ acpica-unix2-20210730/generate/unix/acpidump/Makefile @@ -36,6 +36,7 @@ OBJECTS = \ $(OBJDIR)/osunixdir.o\ $(OBJDIR)/osunixmap.o\ @@ -59,10 +59,10 @@ Index: acpica-unix2-20210604/generate/unix/acpidump/Makefile $(OBJDIR)/tbprint.o\ $(OBJDIR)/tbxfroot.o\ $(OBJDIR)/utascii.o\ -Index: acpica-unix2-20210604/generate/unix/acpiexamples/Makefile +Index: acpica-unix2-20210730/generate/unix/acpiexamples/Makefile =================================================================== ---- acpica-unix2-20210604.orig/generate/unix/acpiexamples/Makefile -+++ acpica-unix2-20210604/generate/unix/acpiexamples/Makefile +--- acpica-unix2-20210730.orig/generate/unix/acpiexamples/Makefile ++++ acpica-unix2-20210730/generate/unix/acpiexamples/Makefile @@ -139,6 +139,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utdecode.o\ @@ -71,10 +71,10 @@ Index: acpica-unix2-20210604/generate/unix/acpiexamples/Makefile $(OBJDIR)/uterror.o\ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ -Index: acpica-unix2-20210604/generate/unix/acpiexec/Makefile +Index: acpica-unix2-20210730/generate/unix/acpiexec/Makefile =================================================================== ---- acpica-unix2-20210604.orig/generate/unix/acpiexec/Makefile -+++ acpica-unix2-20210604/generate/unix/acpiexec/Makefile +--- acpica-unix2-20210730.orig/generate/unix/acpiexec/Makefile ++++ acpica-unix2-20210730/generate/unix/acpiexec/Makefile @@ -214,6 +214,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utdecode.o\ @@ -83,10 +83,10 @@ Index: acpica-unix2-20210604/generate/unix/acpiexec/Makefile $(OBJDIR)/uterror.o\ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ -Index: acpica-unix2-20210604/generate/unix/acpihelp/Makefile +Index: acpica-unix2-20210730/generate/unix/acpihelp/Makefile =================================================================== ---- acpica-unix2-20210604.orig/generate/unix/acpihelp/Makefile -+++ acpica-unix2-20210604/generate/unix/acpihelp/Makefile +--- acpica-unix2-20210730.orig/generate/unix/acpihelp/Makefile ++++ acpica-unix2-20210730/generate/unix/acpihelp/Makefile @@ -45,6 +45,7 @@ OBJECTS = \ $(OBJDIR)/getopt.o\ $(OBJDIR)/osunixxf.o\ @@ -95,10 +95,10 @@ Index: acpica-unix2-20210604/generate/unix/acpihelp/Makefile $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/uthex.o\ -Index: acpica-unix2-20210604/generate/unix/iasl/Makefile +Index: acpica-unix2-20210730/generate/unix/iasl/Makefile =================================================================== ---- acpica-unix2-20210604.orig/generate/unix/iasl/Makefile -+++ acpica-unix2-20210604/generate/unix/iasl/Makefile +--- acpica-unix2-20210730.orig/generate/unix/iasl/Makefile ++++ acpica-unix2-20210730/generate/unix/iasl/Makefile @@ -225,6 +225,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utdecode.o\ @@ -107,10 +107,10 @@ Index: acpica-unix2-20210604/generate/unix/iasl/Makefile $(OBJDIR)/uterror.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ -Index: acpica-unix2-20210604/source/compiler/aslcompiler.h +Index: acpica-unix2-20210730/source/compiler/aslcompiler.h =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslcompiler.h -+++ acpica-unix2-20210604/source/compiler/aslcompiler.h +--- acpica-unix2-20210730.orig/source/compiler/aslcompiler.h ++++ acpica-unix2-20210730/source/compiler/aslcompiler.h @@ -1120,10 +1120,6 @@ BOOLEAN UtIsIdInteger ( UINT8 *Target); @@ -122,10 +122,10 @@ Index: acpica-unix2-20210604/source/compiler/aslcompiler.h BOOLEAN UtQueryForOverwrite ( char *Pathname); -Index: acpica-unix2-20210604/source/compiler/aslutils.c +Index: acpica-unix2-20210730/source/compiler/aslutils.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslutils.c -+++ acpica-unix2-20210604/source/compiler/aslutils.c +--- acpica-unix2-20210730.orig/source/compiler/aslutils.c ++++ acpica-unix2-20210730/source/compiler/aslutils.c @@ -73,33 +73,6 @@ UtDisplayErrorSummary ( /******************************************************************************* @@ -160,10 +160,10 @@ Index: acpica-unix2-20210604/source/compiler/aslutils.c * FUNCTION: UtIsIdInteger * * PARAMETERS: Pointer to an ACPI ID (HID, CID) string -Index: acpica-unix2-20210604/source/components/utilities/utendian.c +Index: acpica-unix2-20210730/source/components/utilities/utendian.c =================================================================== --- /dev/null -+++ acpica-unix2-20210604/source/components/utilities/utendian.c ++++ acpica-unix2-20210730/source/components/utilities/utendian.c @@ -0,0 +1,236 @@ +/****************************************************************************** + * @@ -401,10 +401,10 @@ Index: acpica-unix2-20210604/source/components/utilities/utendian.c + Dst[ii] = Src[SrcLength - ii - 1]; + +} -Index: acpica-unix2-20210604/source/include/acmacros.h +Index: acpica-unix2-20210730/source/include/acmacros.h =================================================================== ---- acpica-unix2-20210604.orig/source/include/acmacros.h -+++ acpica-unix2-20210604/source/include/acmacros.h +--- acpica-unix2-20210730.orig/source/include/acmacros.h ++++ acpica-unix2-20210730/source/include/acmacros.h @@ -76,61 +76,6 @@ * If the hardware supports the transfer of unaligned data, just do the store. * Otherwise, we have to move one byte at a time. @@ -475,10 +475,10 @@ Index: acpica-unix2-20210604/source/include/acmacros.h /* -Index: acpica-unix2-20210604/source/include/acutils.h +Index: acpica-unix2-20210730/source/include/acutils.h =================================================================== ---- acpica-unix2-20210604.orig/source/include/acutils.h -+++ acpica-unix2-20210604/source/include/acutils.h +--- acpica-unix2-20210730.orig/source/include/acutils.h ++++ acpica-unix2-20210730/source/include/acutils.h @@ -1167,4 +1167,36 @@ AcpiUtConvertUuidToString ( char *OutString); #endif @@ -516,10 +516,10 @@ Index: acpica-unix2-20210604/source/include/acutils.h +#endif + #endif /* _ACUTILS_H */ -Index: acpica-unix2-20210604/source/include/platform/aclinux.h +Index: acpica-unix2-20210730/source/include/platform/aclinux.h =================================================================== ---- acpica-unix2-20210604.orig/source/include/platform/aclinux.h -+++ acpica-unix2-20210604/source/include/platform/aclinux.h +--- acpica-unix2-20210730.orig/source/include/platform/aclinux.h ++++ acpica-unix2-20210730/source/include/platform/aclinux.h @@ -198,6 +198,7 @@ #ifdef ACPI_USE_STANDARD_HEADERS diff --git a/0002-Modify-utility-functions-to-be-endian-agnostic.patch b/0002-Modify-utility-functions-to-be-endian-agnostic.patch index 2f3f51e..ff08d2e 100644 --- a/0002-Modify-utility-functions-to-be-endian-agnostic.patch +++ b/0002-Modify-utility-functions-to-be-endian-agnostic.patch @@ -24,10 +24,10 @@ Signed-off-by: Al Stone source/components/tables/tbprint.c | 13 +++++++++---- 5 files changed, 26 insertions(+), 17 deletions(-) -Index: acpica-unix2-20210604/source/common/acfileio.c +Index: acpica-unix2-20210730/source/common/acfileio.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/acfileio.c -+++ acpica-unix2-20210604/source/common/acfileio.c +--- acpica-unix2-20210730.orig/source/common/acfileio.c ++++ acpica-unix2-20210730/source/common/acfileio.c @@ -280,6 +280,7 @@ AcGetOneTableFromFile ( ACPI_TABLE_HEADER *Table; INT32 Count; @@ -94,11 +94,11 @@ Index: acpica-unix2-20210604/source/common/acfileio.c (UINT32) (FileSize - TableOffset)); return (AE_BAD_HEADER); } -Index: acpica-unix2-20210604/source/common/dmtable.c +Index: acpica-unix2-20210730/source/common/dmtable.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtable.c -+++ acpica-unix2-20210604/source/common/dmtable.c -@@ -591,7 +591,7 @@ AcpiDmDumpDataTable ( +--- acpica-unix2-20210730.orig/source/common/dmtable.c ++++ acpica-unix2-20210730/source/common/dmtable.c +@@ -641,7 +641,7 @@ AcpiDmDumpDataTable ( { /* Dump the raw table data */ @@ -107,7 +107,7 @@ Index: acpica-unix2-20210604/source/common/dmtable.c AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n", ACPI_RAW_TABLE_DATA_HEADER, Length, Length); -@@ -608,7 +608,7 @@ AcpiDmDumpDataTable ( +@@ -658,7 +658,7 @@ AcpiDmDumpDataTable ( */ if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) { @@ -116,7 +116,7 @@ Index: acpica-unix2-20210604/source/common/dmtable.c Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); if (ACPI_FAILURE (Status)) { -@@ -628,7 +628,7 @@ AcpiDmDumpDataTable ( +@@ -678,7 +678,7 @@ AcpiDmDumpDataTable ( /* * All other tables must use the common ACPI table header, dump it now */ @@ -125,7 +125,7 @@ Index: acpica-unix2-20210604/source/common/dmtable.c Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader); if (ACPI_FAILURE (Status)) { -@@ -1262,7 +1262,7 @@ AcpiDmDumpTable ( +@@ -1324,7 +1324,7 @@ AcpiDmDumpTable ( AcpiOsPrintf ("%2.2X", *Target); Temp8 = AcpiDmGenerateChecksum (Table, @@ -134,10 +134,10 @@ Index: acpica-unix2-20210604/source/common/dmtable.c ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum) -Index: acpica-unix2-20210604/source/compiler/dtfield.c +Index: acpica-unix2-20210730/source/compiler/dtfield.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dtfield.c -+++ acpica-unix2-20210604/source/compiler/dtfield.c +--- acpica-unix2-20210730.orig/source/compiler/dtfield.c ++++ acpica-unix2-20210730/source/compiler/dtfield.c @@ -361,7 +361,7 @@ DtCompileInteger ( DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, AslGbl_MsgBuffer); } @@ -147,10 +147,10 @@ Index: acpica-unix2-20210604/source/compiler/dtfield.c return; } -Index: acpica-unix2-20210604/source/compiler/dtsubtable.c +Index: acpica-unix2-20210730/source/compiler/dtsubtable.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dtsubtable.c -+++ acpica-unix2-20210604/source/compiler/dtsubtable.c +--- acpica-unix2-20210730.orig/source/compiler/dtsubtable.c ++++ acpica-unix2-20210730/source/compiler/dtsubtable.c @@ -378,6 +378,6 @@ DtSetSubtableLength ( return; } @@ -160,10 +160,10 @@ Index: acpica-unix2-20210604/source/compiler/dtsubtable.c + AcpiUtWriteUint (Subtable->LengthField, Subtable->SizeOfLengthField, + &Subtable->TotalLength, sizeof (Subtable->TotalLength)); } -Index: acpica-unix2-20210604/source/components/tables/tbprint.c +Index: acpica-unix2-20210730/source/components/tables/tbprint.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/tables/tbprint.c -+++ acpica-unix2-20210604/source/components/tables/tbprint.c +--- acpica-unix2-20210730.orig/source/components/tables/tbprint.c ++++ acpica-unix2-20210730/source/components/tables/tbprint.c @@ -44,6 +44,8 @@ #include "acpi.h" #include "accommon.h" diff --git a/0003-Always-display-table-header-content-in-human-readabl.patch b/0003-Always-display-table-header-content-in-human-readabl.patch index 6dddba1..b1bd847 100644 --- a/0003-Always-display-table-header-content-in-human-readabl.patch +++ b/0003-Always-display-table-header-content-in-human-readabl.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/tools/acpibin/abcompare.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210604/source/tools/acpibin/abcompare.c +Index: acpica-unix2-20210730/source/tools/acpibin/abcompare.c =================================================================== ---- acpica-unix2-20210604.orig/source/tools/acpibin/abcompare.c -+++ acpica-unix2-20210604/source/tools/acpibin/abcompare.c +--- acpica-unix2-20210730.orig/source/tools/acpibin/abcompare.c ++++ acpica-unix2-20210730/source/tools/acpibin/abcompare.c @@ -42,6 +42,7 @@ */ diff --git a/0004-Re-enable-support-for-big-endian-machines.patch b/0004-Re-enable-support-for-big-endian-machines.patch index 1422b26..4686ed2 100644 --- a/0004-Re-enable-support-for-big-endian-machines.patch +++ b/0004-Re-enable-support-for-big-endian-machines.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/components/namespace/nsutils.c | 7 +++++-- 2 files changed, 5 insertions(+), 14 deletions(-) -Index: acpica-unix2-20210604/source/compiler/aslmain.c +Index: acpica-unix2-20210730/source/compiler/aslmain.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslmain.c -+++ acpica-unix2-20210604/source/compiler/aslmain.c +--- acpica-unix2-20210730.orig/source/compiler/aslmain.c ++++ acpica-unix2-20210730/source/compiler/aslmain.c @@ -101,18 +101,6 @@ main ( signal (SIGINT, AslSignalHandler); @@ -36,10 +36,10 @@ Index: acpica-unix2-20210604/source/compiler/aslmain.c AcpiOsInitialize (); ACPI_DEBUG_INITIALIZE (); /* For debug version only */ -Index: acpica-unix2-20210604/source/components/namespace/nsutils.c +Index: acpica-unix2-20210730/source/components/namespace/nsutils.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20210604/source/components/namespace/nsutils.c +--- acpica-unix2-20210730.orig/source/components/namespace/nsutils.c ++++ acpica-unix2-20210730/source/components/namespace/nsutils.c @@ -272,6 +272,7 @@ AcpiNsBuildInternalName ( const char *ExternalName = Info->NextExternalChar; char *Result = NULL; diff --git a/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch b/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch index 3074e05..6293206 100644 --- a/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch +++ b/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/cvparser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/compiler/cvparser.c +Index: acpica-unix2-20210730/source/compiler/cvparser.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/cvparser.c -+++ acpica-unix2-20210604/source/compiler/cvparser.c +--- acpica-unix2-20210730.orig/source/compiler/cvparser.c ++++ acpica-unix2-20210730/source/compiler/cvparser.c @@ -144,6 +144,7 @@ CvInitFileTree ( char *ChildFilename = NULL; UINT8 *AmlStart; diff --git a/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch b/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch index 7b7ed81..1ed3be3 100644 --- a/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch +++ b/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/compiler/aslanalyze.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/compiler/aslanalyze.c +Index: acpica-unix2-20210730/source/compiler/aslanalyze.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslanalyze.c -+++ acpica-unix2-20210604/source/compiler/aslanalyze.c +--- acpica-unix2-20210730.orig/source/compiler/aslanalyze.c ++++ acpica-unix2-20210730/source/compiler/aslanalyze.c @@ -469,7 +469,7 @@ ApCheckForGpeNameConflict ( /* Need a null-terminated string version of NameSeg */ diff --git a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch index ade4c9a..9fe820a 100644 --- a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch +++ b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump.c +Index: acpica-unix2-20210730/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210604/source/common/dmtbdump.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump.c ++++ acpica-unix2-20210730/source/common/dmtbdump.c @@ -146,6 +146,8 @@ AcpiDmDumpUnicode ( UINT8 *Buffer; UINT32 Length; diff --git a/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch b/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch index ad4214d..63fa133 100644 --- a/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch +++ b/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -763,7 +763,7 @@ AcpiDmDumpMadt ( { ACPI_STATUS Status; diff --git a/0009-Support-ASF-tables-in-a-big-endian-world.patch b/0009-Support-ASF-tables-in-a-big-endian-world.patch index 5e21344..1010c29 100644 --- a/0009-Support-ASF-tables-in-a-big-endian-world.patch +++ b/0009-Support-ASF-tables-in-a-big-endian-world.patch @@ -10,11 +10,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -79,16 +79,18 @@ AcpiDmDumpAsf ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -298,16 +298,18 @@ AcpiDmDumpAsf ( UINT32 DataOffset = 0; UINT32 i; UINT8 Type; @@ -35,7 +35,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c Subtable->Header.Length, AcpiDmTableInfoAsfHdr); if (ACPI_FAILURE (Status)) { -@@ -146,7 +148,7 @@ AcpiDmDumpAsf ( +@@ -365,7 +367,7 @@ AcpiDmDumpAsf ( return; } @@ -44,7 +44,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c Subtable->Header.Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -163,7 +165,7 @@ AcpiDmDumpAsf ( +@@ -382,7 +384,7 @@ AcpiDmDumpAsf ( for (i = 0; i < DataCount; i++) { AcpiOsPrintf ("\n"); diff --git a/0010-Support-CPEP-tables-in-a-big-endian-world.patch b/0010-Support-CPEP-tables-in-a-big-endian-world.patch index aa677b7..9247b9b 100644 --- a/0010-Support-CPEP-tables-in-a-big-endian-world.patch +++ b/0010-Support-CPEP-tables-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -319,7 +319,7 @@ AcpiDmDumpCpep ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -538,7 +538,7 @@ AcpiDmDumpCpep ( { ACPI_STATUS Status; ACPI_CPEP_POLLING *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_CPEP); -@@ -334,7 +334,7 @@ AcpiDmDumpCpep ( +@@ -553,7 +553,7 @@ AcpiDmDumpCpep ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); diff --git a/0011-Support-DBG2-table-in-a-big-endian-world.patch b/0011-Support-DBG2-table-in-a-big-endian-world.patch index cc613fc..7c22228 100644 --- a/0011-Support-DBG2-table-in-a-big-endian-world.patch +++ b/0011-Support-DBG2-table-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 43 ++++++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 32 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -374,7 +374,7 @@ AcpiDmDumpCsrt ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -593,7 +593,7 @@ AcpiDmDumpCsrt ( ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubtable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_CSRT); UINT32 SubOffset; UINT32 SubSubOffset; -@@ -386,7 +386,7 @@ AcpiDmDumpCsrt ( +@@ -605,7 +605,7 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); @@ -31,7 +31,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { /* Resource group subtable */ -@@ -420,7 +420,7 @@ AcpiDmDumpCsrt ( +@@ -639,7 +639,7 @@ AcpiDmDumpCsrt ( Offset + SubOffset); while ((SubOffset < Subtable->Length) && @@ -40,7 +40,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable, -@@ -481,12 +481,13 @@ AcpiDmDumpDbg2 ( +@@ -700,12 +700,13 @@ AcpiDmDumpDbg2 ( { ACPI_STATUS Status; ACPI_DBG2_DEVICE *Subtable; @@ -55,7 +55,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c /* Main table */ -@@ -500,11 +501,12 @@ AcpiDmDumpDbg2 ( +@@ -719,11 +720,12 @@ AcpiDmDumpDbg2 ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); @@ -70,7 +70,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -514,13 +516,13 @@ AcpiDmDumpDbg2 ( +@@ -733,13 +735,13 @@ AcpiDmDumpDbg2 ( for (i = 0; i < Subtable->RegisterCount; i++) { @@ -86,7 +86,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -531,13 +533,13 @@ AcpiDmDumpDbg2 ( +@@ -750,13 +752,13 @@ AcpiDmDumpDbg2 ( for (i = 0; i < Subtable->RegisterCount; i++) { @@ -102,7 +102,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -547,12 +549,12 @@ AcpiDmDumpDbg2 ( +@@ -766,12 +768,12 @@ AcpiDmDumpDbg2 ( /* Dump the Namestring (required) */ AcpiOsPrintf ("\n"); @@ -117,7 +117,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -562,8 +564,11 @@ AcpiDmDumpDbg2 ( +@@ -781,8 +783,11 @@ AcpiDmDumpDbg2 ( if (Subtable->OemDataOffset) { @@ -131,7 +131,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c AcpiDmTableInfoDbg2OemData); if (ACPI_FAILURE (Status)) { -@@ -573,9 +578,9 @@ AcpiDmDumpDbg2 ( +@@ -792,9 +797,9 @@ AcpiDmDumpDbg2 ( /* Point to next subtable */ @@ -143,11 +143,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c } } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -355,6 +355,7 @@ DtCompileCsrt ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -572,6 +572,7 @@ DtCompileCsrt ( DT_FIELD **PFieldList = (DT_FIELD **) List; UINT32 DescriptorCount; UINT32 GroupLength; @@ -155,7 +155,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c /* Subtables (Resource Groups) */ -@@ -373,12 +374,13 @@ DtCompileCsrt ( +@@ -590,12 +591,13 @@ DtCompileCsrt ( /* Compute the number of resource descriptors */ @@ -175,7 +175,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c DescriptorCount = (GroupLength / sizeof (ACPI_CSRT_DESCRIPTOR)); -@@ -466,6 +468,7 @@ DtCompileDbg2 ( +@@ -683,6 +685,7 @@ DtCompileDbg2 ( ACPI_DBG2_DEVICE *DeviceInfo; UINT16 CurrentOffset; UINT32 i; @@ -183,7 +183,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c /* Main table */ -@@ -482,10 +485,12 @@ DtCompileDbg2 ( +@@ -699,10 +702,12 @@ DtCompileDbg2 ( /* Main table fields */ Dbg2Header = ACPI_CAST_PTR (ACPI_DBG2_HEADER, Subtable->Buffer); @@ -199,7 +199,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c DtPushSubtable (Subtable); /* Process all Device Information subtables (Count = InfoCount) */ -@@ -512,7 +517,8 @@ DtCompileDbg2 ( +@@ -729,7 +734,8 @@ DtCompileDbg2 ( /* BaseAddressRegister GAS array (Required, size is RegisterCount) */ @@ -209,7 +209,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Addr, -@@ -528,7 +534,8 @@ DtCompileDbg2 ( +@@ -745,7 +751,8 @@ DtCompileDbg2 ( /* AddressSize array (Required, size = RegisterCount) */ @@ -219,7 +219,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Size, -@@ -544,7 +551,8 @@ DtCompileDbg2 ( +@@ -761,7 +768,8 @@ DtCompileDbg2 ( /* NamespaceString device identifier (Required, size = NamePathLength) */ @@ -229,7 +229,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Name, &Subtable); if (ACPI_FAILURE (Status)) -@@ -554,8 +562,9 @@ DtCompileDbg2 ( +@@ -771,8 +779,9 @@ DtCompileDbg2 ( /* Update the device info header */ @@ -241,7 +241,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c DtInsertSubtable (ParentTable, Subtable); /* OemData - Variable-length data (Optional, size = OemDataLength) */ -@@ -582,8 +591,10 @@ DtCompileDbg2 ( +@@ -799,8 +808,10 @@ DtCompileDbg2 ( if (Subtable && Subtable->Length) { diff --git a/0012-Support-DMAR-in-a-big-endian-world.patch b/0012-Support-DMAR-in-a-big-endian-world.patch index 3a3f33b..f083ef8 100644 --- a/0012-Support-DMAR-in-a-big-endian-world.patch +++ b/0012-Support-DMAR-in-a-big-endian-world.patch @@ -10,11 +10,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 12 +++++++----- 3 files changed, 24 insertions(+), 18 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtable.c +Index: acpica-unix2-20210730/source/common/dmtable.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtable.c -+++ acpica-unix2-20210604/source/common/dmtable.c -@@ -1341,13 +1341,13 @@ AcpiDmDumpTable ( +--- acpica-unix2-20210730.orig/source/common/dmtable.c ++++ acpica-unix2-20210730/source/common/dmtable.c +@@ -1487,13 +1487,13 @@ AcpiDmDumpTable ( /* DMAR subtable types */ @@ -30,11 +30,11 @@ Index: acpica-unix2-20210604/source/common/dmtable.c AcpiDmDmarSubnames[Temp16]); break; -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -604,13 +604,15 @@ AcpiDmDumpDmar ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -823,13 +823,15 @@ AcpiDmDumpDmar ( { ACPI_STATUS Status; ACPI_DMAR_HEADER *Subtable; @@ -51,7 +51,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c /* Main table */ -@@ -624,13 +626,14 @@ AcpiDmDumpDmar ( +@@ -843,13 +845,14 @@ AcpiDmDumpDmar ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); @@ -68,7 +68,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -638,7 +641,8 @@ AcpiDmDumpDmar ( +@@ -857,7 +860,8 @@ AcpiDmDumpDmar ( AcpiOsPrintf ("\n"); @@ -78,7 +78,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { case ACPI_DMAR_TYPE_HARDWARE_UNIT: -@@ -673,12 +677,12 @@ AcpiDmDumpDmar ( +@@ -892,12 +896,12 @@ AcpiDmDumpDmar ( default: AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", @@ -93,7 +93,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -687,8 +691,8 @@ AcpiDmDumpDmar ( +@@ -906,8 +910,8 @@ AcpiDmDumpDmar ( /* * Dump the optional device scope entries */ @@ -104,7 +104,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { /* These types do not support device scopes */ -@@ -696,7 +700,7 @@ AcpiDmDumpDmar ( +@@ -915,7 +919,7 @@ AcpiDmDumpDmar ( } ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable, ScopeOffset); @@ -113,7 +113,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable, -@@ -737,9 +741,9 @@ AcpiDmDumpDmar ( +@@ -956,9 +960,9 @@ AcpiDmDumpDmar ( NextSubtable: /* Point to next subtable */ @@ -125,11 +125,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c } } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -634,6 +634,7 @@ DtCompileDmar ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -851,6 +851,7 @@ DtCompileDmar ( ACPI_DMAR_DEVICE_SCOPE *DmarDeviceScope; UINT32 DeviceScopeLength; UINT32 PciPathLength; @@ -137,7 +137,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmar, &Subtable); -@@ -664,7 +665,8 @@ DtCompileDmar ( +@@ -881,7 +882,8 @@ DtCompileDmar ( DmarHeader = ACPI_CAST_PTR (ACPI_DMAR_HEADER, Subtable->Buffer); @@ -147,7 +147,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c { case ACPI_DMAR_TYPE_HARDWARE_UNIT: -@@ -711,8 +713,8 @@ DtCompileDmar ( +@@ -928,8 +930,8 @@ DtCompileDmar ( /* * Optional Device Scope subtables */ @@ -158,7 +158,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c { /* These types do not support device scopes */ -@@ -721,8 +723,8 @@ DtCompileDmar ( +@@ -938,8 +940,8 @@ DtCompileDmar ( } DtPushSubtable (Subtable); diff --git a/0013-Support-DRTM-in-a-big-endian-world.patch b/0013-Support-DRTM-in-a-big-endian-world.patch index ac21497..e7bdcd8 100644 --- a/0013-Support-DRTM-in-a-big-endian-world.patch +++ b/0013-Support-DRTM-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 6 ++++-- 2 files changed, 19 insertions(+), 12 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -770,11 +770,14 @@ AcpiDmDumpDrtm ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -989,11 +989,14 @@ AcpiDmDumpDrtm ( ACPI_DRTM_RESOURCE_LIST *DrtmRl; ACPI_DRTM_DPS_ID *DrtmDps; UINT32 Count; @@ -29,7 +29,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c AcpiDmTableInfoDrtm); if (ACPI_FAILURE (Status)) { -@@ -789,7 +792,7 @@ AcpiDmDumpDrtm ( +@@ -1008,7 +1011,7 @@ AcpiDmDumpDrtm ( DrtmVtl = ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST, Table, Offset); AcpiOsPrintf ("\n"); @@ -38,7 +38,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c DrtmVtl, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST, ValidatedTables), AcpiDmTableInfoDrtm0); if (ACPI_FAILURE (Status)) -@@ -802,10 +805,11 @@ AcpiDmDumpDrtm ( +@@ -1021,10 +1024,11 @@ AcpiDmDumpDrtm ( /* Dump Validated table addresses */ Count = 0; @@ -53,7 +53,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c ACPI_ADD_PTR (void, Table, Offset), sizeof (UINT64), AcpiDmTableInfoDrtm0a); if (ACPI_FAILURE (Status)) -@@ -821,7 +825,7 @@ AcpiDmDumpDrtm ( +@@ -1040,7 +1044,7 @@ AcpiDmDumpDrtm ( DrtmRl = ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST, Table, Offset); AcpiOsPrintf ("\n"); @@ -62,7 +62,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c DrtmRl, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST, Resources), AcpiDmTableInfoDrtm1); if (ACPI_FAILURE (Status)) -@@ -834,10 +838,11 @@ AcpiDmDumpDrtm ( +@@ -1053,10 +1057,11 @@ AcpiDmDumpDrtm ( /* Dump the Resource List */ Count = 0; @@ -77,7 +77,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c ACPI_ADD_PTR (void, Table, Offset), sizeof (ACPI_DRTM_RESOURCE), AcpiDmTableInfoDrtm1a); if (ACPI_FAILURE (Status)) -@@ -853,7 +858,7 @@ AcpiDmDumpDrtm ( +@@ -1072,7 +1077,7 @@ AcpiDmDumpDrtm ( DrtmDps = ACPI_ADD_PTR (ACPI_DRTM_DPS_ID, Table, Offset); AcpiOsPrintf ("\n"); @@ -86,11 +86,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c DrtmDps, sizeof (ACPI_DRTM_DPS_ID), AcpiDmTableInfoDrtm2); } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -849,7 +849,8 @@ DtCompileDrtm ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -1066,7 +1066,8 @@ DtCompileDrtm ( Count++; } @@ -100,7 +100,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c DtPopSubtable (); ParentTable = DtPeekSubtable (); -@@ -887,7 +888,8 @@ DtCompileDrtm ( +@@ -1104,7 +1105,8 @@ DtCompileDrtm ( Count++; } diff --git a/0014-Support-EINJ-in-a-big-endian-world.patch b/0014-Support-EINJ-in-a-big-endian-world.patch index b28a42e..157cce7 100644 --- a/0014-Support-EINJ-in-a-big-endian-world.patch +++ b/0014-Support-EINJ-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -882,7 +882,7 @@ AcpiDmDumpEinj ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -1101,7 +1101,7 @@ AcpiDmDumpEinj ( { ACPI_STATUS Status; ACPI_WHEA_HEADER *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_EINJ); -@@ -897,7 +897,7 @@ AcpiDmDumpEinj ( +@@ -1116,7 +1116,7 @@ AcpiDmDumpEinj ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); diff --git a/0015-Support-ERST-in-a-big-endian-world.patch b/0015-Support-ERST-in-a-big-endian-world.patch index 1438b85..3e19334 100644 --- a/0015-Support-ERST-in-a-big-endian-world.patch +++ b/0015-Support-ERST-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -935,7 +935,7 @@ AcpiDmDumpErst ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -1154,7 +1154,7 @@ AcpiDmDumpErst ( { ACPI_STATUS Status; ACPI_WHEA_HEADER *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_ERST); -@@ -950,7 +950,7 @@ AcpiDmDumpErst ( +@@ -1169,7 +1169,7 @@ AcpiDmDumpErst ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); diff --git a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch index 51e4257..9aa875f 100644 --- a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch +++ b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/components/tables/tbfadt.c | 34 +++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 21 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump.c +Index: acpica-unix2-20210730/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210604/source/common/dmtbdump.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump.c ++++ acpica-unix2-20210730/source/common/dmtbdump.c @@ -363,11 +363,12 @@ AcpiDmDumpFadt ( ACPI_TABLE_HEADER *Table) { @@ -91,10 +91,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump.c } -Index: acpica-unix2-20210604/source/components/tables/tbfadt.c +Index: acpica-unix2-20210730/source/components/tables/tbfadt.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/tables/tbfadt.c -+++ acpica-unix2-20210604/source/components/tables/tbfadt.c +--- acpica-unix2-20210730.orig/source/components/tables/tbfadt.c ++++ acpica-unix2-20210730/source/components/tables/tbfadt.c @@ -289,7 +289,6 @@ AcpiTbSelectAddress ( UINT32 Address32, UINT64 Address64) diff --git a/0017-Support-most-FPDTs-in-a-big-endian-world.patch b/0017-Support-most-FPDTs-in-a-big-endian-world.patch index abeed59..bd43520 100644 --- a/0017-Support-most-FPDTs-in-a-big-endian-world.patch +++ b/0017-Support-most-FPDTs-in-a-big-endian-world.patch @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -988,9 +988,10 @@ AcpiDmDumpFpdt ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -1207,9 +1207,10 @@ AcpiDmDumpFpdt ( { ACPI_STATUS Status; ACPI_FPDT_HEADER *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c /* There is no main table (other than the standard ACPI header) */ -@@ -998,19 +999,20 @@ AcpiDmDumpFpdt ( +@@ -1217,19 +1218,20 @@ AcpiDmDumpFpdt ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset); @@ -52,7 +52,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { case ACPI_FPDT_TYPE_BOOT: -@@ -1037,7 +1039,7 @@ AcpiDmDumpFpdt ( +@@ -1256,7 +1258,7 @@ AcpiDmDumpFpdt ( goto NextSubtable; } @@ -61,11 +61,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -1125,6 +1125,7 @@ DtCompileFpdt ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -1342,6 +1342,7 @@ DtCompileFpdt ( ACPI_DMTABLE_INFO *InfoTable; DT_FIELD **PFieldList = (DT_FIELD **) List; DT_FIELD *SubtableStart; @@ -73,7 +73,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c while (*PFieldList) -@@ -1143,7 +1144,8 @@ DtCompileFpdt ( +@@ -1360,7 +1361,8 @@ DtCompileFpdt ( FpdtHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer); diff --git a/0018-Support-GTDT-in-a-big-endian-world.patch b/0018-Support-GTDT-in-a-big-endian-world.patch index df3f181..8017791 100644 --- a/0018-Support-GTDT-in-a-big-endian-world.patch +++ b/0018-Support-GTDT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 9 +++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -1075,7 +1075,7 @@ AcpiDmDumpGtdt ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -1294,7 +1294,7 @@ AcpiDmDumpGtdt ( { ACPI_STATUS Status; ACPI_GTDT_HEADER *Subtable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_GTDT); ACPI_DMTABLE_INFO *InfoTable; UINT32 SubtableLength; -@@ -1111,7 +1111,7 @@ AcpiDmDumpGtdt ( +@@ -1330,7 +1330,7 @@ AcpiDmDumpGtdt ( /* Subtables */ @@ -31,7 +31,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { /* Common subtable header */ -@@ -1129,8 +1129,13 @@ AcpiDmDumpGtdt ( +@@ -1348,8 +1348,13 @@ AcpiDmDumpGtdt ( case ACPI_GTDT_TYPE_TIMER_BLOCK: SubtableLength = sizeof (ACPI_GTDT_TIMER_BLOCK); @@ -47,11 +47,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c InfoTable = AcpiDmTableInfoGtdt0; break; -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -1071,8 +1071,13 @@ DtCompileGtdt ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -1288,8 +1288,13 @@ DtCompileGtdt ( DtPushSubtable (Subtable); ParentTable = DtPeekSubtable (); diff --git a/0019-Support-HEST-in-a-big-endian-world.patch b/0019-Support-HEST-in-a-big-endian-world.patch index baad30e..8fcc14c 100644 --- a/0019-Support-HEST-in-a-big-endian-world.patch +++ b/0019-Support-HEST-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -1216,12 +1216,13 @@ AcpiDmDumpHest ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -1435,12 +1435,13 @@ AcpiDmDumpHest ( { ACPI_STATUS Status; ACPI_HEST_HEADER *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c /* Main table */ -@@ -1235,10 +1236,11 @@ AcpiDmDumpHest ( +@@ -1454,10 +1455,11 @@ AcpiDmDumpHest ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset); @@ -42,7 +42,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { case ACPI_HEST_TYPE_IA32_CHECK: -@@ -1305,7 +1307,7 @@ AcpiDmDumpHest ( +@@ -1524,7 +1526,7 @@ AcpiDmDumpHest ( /* Cannot continue on unknown type - no length */ AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n", @@ -51,11 +51,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c return; } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -1207,6 +1207,7 @@ DtCompileHest ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -1424,6 +1424,7 @@ DtCompileHest ( DT_FIELD *SubtableStart; ACPI_DMTABLE_INFO *InfoTable; UINT16 Type; @@ -63,7 +63,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c UINT32 BankCount; -@@ -1225,7 +1226,8 @@ DtCompileHest ( +@@ -1442,7 +1443,8 @@ DtCompileHest ( /* Get subtable type */ SubtableStart = *PFieldList; diff --git a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch index 6c2d0f0..b6f1812 100644 --- a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch +++ b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump.c +Index: acpica-unix2-20210730/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210604/source/common/dmtbdump.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump.c ++++ acpica-unix2-20210730/source/common/dmtbdump.c @@ -282,6 +282,7 @@ AcpiDmDumpRsdt ( UINT32 Entries; UINT32 Offset; diff --git a/0021-Support-XSDT-in-a-big-endian-world.patch b/0021-Support-XSDT-in-a-big-endian-world.patch index 83877c5..d3bd2b7 100644 --- a/0021-Support-XSDT-in-a-big-endian-world.patch +++ b/0021-Support-XSDT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump.c +Index: acpica-unix2-20210730/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210604/source/common/dmtbdump.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump.c ++++ acpica-unix2-20210730/source/common/dmtbdump.c @@ -323,6 +323,7 @@ AcpiDmDumpXsdt ( UINT32 Entries; UINT32 Offset; diff --git a/0022-Support-SRAT-in-a-big-endian-world.patch b/0022-Support-SRAT-in-a-big-endian-world.patch index 75bcc04..123d2db 100644 --- a/0022-Support-SRAT-in-a-big-endian-world.patch +++ b/0022-Support-SRAT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -173,11 +173,12 @@ AcpiDmDumpSrat ( UINT32 Offset = sizeof (ACPI_TABLE_SRAT); ACPI_SUBTABLE_HEADER *Subtable; diff --git a/0023-Support-SLIT-in-a-big-endian-world.patch b/0023-Support-SLIT-in-a-big-endian-world.patch index e0e324f..9f56350 100644 --- a/0023-Support-SLIT-in-a-big-endian-world.patch +++ b/0023-Support-SLIT-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -96,11 +96,12 @@ AcpiDmDumpSlit ( UINT32 Localities; UINT32 i; @@ -46,10 +46,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump3.c { AcpiOsPrintf ( "\n**** Not enough room in table for all localities\n"); -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -1837,7 +1837,7 @@ DtCompileSlit ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); diff --git a/0024-Support-MSCT-in-a-big-endian-world.patch b/0024-Support-MSCT-in-a-big-endian-world.patch index bb93fe2..4f972b0 100644 --- a/0024-Support-MSCT-in-a-big-endian-world.patch +++ b/0024-Support-MSCT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -1133,11 +1133,12 @@ AcpiDmDumpMsct ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_MSCT); diff --git a/0025-Support-MPST-in-a-big-endian-world.patch b/0025-Support-MPST-in-a-big-endian-world.patch index 600c6ec..5a12316 100644 --- a/0025-Support-MPST-in-a-big-endian-world.patch +++ b/0025-Support-MPST-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 8 ++++---- 2 files changed, 23 insertions(+), 18 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -995,11 +995,13 @@ AcpiDmDumpMpst ( UINT16 SubtableCount; UINT32 PowerStateCount; @@ -117,10 +117,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c sizeof (ACPI_MPST_POWER_DATA), AcpiDmTableInfoMpst2); if (ACPI_FAILURE (Status)) { -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -350,7 +350,7 @@ DtCompileMpst ( DtPushSubtable (Subtable); diff --git a/0026-Support-NFIT-in-a-big-endian-world.patch b/0026-Support-NFIT-in-a-big-endian-world.patch index cf5267d..c774903 100644 --- a/0026-Support-NFIT-in-a-big-endian-world.patch +++ b/0026-Support-NFIT-in-a-big-endian-world.patch @@ -13,11 +13,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 11 ++++++--- 3 files changed, 39 insertions(+), 25 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtable.c +Index: acpica-unix2-20210730/source/common/dmtable.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtable.c -+++ acpica-unix2-20210604/source/common/dmtable.c -@@ -1526,13 +1526,13 @@ AcpiDmDumpTable ( +--- acpica-unix2-20210730.orig/source/common/dmtable.c ++++ acpica-unix2-20210730/source/common/dmtable.c +@@ -1672,13 +1672,13 @@ AcpiDmDumpTable ( /* NFIT subtable types */ @@ -33,10 +33,10 @@ Index: acpica-unix2-20210604/source/common/dmtable.c AcpiDmNfitSubnames[Temp16]); break; -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -1192,18 +1192,23 @@ AcpiDmDumpNfit ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_NFIT); @@ -175,10 +175,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c } } -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -497,6 +497,7 @@ DtCompileNfit ( UINT32 Count; ACPI_NFIT_INTERLEAVE *Interleave = NULL; diff --git a/0027-Support-SDEV-in-a-big-endian-world.patch b/0027-Support-SDEV-in-a-big-endian-world.patch index 800098e..d933b58 100644 --- a/0027-Support-SDEV-in-a-big-endian-world.patch +++ b/0027-Support-SDEV-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 27 ++++++++++++++++++++- 2 files changed, 52 insertions(+), 23 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -2125,7 +2125,7 @@ AcpiDmDumpSdev ( ACPI_SDEV_NAMESPACE *Namesp; ACPI_DMTABLE_INFO *InfoTable; @@ -145,10 +145,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c + SubtableLength); } } -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -1493,6 +1493,7 @@ DtCompileSdev ( UINT32 EntryCount; ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; diff --git a/0028-Support-HMAT-in-a-big-endian-world.patch b/0028-Support-HMAT-in-a-big-endian-world.patch index eb37f70..4ee8edf 100644 --- a/0028-Support-HMAT-in-a-big-endian-world.patch +++ b/0028-Support-HMAT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 24 ++++++++++--- 2 files changed, 59 insertions(+), 35 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -1379,37 +1379,45 @@ AcpiDmDumpHmat ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -1598,37 +1598,45 @@ AcpiDmDumpHmat ( UINT32 Length; ACPI_DMTABLE_INFO *InfoTable; UINT32 i, j; @@ -65,7 +65,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { case ACPI_HMAT_TYPE_ADDRESS_RANGE: -@@ -1432,7 +1440,7 @@ AcpiDmDumpHmat ( +@@ -1651,7 +1659,7 @@ AcpiDmDumpHmat ( default: AcpiOsPrintf ("\n**** Unknown HMAT structure type 0x%X\n", @@ -74,7 +74,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c /* Attempt to continue */ -@@ -1441,13 +1449,13 @@ AcpiDmDumpHmat ( +@@ -1660,13 +1668,13 @@ AcpiDmDumpHmat ( /* Dump HMAT structure body */ @@ -91,7 +91,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -1455,7 +1463,7 @@ AcpiDmDumpHmat ( +@@ -1674,7 +1682,7 @@ AcpiDmDumpHmat ( /* Dump HMAT structure additionals */ @@ -100,7 +100,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c { case ACPI_HMAT_TYPE_LOCALITY: -@@ -1464,15 +1472,16 @@ AcpiDmDumpHmat ( +@@ -1683,15 +1691,16 @@ AcpiDmDumpHmat ( /* Dump initiator proximity domains */ @@ -121,7 +121,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1a); if (ACPI_FAILURE (Status)) -@@ -1485,15 +1494,16 @@ AcpiDmDumpHmat ( +@@ -1704,15 +1713,16 @@ AcpiDmDumpHmat ( /* Dump target proximity domains */ @@ -142,7 +142,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1b); if (ACPI_FAILURE (Status)) -@@ -1506,18 +1516,17 @@ AcpiDmDumpHmat ( +@@ -1725,18 +1735,17 @@ AcpiDmDumpHmat ( /* Dump latency/bandwidth entris */ @@ -166,7 +166,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat1c); if (ACPI_FAILURE(Status)) -@@ -1537,15 +1546,16 @@ AcpiDmDumpHmat ( +@@ -1756,15 +1765,16 @@ AcpiDmDumpHmat ( /* Dump SMBIOS handles */ @@ -187,7 +187,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat2a); if (ACPI_FAILURE (Status)) -@@ -1565,6 +1575,6 @@ AcpiDmDumpHmat ( +@@ -1784,6 +1794,6 @@ AcpiDmDumpHmat ( NextSubtable: /* Point to next HMAT structure subtable */ @@ -195,11 +195,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c + Offset += (HmatStructLength); } } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -1369,6 +1369,8 @@ DtCompileHmat ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -1586,6 +1586,8 @@ DtCompileHmat ( UINT32 TgtPDNumber; UINT64 EntryNumber; UINT16 SMBIOSHandleNumber; @@ -208,7 +208,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c ParentTable = DtPeekSubtable (); -@@ -1399,7 +1401,8 @@ DtCompileHmat ( +@@ -1616,7 +1618,8 @@ DtCompileHmat ( /* Compile HMAT structure body */ @@ -218,7 +218,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c { case ACPI_HMAT_TYPE_ADDRESS_RANGE: -@@ -1432,7 +1435,7 @@ DtCompileHmat ( +@@ -1649,7 +1652,7 @@ DtCompileHmat ( /* Compile HMAT structure additionals */ @@ -227,7 +227,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c { case ACPI_HMAT_TYPE_LOCALITY: -@@ -1458,7 +1461,7 @@ DtCompileHmat ( +@@ -1675,7 +1678,7 @@ DtCompileHmat ( HmatStruct->Length += Subtable->Length; IntPDNumber++; } @@ -236,7 +236,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c /* Compile target proximity domain list */ -@@ -1479,7 +1482,7 @@ DtCompileHmat ( +@@ -1696,7 +1699,7 @@ DtCompileHmat ( HmatStruct->Length += Subtable->Length; TgtPDNumber++; } @@ -245,7 +245,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c /* Save start of the entries for reporting errors */ -@@ -1505,6 +1508,9 @@ DtCompileHmat ( +@@ -1722,6 +1725,9 @@ DtCompileHmat ( EntryNumber++; } @@ -255,7 +255,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c /* Validate number of entries */ if (EntryNumber != -@@ -1538,11 +1544,19 @@ DtCompileHmat ( +@@ -1755,11 +1761,19 @@ DtCompileHmat ( HmatStruct->Length += Subtable->Length; SMBIOSHandleNumber++; } diff --git a/0029-Support-PDTT-in-a-big-endian-world.patch b/0029-Support-PDTT-in-a-big-endian-world.patch index 8511288..c1a0144 100644 --- a/0029-Support-PDTT-in-a-big-endian-world.patch +++ b/0029-Support-PDTT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -1498,13 +1498,13 @@ AcpiDmDumpPdtt ( { ACPI_STATUS Status; diff --git a/0030-Support-PPTT-in-a-big-endian-world.patch b/0030-Support-PPTT-in-a-big-endian-world.patch index c4d062a..4e63eeb 100644 --- a/0030-Support-PPTT-in-a-big-endian-world.patch +++ b/0030-Support-PPTT-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 7 +++++-- 2 files changed, 15 insertions(+), 9 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -1785,6 +1785,8 @@ AcpiDmDumpPptt ( UINT32 Offset = sizeof (ACPI_TABLE_FPDT); ACPI_DMTABLE_INFO *InfoTable; @@ -70,10 +70,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset), 4, AcpiDmTableInfoPptt0a); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -1123,6 +1123,7 @@ DtCompilePptt ( DT_FIELD **PFieldList = (DT_FIELD **) List; DT_FIELD *SubtableStart; diff --git a/0031-Support-PCCT-in-a-big-endian-world.patch b/0031-Support-PCCT-in-a-big-endian-world.patch index 00d908e..7a51793 100644 --- a/0031-Support-PCCT-in-a-big-endian-world.patch +++ b/0031-Support-PCCT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -1394,13 +1394,13 @@ AcpiDmDumpPcct ( ACPI_STATUS Status; ACPI_PCCT_SUBSPACE *Subtable; diff --git a/0032-Support-WDAT-in-a-big-endian-world.patch b/0032-Support-WDAT-in-a-big-endian-world.patch index d28ec57..401f038 100644 --- a/0032-Support-WDAT-in-a-big-endian-world.patch +++ b/0032-Support-WDAT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -675,11 +675,12 @@ AcpiDmDumpWdat ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_WDAT); diff --git a/0033-Support-TCPA-in-a-big-endian-world.patch b/0033-Support-TCPA-in-a-big-endian-world.patch index 21e8818..b10373a 100644 --- a/0033-Support-TCPA-in-a-big-endian-world.patch +++ b/0033-Support-TCPA-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 4 +++- 2 files changed, 11 insertions(+), 6 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -401,11 +401,13 @@ AcpiDmDumpTcpa ( ACPI_TABLE_TCPA_HDR *Subtable = ACPI_ADD_PTR ( ACPI_TABLE_TCPA_HDR, Table, Offset); @@ -52,10 +52,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump3.c break; default: -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -2139,6 +2139,7 @@ DtCompileTcpa ( ACPI_TABLE_TCPA_HDR *TcpaHeader; DT_SUBTABLE *ParentTable; diff --git a/0034-Support-STAO-in-a-big-endian-world.patch b/0034-Support-STAO-in-a-big-endian-world.patch index e338c5f..2fcb5e8 100644 --- a/0034-Support-STAO-in-a-big-endian-world.patch +++ b/0034-Support-STAO-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -285,14 +285,14 @@ AcpiDmDumpStao ( { ACPI_STATUS Status; diff --git a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch index 3f8fa6d..a9f0b5b 100644 --- a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch +++ b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -68,9 +68,11 @@ void AcpiDmDumpSlic ( ACPI_TABLE_HEADER *Table) diff --git a/0036-Support-MCFG-in-a-big-endian-world.patch b/0036-Support-MCFG-in-a-big-endian-world.patch index c5a30da..634e9b8 100644 --- a/0036-Support-MCFG-in-a-big-endian-world.patch +++ b/0036-Support-MCFG-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -930,11 +930,12 @@ AcpiDmDumpMcfg ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_MCFG); diff --git a/0037-Support-LPIT-in-a-big-endian-world.patch b/0037-Support-LPIT-in-a-big-endian-world.patch index e5e83d3..d53a3a2 100644 --- a/0037-Support-LPIT-in-a-big-endian-world.patch +++ b/0037-Support-LPIT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -690,7 +690,7 @@ AcpiDmDumpLpit ( { ACPI_STATUS Status; diff --git a/0038-Support-PMTT-in-a-big-endian-world.patch b/0038-Support-PMTT-in-a-big-endian-world.patch index 4c6338c..7e2bd91 100644 --- a/0038-Support-PMTT-in-a-big-endian-world.patch +++ b/0038-Support-PMTT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -1686,8 +1686,9 @@ AcpiDmDumpPmtt ( { ACPI_STATUS Status; diff --git a/0039-Support-TPM2-in-a-big-endian-world.patch b/0039-Support-TPM2-in-a-big-endian-world.patch index 08e3522..99bdf64 100644 --- a/0039-Support-TPM2-in-a-big-endian-world.patch +++ b/0039-Support-TPM2-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 8 +++++--- 2 files changed, 15 insertions(+), 11 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c @@ -470,11 +470,12 @@ AcpiDmDumpTpm2Rev3 ( ACPI_TABLE_TPM23 *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM23, Table); ACPI_TPM23_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM23_TRAILER, Table, Offset); @@ -77,10 +77,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump3.c break; default: -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -2267,6 +2267,7 @@ DtCompileTpm2 ( DT_SUBTABLE *ParentTable; ACPI_STATUS Status = AE_OK; diff --git a/0040-Support-S3PT-in-a-big-endian-world.patch b/0040-Support-S3PT-in-a-big-endian-world.patch index 07e0a24..9f5782d 100644 --- a/0040-Support-S3PT-in-a-big-endian-world.patch +++ b/0040-Support-S3PT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Subject: [PATCH 40/45] Support S3PT in a big-endian world source/compiler/dttable2.c | 4 +++- 2 files changed, 12 insertions(+), 7 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -2039,6 +2039,8 @@ AcpiDmDumpS3pt ( ACPI_FPDT_HEADER *Subtable; ACPI_DMTABLE_INFO *InfoTable; @@ -72,10 +72,10 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c } -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c @@ -1406,6 +1406,7 @@ DtCompileS3pt ( DT_SUBTABLE *ParentTable; ACPI_DMTABLE_INFO *InfoTable; diff --git a/0041-Support-IORT-in-a-big-endian-world.patch b/0041-Support-IORT-in-a-big-endian-world.patch index ccc6e77..6e10da6 100644 --- a/0041-Support-IORT-in-a-big-endian-world.patch +++ b/0041-Support-IORT-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 40 ++++++++++-------- 2 files changed, 72 insertions(+), 53 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -77,17 +77,20 @@ AcpiDmDumpIort ( ACPI_IORT_RMR *IortRmr = NULL; UINT32 Offset; @@ -246,11 +246,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c } } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -1592,6 +1592,7 @@ DtCompileIort ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -1809,6 +1809,7 @@ DtCompileIort ( ACPI_IORT_ITS_GROUP *IortItsGroup; ACPI_IORT_SMMU *IortSmmu; ACPI_IORT_RMR *IortRmr; @@ -258,7 +258,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c UINT32 NodeNumber; UINT32 NodeLength; UINT32 IdMappingNumber; -@@ -1637,7 +1638,7 @@ DtCompileIort ( +@@ -1854,7 +1855,7 @@ DtCompileIort ( * Optionally allows the generic data types to be used for filling * this field. */ @@ -267,7 +267,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortPad, &Subtable); if (ACPI_FAILURE (Status)) -@@ -1647,7 +1648,7 @@ DtCompileIort ( +@@ -1864,7 +1865,7 @@ DtCompileIort ( if (Subtable) { DtInsertSubtable (ParentTable, Subtable); @@ -276,7 +276,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c } else { -@@ -1657,7 +1658,7 @@ DtCompileIort ( +@@ -1874,7 +1875,7 @@ DtCompileIort ( { return (Status); } @@ -285,7 +285,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c } NodeNumber = 0; -@@ -1721,7 +1722,7 @@ DtCompileIort ( +@@ -1938,7 +1939,7 @@ DtCompileIort ( ItsNumber++; } @@ -294,7 +294,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c break; case ACPI_IORT_NODE_NAMED_COMPONENT: -@@ -1755,15 +1756,18 @@ DtCompileIort ( +@@ -1972,15 +1973,18 @@ DtCompileIort ( } else { @@ -316,7 +316,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c &Subtable); if (ACPI_FAILURE (Status)) { -@@ -1771,7 +1775,7 @@ DtCompileIort ( +@@ -1988,7 +1992,7 @@ DtCompileIort ( } DtInsertSubtable (ParentTable, Subtable); @@ -325,7 +325,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c } } break; -@@ -1804,7 +1808,7 @@ DtCompileIort ( +@@ -2021,7 +2025,7 @@ DtCompileIort ( /* Compile global interrupt array */ @@ -334,7 +334,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3a, &Subtable); if (ACPI_FAILURE (Status)) -@@ -1818,7 +1822,7 @@ DtCompileIort ( +@@ -2035,7 +2039,7 @@ DtCompileIort ( /* Compile context interrupt array */ ContextIrptNumber = 0; @@ -343,7 +343,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c while (*PFieldList) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3b, -@@ -1838,12 +1842,12 @@ DtCompileIort ( +@@ -2055,12 +2059,12 @@ DtCompileIort ( ContextIrptNumber++; } @@ -358,7 +358,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c while (*PFieldList) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3c, -@@ -1863,7 +1867,7 @@ DtCompileIort ( +@@ -2080,7 +2084,7 @@ DtCompileIort ( PmuIrptNumber++; } @@ -367,7 +367,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c break; case ACPI_IORT_NODE_SMMU_V3: -@@ -1908,7 +1912,7 @@ DtCompileIort ( +@@ -2125,7 +2129,7 @@ DtCompileIort ( /* Compile RMR Descriptors */ RmrCount = 0; @@ -376,7 +376,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c while (*PFieldList) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort6a, -@@ -1928,7 +1932,7 @@ DtCompileIort ( +@@ -2145,7 +2149,7 @@ DtCompileIort ( RmrCount++; } @@ -385,7 +385,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c break; default: -@@ -1939,7 +1943,7 @@ DtCompileIort ( +@@ -2156,7 +2160,7 @@ DtCompileIort ( /* Compile Array of ID mappings */ @@ -394,7 +394,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c IdMappingNumber = 0; while (*PFieldList) { -@@ -1960,7 +1964,7 @@ DtCompileIort ( +@@ -2177,7 +2181,7 @@ DtCompileIort ( IdMappingNumber++; } @@ -403,7 +403,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c if (!IdMappingNumber) { IortNode->MappingOffset = 0; -@@ -1975,7 +1979,7 @@ DtCompileIort ( +@@ -2192,7 +2196,7 @@ DtCompileIort ( NodeNumber++; } diff --git a/0042-Support-IVRS-in-a-big-endian-world.patch b/0042-Support-IVRS-in-a-big-endian-world.patch index 6d8bab7..c9b31ef 100644 --- a/0042-Support-IVRS-in-a-big-endian-world.patch +++ b/0042-Support-IVRS-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20210730/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20210730/source/common/dmtbdump2.c @@ -419,11 +419,14 @@ AcpiDmDumpIvrs ( ACPI_IVRS_DE_HEADER *DeviceEntry; ACPI_IVRS_HEADER *Subtable; diff --git a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch index 60a1e72..1f5c3dd 100644 --- a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch +++ b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch @@ -42,10 +42,10 @@ Signed-off-by: Al Stone source/components/utilities/utresrc.c | 2 +- 28 files changed, 721 insertions(+), 341 deletions(-) -Index: acpica-unix2-20210604/source/common/adwalk.c +Index: acpica-unix2-20210730/source/common/adwalk.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/adwalk.c -+++ acpica-unix2-20210604/source/common/adwalk.c +--- acpica-unix2-20210730.orig/source/common/adwalk.c ++++ acpica-unix2-20210730/source/common/adwalk.c @@ -679,7 +679,8 @@ AcpiDmLoadDescendingOp ( if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) @@ -56,10 +56,10 @@ Index: acpica-unix2-20210604/source/common/adwalk.c FieldPath[4] = 0; Path = FieldPath; } -Index: acpica-unix2-20210604/source/common/dmrestag.c +Index: acpica-unix2-20210730/source/common/dmrestag.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmrestag.c -+++ acpica-unix2-20210604/source/common/dmrestag.c +--- acpica-unix2-20210730.orig/source/common/dmrestag.c ++++ acpica-unix2-20210730/source/common/dmrestag.c @@ -1048,7 +1048,7 @@ AcpiDmAddResourcesToNamespace ( * NextOp contains the Aml pointer and the Aml length */ @@ -69,10 +69,10 @@ Index: acpica-unix2-20210604/source/common/dmrestag.c AcpiDmAddResourceToNamespace, (void **) BufferNode); } -Index: acpica-unix2-20210604/source/common/dmtables.c +Index: acpica-unix2-20210730/source/common/dmtables.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtables.c -+++ acpica-unix2-20210604/source/common/dmtables.c +--- acpica-unix2-20210730.orig/source/common/dmtables.c ++++ acpica-unix2-20210730/source/common/dmtables.c @@ -142,6 +142,10 @@ AdCreateTableHeader ( ACPI_TABLE_HEADER *Table) { @@ -133,10 +133,10 @@ Index: acpica-unix2-20210604/source/common/dmtables.c AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); AcpiUtSetIntegerWidth (Table->Revision); -Index: acpica-unix2-20210604/source/common/dmtbdump.c +Index: acpica-unix2-20210730/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210604/source/common/dmtbdump.c +--- acpica-unix2-20210730.orig/source/common/dmtbdump.c ++++ acpica-unix2-20210730/source/common/dmtbdump.c @@ -338,8 +338,7 @@ AcpiDmDumpXsdt ( for (i = 0; i < Entries; i++) { @@ -147,43 +147,45 @@ Index: acpica-unix2-20210604/source/common/dmtbdump.c Offset += sizeof (UINT64); } } -Index: acpica-unix2-20210604/source/common/dmtbdump3.c +Index: acpica-unix2-20210730/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c -@@ -736,13 +736,13 @@ AcpiDmDumpWpbt ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20210730/source/common/dmtbdump3.c +@@ -736,12 +736,13 @@ AcpiDmDumpWpbt ( { ACPI_STATUS Status; ACPI_TABLE_WPBT *Subtable; -- UINT32 Length = Table->Length; + UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); UINT16 ArgumentsLength; /* Dump the main table */ -- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoWpbt); +- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWpbt); + Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoWpbt); if (ACPI_FAILURE (Status)) { return; -@@ -751,10 +751,10 @@ AcpiDmDumpWpbt ( +@@ -750,13 +751,13 @@ AcpiDmDumpWpbt ( /* Extract the arguments buffer length from the main table */ Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); - ArgumentsLength = Subtable->ArgumentsLength; + ArgumentsLength = AcpiUtReadUint16 (&Subtable->ArgumentsLength); - /* Dump the arguments buffer */ + /* Dump the arguments buffer if present */ -- (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength, -+ (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength, - AcpiDmTableInfoWpbt0); + if (ArgumentsLength) + { +- (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength, ++ (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength, + AcpiDmTableInfoWpbt0); + } } -Index: acpica-unix2-20210604/source/compiler/aslcodegen.c +Index: acpica-unix2-20210730/source/compiler/aslcodegen.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslcodegen.c -+++ acpica-unix2-20210604/source/compiler/aslcodegen.c +--- acpica-unix2-20210730.orig/source/compiler/aslcodegen.c ++++ acpica-unix2-20210730/source/compiler/aslcodegen.c @@ -238,6 +238,10 @@ CgWriteAmlOpcode ( { UINT8 PkgLenFirstByte; @@ -346,10 +348,10 @@ Index: acpica-unix2-20210604/source/compiler/aslcodegen.c return; -Index: acpica-unix2-20210604/source/compiler/aslopcodes.c +Index: acpica-unix2-20210730/source/compiler/aslopcodes.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslopcodes.c -+++ acpica-unix2-20210604/source/compiler/aslopcodes.c +--- acpica-unix2-20210730.orig/source/compiler/aslopcodes.c ++++ acpica-unix2-20210730/source/compiler/aslopcodes.c @@ -511,7 +511,8 @@ OpcDoUnicode ( for (i = 0; i < Count; i++) @@ -360,10 +362,10 @@ Index: acpica-unix2-20210604/source/compiler/aslopcodes.c } /* -Index: acpica-unix2-20210604/source/compiler/aslrestype1.c +Index: acpica-unix2-20210730/source/compiler/aslrestype1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype1.c -+++ acpica-unix2-20210604/source/compiler/aslrestype1.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype1.c ++++ acpica-unix2-20210730/source/compiler/aslrestype1.c @@ -143,6 +143,7 @@ RsDoMemory24Descriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -548,10 +550,10 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); break; -Index: acpica-unix2-20210604/source/compiler/aslrestype1i.c +Index: acpica-unix2-20210730/source/compiler/aslrestype1i.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype1i.c -+++ acpica-unix2-20210604/source/compiler/aslrestype1i.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype1i.c ++++ acpica-unix2-20210730/source/compiler/aslrestype1i.c @@ -199,6 +199,7 @@ RsDoFixedDmaDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -669,10 +671,10 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype1i.c + Descriptor->Irq.IrqMask = AcpiUtReadUint16(&IrqMask); return (Rnode); } -Index: acpica-unix2-20210604/source/compiler/aslrestype2.c +Index: acpica-unix2-20210730/source/compiler/aslrestype2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype2.c -+++ acpica-unix2-20210604/source/compiler/aslrestype2.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype2.c ++++ acpica-unix2-20210730/source/compiler/aslrestype2.c @@ -77,6 +77,8 @@ RsDoGeneralRegisterDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -749,10 +751,10 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype2.c /* Point to end-of-descriptor for vendor data */ -Index: acpica-unix2-20210604/source/compiler/aslrestype2d.c +Index: acpica-unix2-20210730/source/compiler/aslrestype2d.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype2d.c -+++ acpica-unix2-20210604/source/compiler/aslrestype2d.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype2d.c ++++ acpica-unix2-20210730/source/compiler/aslrestype2d.c @@ -84,6 +84,8 @@ RsDoDwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -999,10 +1001,10 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype2d.c Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20210604/source/compiler/aslrestype2q.c +Index: acpica-unix2-20210730/source/compiler/aslrestype2q.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype2q.c -+++ acpica-unix2-20210604/source/compiler/aslrestype2q.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype2q.c ++++ acpica-unix2-20210730/source/compiler/aslrestype2q.c @@ -84,6 +84,7 @@ RsDoQwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1231,10 +1233,10 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype2q.c Descriptor->Address64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20210604/source/compiler/aslrestype2w.c +Index: acpica-unix2-20210730/source/compiler/aslrestype2w.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype2w.c -+++ acpica-unix2-20210604/source/compiler/aslrestype2w.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype2w.c ++++ acpica-unix2-20210730/source/compiler/aslrestype2w.c @@ -84,6 +84,7 @@ RsDoWordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1482,24 +1484,24 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20210730/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c -@@ -2635,7 +2635,8 @@ DtCompileWpbt ( +--- acpica-unix2-20210730.orig/source/compiler/dttable2.c ++++ acpica-unix2-20210730/source/compiler/dttable2.c +@@ -2645,7 +2645,8 @@ DtCompileWpbt ( /* Extract the length of the Arguments buffer, insert into main table */ -- Length = (UINT16) Subtable->TotalLength; -+ AcpiUtWriteUint (&Length, sizeof (UINT16), +- Table->ArgumentsLength = (UINT16) Subtable->TotalLength; ++ AcpiUtWriteUint (&Table->ArgumentsLength, sizeof (UINT16), + &Subtable->TotalLength, sizeof (UINT32)); - Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); - Table->ArgumentsLength = Length; - -Index: acpica-unix2-20210604/source/components/disassembler/dmbuffer.c + DtInsertSubtable (ParentTable, Subtable); + return (AE_OK); + } +Index: acpica-unix2-20210730/source/components/disassembler/dmbuffer.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmbuffer.c -+++ acpica-unix2-20210604/source/components/disassembler/dmbuffer.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmbuffer.c ++++ acpica-unix2-20210730/source/components/disassembler/dmbuffer.c @@ -204,7 +204,7 @@ AcpiDmByteList ( @@ -1589,10 +1591,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmbuffer.c AcpiOsPrintf ("EisaId (\"%s\")", IdBuffer); /* If we know about the ID, emit the description */ -Index: acpica-unix2-20210604/source/components/disassembler/dmopcode.c +Index: acpica-unix2-20210730/source/components/disassembler/dmopcode.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmopcode.c -+++ acpica-unix2-20210604/source/components/disassembler/dmopcode.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmopcode.c ++++ acpica-unix2-20210730/source/components/disassembler/dmopcode.c @@ -778,7 +778,9 @@ AcpiDmDisassembleOneOp ( } else @@ -1649,10 +1651,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmopcode.c Info->BitOffset += Offset; if (Info->BitOffset % 8 == 0) -Index: acpica-unix2-20210604/source/components/disassembler/dmresrc.c +Index: acpica-unix2-20210730/source/components/disassembler/dmresrc.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmresrc.c -+++ acpica-unix2-20210604/source/components/disassembler/dmresrc.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmresrc.c ++++ acpica-unix2-20210730/source/components/disassembler/dmresrc.c @@ -417,7 +417,7 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } @@ -1662,10 +1664,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmresrc.c /* Get the length of the raw initialization byte list */ -Index: acpica-unix2-20210604/source/components/disassembler/dmresrcl.c +Index: acpica-unix2-20210730/source/components/disassembler/dmresrcl.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmresrcl.c -+++ acpica-unix2-20210604/source/components/disassembler/dmresrcl.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmresrcl.c ++++ acpica-unix2-20210730/source/components/disassembler/dmresrcl.c @@ -141,6 +141,8 @@ AcpiDmMemoryFields ( UINT32 Level) { @@ -1787,10 +1789,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmresrcl.c } AcpiDmIndent (Level); -Index: acpica-unix2-20210604/source/components/disassembler/dmresrcl2.c +Index: acpica-unix2-20210730/source/components/disassembler/dmresrcl2.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmresrcl2.c -+++ acpica-unix2-20210604/source/components/disassembler/dmresrcl2.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmresrcl2.c ++++ acpica-unix2-20210730/source/components/disassembler/dmresrcl2.c @@ -199,22 +199,27 @@ AcpiDmGpioCommon ( char *DeviceName = NULL; UINT32 PinCount; @@ -2132,10 +2134,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmresrcl2.c DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); -Index: acpica-unix2-20210604/source/components/disassembler/dmresrcs.c +Index: acpica-unix2-20210730/source/components/disassembler/dmresrcs.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmresrcs.c -+++ acpica-unix2-20210604/source/components/disassembler/dmresrcs.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmresrcs.c ++++ acpica-unix2-20210730/source/components/disassembler/dmresrcs.c @@ -93,7 +93,7 @@ AcpiDmIrqDescriptor ( AcpiOsPrintf (")\n"); @@ -2186,10 +2188,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmresrcs.c /* Insert a descriptor name */ -Index: acpica-unix2-20210604/source/components/disassembler/dmwalk.c +Index: acpica-unix2-20210730/source/components/disassembler/dmwalk.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/disassembler/dmwalk.c -+++ acpica-unix2-20210604/source/components/disassembler/dmwalk.c +--- acpica-unix2-20210730.orig/source/components/disassembler/dmwalk.c ++++ acpica-unix2-20210730/source/components/disassembler/dmwalk.c @@ -1155,7 +1155,7 @@ AcpiDmAscendingOp ( { ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST; @@ -2199,10 +2201,10 @@ Index: acpica-unix2-20210604/source/components/disassembler/dmwalk.c } } -Index: acpica-unix2-20210604/source/components/namespace/nsaccess.c +Index: acpica-unix2-20210730/source/components/namespace/nsaccess.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/namespace/nsaccess.c -+++ acpica-unix2-20210604/source/components/namespace/nsaccess.c +--- acpica-unix2-20210730.orig/source/components/namespace/nsaccess.c ++++ acpica-unix2-20210730/source/components/namespace/nsaccess.c @@ -644,7 +644,7 @@ AcpiNsLookup ( /* Extract one ACPI name from the front of the pathname */ @@ -2212,10 +2214,10 @@ Index: acpica-unix2-20210604/source/components/namespace/nsaccess.c /* Try to find the single (4 character) ACPI name */ -Index: acpica-unix2-20210604/source/components/namespace/nsnames.c +Index: acpica-unix2-20210730/source/components/namespace/nsnames.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/namespace/nsnames.c -+++ acpica-unix2-20210604/source/components/namespace/nsnames.c +--- acpica-unix2-20210730.orig/source/components/namespace/nsnames.c ++++ acpica-unix2-20210730/source/components/namespace/nsnames.c @@ -297,10 +297,10 @@ AcpiNsBuildNormalizedPath ( { if (NextNode != Node) @@ -2229,10 +2231,10 @@ Index: acpica-unix2-20210604/source/components/namespace/nsnames.c DoNoTrailing = NoTrailing; for (i = 0; i < 4; i++) { -Index: acpica-unix2-20210604/source/components/namespace/nsparse.c +Index: acpica-unix2-20210730/source/components/namespace/nsparse.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/namespace/nsparse.c -+++ acpica-unix2-20210604/source/components/namespace/nsparse.c +--- acpica-unix2-20210730.orig/source/components/namespace/nsparse.c ++++ acpica-unix2-20210730/source/components/namespace/nsparse.c @@ -203,6 +203,7 @@ AcpiNsOneCompleteParse ( ACPI_WALK_STATE *WalkState; ACPI_TABLE_HEADER *Table; @@ -2258,10 +2260,10 @@ Index: acpica-unix2-20210604/source/components/namespace/nsparse.c Status = AcpiTbGetOwnerId (TableIndex, &OwnerId); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20210604/source/components/namespace/nsutils.c +Index: acpica-unix2-20210730/source/components/namespace/nsutils.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20210604/source/components/namespace/nsutils.c +--- acpica-unix2-20210730.orig/source/components/namespace/nsutils.c ++++ acpica-unix2-20210730/source/components/namespace/nsutils.c @@ -272,7 +272,6 @@ AcpiNsBuildInternalName ( const char *ExternalName = Info->NextExternalChar; char *Result = NULL; @@ -2298,10 +2300,10 @@ Index: acpica-unix2-20210604/source/components/namespace/nsutils.c /* Now we must have a path separator, or the pathname is bad */ -Index: acpica-unix2-20210604/source/components/utilities/utresrc.c +Index: acpica-unix2-20210730/source/components/utilities/utresrc.c =================================================================== ---- acpica-unix2-20210604.orig/source/components/utilities/utresrc.c -+++ acpica-unix2-20210604/source/components/utilities/utresrc.c +--- acpica-unix2-20210730.orig/source/components/utilities/utresrc.c ++++ acpica-unix2-20210730/source/components/utilities/utresrc.c @@ -541,7 +541,7 @@ AcpiUtGetResourceLength ( { /* Large Resource type -- bytes 1-2 contain the 16-bit length */ @@ -2311,10 +2313,10 @@ Index: acpica-unix2-20210604/source/components/utilities/utresrc.c } else -Index: acpica-unix2-20210604/source/compiler/aslrestype2e.c +Index: acpica-unix2-20210730/source/compiler/aslrestype2e.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype2e.c -+++ acpica-unix2-20210604/source/compiler/aslrestype2e.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype2e.c ++++ acpica-unix2-20210730/source/compiler/aslrestype2e.c @@ -80,6 +80,7 @@ RsDoExtendedIoDescriptor ( UINT16 StringLength = 0; UINT32 CurrentByteOffset; @@ -2573,10 +2575,10 @@ Index: acpica-unix2-20210604/source/compiler/aslrestype2e.c Descriptor->ExtAddress64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20210604/source/compiler/aslrestype2s.c +Index: acpica-unix2-20210730/source/compiler/aslrestype2s.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/aslrestype2s.c -+++ acpica-unix2-20210604/source/compiler/aslrestype2s.c +--- acpica-unix2-20210730.orig/source/compiler/aslrestype2s.c ++++ acpica-unix2-20210730/source/compiler/aslrestype2s.c @@ -343,6 +343,7 @@ RsDoGpioIntDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; diff --git a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch index 45bfbb5..62866f4 100644 --- a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch +++ b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 28 +++++++++++++------------ 2 files changed, 39 insertions(+), 32 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump1.c +Index: acpica-unix2-20210730/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210604/source/common/dmtbdump1.c -@@ -374,11 +374,13 @@ AcpiDmDumpCsrt ( +--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20210730/source/common/dmtbdump1.c +@@ -593,11 +593,13 @@ AcpiDmDumpCsrt ( ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubtable; @@ -31,7 +31,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c /* The main table only contains the ACPI header, thus already handled */ -@@ -386,13 +388,14 @@ AcpiDmDumpCsrt ( +@@ -605,13 +607,14 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); @@ -49,7 +49,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -405,26 +408,28 @@ AcpiDmDumpCsrt ( +@@ -624,26 +627,28 @@ AcpiDmDumpCsrt ( Offset + SubOffset); AcpiOsPrintf ("\n"); @@ -85,7 +85,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -434,11 +439,12 @@ AcpiDmDumpCsrt ( +@@ -653,11 +658,12 @@ AcpiDmDumpCsrt ( /* Resource-specific info buffer */ @@ -101,7 +101,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c InfoLength, AcpiDmTableInfoCsrt2a); if (ACPI_FAILURE (Status)) { -@@ -448,16 +454,15 @@ AcpiDmDumpCsrt ( +@@ -667,16 +673,15 @@ AcpiDmDumpCsrt ( /* Point to next sub-subtable */ @@ -122,11 +122,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump1.c } } -Index: acpica-unix2-20210604/source/compiler/dttable1.c +Index: acpica-unix2-20210730/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210604/source/compiler/dttable1.c -@@ -353,14 +353,16 @@ DtCompileCsrt ( +--- acpica-unix2-20210730.orig/source/compiler/dttable1.c ++++ acpica-unix2-20210730/source/compiler/dttable1.c +@@ -570,14 +570,16 @@ DtCompileCsrt ( DT_SUBTABLE *Subtable; DT_SUBTABLE *ParentTable; DT_FIELD **PFieldList = (DT_FIELD **) List; @@ -144,7 +144,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c while (*PFieldList) { /* Resource group subtable */ -@@ -375,16 +377,13 @@ DtCompileCsrt ( +@@ -592,16 +594,13 @@ DtCompileCsrt ( /* Compute the number of resource descriptors */ Tmp = AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_CSRT_GROUP, @@ -163,7 +163,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c DtInsertSubtable (ParentTable, Subtable); DtPushSubtable (Subtable); ParentTable = DtPeekSubtable (); -@@ -399,10 +398,13 @@ DtCompileCsrt ( +@@ -616,10 +615,13 @@ DtCompileCsrt ( } DtInsertSubtable (ParentTable, Subtable); @@ -178,7 +178,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c { Status = DtCompileTable (PFieldList, AcpiDmTableInfoCsrt2, -@@ -411,6 +413,10 @@ DtCompileCsrt ( +@@ -628,6 +630,10 @@ DtCompileCsrt ( { return (Status); } @@ -189,7 +189,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c DtInsertSubtable (ParentTable, Subtable); -@@ -420,11 +426,7 @@ DtCompileCsrt ( +@@ -637,11 +643,7 @@ DtCompileCsrt ( { Status = DtCompileTable (PFieldList, AcpiDmTableInfoCsrt2a, &Subtable); @@ -202,7 +202,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable1.c { DtInsertSubtable (ParentTable, Subtable); } -@@ -432,7 +434,7 @@ DtCompileCsrt ( +@@ -649,7 +651,7 @@ DtCompileCsrt ( DtPopSubtable (); ParentTable = DtPeekSubtable (); diff --git a/acpica-tools.spec b/acpica-tools.spec index 07e7481..4ae3f29 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,12 +1,12 @@ Name: acpica-tools -Version: 20210604 -Release: 4%{?dist} +Version: 20210730 +Release: 1%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 URL: https://www.acpica.org/ -Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar_0.gz +Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz Source2: README.Fedora Source3: iasl.1 @@ -67,9 +67,8 @@ Patch39: 0040-Support-S3PT-in-a-big-endian-world.patch Patch40: 0041-Support-IORT-in-a-big-endian-world.patch Patch41: 0042-Support-IVRS-in-a-big-endian-world.patch 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 +Patch43: 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch +Patch44: 0046-Support-PHAT-in-a-big-endian-world.patch # other miscellaneous patches Patch100: unaligned.patch @@ -89,7 +88,6 @@ Patch113: facp.patch Patch114: armv7-str-fixes.patch Patch115: dbtest.patch Patch116: ull-32bit.patch -Patch117: wpbt-unicode.patch BuildRequires: make BuildRequires: bison patchutils flex gcc @@ -258,6 +256,9 @@ fi * Wed Jan 19 2022 Fedora Release Engineering - 20210604-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild +* Mon Oct 4 2021 Al Stone - 20210730-1 +- Update to 20210730 upstream source. Bring all the patches up to date. + * Tue Jul 27 2021 Al Stone - 20210604-3 - Running 'iasl -T all' would segfault when dumping the PHAT template; fixed AcpiDmDumpPhat() by removing unnecessary assignments from patch diff --git a/sources b/sources index 75beb94..4b7a504 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20210604.tar_0.gz) = f7f6e3c1964ffae186fe3d34b64a6251dd2e4423244c08c7e4301fd38396eac1af6e562956984a37af803ac11d5a46dd2dce88540787df353fc268002710dc62 -SHA512 (acpitests-unix-20210604.tar.gz) = 80b4676f1a9e11a7c1962eb8f292400322bbcfc91718749138c7807c7bbc38e52dd88c8e42096752e491298f4b07f6a68fa9ff2c49450be1de3abef56e8ba08a +SHA512 (acpica-unix2-20210730.tar.gz) = 9a8b88e44029a241cd3f26714b244723a59b7235662ecdf0c042b816495f140722aeb3897424c6f43bdddc81c141b1fa09c9645a6e0c4d860159001a65e08483 +SHA512 (acpitests-unix-20210730.tar.gz) = 4d01574f05ec1fd22d3fcdf6b5245c5670245c4edb11e8ce44fdcac73296552095539eab854cfb271abfd6409507951f0e8512ff57a74caa0e8609fef5f2035e From da0952d3816054a01c76778255a5a6ea55012c78 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Wed, 9 Mar 2022 20:00:17 -0700 Subject: [PATCH 07/28] Update source tarballs Signed-off-by: Al Stone --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bd2f67d..7be0935 100644 --- a/.gitignore +++ b/.gitignore @@ -150,3 +150,5 @@ series /acpica-unix2-20210604.tar.gz /acpica-unix2-20210730.tar.gz /acpitests-unix-20210730.tar.gz +/acpica-unix2-20210930.tar.gz +/acpitests-unix-20210930.tar.gz diff --git a/sources b/sources index 4b7a504..391c577 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20210730.tar.gz) = 9a8b88e44029a241cd3f26714b244723a59b7235662ecdf0c042b816495f140722aeb3897424c6f43bdddc81c141b1fa09c9645a6e0c4d860159001a65e08483 -SHA512 (acpitests-unix-20210730.tar.gz) = 4d01574f05ec1fd22d3fcdf6b5245c5670245c4edb11e8ce44fdcac73296552095539eab854cfb271abfd6409507951f0e8512ff57a74caa0e8609fef5f2035e +SHA512 (acpica-unix2-20210930.tar.gz) = c60b744e1176530c2a6460ddf5c65b6b7acd5adda90df06747186e75ee3d83a1e86c11832aa0b4d929a0e5143a5304ab17a96bc2a77b7f13a2fc39dd1bb9b01a +SHA512 (acpitests-unix-20210930.tar.gz) = 0f1811b21f0c1983c6608151722ce975f5ed8dd6e4f3243f6ab472a71689fcee2efe8b3072b14f796ae09506e3df388187e87047ad26c539a04811b2b601de53 From b0419b13c7d56f0af12aff1f8b312c3a50302238 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Wed, 9 Mar 2022 20:05:58 -0700 Subject: [PATCH 08/28] Update 20211217 tarballs Signed-off-by: Al Stone --- .gitignore | 2 ++ sources | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7be0935..f0d850d 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,5 @@ series /acpitests-unix-20210730.tar.gz /acpica-unix2-20210930.tar.gz /acpitests-unix-20210930.tar.gz +/acpica-unix2-20211217.tar.gz +/acpitests-unix-20211217.tar.gz diff --git a/sources b/sources index 391c577..ad07293 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20210930.tar.gz) = c60b744e1176530c2a6460ddf5c65b6b7acd5adda90df06747186e75ee3d83a1e86c11832aa0b4d929a0e5143a5304ab17a96bc2a77b7f13a2fc39dd1bb9b01a -SHA512 (acpitests-unix-20210930.tar.gz) = 0f1811b21f0c1983c6608151722ce975f5ed8dd6e4f3243f6ab472a71689fcee2efe8b3072b14f796ae09506e3df388187e87047ad26c539a04811b2b601de53 +SHA512 (acpica-unix2-20211217.tar.gz) = e8e6e4f4543205d2ed9c8fe2b49c8952272d4a1b066018327660c6a4e0fd018d3144e18a759784b6b4a37efe726ec0c61ff36026a1021cdcba6c7627e105385d +SHA512 (acpitests-unix-20211217.tar.gz) = 1dd73746accc78118477d57b01c43d60df02c8a3cea4ebba8ea2dac85871193debe359437f4cd25a3662520063f5f4a28f5e3fdfc3bc979fdd8a136fee7e43ac From 97df1c2ef7772c22f4e1a09978886167dfbdbb73 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Fri, 18 Mar 2022 16:08:40 -0600 Subject: [PATCH 09/28] Update all patches to match upstream 20211217 release Signed-off-by: Al Stone --- ...lity-functions-to-be-endian-agnostic.patch | 46 ++--- ...ing-Unicode-properly-when-big-endian.patch | 14 +- ...ort-ASF-tables-in-a-big-endian-world.patch | 12 +- ...rt-CPEP-tables-in-a-big-endian-world.patch | 10 +- ...ort-DBG2-table-in-a-big-endian-world.patch | 32 ++-- 0012-Support-DMAR-in-a-big-endian-world.patch | 34 ++-- 0013-Support-DRTM-in-a-big-endian-world.patch | 24 +-- 0014-Support-EINJ-in-a-big-endian-world.patch | 10 +- 0015-Support-ERST-in-a-big-endian-world.patch | 10 +- ...-FADT-aka-FACP-in-a-big-endian-world.patch | 24 +-- ...ort-most-FPDTs-in-a-big-endian-world.patch | 18 +- 0018-Support-GTDT-in-a-big-endian-world.patch | 18 +- 0019-Support-HEST-in-a-big-endian-world.patch | 18 +- ...t-RSDT-RSD-PTR-in-a-big-endian-world.patch | 10 +- 0021-Support-XSDT-in-a-big-endian-world.patch | 10 +- 0022-Support-SRAT-in-a-big-endian-world.patch | 8 +- 0023-Support-SLIT-in-a-big-endian-world.patch | 14 +- 0024-Support-MSCT-in-a-big-endian-world.patch | 6 +- 0026-Support-NFIT-in-a-big-endian-world.patch | 20 +- 0027-Support-SDEV-in-a-big-endian-world.patch | 38 ++-- 0028-Support-HMAT-in-a-big-endian-world.patch | 30 +-- 0029-Support-PDTT-in-a-big-endian-world.patch | 10 +- 0030-Support-PPTT-in-a-big-endian-world.patch | 28 +-- 0031-Support-PCCT-in-a-big-endian-world.patch | 12 +- 0032-Support-WDAT-in-a-big-endian-world.patch | 10 +- 0033-Support-TCPA-in-a-big-endian-world.patch | 20 +- 0034-Support-STAO-in-a-big-endian-world.patch | 10 +- ...-SLIC-and-MSDM-in-a-big-endian-world.patch | 6 +- 0038-Support-PMTT-in-a-big-endian-world.patch | 18 +- 0039-Support-TPM2-in-a-big-endian-world.patch | 32 ++-- 0040-Support-S3PT-in-a-big-endian-world.patch | 26 +-- ...port-DSDT-SSDT-in-a-big-endian-world.patch | 176 +++++++++--------- ...T-fixed-use-of-optional-ResourceInfo.patch | 22 +-- 0046-Support-PHAT-in-a-big-endian-world.patch | 30 +-- acpica-tools.spec | 21 ++- armv7-str-fixes.patch | 8 +- badcode.asl.result | 4 +- facp.patch | 28 --- grammar.asl.result | 125 +++++++------ ull-32bit.patch | 8 +- 40 files changed, 498 insertions(+), 502 deletions(-) delete mode 100644 facp.patch diff --git a/0002-Modify-utility-functions-to-be-endian-agnostic.patch b/0002-Modify-utility-functions-to-be-endian-agnostic.patch index ff08d2e..8c06f05 100644 --- a/0002-Modify-utility-functions-to-be-endian-agnostic.patch +++ b/0002-Modify-utility-functions-to-be-endian-agnostic.patch @@ -24,10 +24,10 @@ Signed-off-by: Al Stone source/components/tables/tbprint.c | 13 +++++++++---- 5 files changed, 26 insertions(+), 17 deletions(-) -Index: acpica-unix2-20210730/source/common/acfileio.c +Index: acpica-unix2-20211217/source/common/acfileio.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/acfileio.c -+++ acpica-unix2-20210730/source/common/acfileio.c +--- acpica-unix2-20211217.orig/source/common/acfileio.c ++++ acpica-unix2-20211217/source/common/acfileio.c @@ -280,6 +280,7 @@ AcGetOneTableFromFile ( ACPI_TABLE_HEADER *Table; INT32 Count; @@ -79,7 +79,7 @@ Index: acpica-unix2-20210730/source/common/acfileio.c ACPI_FUNCTION_TRACE (AcValidateTableHeader); -@@ -467,11 +470,12 @@ AcValidateTableHeader ( +@@ -472,11 +475,12 @@ AcValidateTableHeader ( /* Validate table length against bytes remaining in the file */ FileSize = CmGetFileSize (File); @@ -94,11 +94,11 @@ Index: acpica-unix2-20210730/source/common/acfileio.c (UINT32) (FileSize - TableOffset)); return (AE_BAD_HEADER); } -Index: acpica-unix2-20210730/source/common/dmtable.c +Index: acpica-unix2-20211217/source/common/dmtable.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtable.c -+++ acpica-unix2-20210730/source/common/dmtable.c -@@ -641,7 +641,7 @@ AcpiDmDumpDataTable ( +--- acpica-unix2-20211217.orig/source/common/dmtable.c ++++ acpica-unix2-20211217/source/common/dmtable.c +@@ -710,7 +710,7 @@ AcpiDmDumpDataTable ( { /* Dump the raw table data */ @@ -107,7 +107,7 @@ Index: acpica-unix2-20210730/source/common/dmtable.c AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n", ACPI_RAW_TABLE_DATA_HEADER, Length, Length); -@@ -658,7 +658,7 @@ AcpiDmDumpDataTable ( +@@ -727,7 +727,7 @@ AcpiDmDumpDataTable ( */ if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) { @@ -116,7 +116,7 @@ Index: acpica-unix2-20210730/source/common/dmtable.c Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); if (ACPI_FAILURE (Status)) { -@@ -678,7 +678,7 @@ AcpiDmDumpDataTable ( +@@ -748,7 +748,7 @@ AcpiDmDumpDataTable ( /* * All other tables must use the common ACPI table header, dump it now */ @@ -125,7 +125,7 @@ Index: acpica-unix2-20210730/source/common/dmtable.c Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader); if (ACPI_FAILURE (Status)) { -@@ -1324,7 +1324,7 @@ AcpiDmDumpTable ( +@@ -1407,7 +1407,7 @@ AcpiDmDumpTable ( AcpiOsPrintf ("%2.2X", *Target); Temp8 = AcpiDmGenerateChecksum (Table, @@ -134,10 +134,10 @@ Index: acpica-unix2-20210730/source/common/dmtable.c ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum) -Index: acpica-unix2-20210730/source/compiler/dtfield.c +Index: acpica-unix2-20211217/source/compiler/dtfield.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dtfield.c -+++ acpica-unix2-20210730/source/compiler/dtfield.c +--- acpica-unix2-20211217.orig/source/compiler/dtfield.c ++++ acpica-unix2-20211217/source/compiler/dtfield.c @@ -361,7 +361,7 @@ DtCompileInteger ( DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, AslGbl_MsgBuffer); } @@ -147,10 +147,10 @@ Index: acpica-unix2-20210730/source/compiler/dtfield.c return; } -Index: acpica-unix2-20210730/source/compiler/dtsubtable.c +Index: acpica-unix2-20211217/source/compiler/dtsubtable.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dtsubtable.c -+++ acpica-unix2-20210730/source/compiler/dtsubtable.c +--- acpica-unix2-20211217.orig/source/compiler/dtsubtable.c ++++ acpica-unix2-20211217/source/compiler/dtsubtable.c @@ -378,6 +378,6 @@ DtSetSubtableLength ( return; } @@ -160,10 +160,10 @@ Index: acpica-unix2-20210730/source/compiler/dtsubtable.c + AcpiUtWriteUint (Subtable->LengthField, Subtable->SizeOfLengthField, + &Subtable->TotalLength, sizeof (Subtable->TotalLength)); } -Index: acpica-unix2-20210730/source/components/tables/tbprint.c +Index: acpica-unix2-20211217/source/components/tables/tbprint.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/tables/tbprint.c -+++ acpica-unix2-20210730/source/components/tables/tbprint.c +--- acpica-unix2-20211217.orig/source/components/tables/tbprint.c ++++ acpica-unix2-20211217/source/components/tables/tbprint.c @@ -44,6 +44,8 @@ #include "acpi.h" #include "accommon.h" @@ -180,9 +180,9 @@ Index: acpica-unix2-20210730/source/components/tables/tbprint.c - Header->Length)); + AcpiUtReadUint32 (&Header->Length))); } - else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature)) - { -@@ -178,9 +180,12 @@ AcpiTbPrintTableHeader ( + else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP, + Header)->Signature)) +@@ -179,9 +181,12 @@ AcpiTbPrintTableHeader ( "%-4.4s 0x%8.8X%8.8X" " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", LocalHeader.Signature, ACPI_FORMAT_UINT64 (Address), diff --git a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch index 9fe820a..a046fe9 100644 --- a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch +++ b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump.c +Index: acpica-unix2-20211217/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210730/source/common/dmtbdump.c -@@ -146,6 +146,8 @@ AcpiDmDumpUnicode ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump.c ++++ acpica-unix2-20211217/source/common/dmtbdump.c +@@ -200,6 +200,8 @@ AcpiDmDumpUnicode ( UINT8 *Buffer; UINT32 Length; UINT32 i; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c Buffer = ((UINT8 *) Table) + BufferOffset; -@@ -155,7 +157,8 @@ AcpiDmDumpUnicode ( +@@ -209,7 +211,8 @@ AcpiDmDumpUnicode ( for (i = 0; i < Length; i += 2) { @@ -31,7 +31,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c { goto DumpRawBuffer; } -@@ -163,7 +166,8 @@ AcpiDmDumpUnicode ( +@@ -217,7 +220,8 @@ AcpiDmDumpUnicode ( /* Ensure all high bytes are zero */ @@ -41,7 +41,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c { if (Buffer[i]) { -@@ -176,7 +180,8 @@ AcpiDmDumpUnicode ( +@@ -230,7 +234,8 @@ AcpiDmDumpUnicode ( AcpiOsPrintf ("\""); for (i = 0; i < Length; i += 2) { diff --git a/0009-Support-ASF-tables-in-a-big-endian-world.patch b/0009-Support-ASF-tables-in-a-big-endian-world.patch index 1010c29..a0cdeb7 100644 --- a/0009-Support-ASF-tables-in-a-big-endian-world.patch +++ b/0009-Support-ASF-tables-in-a-big-endian-world.patch @@ -10,11 +10,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -298,16 +298,18 @@ AcpiDmDumpAsf ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -296,16 +296,18 @@ AcpiDmDumpAsf ( UINT32 DataOffset = 0; UINT32 i; UINT8 Type; @@ -35,7 +35,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c Subtable->Header.Length, AcpiDmTableInfoAsfHdr); if (ACPI_FAILURE (Status)) { -@@ -365,7 +367,7 @@ AcpiDmDumpAsf ( +@@ -363,7 +365,7 @@ AcpiDmDumpAsf ( return; } @@ -44,7 +44,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c Subtable->Header.Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -382,7 +384,7 @@ AcpiDmDumpAsf ( +@@ -380,7 +382,7 @@ AcpiDmDumpAsf ( for (i = 0; i < DataCount; i++) { AcpiOsPrintf ("\n"); diff --git a/0010-Support-CPEP-tables-in-a-big-endian-world.patch b/0010-Support-CPEP-tables-in-a-big-endian-world.patch index 9247b9b..a27a312 100644 --- a/0010-Support-CPEP-tables-in-a-big-endian-world.patch +++ b/0010-Support-CPEP-tables-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -538,7 +538,7 @@ AcpiDmDumpCpep ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -536,7 +536,7 @@ AcpiDmDumpCpep ( { ACPI_STATUS Status; ACPI_CPEP_POLLING *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_CPEP); -@@ -553,7 +553,7 @@ AcpiDmDumpCpep ( +@@ -551,7 +551,7 @@ AcpiDmDumpCpep ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); diff --git a/0011-Support-DBG2-table-in-a-big-endian-world.patch b/0011-Support-DBG2-table-in-a-big-endian-world.patch index 7c22228..5a2c9dd 100644 --- a/0011-Support-DBG2-table-in-a-big-endian-world.patch +++ b/0011-Support-DBG2-table-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 43 ++++++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 32 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -593,7 +593,7 @@ AcpiDmDumpCsrt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -591,7 +591,7 @@ AcpiDmDumpCsrt ( ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubtable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_CSRT); UINT32 SubOffset; UINT32 SubSubOffset; -@@ -605,7 +605,7 @@ AcpiDmDumpCsrt ( +@@ -603,7 +603,7 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); @@ -31,7 +31,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { /* Resource group subtable */ -@@ -639,7 +639,7 @@ AcpiDmDumpCsrt ( +@@ -637,7 +637,7 @@ AcpiDmDumpCsrt ( Offset + SubOffset); while ((SubOffset < Subtable->Length) && @@ -40,7 +40,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable, -@@ -700,12 +700,13 @@ AcpiDmDumpDbg2 ( +@@ -698,12 +698,13 @@ AcpiDmDumpDbg2 ( { ACPI_STATUS Status; ACPI_DBG2_DEVICE *Subtable; @@ -55,7 +55,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c /* Main table */ -@@ -719,11 +720,12 @@ AcpiDmDumpDbg2 ( +@@ -717,11 +718,12 @@ AcpiDmDumpDbg2 ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); @@ -70,7 +70,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -733,13 +735,13 @@ AcpiDmDumpDbg2 ( +@@ -731,13 +733,13 @@ AcpiDmDumpDbg2 ( for (i = 0; i < Subtable->RegisterCount; i++) { @@ -86,7 +86,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -750,13 +752,13 @@ AcpiDmDumpDbg2 ( +@@ -748,13 +750,13 @@ AcpiDmDumpDbg2 ( for (i = 0; i < Subtable->RegisterCount; i++) { @@ -102,7 +102,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -766,12 +768,12 @@ AcpiDmDumpDbg2 ( +@@ -764,12 +766,12 @@ AcpiDmDumpDbg2 ( /* Dump the Namestring (required) */ AcpiOsPrintf ("\n"); @@ -117,7 +117,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -781,8 +783,11 @@ AcpiDmDumpDbg2 ( +@@ -779,8 +781,11 @@ AcpiDmDumpDbg2 ( if (Subtable->OemDataOffset) { @@ -131,7 +131,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c AcpiDmTableInfoDbg2OemData); if (ACPI_FAILURE (Status)) { -@@ -792,9 +797,9 @@ AcpiDmDumpDbg2 ( +@@ -790,9 +795,9 @@ AcpiDmDumpDbg2 ( /* Point to next subtable */ @@ -143,10 +143,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c } } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -572,6 +572,7 @@ DtCompileCsrt ( DT_FIELD **PFieldList = (DT_FIELD **) List; UINT32 DescriptorCount; diff --git a/0012-Support-DMAR-in-a-big-endian-world.patch b/0012-Support-DMAR-in-a-big-endian-world.patch index f083ef8..895f65f 100644 --- a/0012-Support-DMAR-in-a-big-endian-world.patch +++ b/0012-Support-DMAR-in-a-big-endian-world.patch @@ -10,11 +10,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 12 +++++++----- 3 files changed, 24 insertions(+), 18 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtable.c +Index: acpica-unix2-20211217/source/common/dmtable.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtable.c -+++ acpica-unix2-20210730/source/common/dmtable.c -@@ -1487,13 +1487,13 @@ AcpiDmDumpTable ( +--- acpica-unix2-20211217.orig/source/common/dmtable.c ++++ acpica-unix2-20211217/source/common/dmtable.c +@@ -1570,13 +1570,13 @@ AcpiDmDumpTable ( /* DMAR subtable types */ @@ -30,11 +30,11 @@ Index: acpica-unix2-20210730/source/common/dmtable.c AcpiDmDmarSubnames[Temp16]); break; -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -823,13 +823,15 @@ AcpiDmDumpDmar ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -821,13 +821,15 @@ AcpiDmDumpDmar ( { ACPI_STATUS Status; ACPI_DMAR_HEADER *Subtable; @@ -51,7 +51,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c /* Main table */ -@@ -843,13 +845,14 @@ AcpiDmDumpDmar ( +@@ -841,13 +843,14 @@ AcpiDmDumpDmar ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); @@ -68,7 +68,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -857,7 +860,8 @@ AcpiDmDumpDmar ( +@@ -855,7 +858,8 @@ AcpiDmDumpDmar ( AcpiOsPrintf ("\n"); @@ -78,7 +78,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { case ACPI_DMAR_TYPE_HARDWARE_UNIT: -@@ -892,12 +896,12 @@ AcpiDmDumpDmar ( +@@ -890,12 +894,12 @@ AcpiDmDumpDmar ( default: AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", @@ -93,7 +93,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -906,8 +910,8 @@ AcpiDmDumpDmar ( +@@ -904,8 +908,8 @@ AcpiDmDumpDmar ( /* * Dump the optional device scope entries */ @@ -104,7 +104,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { /* These types do not support device scopes */ -@@ -915,7 +919,7 @@ AcpiDmDumpDmar ( +@@ -913,7 +917,7 @@ AcpiDmDumpDmar ( } ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable, ScopeOffset); @@ -113,7 +113,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable, -@@ -956,9 +960,9 @@ AcpiDmDumpDmar ( +@@ -954,9 +958,9 @@ AcpiDmDumpDmar ( NextSubtable: /* Point to next subtable */ @@ -125,10 +125,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c } } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -851,6 +851,7 @@ DtCompileDmar ( ACPI_DMAR_DEVICE_SCOPE *DmarDeviceScope; UINT32 DeviceScopeLength; diff --git a/0013-Support-DRTM-in-a-big-endian-world.patch b/0013-Support-DRTM-in-a-big-endian-world.patch index e7bdcd8..02fa91e 100644 --- a/0013-Support-DRTM-in-a-big-endian-world.patch +++ b/0013-Support-DRTM-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 6 ++++-- 2 files changed, 19 insertions(+), 12 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -989,11 +989,14 @@ AcpiDmDumpDrtm ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -987,11 +987,14 @@ AcpiDmDumpDrtm ( ACPI_DRTM_RESOURCE_LIST *DrtmRl; ACPI_DRTM_DPS_ID *DrtmDps; UINT32 Count; @@ -29,7 +29,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c AcpiDmTableInfoDrtm); if (ACPI_FAILURE (Status)) { -@@ -1008,7 +1011,7 @@ AcpiDmDumpDrtm ( +@@ -1006,7 +1009,7 @@ AcpiDmDumpDrtm ( DrtmVtl = ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST, Table, Offset); AcpiOsPrintf ("\n"); @@ -38,7 +38,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c DrtmVtl, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST, ValidatedTables), AcpiDmTableInfoDrtm0); if (ACPI_FAILURE (Status)) -@@ -1021,10 +1024,11 @@ AcpiDmDumpDrtm ( +@@ -1019,10 +1022,11 @@ AcpiDmDumpDrtm ( /* Dump Validated table addresses */ Count = 0; @@ -53,7 +53,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c ACPI_ADD_PTR (void, Table, Offset), sizeof (UINT64), AcpiDmTableInfoDrtm0a); if (ACPI_FAILURE (Status)) -@@ -1040,7 +1044,7 @@ AcpiDmDumpDrtm ( +@@ -1038,7 +1042,7 @@ AcpiDmDumpDrtm ( DrtmRl = ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST, Table, Offset); AcpiOsPrintf ("\n"); @@ -62,7 +62,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c DrtmRl, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST, Resources), AcpiDmTableInfoDrtm1); if (ACPI_FAILURE (Status)) -@@ -1053,10 +1057,11 @@ AcpiDmDumpDrtm ( +@@ -1051,10 +1055,11 @@ AcpiDmDumpDrtm ( /* Dump the Resource List */ Count = 0; @@ -77,7 +77,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c ACPI_ADD_PTR (void, Table, Offset), sizeof (ACPI_DRTM_RESOURCE), AcpiDmTableInfoDrtm1a); if (ACPI_FAILURE (Status)) -@@ -1072,7 +1077,7 @@ AcpiDmDumpDrtm ( +@@ -1070,7 +1075,7 @@ AcpiDmDumpDrtm ( DrtmDps = ACPI_ADD_PTR (ACPI_DRTM_DPS_ID, Table, Offset); AcpiOsPrintf ("\n"); @@ -86,10 +86,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c DrtmDps, sizeof (ACPI_DRTM_DPS_ID), AcpiDmTableInfoDrtm2); } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -1066,7 +1066,8 @@ DtCompileDrtm ( Count++; } diff --git a/0014-Support-EINJ-in-a-big-endian-world.patch b/0014-Support-EINJ-in-a-big-endian-world.patch index 157cce7..5e360a1 100644 --- a/0014-Support-EINJ-in-a-big-endian-world.patch +++ b/0014-Support-EINJ-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -1101,7 +1101,7 @@ AcpiDmDumpEinj ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -1099,7 +1099,7 @@ AcpiDmDumpEinj ( { ACPI_STATUS Status; ACPI_WHEA_HEADER *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_EINJ); -@@ -1116,7 +1116,7 @@ AcpiDmDumpEinj ( +@@ -1114,7 +1114,7 @@ AcpiDmDumpEinj ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); diff --git a/0015-Support-ERST-in-a-big-endian-world.patch b/0015-Support-ERST-in-a-big-endian-world.patch index 3e19334..db9cade 100644 --- a/0015-Support-ERST-in-a-big-endian-world.patch +++ b/0015-Support-ERST-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -1154,7 +1154,7 @@ AcpiDmDumpErst ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -1152,7 +1152,7 @@ AcpiDmDumpErst ( { ACPI_STATUS Status; ACPI_WHEA_HEADER *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_ERST); -@@ -1169,7 +1169,7 @@ AcpiDmDumpErst ( +@@ -1167,7 +1167,7 @@ AcpiDmDumpErst ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); diff --git a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch index 9aa875f..f74a041 100644 --- a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch +++ b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/components/tables/tbfadt.c | 34 +++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 21 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump.c +Index: acpica-unix2-20211217/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210730/source/common/dmtbdump.c -@@ -363,11 +363,12 @@ AcpiDmDumpFadt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump.c ++++ acpica-unix2-20211217/source/common/dmtbdump.c +@@ -417,11 +417,12 @@ AcpiDmDumpFadt ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; @@ -27,7 +27,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c AcpiDmTableInfoFadt1); if (ACPI_FAILURE (Status)) { -@@ -376,10 +377,10 @@ AcpiDmDumpFadt ( +@@ -430,10 +431,10 @@ AcpiDmDumpFadt ( /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */ @@ -41,7 +41,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c AcpiDmTableInfoFadt2); if (ACPI_FAILURE (Status)) { -@@ -389,9 +390,9 @@ AcpiDmDumpFadt ( +@@ -443,9 +444,9 @@ AcpiDmDumpFadt ( /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */ @@ -53,7 +53,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c AcpiDmTableInfoFadt3); if (ACPI_FAILURE (Status)) { -@@ -400,9 +401,9 @@ AcpiDmDumpFadt ( +@@ -454,9 +455,9 @@ AcpiDmDumpFadt ( /* Check for FADT revision 5 fields and up (ACPI 5.0+) */ @@ -65,7 +65,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c AcpiDmTableInfoFadt5); if (ACPI_FAILURE (Status)) { -@@ -412,9 +413,9 @@ AcpiDmDumpFadt ( +@@ -466,9 +467,9 @@ AcpiDmDumpFadt ( /* Check for FADT revision 6 fields and up (ACPI 6.0+) */ @@ -77,7 +77,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c AcpiDmTableInfoFadt6); if (ACPI_FAILURE (Status)) { -@@ -425,11 +426,11 @@ AcpiDmDumpFadt ( +@@ -479,11 +480,11 @@ AcpiDmDumpFadt ( /* Validate various fields in the FADT, including length */ @@ -91,10 +91,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c } -Index: acpica-unix2-20210730/source/components/tables/tbfadt.c +Index: acpica-unix2-20211217/source/components/tables/tbfadt.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/tables/tbfadt.c -+++ acpica-unix2-20210730/source/components/tables/tbfadt.c +--- acpica-unix2-20211217.orig/source/components/tables/tbfadt.c ++++ acpica-unix2-20211217/source/components/tables/tbfadt.c @@ -289,7 +289,6 @@ AcpiTbSelectAddress ( UINT32 Address32, UINT64 Address64) diff --git a/0017-Support-most-FPDTs-in-a-big-endian-world.patch b/0017-Support-most-FPDTs-in-a-big-endian-world.patch index bd43520..058f86a 100644 --- a/0017-Support-most-FPDTs-in-a-big-endian-world.patch +++ b/0017-Support-most-FPDTs-in-a-big-endian-world.patch @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -1207,9 +1207,10 @@ AcpiDmDumpFpdt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -1205,9 +1205,10 @@ AcpiDmDumpFpdt ( { ACPI_STATUS Status; ACPI_FPDT_HEADER *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c /* There is no main table (other than the standard ACPI header) */ -@@ -1217,19 +1218,20 @@ AcpiDmDumpFpdt ( +@@ -1215,19 +1216,20 @@ AcpiDmDumpFpdt ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset); @@ -52,7 +52,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { case ACPI_FPDT_TYPE_BOOT: -@@ -1256,7 +1258,7 @@ AcpiDmDumpFpdt ( +@@ -1254,7 +1256,7 @@ AcpiDmDumpFpdt ( goto NextSubtable; } @@ -61,10 +61,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -1342,6 +1342,7 @@ DtCompileFpdt ( ACPI_DMTABLE_INFO *InfoTable; DT_FIELD **PFieldList = (DT_FIELD **) List; diff --git a/0018-Support-GTDT-in-a-big-endian-world.patch b/0018-Support-GTDT-in-a-big-endian-world.patch index 8017791..fdfcd8d 100644 --- a/0018-Support-GTDT-in-a-big-endian-world.patch +++ b/0018-Support-GTDT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 9 +++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -1294,7 +1294,7 @@ AcpiDmDumpGtdt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -1292,7 +1292,7 @@ AcpiDmDumpGtdt ( { ACPI_STATUS Status; ACPI_GTDT_HEADER *Subtable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_GTDT); ACPI_DMTABLE_INFO *InfoTable; UINT32 SubtableLength; -@@ -1330,7 +1330,7 @@ AcpiDmDumpGtdt ( +@@ -1328,7 +1328,7 @@ AcpiDmDumpGtdt ( /* Subtables */ @@ -31,7 +31,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { /* Common subtable header */ -@@ -1348,8 +1348,13 @@ AcpiDmDumpGtdt ( +@@ -1346,8 +1346,13 @@ AcpiDmDumpGtdt ( case ACPI_GTDT_TYPE_TIMER_BLOCK: SubtableLength = sizeof (ACPI_GTDT_TIMER_BLOCK); @@ -47,10 +47,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c InfoTable = AcpiDmTableInfoGtdt0; break; -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -1288,8 +1288,13 @@ DtCompileGtdt ( DtPushSubtable (Subtable); ParentTable = DtPeekSubtable (); diff --git a/0019-Support-HEST-in-a-big-endian-world.patch b/0019-Support-HEST-in-a-big-endian-world.patch index 8fcc14c..611e052 100644 --- a/0019-Support-HEST-in-a-big-endian-world.patch +++ b/0019-Support-HEST-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -1435,12 +1435,13 @@ AcpiDmDumpHest ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -1433,12 +1433,13 @@ AcpiDmDumpHest ( { ACPI_STATUS Status; ACPI_HEST_HEADER *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c /* Main table */ -@@ -1454,10 +1455,11 @@ AcpiDmDumpHest ( +@@ -1452,10 +1453,11 @@ AcpiDmDumpHest ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset); @@ -42,7 +42,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { case ACPI_HEST_TYPE_IA32_CHECK: -@@ -1524,7 +1526,7 @@ AcpiDmDumpHest ( +@@ -1522,7 +1524,7 @@ AcpiDmDumpHest ( /* Cannot continue on unknown type - no length */ AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n", @@ -51,10 +51,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c return; } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -1424,6 +1424,7 @@ DtCompileHest ( DT_FIELD *SubtableStart; ACPI_DMTABLE_INFO *InfoTable; diff --git a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch index b6f1812..0df5881 100644 --- a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch +++ b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump.c +Index: acpica-unix2-20211217/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210730/source/common/dmtbdump.c -@@ -282,6 +282,7 @@ AcpiDmDumpRsdt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump.c ++++ acpica-unix2-20211217/source/common/dmtbdump.c +@@ -336,6 +336,7 @@ AcpiDmDumpRsdt ( UINT32 Entries; UINT32 Offset; UINT32 i; @@ -20,7 +20,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c /* Point to start of table pointer array */ -@@ -291,12 +292,12 @@ AcpiDmDumpRsdt ( +@@ -345,12 +346,12 @@ AcpiDmDumpRsdt ( /* RSDT uses 32-bit pointers */ diff --git a/0021-Support-XSDT-in-a-big-endian-world.patch b/0021-Support-XSDT-in-a-big-endian-world.patch index d3bd2b7..40639d6 100644 --- a/0021-Support-XSDT-in-a-big-endian-world.patch +++ b/0021-Support-XSDT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump.c +Index: acpica-unix2-20211217/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210730/source/common/dmtbdump.c -@@ -323,6 +323,7 @@ AcpiDmDumpXsdt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump.c ++++ acpica-unix2-20211217/source/common/dmtbdump.c +@@ -377,6 +377,7 @@ AcpiDmDumpXsdt ( UINT32 Entries; UINT32 Offset; UINT32 i; @@ -20,7 +20,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c /* Point to start of table pointer array */ -@@ -332,12 +333,13 @@ AcpiDmDumpXsdt ( +@@ -386,12 +387,13 @@ AcpiDmDumpXsdt ( /* XSDT uses 64-bit pointers */ diff --git a/0022-Support-SRAT-in-a-big-endian-world.patch b/0022-Support-SRAT-in-a-big-endian-world.patch index 123d2db..896efe9 100644 --- a/0022-Support-SRAT-in-a-big-endian-world.patch +++ b/0022-Support-SRAT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c @@ -173,11 +173,12 @@ AcpiDmDumpSrat ( UINT32 Offset = sizeof (ACPI_TABLE_SRAT); ACPI_SUBTABLE_HEADER *Subtable; @@ -41,7 +41,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c Subtable->Length, AcpiDmTableInfoSratHdr); if (ACPI_FAILURE (Status)) { -@@ -245,7 +246,7 @@ AcpiDmDumpSrat ( +@@ -250,7 +251,7 @@ AcpiDmDumpSrat ( } AcpiOsPrintf ("\n"); diff --git a/0023-Support-SLIT-in-a-big-endian-world.patch b/0023-Support-SLIT-in-a-big-endian-world.patch index 9f56350..c546b1d 100644 --- a/0023-Support-SLIT-in-a-big-endian-world.patch +++ b/0023-Support-SLIT-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c @@ -96,11 +96,12 @@ AcpiDmDumpSlit ( UINT32 Localities; UINT32 i; @@ -46,11 +46,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c { AcpiOsPrintf ( "\n**** Not enough room in table for all localities\n"); -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -1837,7 +1837,7 @@ DtCompileSlit ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -2221,7 +2221,7 @@ DtCompileSlit ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); diff --git a/0024-Support-MSCT-in-a-big-endian-world.patch b/0024-Support-MSCT-in-a-big-endian-world.patch index 4f972b0..43dae55 100644 --- a/0024-Support-MSCT-in-a-big-endian-world.patch +++ b/0024-Support-MSCT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c @@ -1133,11 +1133,12 @@ AcpiDmDumpMsct ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_MSCT); diff --git a/0026-Support-NFIT-in-a-big-endian-world.patch b/0026-Support-NFIT-in-a-big-endian-world.patch index c774903..5089e09 100644 --- a/0026-Support-NFIT-in-a-big-endian-world.patch +++ b/0026-Support-NFIT-in-a-big-endian-world.patch @@ -13,11 +13,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 11 ++++++--- 3 files changed, 39 insertions(+), 25 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtable.c +Index: acpica-unix2-20211217/source/common/dmtable.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtable.c -+++ acpica-unix2-20210730/source/common/dmtable.c -@@ -1672,13 +1672,13 @@ AcpiDmDumpTable ( +--- acpica-unix2-20211217.orig/source/common/dmtable.c ++++ acpica-unix2-20211217/source/common/dmtable.c +@@ -1755,13 +1755,13 @@ AcpiDmDumpTable ( /* NFIT subtable types */ @@ -33,10 +33,10 @@ Index: acpica-unix2-20210730/source/common/dmtable.c AcpiDmNfitSubnames[Temp16]); break; -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c @@ -1192,18 +1192,23 @@ AcpiDmDumpNfit ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_NFIT); @@ -175,10 +175,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c } } -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c @@ -497,6 +497,7 @@ DtCompileNfit ( UINT32 Count; ACPI_NFIT_INTERLEAVE *Interleave = NULL; diff --git a/0027-Support-SDEV-in-a-big-endian-world.patch b/0027-Support-SDEV-in-a-big-endian-world.patch index d933b58..11adeb5 100644 --- a/0027-Support-SDEV-in-a-big-endian-world.patch +++ b/0027-Support-SDEV-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 27 ++++++++++++++++++++- 2 files changed, 52 insertions(+), 23 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -2125,7 +2125,7 @@ AcpiDmDumpSdev ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -2534,7 +2534,7 @@ AcpiDmDumpSdev ( ACPI_SDEV_NAMESPACE *Namesp; ACPI_DMTABLE_INFO *InfoTable; ACPI_DMTABLE_INFO *SecureComponentInfoTable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c UINT32 Offset = sizeof (ACPI_TABLE_SDEV); UINT16 PathOffset; UINT16 PathLength; -@@ -2133,11 +2133,12 @@ AcpiDmDumpSdev ( +@@ -2542,11 +2542,12 @@ AcpiDmDumpSdev ( UINT16 VendorDataLength; ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; UINT32 CurrentOffset = 0; @@ -36,7 +36,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2146,13 +2147,14 @@ AcpiDmDumpSdev ( +@@ -2555,13 +2556,14 @@ AcpiDmDumpSdev ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_SDEV_HEADER, Table, Offset); @@ -54,7 +54,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2175,8 +2177,8 @@ AcpiDmDumpSdev ( +@@ -2584,8 +2586,8 @@ AcpiDmDumpSdev ( } AcpiOsPrintf ("\n"); @@ -65,7 +65,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2235,12 +2237,12 @@ AcpiDmDumpSdev ( +@@ -2644,12 +2646,12 @@ AcpiDmDumpSdev ( /* Dump the PCIe device ID(s) */ Namesp = ACPI_CAST_PTR (ACPI_SDEV_NAMESPACE, Subtable); @@ -81,7 +81,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c ACPI_ADD_PTR (UINT8, Namesp, PathOffset), PathLength, AcpiDmTableInfoSdev0a); if (ACPI_FAILURE (Status)) -@@ -2252,14 +2254,14 @@ AcpiDmDumpSdev ( +@@ -2661,14 +2663,14 @@ AcpiDmDumpSdev ( /* Dump the vendor-specific data */ @@ -100,7 +100,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c ACPI_ADD_PTR (UINT8, Namesp, VendorDataOffset), VendorDataLength, AcpiDmTableInfoSdev1b); if (ACPI_FAILURE (Status)) -@@ -2274,12 +2276,12 @@ AcpiDmDumpSdev ( +@@ -2683,12 +2685,12 @@ AcpiDmDumpSdev ( /* PCI path substructures */ Pcie = ACPI_CAST_PTR (ACPI_SDEV_PCIE, Subtable); @@ -116,7 +116,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c PathOffset + Offset, ACPI_ADD_PTR (UINT8, Pcie, PathOffset), sizeof (ACPI_SDEV_PCIE_PATH), AcpiDmTableInfoSdev1a); -@@ -2294,12 +2296,14 @@ AcpiDmDumpSdev ( +@@ -2703,12 +2705,14 @@ AcpiDmDumpSdev ( /* VendorData */ @@ -134,7 +134,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset), VendorDataLength, AcpiDmTableInfoSdev1b); if (ACPI_FAILURE (Status)) -@@ -2316,8 +2320,8 @@ AcpiDmDumpSdev ( +@@ -2725,8 +2729,8 @@ AcpiDmDumpSdev ( NextSubtable: /* Point to next subtable */ @@ -145,11 +145,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c + SubtableLength); } } -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -1493,6 +1493,7 @@ DtCompileSdev ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -1877,6 +1877,7 @@ DtCompileSdev ( UINT32 EntryCount; ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; UINT16 ComponentLength = 0; @@ -157,7 +157,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c /* Subtables */ -@@ -1514,7 +1515,7 @@ DtCompileSdev ( +@@ -1898,7 +1899,7 @@ DtCompileSdev ( DtPushSubtable (Subtable); SdevHeader = ACPI_CAST_PTR (ACPI_SDEV_HEADER, Subtable->Buffer); @@ -166,7 +166,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c switch (SdevHeader->Type) { -@@ -1687,6 +1688,18 @@ DtCompileSdev ( +@@ -2071,6 +2072,18 @@ DtCompileSdev ( } } @@ -185,7 +185,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c break; case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE: -@@ -1749,6 +1762,18 @@ DtCompileSdev ( +@@ -2133,6 +2146,18 @@ DtCompileSdev ( SdevHeader->Length = sizeof (ACPI_SDEV_PCIE) + Pcie->PathLength + Pcie->VendorDataLength; diff --git a/0028-Support-HMAT-in-a-big-endian-world.patch b/0028-Support-HMAT-in-a-big-endian-world.patch index 4ee8edf..9cbb611 100644 --- a/0028-Support-HMAT-in-a-big-endian-world.patch +++ b/0028-Support-HMAT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 24 ++++++++++--- 2 files changed, 59 insertions(+), 35 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -1598,37 +1598,45 @@ AcpiDmDumpHmat ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -1596,37 +1596,45 @@ AcpiDmDumpHmat ( UINT32 Length; ACPI_DMTABLE_INFO *InfoTable; UINT32 i, j; @@ -65,7 +65,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { case ACPI_HMAT_TYPE_ADDRESS_RANGE: -@@ -1651,7 +1659,7 @@ AcpiDmDumpHmat ( +@@ -1649,7 +1657,7 @@ AcpiDmDumpHmat ( default: AcpiOsPrintf ("\n**** Unknown HMAT structure type 0x%X\n", @@ -74,7 +74,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c /* Attempt to continue */ -@@ -1660,13 +1668,13 @@ AcpiDmDumpHmat ( +@@ -1658,13 +1666,13 @@ AcpiDmDumpHmat ( /* Dump HMAT structure body */ @@ -91,7 +91,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -1674,7 +1682,7 @@ AcpiDmDumpHmat ( +@@ -1672,7 +1680,7 @@ AcpiDmDumpHmat ( /* Dump HMAT structure additionals */ @@ -100,7 +100,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c { case ACPI_HMAT_TYPE_LOCALITY: -@@ -1683,15 +1691,16 @@ AcpiDmDumpHmat ( +@@ -1681,15 +1689,16 @@ AcpiDmDumpHmat ( /* Dump initiator proximity domains */ @@ -121,7 +121,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1a); if (ACPI_FAILURE (Status)) -@@ -1704,15 +1713,16 @@ AcpiDmDumpHmat ( +@@ -1702,15 +1711,16 @@ AcpiDmDumpHmat ( /* Dump target proximity domains */ @@ -142,7 +142,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1b); if (ACPI_FAILURE (Status)) -@@ -1725,18 +1735,17 @@ AcpiDmDumpHmat ( +@@ -1723,18 +1733,17 @@ AcpiDmDumpHmat ( /* Dump latency/bandwidth entris */ @@ -166,7 +166,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat1c); if (ACPI_FAILURE(Status)) -@@ -1756,15 +1765,16 @@ AcpiDmDumpHmat ( +@@ -1754,15 +1763,16 @@ AcpiDmDumpHmat ( /* Dump SMBIOS handles */ @@ -187,7 +187,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat2a); if (ACPI_FAILURE (Status)) -@@ -1784,6 +1794,6 @@ AcpiDmDumpHmat ( +@@ -1782,6 +1792,6 @@ AcpiDmDumpHmat ( NextSubtable: /* Point to next HMAT structure subtable */ @@ -195,10 +195,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c + Offset += (HmatStructLength); } } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -1586,6 +1586,8 @@ DtCompileHmat ( UINT32 TgtPDNumber; UINT64 EntryNumber; diff --git a/0029-Support-PDTT-in-a-big-endian-world.patch b/0029-Support-PDTT-in-a-big-endian-world.patch index c1a0144..3ddabc9 100644 --- a/0029-Support-PDTT-in-a-big-endian-world.patch +++ b/0029-Support-PDTT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -1498,13 +1498,13 @@ AcpiDmDumpPdtt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -1907,13 +1907,13 @@ AcpiDmDumpPdtt ( { ACPI_STATUS Status; ACPI_PDTT_CHANNEL *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1513,10 +1513,10 @@ AcpiDmDumpPdtt ( +@@ -1922,10 +1922,10 @@ AcpiDmDumpPdtt ( /* Subtables. Currently there is only one type, but can be multiples */ Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Table, Offset); diff --git a/0030-Support-PPTT-in-a-big-endian-world.patch b/0030-Support-PPTT-in-a-big-endian-world.patch index 4e63eeb..e1fd491 100644 --- a/0030-Support-PPTT-in-a-big-endian-world.patch +++ b/0030-Support-PPTT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 7 +++++-- 2 files changed, 15 insertions(+), 9 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -1785,6 +1785,8 @@ AcpiDmDumpPptt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -2194,6 +2194,8 @@ AcpiDmDumpPptt ( UINT32 Offset = sizeof (ACPI_TABLE_FPDT); ACPI_DMTABLE_INFO *InfoTable; UINT32 i; @@ -22,7 +22,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c /* There is no main table (other than the standard ACPI header) */ -@@ -1792,7 +1794,7 @@ AcpiDmDumpPptt ( +@@ -2201,7 +2203,7 @@ AcpiDmDumpPptt ( /* Subtables */ Offset = sizeof (ACPI_TABLE_HEADER); @@ -31,7 +31,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c { AcpiOsPrintf ("\n"); -@@ -1804,7 +1806,7 @@ AcpiDmDumpPptt ( +@@ -2213,7 +2215,7 @@ AcpiDmDumpPptt ( AcpiOsPrintf ("Invalid subtable length\n"); return; } @@ -40,7 +40,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c Subtable->Length, AcpiDmTableInfoPpttHdr); if (ACPI_FAILURE (Status)) { -@@ -1846,7 +1848,7 @@ AcpiDmDumpPptt ( +@@ -2255,7 +2257,7 @@ AcpiDmDumpPptt ( AcpiOsPrintf ("Invalid subtable length\n"); return; } @@ -49,7 +49,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -1862,15 +1864,16 @@ AcpiDmDumpPptt ( +@@ -2271,15 +2273,16 @@ AcpiDmDumpPptt ( /* Dump SMBIOS handles */ @@ -70,11 +70,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset), 4, AcpiDmTableInfoPptt0a); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -1123,6 +1123,7 @@ DtCompilePptt ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -1507,6 +1507,7 @@ DtCompilePptt ( DT_FIELD **PFieldList = (DT_FIELD **) List; DT_FIELD *SubtableStart; ACPI_TABLE_HEADER *PpttAcpiHeader; @@ -82,7 +82,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c ParentTable = DtPeekSubtable (); -@@ -1187,7 +1188,7 @@ DtCompilePptt ( +@@ -1571,7 +1572,7 @@ DtCompilePptt ( { /* Compile initiator proximity domain list */ @@ -91,7 +91,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c while (*PFieldList) { Status = DtCompileTable (PFieldList, -@@ -1203,8 +1204,10 @@ DtCompilePptt ( +@@ -1587,8 +1588,10 @@ DtCompilePptt ( DtInsertSubtable (ParentTable, Subtable); PpttHeader->Length += (UINT8)(Subtable->Length); diff --git a/0031-Support-PCCT-in-a-big-endian-world.patch b/0031-Support-PCCT-in-a-big-endian-world.patch index 7a51793..970958c 100644 --- a/0031-Support-PCCT-in-a-big-endian-world.patch +++ b/0031-Support-PCCT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -1394,13 +1394,13 @@ AcpiDmDumpPcct ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -1803,13 +1803,13 @@ AcpiDmDumpPcct ( ACPI_STATUS Status; ACPI_PCCT_SUBSPACE *Subtable; ACPI_DMTABLE_INFO *InfoTable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1409,12 +1409,12 @@ AcpiDmDumpPcct ( +@@ -1818,12 +1818,12 @@ AcpiDmDumpPcct ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset); @@ -43,7 +43,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c Subtable->Header.Length, AcpiDmTableInfoPcctHdr); if (ACPI_FAILURE (Status)) { -@@ -1462,7 +1462,7 @@ AcpiDmDumpPcct ( +@@ -1871,7 +1871,7 @@ AcpiDmDumpPcct ( } AcpiOsPrintf ("\n"); diff --git a/0032-Support-WDAT-in-a-big-endian-world.patch b/0032-Support-WDAT-in-a-big-endian-world.patch index 401f038..83a9c05 100644 --- a/0032-Support-WDAT-in-a-big-endian-world.patch +++ b/0032-Support-WDAT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c -@@ -675,11 +675,12 @@ AcpiDmDumpWdat ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c +@@ -680,11 +680,12 @@ AcpiDmDumpWdat ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_WDAT); ACPI_WDAT_ENTRY *Subtable; @@ -26,7 +26,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { return; -@@ -688,12 +689,12 @@ AcpiDmDumpWdat ( +@@ -693,12 +694,12 @@ AcpiDmDumpWdat ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset); diff --git a/0033-Support-TCPA-in-a-big-endian-world.patch b/0033-Support-TCPA-in-a-big-endian-world.patch index b10373a..806ea8e 100644 --- a/0033-Support-TCPA-in-a-big-endian-world.patch +++ b/0033-Support-TCPA-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 4 +++- 2 files changed, 11 insertions(+), 6 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c -@@ -401,11 +401,13 @@ AcpiDmDumpTcpa ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c +@@ -406,11 +406,13 @@ AcpiDmDumpTcpa ( ACPI_TABLE_TCPA_HDR *Subtable = ACPI_ADD_PTR ( ACPI_TABLE_TCPA_HDR, Table, Offset); ACPI_STATUS Status; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c 0, AcpiDmTableInfoTcpaHdr); if (ACPI_FAILURE (Status)) { -@@ -416,18 +418,19 @@ AcpiDmDumpTcpa ( +@@ -421,18 +423,19 @@ AcpiDmDumpTcpa ( * Examine the PlatformClass field to determine the table type. * Either a client or server table. Only one. */ @@ -52,11 +52,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c break; default: -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -2139,6 +2139,7 @@ DtCompileTcpa ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -2527,6 +2527,7 @@ DtCompileTcpa ( ACPI_TABLE_TCPA_HDR *TcpaHeader; DT_SUBTABLE *ParentTable; ACPI_STATUS Status; @@ -64,7 +64,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c /* Compile the main table */ -@@ -2159,7 +2160,8 @@ DtCompileTcpa ( +@@ -2547,7 +2548,8 @@ DtCompileTcpa ( */ TcpaHeader = ACPI_CAST_PTR (ACPI_TABLE_TCPA_HDR, ParentTable->Buffer); diff --git a/0034-Support-STAO-in-a-big-endian-world.patch b/0034-Support-STAO-in-a-big-endian-world.patch index 2fcb5e8..120f915 100644 --- a/0034-Support-STAO-in-a-big-endian-world.patch +++ b/0034-Support-STAO-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c -@@ -285,14 +285,14 @@ AcpiDmDumpStao ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c +@@ -290,14 +290,14 @@ AcpiDmDumpStao ( { ACPI_STATUS Status; char *Namepath; @@ -29,7 +29,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { return; -@@ -300,7 +300,7 @@ AcpiDmDumpStao ( +@@ -305,7 +305,7 @@ AcpiDmDumpStao ( /* The rest of the table consists of Namepath strings */ diff --git a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch index a9f0b5b..c961086 100644 --- a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch +++ b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c @@ -68,9 +68,11 @@ void AcpiDmDumpSlic ( ACPI_TABLE_HEADER *Table) diff --git a/0038-Support-PMTT-in-a-big-endian-world.patch b/0038-Support-PMTT-in-a-big-endian-world.patch index 7e2bd91..f5853ee 100644 --- a/0038-Support-PMTT-in-a-big-endian-world.patch +++ b/0038-Support-PMTT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -1686,8 +1686,9 @@ AcpiDmDumpPmtt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -2095,8 +2095,9 @@ AcpiDmDumpPmtt ( { ACPI_STATUS Status; ACPI_PMTT_HEADER *Subtable; @@ -23,7 +23,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c /* Main table */ -@@ -1701,17 +1702,18 @@ AcpiDmDumpPmtt ( +@@ -2110,17 +2111,18 @@ AcpiDmDumpPmtt ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset); @@ -44,7 +44,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1720,7 +1722,7 @@ AcpiDmDumpPmtt ( +@@ -2129,7 +2131,7 @@ AcpiDmDumpPmtt ( case ACPI_PMTT_TYPE_CONTROLLER: Status = AcpiDmDumpTable (Length, Offset, Subtable, @@ -53,7 +53,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1729,7 +1731,7 @@ AcpiDmDumpPmtt ( +@@ -2138,7 +2140,7 @@ AcpiDmDumpPmtt ( case ACPI_PMTT_TYPE_DIMM: Status = AcpiDmDumpTable (Length, Offset, Subtable, @@ -62,7 +62,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1738,7 +1740,7 @@ AcpiDmDumpPmtt ( +@@ -2147,7 +2149,7 @@ AcpiDmDumpPmtt ( case ACPI_PMTT_TYPE_VENDOR: Status = AcpiDmDumpTable (Length, Offset, Subtable, @@ -71,7 +71,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1754,9 +1756,9 @@ AcpiDmDumpPmtt ( +@@ -2163,9 +2165,9 @@ AcpiDmDumpPmtt ( /* Point to next subtable */ diff --git a/0039-Support-TPM2-in-a-big-endian-world.patch b/0039-Support-TPM2-in-a-big-endian-world.patch index 99bdf64..177f908 100644 --- a/0039-Support-TPM2-in-a-big-endian-world.patch +++ b/0039-Support-TPM2-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 8 +++++--- 2 files changed, 15 insertions(+), 11 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c -@@ -470,11 +470,12 @@ AcpiDmDumpTpm2Rev3 ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c +@@ -475,11 +475,12 @@ AcpiDmDumpTpm2Rev3 ( ACPI_TABLE_TPM23 *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM23, Table); ACPI_TPM23_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM23_TRAILER, Table, Offset); ACPI_STATUS Status; @@ -27,7 +27,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { return; -@@ -486,8 +487,8 @@ AcpiDmDumpTpm2Rev3 ( +@@ -491,8 +492,8 @@ AcpiDmDumpTpm2Rev3 ( { case ACPI_TPM23_ACPI_START_METHOD: @@ -38,7 +38,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c break; default: -@@ -517,6 +518,7 @@ AcpiDmDumpTpm2 ( +@@ -522,6 +523,7 @@ AcpiDmDumpTpm2 ( ACPI_TPM2_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM2_TRAILER, Table, Offset); ACPI_TPM2_ARM_SMC *ArmSubtable; ACPI_STATUS Status; @@ -46,7 +46,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (Table->Revision == 3) -@@ -527,7 +529,7 @@ AcpiDmDumpTpm2 ( +@@ -532,7 +534,7 @@ AcpiDmDumpTpm2 ( /* Main table */ @@ -55,7 +55,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { -@@ -535,8 +537,8 @@ AcpiDmDumpTpm2 ( +@@ -540,8 +542,8 @@ AcpiDmDumpTpm2 ( } AcpiOsPrintf ("\n"); @@ -66,7 +66,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { return; -@@ -551,8 +553,8 @@ AcpiDmDumpTpm2 ( +@@ -556,8 +558,8 @@ AcpiDmDumpTpm2 ( Offset += sizeof (ACPI_TPM2_TRAILER); AcpiOsPrintf ("\n"); @@ -77,11 +77,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c break; default: -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -2267,6 +2267,7 @@ DtCompileTpm2 ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -2655,6 +2655,7 @@ DtCompileTpm2 ( DT_SUBTABLE *ParentTable; ACPI_STATUS Status = AE_OK; ACPI_TABLE_HEADER *Header; @@ -89,7 +89,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c ParentTable = DtPeekSubtable (); -@@ -2310,7 +2311,8 @@ DtCompileTpm2 ( +@@ -2698,7 +2699,8 @@ DtCompileTpm2 ( /* Subtable type depends on the StartMethod */ @@ -99,7 +99,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c { case ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC: -@@ -2341,7 +2343,7 @@ DtCompileTpm2 ( +@@ -2729,7 +2731,7 @@ DtCompileTpm2 ( case ACPI_TPM2_RESERVED10: AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n", @@ -108,7 +108,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c Status = AE_ERROR; break; -@@ -2349,7 +2351,7 @@ DtCompileTpm2 ( +@@ -2737,7 +2739,7 @@ DtCompileTpm2 ( default: AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n", diff --git a/0040-Support-S3PT-in-a-big-endian-world.patch b/0040-Support-S3PT-in-a-big-endian-world.patch index 9f5782d..03bc849 100644 --- a/0040-Support-S3PT-in-a-big-endian-world.patch +++ b/0040-Support-S3PT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Subject: [PATCH 40/45] Support S3PT in a big-endian world source/compiler/dttable2.c | 4 +++- 2 files changed, 12 insertions(+), 7 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -2039,6 +2039,8 @@ AcpiDmDumpS3pt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -2448,6 +2448,8 @@ AcpiDmDumpS3pt ( ACPI_FPDT_HEADER *Subtable; ACPI_DMTABLE_INFO *InfoTable; ACPI_TABLE_S3PT *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables); @@ -21,7 +21,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c /* Main table */ -@@ -2050,19 +2052,20 @@ AcpiDmDumpS3pt ( +@@ -2459,19 +2461,20 @@ AcpiDmDumpS3pt ( } Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, S3ptTable, Offset); @@ -45,7 +45,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c { case ACPI_S3PT_TYPE_RESUME: -@@ -2077,7 +2080,7 @@ AcpiDmDumpS3pt ( +@@ -2486,7 +2489,7 @@ AcpiDmDumpS3pt ( default: AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", @@ -54,7 +54,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c /* Attempt to continue */ -@@ -2090,7 +2093,7 @@ AcpiDmDumpS3pt ( +@@ -2499,7 +2502,7 @@ AcpiDmDumpS3pt ( } AcpiOsPrintf ("\n"); @@ -63,7 +63,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -2104,7 +2107,7 @@ NextSubtable: +@@ -2513,7 +2516,7 @@ NextSubtable: Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Subtable, Subtable->Length); } @@ -72,11 +72,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c } -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -1406,6 +1406,7 @@ DtCompileS3pt ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -1790,6 +1790,7 @@ DtCompileS3pt ( DT_SUBTABLE *ParentTable; ACPI_DMTABLE_INFO *InfoTable; DT_FIELD *SubtableStart; @@ -84,7 +84,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3pt, -@@ -1433,7 +1434,8 @@ DtCompileS3pt ( +@@ -1817,7 +1818,8 @@ DtCompileS3pt ( S3ptHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer); diff --git a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch index 1f5c3dd..e104037 100644 --- a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch +++ b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch @@ -42,10 +42,10 @@ Signed-off-by: Al Stone source/components/utilities/utresrc.c | 2 +- 28 files changed, 721 insertions(+), 341 deletions(-) -Index: acpica-unix2-20210730/source/common/adwalk.c +Index: acpica-unix2-20211217/source/common/adwalk.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/adwalk.c -+++ acpica-unix2-20210730/source/common/adwalk.c +--- acpica-unix2-20211217.orig/source/common/adwalk.c ++++ acpica-unix2-20211217/source/common/adwalk.c @@ -679,7 +679,8 @@ AcpiDmLoadDescendingOp ( if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) @@ -56,10 +56,10 @@ Index: acpica-unix2-20210730/source/common/adwalk.c FieldPath[4] = 0; Path = FieldPath; } -Index: acpica-unix2-20210730/source/common/dmrestag.c +Index: acpica-unix2-20211217/source/common/dmrestag.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmrestag.c -+++ acpica-unix2-20210730/source/common/dmrestag.c +--- acpica-unix2-20211217.orig/source/common/dmrestag.c ++++ acpica-unix2-20211217/source/common/dmrestag.c @@ -1048,7 +1048,7 @@ AcpiDmAddResourcesToNamespace ( * NextOp contains the Aml pointer and the Aml length */ @@ -69,10 +69,10 @@ Index: acpica-unix2-20210730/source/common/dmrestag.c AcpiDmAddResourceToNamespace, (void **) BufferNode); } -Index: acpica-unix2-20210730/source/common/dmtables.c +Index: acpica-unix2-20211217/source/common/dmtables.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtables.c -+++ acpica-unix2-20210730/source/common/dmtables.c +--- acpica-unix2-20211217.orig/source/common/dmtables.c ++++ acpica-unix2-20211217/source/common/dmtables.c @@ -142,6 +142,10 @@ AdCreateTableHeader ( ACPI_TABLE_HEADER *Table) { @@ -133,11 +133,11 @@ Index: acpica-unix2-20210730/source/common/dmtables.c AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); AcpiUtSetIntegerWidth (Table->Revision); -Index: acpica-unix2-20210730/source/common/dmtbdump.c +Index: acpica-unix2-20211217/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210730/source/common/dmtbdump.c -@@ -338,8 +338,7 @@ AcpiDmDumpXsdt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump.c ++++ acpica-unix2-20211217/source/common/dmtbdump.c +@@ -392,8 +392,7 @@ AcpiDmDumpXsdt ( for (i = 0; i < Entries; i++) { AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); @@ -147,11 +147,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump.c Offset += sizeof (UINT64); } } -Index: acpica-unix2-20210730/source/common/dmtbdump3.c +Index: acpica-unix2-20211217/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210730/source/common/dmtbdump3.c -@@ -736,12 +736,13 @@ AcpiDmDumpWpbt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20211217/source/common/dmtbdump3.c +@@ -741,12 +741,13 @@ AcpiDmDumpWpbt ( { ACPI_STATUS Status; ACPI_TABLE_WPBT *Subtable; @@ -166,7 +166,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { return; -@@ -750,13 +751,13 @@ AcpiDmDumpWpbt ( +@@ -755,13 +756,13 @@ AcpiDmDumpWpbt ( /* Extract the arguments buffer length from the main table */ Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); @@ -182,10 +182,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump3.c AcpiDmTableInfoWpbt0); } } -Index: acpica-unix2-20210730/source/compiler/aslcodegen.c +Index: acpica-unix2-20211217/source/compiler/aslcodegen.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslcodegen.c -+++ acpica-unix2-20210730/source/compiler/aslcodegen.c +--- acpica-unix2-20211217.orig/source/compiler/aslcodegen.c ++++ acpica-unix2-20211217/source/compiler/aslcodegen.c @@ -238,6 +238,10 @@ CgWriteAmlOpcode ( { UINT8 PkgLenFirstByte; @@ -348,10 +348,10 @@ Index: acpica-unix2-20210730/source/compiler/aslcodegen.c return; -Index: acpica-unix2-20210730/source/compiler/aslopcodes.c +Index: acpica-unix2-20211217/source/compiler/aslopcodes.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslopcodes.c -+++ acpica-unix2-20210730/source/compiler/aslopcodes.c +--- acpica-unix2-20211217.orig/source/compiler/aslopcodes.c ++++ acpica-unix2-20211217/source/compiler/aslopcodes.c @@ -511,7 +511,8 @@ OpcDoUnicode ( for (i = 0; i < Count; i++) @@ -362,10 +362,10 @@ Index: acpica-unix2-20210730/source/compiler/aslopcodes.c } /* -Index: acpica-unix2-20210730/source/compiler/aslrestype1.c +Index: acpica-unix2-20211217/source/compiler/aslrestype1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype1.c -+++ acpica-unix2-20210730/source/compiler/aslrestype1.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype1.c ++++ acpica-unix2-20211217/source/compiler/aslrestype1.c @@ -143,6 +143,7 @@ RsDoMemory24Descriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -550,10 +550,10 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); break; -Index: acpica-unix2-20210730/source/compiler/aslrestype1i.c +Index: acpica-unix2-20211217/source/compiler/aslrestype1i.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype1i.c -+++ acpica-unix2-20210730/source/compiler/aslrestype1i.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype1i.c ++++ acpica-unix2-20211217/source/compiler/aslrestype1i.c @@ -199,6 +199,7 @@ RsDoFixedDmaDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -671,10 +671,10 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype1i.c + Descriptor->Irq.IrqMask = AcpiUtReadUint16(&IrqMask); return (Rnode); } -Index: acpica-unix2-20210730/source/compiler/aslrestype2.c +Index: acpica-unix2-20211217/source/compiler/aslrestype2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype2.c -+++ acpica-unix2-20210730/source/compiler/aslrestype2.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype2.c ++++ acpica-unix2-20211217/source/compiler/aslrestype2.c @@ -77,6 +77,8 @@ RsDoGeneralRegisterDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -751,10 +751,10 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype2.c /* Point to end-of-descriptor for vendor data */ -Index: acpica-unix2-20210730/source/compiler/aslrestype2d.c +Index: acpica-unix2-20211217/source/compiler/aslrestype2d.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype2d.c -+++ acpica-unix2-20210730/source/compiler/aslrestype2d.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype2d.c ++++ acpica-unix2-20211217/source/compiler/aslrestype2d.c @@ -84,6 +84,8 @@ RsDoDwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1001,10 +1001,10 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype2d.c Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20210730/source/compiler/aslrestype2q.c +Index: acpica-unix2-20211217/source/compiler/aslrestype2q.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype2q.c -+++ acpica-unix2-20210730/source/compiler/aslrestype2q.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype2q.c ++++ acpica-unix2-20211217/source/compiler/aslrestype2q.c @@ -84,6 +84,7 @@ RsDoQwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1233,10 +1233,10 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype2q.c Descriptor->Address64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20210730/source/compiler/aslrestype2w.c +Index: acpica-unix2-20211217/source/compiler/aslrestype2w.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype2w.c -+++ acpica-unix2-20210730/source/compiler/aslrestype2w.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype2w.c ++++ acpica-unix2-20211217/source/compiler/aslrestype2w.c @@ -84,6 +84,7 @@ RsDoWordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1484,11 +1484,11 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -2645,7 +2645,8 @@ DtCompileWpbt ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -3033,7 +3033,8 @@ DtCompileWpbt ( /* Extract the length of the Arguments buffer, insert into main table */ @@ -1498,10 +1498,10 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c DtInsertSubtable (ParentTable, Subtable); return (AE_OK); } -Index: acpica-unix2-20210730/source/components/disassembler/dmbuffer.c +Index: acpica-unix2-20211217/source/components/disassembler/dmbuffer.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmbuffer.c -+++ acpica-unix2-20210730/source/components/disassembler/dmbuffer.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmbuffer.c ++++ acpica-unix2-20211217/source/components/disassembler/dmbuffer.c @@ -204,7 +204,7 @@ AcpiDmByteList ( @@ -1591,10 +1591,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmbuffer.c AcpiOsPrintf ("EisaId (\"%s\")", IdBuffer); /* If we know about the ID, emit the description */ -Index: acpica-unix2-20210730/source/components/disassembler/dmopcode.c +Index: acpica-unix2-20211217/source/components/disassembler/dmopcode.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmopcode.c -+++ acpica-unix2-20210730/source/components/disassembler/dmopcode.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmopcode.c ++++ acpica-unix2-20211217/source/components/disassembler/dmopcode.c @@ -778,7 +778,9 @@ AcpiDmDisassembleOneOp ( } else @@ -1651,10 +1651,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmopcode.c Info->BitOffset += Offset; if (Info->BitOffset % 8 == 0) -Index: acpica-unix2-20210730/source/components/disassembler/dmresrc.c +Index: acpica-unix2-20211217/source/components/disassembler/dmresrc.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmresrc.c -+++ acpica-unix2-20210730/source/components/disassembler/dmresrc.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmresrc.c ++++ acpica-unix2-20211217/source/components/disassembler/dmresrc.c @@ -417,7 +417,7 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } @@ -1664,10 +1664,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmresrc.c /* Get the length of the raw initialization byte list */ -Index: acpica-unix2-20210730/source/components/disassembler/dmresrcl.c +Index: acpica-unix2-20211217/source/components/disassembler/dmresrcl.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmresrcl.c -+++ acpica-unix2-20210730/source/components/disassembler/dmresrcl.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmresrcl.c ++++ acpica-unix2-20211217/source/components/disassembler/dmresrcl.c @@ -141,6 +141,8 @@ AcpiDmMemoryFields ( UINT32 Level) { @@ -1789,10 +1789,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmresrcl.c } AcpiDmIndent (Level); -Index: acpica-unix2-20210730/source/components/disassembler/dmresrcl2.c +Index: acpica-unix2-20211217/source/components/disassembler/dmresrcl2.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmresrcl2.c -+++ acpica-unix2-20210730/source/components/disassembler/dmresrcl2.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmresrcl2.c ++++ acpica-unix2-20211217/source/components/disassembler/dmresrcl2.c @@ -199,22 +199,27 @@ AcpiDmGpioCommon ( char *DeviceName = NULL; UINT32 PinCount; @@ -2134,10 +2134,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmresrcl2.c DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); -Index: acpica-unix2-20210730/source/components/disassembler/dmresrcs.c +Index: acpica-unix2-20211217/source/components/disassembler/dmresrcs.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmresrcs.c -+++ acpica-unix2-20210730/source/components/disassembler/dmresrcs.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmresrcs.c ++++ acpica-unix2-20211217/source/components/disassembler/dmresrcs.c @@ -93,7 +93,7 @@ AcpiDmIrqDescriptor ( AcpiOsPrintf (")\n"); @@ -2188,10 +2188,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmresrcs.c /* Insert a descriptor name */ -Index: acpica-unix2-20210730/source/components/disassembler/dmwalk.c +Index: acpica-unix2-20211217/source/components/disassembler/dmwalk.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/disassembler/dmwalk.c -+++ acpica-unix2-20210730/source/components/disassembler/dmwalk.c +--- acpica-unix2-20211217.orig/source/components/disassembler/dmwalk.c ++++ acpica-unix2-20211217/source/components/disassembler/dmwalk.c @@ -1155,7 +1155,7 @@ AcpiDmAscendingOp ( { ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST; @@ -2201,10 +2201,10 @@ Index: acpica-unix2-20210730/source/components/disassembler/dmwalk.c } } -Index: acpica-unix2-20210730/source/components/namespace/nsaccess.c +Index: acpica-unix2-20211217/source/components/namespace/nsaccess.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/namespace/nsaccess.c -+++ acpica-unix2-20210730/source/components/namespace/nsaccess.c +--- acpica-unix2-20211217.orig/source/components/namespace/nsaccess.c ++++ acpica-unix2-20211217/source/components/namespace/nsaccess.c @@ -644,7 +644,7 @@ AcpiNsLookup ( /* Extract one ACPI name from the front of the pathname */ @@ -2214,10 +2214,10 @@ Index: acpica-unix2-20210730/source/components/namespace/nsaccess.c /* Try to find the single (4 character) ACPI name */ -Index: acpica-unix2-20210730/source/components/namespace/nsnames.c +Index: acpica-unix2-20211217/source/components/namespace/nsnames.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/namespace/nsnames.c -+++ acpica-unix2-20210730/source/components/namespace/nsnames.c +--- acpica-unix2-20211217.orig/source/components/namespace/nsnames.c ++++ acpica-unix2-20211217/source/components/namespace/nsnames.c @@ -297,10 +297,10 @@ AcpiNsBuildNormalizedPath ( { if (NextNode != Node) @@ -2231,10 +2231,10 @@ Index: acpica-unix2-20210730/source/components/namespace/nsnames.c DoNoTrailing = NoTrailing; for (i = 0; i < 4; i++) { -Index: acpica-unix2-20210730/source/components/namespace/nsparse.c +Index: acpica-unix2-20211217/source/components/namespace/nsparse.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/namespace/nsparse.c -+++ acpica-unix2-20210730/source/components/namespace/nsparse.c +--- acpica-unix2-20211217.orig/source/components/namespace/nsparse.c ++++ acpica-unix2-20211217/source/components/namespace/nsparse.c @@ -203,6 +203,7 @@ AcpiNsOneCompleteParse ( ACPI_WALK_STATE *WalkState; ACPI_TABLE_HEADER *Table; @@ -2260,10 +2260,10 @@ Index: acpica-unix2-20210730/source/components/namespace/nsparse.c Status = AcpiTbGetOwnerId (TableIndex, &OwnerId); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20210730/source/components/namespace/nsutils.c +Index: acpica-unix2-20211217/source/components/namespace/nsutils.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20210730/source/components/namespace/nsutils.c +--- acpica-unix2-20211217.orig/source/components/namespace/nsutils.c ++++ acpica-unix2-20211217/source/components/namespace/nsutils.c @@ -272,7 +272,6 @@ AcpiNsBuildInternalName ( const char *ExternalName = Info->NextExternalChar; char *Result = NULL; @@ -2300,10 +2300,10 @@ Index: acpica-unix2-20210730/source/components/namespace/nsutils.c /* Now we must have a path separator, or the pathname is bad */ -Index: acpica-unix2-20210730/source/components/utilities/utresrc.c +Index: acpica-unix2-20211217/source/components/utilities/utresrc.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/utilities/utresrc.c -+++ acpica-unix2-20210730/source/components/utilities/utresrc.c +--- acpica-unix2-20211217.orig/source/components/utilities/utresrc.c ++++ acpica-unix2-20211217/source/components/utilities/utresrc.c @@ -541,7 +541,7 @@ AcpiUtGetResourceLength ( { /* Large Resource type -- bytes 1-2 contain the 16-bit length */ @@ -2313,10 +2313,10 @@ Index: acpica-unix2-20210730/source/components/utilities/utresrc.c } else -Index: acpica-unix2-20210730/source/compiler/aslrestype2e.c +Index: acpica-unix2-20211217/source/compiler/aslrestype2e.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype2e.c -+++ acpica-unix2-20210730/source/compiler/aslrestype2e.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype2e.c ++++ acpica-unix2-20211217/source/compiler/aslrestype2e.c @@ -80,6 +80,7 @@ RsDoExtendedIoDescriptor ( UINT16 StringLength = 0; UINT32 CurrentByteOffset; @@ -2575,10 +2575,10 @@ Index: acpica-unix2-20210730/source/compiler/aslrestype2e.c Descriptor->ExtAddress64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20210730/source/compiler/aslrestype2s.c +Index: acpica-unix2-20211217/source/compiler/aslrestype2s.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslrestype2s.c -+++ acpica-unix2-20210730/source/compiler/aslrestype2s.c +--- acpica-unix2-20211217.orig/source/compiler/aslrestype2s.c ++++ acpica-unix2-20211217/source/compiler/aslrestype2s.c @@ -343,6 +343,7 @@ RsDoGpioIntDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; diff --git a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch index 62866f4..788669c 100644 --- a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch +++ b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 28 +++++++++++++------------ 2 files changed, 39 insertions(+), 32 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump1.c +Index: acpica-unix2-20211217/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20210730/source/common/dmtbdump1.c -@@ -593,11 +593,13 @@ AcpiDmDumpCsrt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20211217/source/common/dmtbdump1.c +@@ -591,11 +591,13 @@ AcpiDmDumpCsrt ( ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubtable; @@ -31,7 +31,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c /* The main table only contains the ACPI header, thus already handled */ -@@ -605,13 +607,14 @@ AcpiDmDumpCsrt ( +@@ -603,13 +605,14 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); @@ -49,7 +49,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -624,26 +627,28 @@ AcpiDmDumpCsrt ( +@@ -622,26 +625,28 @@ AcpiDmDumpCsrt ( Offset + SubOffset); AcpiOsPrintf ("\n"); @@ -85,7 +85,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -653,11 +658,12 @@ AcpiDmDumpCsrt ( +@@ -651,11 +656,12 @@ AcpiDmDumpCsrt ( /* Resource-specific info buffer */ @@ -101,7 +101,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c InfoLength, AcpiDmTableInfoCsrt2a); if (ACPI_FAILURE (Status)) { -@@ -667,16 +673,15 @@ AcpiDmDumpCsrt ( +@@ -665,16 +671,15 @@ AcpiDmDumpCsrt ( /* Point to next sub-subtable */ @@ -122,10 +122,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump1.c } } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20211217/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c +--- acpica-unix2-20211217.orig/source/compiler/dttable1.c ++++ acpica-unix2-20211217/source/compiler/dttable1.c @@ -570,14 +570,16 @@ DtCompileCsrt ( DT_SUBTABLE *Subtable; DT_SUBTABLE *ParentTable; diff --git a/0046-Support-PHAT-in-a-big-endian-world.patch b/0046-Support-PHAT-in-a-big-endian-world.patch index 011e519..ea9bea6 100644 --- a/0046-Support-PHAT-in-a-big-endian-world.patch +++ b/0046-Support-PHAT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 12 +++++++++--- 2 files changed, 29 insertions(+), 19 deletions(-) -Index: acpica-unix2-20210604/source/common/dmtbdump2.c +Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210604/source/common/dmtbdump2.c -@@ -1573,39 +1573,41 @@ AcpiDmDumpPhat ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20211217/source/common/dmtbdump2.c +@@ -1982,39 +1982,41 @@ AcpiDmDumpPhat ( ACPI_PHAT_HEADER *Subtable; ACPI_PHAT_VERSION_DATA *VersionData; UINT32 RecordCount; @@ -62,7 +62,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c break; default: -@@ -1616,22 +1618,22 @@ AcpiDmDumpPhat ( +@@ -2025,22 +2027,22 @@ AcpiDmDumpPhat ( return; } @@ -89,7 +89,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)), sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a); if (ACPI_FAILURE (Status)) -@@ -1649,7 +1651,7 @@ AcpiDmDumpPhat ( +@@ -2058,7 +2060,7 @@ AcpiDmDumpPhat ( /* account for the null terminator */ PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1; @@ -98,7 +98,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)), PathLength, AcpiDmTableInfoPhat1a); if (ACPI_FAILURE (Status)) -@@ -1660,8 +1662,8 @@ AcpiDmDumpPhat ( +@@ -2069,8 +2071,8 @@ AcpiDmDumpPhat ( /* Get vendor data - data length is the remaining subtable length */ VendorLength = @@ -109,7 +109,7 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength), VendorLength, AcpiDmTableInfoPhat1b); if (ACPI_FAILURE (Status)) -@@ -1673,15 +1675,15 @@ AcpiDmDumpPhat ( +@@ -2082,15 +2084,15 @@ AcpiDmDumpPhat ( default: AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n", @@ -128,11 +128,11 @@ Index: acpica-unix2-20210604/source/common/dmtbdump2.c } } -Index: acpica-unix2-20210604/source/compiler/dttable2.c +Index: acpica-unix2-20211217/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c -@@ -870,6 +870,8 @@ DtCompilePhat ( +--- acpica-unix2-20211217.orig/source/compiler/dttable2.c ++++ acpica-unix2-20211217/source/compiler/dttable2.c +@@ -1254,6 +1254,8 @@ DtCompilePhat ( ACPI_DMTABLE_INFO *Info; ACPI_PHAT_VERSION_DATA *VersionData; UINT32 RecordCount; @@ -141,7 +141,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable2.c /* The table consist of subtables */ -@@ -887,8 +889,9 @@ DtCompilePhat ( +@@ -1271,8 +1273,9 @@ DtCompilePhat ( DtPushSubtable (Subtable); PhatHeader = ACPI_CAST_PTR (ACPI_PHAT_HEADER, Subtable->Buffer); @@ -152,7 +152,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable2.c { case ACPI_PHAT_TYPE_FW_VERSION_DATA: -@@ -919,13 +922,13 @@ DtCompilePhat ( +@@ -1303,13 +1306,13 @@ DtCompilePhat ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); @@ -168,7 +168,7 @@ Index: acpica-unix2-20210604/source/compiler/dttable2.c while (RecordCount) { -@@ -976,6 +979,9 @@ DtCompilePhat ( +@@ -1360,6 +1363,9 @@ DtCompilePhat ( DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT"); return (AE_ERROR); } diff --git a/acpica-tools.spec b/acpica-tools.spec index 4ae3f29..0af4295 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,5 +1,5 @@ Name: acpica-tools -Version: 20210730 +Version: 20211217 Release: 1%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables @@ -84,12 +84,13 @@ Patch109: cve-2017-13694.patch Patch110: cve-2017-13695.patch Patch111: str-trunc-warn.patch Patch112: ptr-cast.patch -Patch113: facp.patch -Patch114: armv7-str-fixes.patch -Patch115: dbtest.patch -Patch116: ull-32bit.patch +Patch113: armv7-str-fixes.patch +Patch114: dbtest.patch +Patch115: ull-32bit.patch +Patch116: dangling-ptr.patch +Patch117: uuid-len.patch -BuildRequires: make +BuildRequires: make BuildRequires: bison patchutils flex gcc # The previous iasl package contained only a very small subset of these tools @@ -253,6 +254,14 @@ fi %changelog +* Fri Mar 18 2022 Al Stone - 20211217-1 +- Update to 20211217 upstream source. Bring all the patches up to date. +- Rawhide use of GCC 12 introduces a new check for dangling pointers which + causes non-portable code in utdebug.c stack functions to not compile; add + a patch to disable -Wdangling-pointer=2 for the specific functions +- The AeRegionHandler() code in acpiexec call a UUID function with a buffer + too small for the UUID output string; add a patch to correct this. + * Wed Jan 19 2022 Fedora Release Engineering - 20210604-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/armv7-str-fixes.patch b/armv7-str-fixes.patch index fdc2434..497c92b 100644 --- a/armv7-str-fixes.patch +++ b/armv7-str-fixes.patch @@ -1,8 +1,8 @@ -Index: acpica-unix2-20200925/source/include/actypes.h +Index: acpica-unix2-20211217/source/include/actypes.h =================================================================== ---- acpica-unix2-20200925.orig/source/include/actypes.h -+++ acpica-unix2-20200925/source/include/actypes.h -@@ -561,7 +561,7 @@ typedef UINT64 +--- acpica-unix2-20211217.orig/source/include/actypes.h ++++ acpica-unix2-20211217/source/include/actypes.h +@@ -560,7 +560,7 @@ typedef UINT64 #define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) #else #define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) diff --git a/badcode.asl.result b/badcode.asl.result index 100cd4b..093c50d 100644 --- a/badcode.asl.result +++ b/badcode.asl.result @@ -146,7 +146,7 @@ badcode.asl 197: Return ("Unexpected Return Value") Warning 3104 - Reserved method should not return a value ^ (_Q22) badcode.asl 203: Device (EC) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) badcode.asl 205: Method (_REG, 2) Warning 3079 - ^ _REG has no corresponding Operation Region @@ -263,4 +263,4 @@ Ignoring all errors, forcing AML file generation ASL Input: badcode.asl - 11588 bytes 81 keywords 408 source lines AML Output: badcode.aml - 1195 bytes 20 opcodes 61 named objects -Compilation successful. 45 Errors, 29 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded +Compilation successful. 46 Errors, 28 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded diff --git a/facp.patch b/facp.patch deleted file mode 100644 index 1d7ffee..0000000 --- a/facp.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7670c56ebe004e698551635f9c5d48a1794066dd Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 19 Dec 2018 16:52:41 -0700 -Subject: [PATCH] Correct DSDT Address field in FACP tables - -The FADT allows either the DSDT Address or XDSDT Address field to be -zero. However, the table definition used by the table compiler still -requires the DSDT Address to be non-zero, which is not correct. So, -remove the DT_NON_ZERO flag from the field. - -Signed-off-by: Al Stone ---- - source/common/dmtbinfo.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: acpica-unix2-20200925/source/common/dmtbinfo.c -=================================================================== ---- acpica-unix2-20200925.orig/source/common/dmtbinfo.c -+++ acpica-unix2-20200925/source/common/dmtbinfo.c -@@ -184,7 +184,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI - ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] = - { - {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Facs), "FACS Address", 0}, -- {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Dsdt), "DSDT Address", DT_NON_ZERO}, -+ {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Dsdt), "DSDT Address", 0}, - {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (Model), "Model", 0}, - {ACPI_DMT_FADTPM, ACPI_FADT_OFFSET (PreferredProfile), "PM Profile", 0}, - {ACPI_DMT_UINT16, ACPI_FADT_OFFSET (SciInterrupt), "SCI Interrupt", 0}, diff --git a/grammar.asl.result b/grammar.asl.result index 5269983..84cebe4 100644 --- a/grammar.asl.result +++ b/grammar.asl.result @@ -1,23 +1,32 @@ grammar.asl 120: Device (A1) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 135: Device (A2) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 145: Device (A3) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 155: Device (A4) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 171: Device (IRES) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) + +grammar.asl 171: Device (IRES) +Warning 3141 - ^ Missing dependency (Device has a _SRS, missing a _PRS, required) + +grammar.asl 171: Device (IRES) +Remark 2141 - ^ Missing dependency (Device has a _SRS, no corresponding _DIS) grammar.asl 199: Name (_NPK, Package () Warning 3133 - ^ Unknown reserved name (_NPK) grammar.asl 208: Device (RES) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) + +grammar.asl 208: Device (RES) +Remark 2141 - ^ Missing dependency (Device has a _SRS, no corresponding _DIS) grammar.asl 247: Name (PRT0, ResourceTemplate () Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\RES._CRS) @@ -82,6 +91,12 @@ Remark 2089 - Object is not referenced ^ (Name [FL grammar.asl 705: Device(PCI0) Warning 3073 - Multiple types ^ (Device object requires either a _HID or _ADR, but not both) +grammar.asl 705: Device(PCI0) +Warning 3141 - Missing dependency ^ (Device has a _SRS, missing a _PRS, required) + +grammar.asl 705: Device(PCI0) +Remark 2141 - Missing dependency ^ (Device has a _SRS, no corresponding _DIS) + grammar.asl 712: Name(PRT0, ResourceTemplate() { Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PCI0._CRS) @@ -89,13 +104,13 @@ grammar.asl 733: Method(_SRS) Warning 3102 - ^ Reserved method has too few arguments (_SRS requires 1) grammar.asl 738: Device(EIO) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 822: If(LNot(SMRE(0x09,0x17,Local2,RefOf(Local3)))){ Warning 3144 - Method Local is set but never used ^ (Local3) grammar.asl 913: Device (DEV1) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 963: Divide (Local0, Local1, Local3) Warning 3144 - Method Local is set but never used ^ (Local3) @@ -200,16 +215,16 @@ grammar.asl 1930: Store (RefOf (MAIN), Local5) Warning 3144 - Method Local is set but never used ^ (Local5) grammar.asl 2005: Device (IFEL) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2162: Device (NOSV) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2168: Name (WRD, 0x1234) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\NOSV.TEST) grammar.asl 2583: Device (IDXF) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2611: Store (IFE0, Local0) Warning 3144 - ^ Method Local is set but never used (Local0) @@ -221,10 +236,10 @@ grammar.asl 2613: Store (IFE2, Local2) Warning 3144 - ^ Method Local is set but never used (Local2) grammar.asl 2630: Device (NSTL) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 2658: Device (RTBF) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2667: Name (ABUF, Buffer() {"ARBITRARY_BUFFER"}) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\RTBF.RBUF) @@ -233,19 +248,19 @@ grammar.asl 2695: Name (BUFR, Buffer(Local1) {}) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\RTBF.RBUF) grammar.asl 2756: Device (GPE2) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2771: Device (PRW2) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2819: Device (PRW1) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 2886: Store (Arg0, Local0) Warning 3144 - ^ Method Local is set but never used (Local0) grammar.asl 2889: Device (RTLV) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 2989: Device (PCI1) Warning 3073 - Multiple types ^ (Device object requires either a _HID or _ADR, but not both) @@ -254,22 +269,22 @@ grammar.asl 2993: Name (_CRS,0) Error 6105 - ^ Invalid object type for reserved name (_CRS: found Integer, Buffer required) grammar.asl 3017: Device (RETP) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 3053: Device (WHLR) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 3109: Device (ANDO) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 3343: Name(RSLT,1) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\ANDO.TEST) grammar.asl 3383: Device (BRKP) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 3420: Device (ADSU) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 3435: Name (DWRD, 0x12345678) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\ADSU.TEST) @@ -281,7 +296,7 @@ grammar.asl 3437: Name (BYT, 0x12) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\ADSU.TEST) grammar.asl 3513: Device (INDC) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 3528: Name (DWRD, 0x12345678) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\INDC.TEST) @@ -293,13 +308,13 @@ grammar.asl 3530: Name (BYT, 0x12) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\INDC.TEST) grammar.asl 3611: Device (LOPS) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 3956: Device (FDSO) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 4120: Device (MLDV) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 4135: Name (RMDR, 0) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\MLDV.TEST) @@ -314,13 +329,13 @@ grammar.asl 4138: Name (BYT, 0x12) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\MLDV.TEST) grammar.asl 4253: Device (NBIT) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 4489: Device (SHFT) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 4685: Device (XORD) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 4693: OperationRegion (RAM, SystemMemory, 0x800000, 256) Warning 3175 - ^ Static OperationRegion should be declared outside control method @@ -329,28 +344,28 @@ grammar.asl 4693: OperationRegion (RAM, SystemMemory, 0x800000, 25 Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\XORD.TEST) grammar.asl 5022: Device (CRBF) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 5100: Device (IDX4) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 5117: OperationRegion (RAM, SystemMemory, Arg0, 0x100) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\IDX4.MADM) grammar.asl 5639: Device (EVNT) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 5867: Device (SZLV) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 5960: Device (BYTF) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 5970: Device (C005) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 5972: Device (C013) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 6027: Name (_HID, "*PNP0A06") Error 6061 - Invalid leading asterisk ^ (*PNP0A06) @@ -359,13 +374,13 @@ grammar.asl 6166: Name (C18C, Package (2) Remark 2063 - ^ Initializer list shorter than declared package length grammar.asl 6190: Device (C19B) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 6199: Divide (Local1, 10, Local0, Local2) // Local0 = Local1 / 10 Warning 3144 - Method Local is set but never used ^ (Local0) grammar.asl 6244: Device (DWDF) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 6276: Method (MKW_, 2) Remark 2146 - ^ Method Argument is never used (Arg0) @@ -374,13 +389,13 @@ grammar.asl 6276: Method (MKW_, 2) Remark 2146 - ^ Method Argument is never used (Arg1) grammar.asl 6285: Device (DVAX) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 6328: Device (IDX6) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 6352: Device (TST_) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 6371: Store (IFE0, Local0) Warning 3144 - ^ Method Local is set but never used (Local0) @@ -404,7 +419,7 @@ grammar.asl 6380: Store (\IDX6.TST_.IFE1, Local6) Warning 3144 - Method Local is set but never used ^ (Local6) grammar.asl 6393: Device (IDX5) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 6416: Name (BUF0, Buffer (Local0) {}) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\IDX5.MCTH) @@ -431,7 +446,7 @@ grammar.asl 6625: Name (BUFR, Buffer(16) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.IDX0.TEST) grammar.asl 6709: Device (BITI) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 6817: And (Local0, 1, Local0) // Local0 &= 1 Error 6066 - ^ Method local variable is not initialized (Local0) @@ -443,7 +458,7 @@ grammar.asl 6903: Name (_HID, "*PNP0C0A") // Control Method B Error 6061 - Invalid leading asterisk ^ (*PNP0C0A) grammar.asl 6912: Device (IDX3) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 6922: Name (BUFR, Buffer () {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.IDX3.LCLB) @@ -452,7 +467,7 @@ grammar.asl 6974: Name (PKG, Package () {0, 1, 2, 3, 4, 5, 6 Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.IDX3.LCLP) grammar.asl 7057: Device(IDX7) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 7074: Name (DEST, Buffer () // 62 characters plus NULL Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\IDX7.TST1) @@ -491,7 +506,7 @@ grammar.asl 7556: Name (DBUF, Buffer () {"abcdefghijklmnopqrstuvwx Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\IDX7.TSTL) grammar.asl 7736: Device (MTCH) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 7743: Name (TIM0, Package () Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\MTCH.TEST) @@ -512,13 +527,13 @@ grammar.asl 7760: CreateDWordField (TMD0, 16, CHNF) Remark 2089 - Object is not referenced ^ (Name [CHNF] is within a method [TEST]) grammar.asl 7934: Device (WHLB) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 8275: Name (BUFR, Package (13) {}) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.BAT1._BIF) grammar.asl 8295: Device (IDX2) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 8300: Name (SRCB, Buffer () {"Short Buffer"}) // 12 characters plus NULL Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.IDX2.B2IB) @@ -530,7 +545,7 @@ grammar.asl 8493: Name (DEST, Package (2) {}) Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.IDX2.FB2P) grammar.asl 8678: Device (SIZO) -Warning 3141 - ^ Missing dependency (Device object requires a _HID or _ADR in same scope) +Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) grammar.asl 8708: Name (BUFR, Buffer (12) {}) // uninitialized Buffer Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\SIZO.SARG) @@ -563,19 +578,19 @@ grammar.asl 9132: Store (_OS, Local0) Warning 3144 - ^ Method Local is set but never used (Local0) grammar.asl 9262: Device (MBIT) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 9273: Device (MWRD) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 9281: Device (MBYT) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 9354: Device (SMIS) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) grammar.asl 9408: Device(CNDT) -Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) +Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) Intel ACPI Component Architecture @@ -587,4 +602,4 @@ Ignoring all errors, forcing AML file generation ASL Input: grammar.asl - 323653 bytes 4818 keywords 10284 source lines AML Output: grammar.aml - 43758 bytes 4148 opcodes 670 named objects -Compilation successful. 6 Errors, 93 Warnings, 94 Remarks, 1106 Optimizations +Compilation successful. 60 Errors, 41 Warnings, 97 Remarks, 1106 Optimizations diff --git a/ull-32bit.patch b/ull-32bit.patch index 7d0580b..17cfe58 100644 --- a/ull-32bit.patch +++ b/ull-32bit.patch @@ -1,8 +1,8 @@ -Index: acpica-unix2-20210604/source/common/dmtbdump.c +Index: acpica-unix2-20211217/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump.c -+++ acpica-unix2-20210604/source/common/dmtbdump.c -@@ -338,7 +338,11 @@ AcpiDmDumpXsdt ( +--- acpica-unix2-20211217.orig/source/common/dmtbdump.c ++++ acpica-unix2-20211217/source/common/dmtbdump.c +@@ -392,7 +392,11 @@ AcpiDmDumpXsdt ( for (i = 0; i < Entries; i++) { AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); From b8d03463ff688f3eafbac20e5a1e9f11a522f2f0 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Fri, 18 Mar 2022 16:09:50 -0600 Subject: [PATCH 10/28] Add two new patches to correct compilation errors in rawhide Signed-off-by: Al Stone --- dangling-ptr.patch | 24 ++++++++++++++++++++++++ uuid-len.patch | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 dangling-ptr.patch create mode 100644 uuid-len.patch diff --git a/dangling-ptr.patch b/dangling-ptr.patch new file mode 100644 index 0000000..582fb9e --- /dev/null +++ b/dangling-ptr.patch @@ -0,0 +1,24 @@ +diff -Naur acpica-unix2-20211217/source/components/utilities/utdebug.c acpica-unix2-20211217.orig/source/components/utilities/utdebug.c +--- acpica-unix2-20211217/source/components/utilities/utdebug.c 2022-03-15 17:05:07.992387565 -0600 ++++ acpica-unix2-20211217.orig/source/components/utilities/utdebug.c 2021-12-17 10:48:16.000000000 -0700 +@@ -58,6 +58,10 @@ + static const char *AcpiGbl_FunctionExitPrefix = "----Exit-"; + + ++#if defined(__GNUC__) && (__GNUC__ > 11) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdangling-pointer" ++#endif + /******************************************************************************* + * + * FUNCTION: AcpiUtInitStackPtrTrace +@@ -114,6 +110,9 @@ + AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel; + } + } ++#if defined(__GNUC__) && (__GNUC__ > 11) ++#pragma GCC diagnostic pop ++#endif + + + /******************************************************************************* diff --git a/uuid-len.patch b/uuid-len.patch new file mode 100644 index 0000000..26fd798 --- /dev/null +++ b/uuid-len.patch @@ -0,0 +1,12 @@ +diff -Naur acpica-unix2-20211217.orig/source/tools/acpiexec/aeregion.c acpica-unix2-20211217/source/tools/acpiexec/aeregion.c +--- acpica-unix2-20211217.orig/source/tools/acpiexec/aeregion.c 2021-12-17 10:48:17.000000000 -0700 ++++ acpica-unix2-20211217/source/tools/acpiexec/aeregion.c 2022-03-18 15:53:25.032687782 -0600 +@@ -97,7 +97,7 @@ + UINT32 Value1; + UINT32 Value2; + ACPI_RESOURCE *Resource; +- char Uuid[ACPI_PRM_INPUT_BUFFER_SIZE + 1]; ++ char Uuid[UUID_STRING_LENGTH + 1]; + + + ACPI_FUNCTION_NAME (AeRegionHandler); From cf71d6aebb24950c029c6ecbbf253a33d924db08 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Mon, 28 Mar 2022 20:37:18 -0600 Subject: [PATCH 11/28] Stop supporting i686 architecture Signed-off-by: Al Stone --- acpica-tools.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 0af4295..a2c8772 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,11 +1,13 @@ Name: acpica-tools Version: 20211217 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 URL: https://www.acpica.org/ +ExcludeArch: i686 + Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz Source2: README.Fedora @@ -254,6 +256,11 @@ fi %changelog +* Mon Mar 28 2022 Al Stone - 20211217-2 +- Stop building i686; it is the only Arch that stumbles across a problem + in using varargs but since the Arch has been essentially deprecated, + take this as an opportunity to finally drop support for it. + * Fri Mar 18 2022 Al Stone - 20211217-1 - Update to 20211217 upstream source. Bring all the patches up to date. - Rawhide use of GCC 12 introduces a new check for dangling pointers which From fc3eef63e813ae93feb4ceb7316ceab1ea3f1f35 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Sun, 3 Apr 2022 15:18:02 -0600 Subject: [PATCH 12/28] 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 --- .gitignore | 2 + ...nfrastructure-for-big-endian-support.patch | 72 ++++---- ...lity-functions-to-be-endian-agnostic.patch | 38 ++-- ...able-header-content-in-human-readabl.patch | 6 +- ...able-support-for-big-endian-machines.patch | 12 +- ...n-ness-problem-when-converting-ASL-t.patch | 6 +- ...e-ACPI_COPY_NAMSEG-in-GPE-name-check.patch | 6 +- ...ing-Unicode-properly-when-big-endian.patch | 6 +- ...-MADT-aka-APIC-in-a-big-endian-world.patch | 12 +- ...ort-ASF-tables-in-a-big-endian-world.patch | 12 +- ...rt-CPEP-tables-in-a-big-endian-world.patch | 10 +- ...ort-DBG2-table-in-a-big-endian-world.patch | 50 ++--- 0012-Support-DMAR-in-a-big-endian-world.patch | 42 ++--- 0013-Support-DRTM-in-a-big-endian-world.patch | 28 +-- 0014-Support-EINJ-in-a-big-endian-world.patch | 10 +- 0015-Support-ERST-in-a-big-endian-world.patch | 10 +- ...-FADT-aka-FACP-in-a-big-endian-world.patch | 12 +- ...ort-most-FPDTs-in-a-big-endian-world.patch | 22 +-- 0018-Support-GTDT-in-a-big-endian-world.patch | 20 +- 0019-Support-HEST-in-a-big-endian-world.patch | 22 +-- ...t-RSDT-RSD-PTR-in-a-big-endian-world.patch | 6 +- 0021-Support-XSDT-in-a-big-endian-world.patch | 6 +- 0022-Support-SRAT-in-a-big-endian-world.patch | 6 +- 0023-Support-SLIT-in-a-big-endian-world.patch | 14 +- 0024-Support-MSCT-in-a-big-endian-world.patch | 10 +- 0025-Support-MPST-in-a-big-endian-world.patch | 32 ++-- 0026-Support-NFIT-in-a-big-endian-world.patch | 46 ++--- 0027-Support-SDEV-in-a-big-endian-world.patch | 38 ++-- 0028-Support-HMAT-in-a-big-endian-world.patch | 44 ++--- 0029-Support-PDTT-in-a-big-endian-world.patch | 10 +- 0030-Support-PPTT-in-a-big-endian-world.patch | 28 +-- 0031-Support-PCCT-in-a-big-endian-world.patch | 12 +- 0032-Support-WDAT-in-a-big-endian-world.patch | 6 +- 0033-Support-TCPA-in-a-big-endian-world.patch | 16 +- 0034-Support-STAO-in-a-big-endian-world.patch | 6 +- ...-SLIC-and-MSDM-in-a-big-endian-world.patch | 6 +- 0036-Support-MCFG-in-a-big-endian-world.patch | 10 +- 0037-Support-LPIT-in-a-big-endian-world.patch | 6 +- 0038-Support-PMTT-in-a-big-endian-world.patch | 18 +- 0039-Support-TPM2-in-a-big-endian-world.patch | 20 +- 0040-Support-S3PT-in-a-big-endian-world.patch | 26 +-- 0041-Support-IORT-in-a-big-endian-world.patch | 46 ++--- 0042-Support-IVRS-in-a-big-endian-world.patch | 6 +- ...port-DSDT-SSDT-in-a-big-endian-world.patch | 172 +++++++++--------- ...T-fixed-use-of-optional-ResourceInfo.patch | 34 ++-- 0046-Support-PHAT-in-a-big-endian-world.patch | 30 +-- 0047-Support-PRMT-in-a-big-endian-world.patch | 51 ++++++ 0048-Support-RGRT-in-a-big-endian-world.patch | 35 ++++ 0049-Support-SVKL-in-a-big-endian-world.patch | 42 +++++ OPT_LDFLAGS.patch | 6 +- acpica-tools.spec | 12 +- arm7hl.patch | 6 +- armv7-str-fixes.patch | 8 +- badcode.asl.result | 4 +- converterSample.asl.result | 9 +- cve-2017-13693.patch | 6 +- cve-2017-13694.patch | 6 +- cve-2017-13695.patch | 6 +- dbtest.patch | 6 +- f23-harden.patch | 12 +- grammar.asl.result | 4 +- int-format.patch | 94 +++++----- mips-be-fix.patch | 6 +- ptr-cast.patch | 12 +- simple-64bit.patch | 8 +- sources | 4 +- str-trunc-warn.patch | 18 +- template.patch | 6 +- ull-32bit.patch | 6 +- unaligned.patch | 12 +- 70 files changed, 783 insertions(+), 648 deletions(-) create mode 100644 0047-Support-PRMT-in-a-big-endian-world.patch create mode 100644 0048-Support-RGRT-in-a-big-endian-world.patch create mode 100644 0049-Support-SVKL-in-a-big-endian-world.patch diff --git a/.gitignore b/.gitignore index f0d850d..8d6a67f 100644 --- a/.gitignore +++ b/.gitignore @@ -154,3 +154,5 @@ series /acpitests-unix-20210930.tar.gz /acpica-unix2-20211217.tar.gz /acpitests-unix-20211217.tar.gz +/acpica-unix2-20220331.tar.gz +/acpitests-unix-20220331.tar.gz diff --git a/0001-Add-in-basic-infrastructure-for-big-endian-support.patch b/0001-Add-in-basic-infrastructure-for-big-endian-support.patch index 27278a6..4e12c34 100644 --- a/0001-Add-in-basic-infrastructure-for-big-endian-support.patch +++ b/0001-Add-in-basic-infrastructure-for-big-endian-support.patch @@ -35,10 +35,10 @@ Signed-off-by: Al Stone 12 files changed, 275 insertions(+), 87 deletions(-) create mode 100644 source/components/utilities/utendian.c -Index: acpica-unix2-20210730/generate/unix/acpibin/Makefile +Index: acpica-unix2-20220331/generate/unix/acpibin/Makefile =================================================================== ---- acpica-unix2-20210730.orig/generate/unix/acpibin/Makefile -+++ acpica-unix2-20210730/generate/unix/acpibin/Makefile +--- acpica-unix2-20220331.orig/generate/unix/acpibin/Makefile ++++ acpica-unix2-20220331/generate/unix/acpibin/Makefile @@ -37,6 +37,7 @@ OBJECTS = \ $(OBJDIR)/utcache.o\ $(OBJDIR)/utdebug.o\ @@ -47,10 +47,10 @@ Index: acpica-unix2-20210730/generate/unix/acpibin/Makefile $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/utlock.o\ -Index: acpica-unix2-20210730/generate/unix/acpidump/Makefile +Index: acpica-unix2-20220331/generate/unix/acpidump/Makefile =================================================================== ---- acpica-unix2-20210730.orig/generate/unix/acpidump/Makefile -+++ acpica-unix2-20210730/generate/unix/acpidump/Makefile +--- acpica-unix2-20220331.orig/generate/unix/acpidump/Makefile ++++ acpica-unix2-20220331/generate/unix/acpidump/Makefile @@ -36,6 +36,7 @@ OBJECTS = \ $(OBJDIR)/osunixdir.o\ $(OBJDIR)/osunixmap.o\ @@ -59,10 +59,10 @@ Index: acpica-unix2-20210730/generate/unix/acpidump/Makefile $(OBJDIR)/tbprint.o\ $(OBJDIR)/tbxfroot.o\ $(OBJDIR)/utascii.o\ -Index: acpica-unix2-20210730/generate/unix/acpiexamples/Makefile +Index: acpica-unix2-20220331/generate/unix/acpiexamples/Makefile =================================================================== ---- acpica-unix2-20210730.orig/generate/unix/acpiexamples/Makefile -+++ acpica-unix2-20210730/generate/unix/acpiexamples/Makefile +--- acpica-unix2-20220331.orig/generate/unix/acpiexamples/Makefile ++++ acpica-unix2-20220331/generate/unix/acpiexamples/Makefile @@ -139,6 +139,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utdecode.o\ @@ -71,10 +71,10 @@ Index: acpica-unix2-20210730/generate/unix/acpiexamples/Makefile $(OBJDIR)/uterror.o\ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ -Index: acpica-unix2-20210730/generate/unix/acpiexec/Makefile +Index: acpica-unix2-20220331/generate/unix/acpiexec/Makefile =================================================================== ---- acpica-unix2-20210730.orig/generate/unix/acpiexec/Makefile -+++ acpica-unix2-20210730/generate/unix/acpiexec/Makefile +--- acpica-unix2-20220331.orig/generate/unix/acpiexec/Makefile ++++ acpica-unix2-20220331/generate/unix/acpiexec/Makefile @@ -214,6 +214,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utdecode.o\ @@ -83,10 +83,10 @@ Index: acpica-unix2-20210730/generate/unix/acpiexec/Makefile $(OBJDIR)/uterror.o\ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ -Index: acpica-unix2-20210730/generate/unix/acpihelp/Makefile +Index: acpica-unix2-20220331/generate/unix/acpihelp/Makefile =================================================================== ---- acpica-unix2-20210730.orig/generate/unix/acpihelp/Makefile -+++ acpica-unix2-20210730/generate/unix/acpihelp/Makefile +--- acpica-unix2-20220331.orig/generate/unix/acpihelp/Makefile ++++ acpica-unix2-20220331/generate/unix/acpihelp/Makefile @@ -45,6 +45,7 @@ OBJECTS = \ $(OBJDIR)/getopt.o\ $(OBJDIR)/osunixxf.o\ @@ -95,10 +95,10 @@ Index: acpica-unix2-20210730/generate/unix/acpihelp/Makefile $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/uthex.o\ -Index: acpica-unix2-20210730/generate/unix/iasl/Makefile +Index: acpica-unix2-20220331/generate/unix/iasl/Makefile =================================================================== ---- acpica-unix2-20210730.orig/generate/unix/iasl/Makefile -+++ acpica-unix2-20210730/generate/unix/iasl/Makefile +--- acpica-unix2-20220331.orig/generate/unix/iasl/Makefile ++++ acpica-unix2-20220331/generate/unix/iasl/Makefile @@ -225,6 +225,7 @@ OBJECTS = \ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utdecode.o\ @@ -107,10 +107,10 @@ Index: acpica-unix2-20210730/generate/unix/iasl/Makefile $(OBJDIR)/uterror.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ -Index: acpica-unix2-20210730/source/compiler/aslcompiler.h +Index: acpica-unix2-20220331/source/compiler/aslcompiler.h =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslcompiler.h -+++ acpica-unix2-20210730/source/compiler/aslcompiler.h +--- acpica-unix2-20220331.orig/source/compiler/aslcompiler.h ++++ acpica-unix2-20220331/source/compiler/aslcompiler.h @@ -1120,10 +1120,6 @@ BOOLEAN UtIsIdInteger ( UINT8 *Target); @@ -122,10 +122,10 @@ Index: acpica-unix2-20210730/source/compiler/aslcompiler.h BOOLEAN UtQueryForOverwrite ( char *Pathname); -Index: acpica-unix2-20210730/source/compiler/aslutils.c +Index: acpica-unix2-20220331/source/compiler/aslutils.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslutils.c -+++ acpica-unix2-20210730/source/compiler/aslutils.c +--- acpica-unix2-20220331.orig/source/compiler/aslutils.c ++++ acpica-unix2-20220331/source/compiler/aslutils.c @@ -73,33 +73,6 @@ UtDisplayErrorSummary ( /******************************************************************************* @@ -160,10 +160,10 @@ Index: acpica-unix2-20210730/source/compiler/aslutils.c * FUNCTION: UtIsIdInteger * * PARAMETERS: Pointer to an ACPI ID (HID, CID) string -Index: acpica-unix2-20210730/source/components/utilities/utendian.c +Index: acpica-unix2-20220331/source/components/utilities/utendian.c =================================================================== --- /dev/null -+++ acpica-unix2-20210730/source/components/utilities/utendian.c ++++ acpica-unix2-20220331/source/components/utilities/utendian.c @@ -0,0 +1,236 @@ +/****************************************************************************** + * @@ -401,10 +401,10 @@ Index: acpica-unix2-20210730/source/components/utilities/utendian.c + Dst[ii] = Src[SrcLength - ii - 1]; + +} -Index: acpica-unix2-20210730/source/include/acmacros.h +Index: acpica-unix2-20220331/source/include/acmacros.h =================================================================== ---- acpica-unix2-20210730.orig/source/include/acmacros.h -+++ acpica-unix2-20210730/source/include/acmacros.h +--- acpica-unix2-20220331.orig/source/include/acmacros.h ++++ acpica-unix2-20220331/source/include/acmacros.h @@ -76,61 +76,6 @@ * If the hardware supports the transfer of unaligned data, just do the store. * Otherwise, we have to move one byte at a time. @@ -475,10 +475,10 @@ Index: acpica-unix2-20210730/source/include/acmacros.h /* -Index: acpica-unix2-20210730/source/include/acutils.h +Index: acpica-unix2-20220331/source/include/acutils.h =================================================================== ---- acpica-unix2-20210730.orig/source/include/acutils.h -+++ acpica-unix2-20210730/source/include/acutils.h +--- acpica-unix2-20220331.orig/source/include/acutils.h ++++ acpica-unix2-20220331/source/include/acutils.h @@ -1167,4 +1167,36 @@ AcpiUtConvertUuidToString ( char *OutString); #endif @@ -516,11 +516,11 @@ Index: acpica-unix2-20210730/source/include/acutils.h +#endif + #endif /* _ACUTILS_H */ -Index: acpica-unix2-20210730/source/include/platform/aclinux.h +Index: acpica-unix2-20220331/source/include/platform/aclinux.h =================================================================== ---- acpica-unix2-20210730.orig/source/include/platform/aclinux.h -+++ acpica-unix2-20210730/source/include/platform/aclinux.h -@@ -198,6 +198,7 @@ +--- acpica-unix2-20220331.orig/source/include/platform/aclinux.h ++++ acpica-unix2-20220331/source/include/platform/aclinux.h +@@ -203,6 +203,7 @@ #ifdef ACPI_USE_STANDARD_HEADERS #include diff --git a/0002-Modify-utility-functions-to-be-endian-agnostic.patch b/0002-Modify-utility-functions-to-be-endian-agnostic.patch index 8c06f05..a328096 100644 --- a/0002-Modify-utility-functions-to-be-endian-agnostic.patch +++ b/0002-Modify-utility-functions-to-be-endian-agnostic.patch @@ -24,10 +24,10 @@ Signed-off-by: Al Stone source/components/tables/tbprint.c | 13 +++++++++---- 5 files changed, 26 insertions(+), 17 deletions(-) -Index: acpica-unix2-20211217/source/common/acfileio.c +Index: acpica-unix2-20220331/source/common/acfileio.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/acfileio.c -+++ acpica-unix2-20211217/source/common/acfileio.c +--- acpica-unix2-20220331.orig/source/common/acfileio.c ++++ acpica-unix2-20220331/source/common/acfileio.c @@ -280,6 +280,7 @@ AcGetOneTableFromFile ( ACPI_TABLE_HEADER *Table; INT32 Count; @@ -94,11 +94,11 @@ Index: acpica-unix2-20211217/source/common/acfileio.c (UINT32) (FileSize - TableOffset)); return (AE_BAD_HEADER); } -Index: acpica-unix2-20211217/source/common/dmtable.c +Index: acpica-unix2-20220331/source/common/dmtable.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtable.c -+++ acpica-unix2-20211217/source/common/dmtable.c -@@ -710,7 +710,7 @@ AcpiDmDumpDataTable ( +--- acpica-unix2-20220331.orig/source/common/dmtable.c ++++ acpica-unix2-20220331/source/common/dmtable.c +@@ -713,7 +713,7 @@ AcpiDmDumpDataTable ( { /* Dump the raw table data */ @@ -107,7 +107,7 @@ Index: acpica-unix2-20211217/source/common/dmtable.c AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n", ACPI_RAW_TABLE_DATA_HEADER, Length, Length); -@@ -727,7 +727,7 @@ AcpiDmDumpDataTable ( +@@ -730,7 +730,7 @@ AcpiDmDumpDataTable ( */ if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) { @@ -116,7 +116,7 @@ Index: acpica-unix2-20211217/source/common/dmtable.c Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); if (ACPI_FAILURE (Status)) { -@@ -748,7 +748,7 @@ AcpiDmDumpDataTable ( +@@ -751,7 +751,7 @@ AcpiDmDumpDataTable ( /* * All other tables must use the common ACPI table header, dump it now */ @@ -125,7 +125,7 @@ Index: acpica-unix2-20211217/source/common/dmtable.c Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader); if (ACPI_FAILURE (Status)) { -@@ -1407,7 +1407,7 @@ AcpiDmDumpTable ( +@@ -1415,7 +1415,7 @@ AcpiDmDumpTable ( AcpiOsPrintf ("%2.2X", *Target); Temp8 = AcpiDmGenerateChecksum (Table, @@ -134,10 +134,10 @@ Index: acpica-unix2-20211217/source/common/dmtable.c ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum) -Index: acpica-unix2-20211217/source/compiler/dtfield.c +Index: acpica-unix2-20220331/source/compiler/dtfield.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dtfield.c -+++ acpica-unix2-20211217/source/compiler/dtfield.c +--- acpica-unix2-20220331.orig/source/compiler/dtfield.c ++++ acpica-unix2-20220331/source/compiler/dtfield.c @@ -361,7 +361,7 @@ DtCompileInteger ( DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, AslGbl_MsgBuffer); } @@ -147,10 +147,10 @@ Index: acpica-unix2-20211217/source/compiler/dtfield.c return; } -Index: acpica-unix2-20211217/source/compiler/dtsubtable.c +Index: acpica-unix2-20220331/source/compiler/dtsubtable.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dtsubtable.c -+++ acpica-unix2-20211217/source/compiler/dtsubtable.c +--- acpica-unix2-20220331.orig/source/compiler/dtsubtable.c ++++ acpica-unix2-20220331/source/compiler/dtsubtable.c @@ -378,6 +378,6 @@ DtSetSubtableLength ( return; } @@ -160,10 +160,10 @@ Index: acpica-unix2-20211217/source/compiler/dtsubtable.c + AcpiUtWriteUint (Subtable->LengthField, Subtable->SizeOfLengthField, + &Subtable->TotalLength, sizeof (Subtable->TotalLength)); } -Index: acpica-unix2-20211217/source/components/tables/tbprint.c +Index: acpica-unix2-20220331/source/components/tables/tbprint.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/tables/tbprint.c -+++ acpica-unix2-20211217/source/components/tables/tbprint.c +--- acpica-unix2-20220331.orig/source/components/tables/tbprint.c ++++ acpica-unix2-20220331/source/components/tables/tbprint.c @@ -44,6 +44,8 @@ #include "acpi.h" #include "accommon.h" diff --git a/0003-Always-display-table-header-content-in-human-readabl.patch b/0003-Always-display-table-header-content-in-human-readabl.patch index b1bd847..f540ac1 100644 --- a/0003-Always-display-table-header-content-in-human-readabl.patch +++ b/0003-Always-display-table-header-content-in-human-readabl.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/tools/acpibin/abcompare.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20210730/source/tools/acpibin/abcompare.c +Index: acpica-unix2-20220331/source/tools/acpibin/abcompare.c =================================================================== ---- acpica-unix2-20210730.orig/source/tools/acpibin/abcompare.c -+++ acpica-unix2-20210730/source/tools/acpibin/abcompare.c +--- acpica-unix2-20220331.orig/source/tools/acpibin/abcompare.c ++++ acpica-unix2-20220331/source/tools/acpibin/abcompare.c @@ -42,6 +42,7 @@ */ diff --git a/0004-Re-enable-support-for-big-endian-machines.patch b/0004-Re-enable-support-for-big-endian-machines.patch index 4686ed2..d2dc432 100644 --- a/0004-Re-enable-support-for-big-endian-machines.patch +++ b/0004-Re-enable-support-for-big-endian-machines.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/components/namespace/nsutils.c | 7 +++++-- 2 files changed, 5 insertions(+), 14 deletions(-) -Index: acpica-unix2-20210730/source/compiler/aslmain.c +Index: acpica-unix2-20220331/source/compiler/aslmain.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslmain.c -+++ acpica-unix2-20210730/source/compiler/aslmain.c +--- acpica-unix2-20220331.orig/source/compiler/aslmain.c ++++ acpica-unix2-20220331/source/compiler/aslmain.c @@ -101,18 +101,6 @@ main ( signal (SIGINT, AslSignalHandler); @@ -36,10 +36,10 @@ Index: acpica-unix2-20210730/source/compiler/aslmain.c AcpiOsInitialize (); ACPI_DEBUG_INITIALIZE (); /* For debug version only */ -Index: acpica-unix2-20210730/source/components/namespace/nsutils.c +Index: acpica-unix2-20220331/source/components/namespace/nsutils.c =================================================================== ---- acpica-unix2-20210730.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20210730/source/components/namespace/nsutils.c +--- acpica-unix2-20220331.orig/source/components/namespace/nsutils.c ++++ acpica-unix2-20220331/source/components/namespace/nsutils.c @@ -272,6 +272,7 @@ AcpiNsBuildInternalName ( const char *ExternalName = Info->NextExternalChar; char *Result = NULL; diff --git a/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch b/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch index 6293206..e5a9dc5 100644 --- a/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch +++ b/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/cvparser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/compiler/cvparser.c +Index: acpica-unix2-20220331/source/compiler/cvparser.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/cvparser.c -+++ acpica-unix2-20210730/source/compiler/cvparser.c +--- acpica-unix2-20220331.orig/source/compiler/cvparser.c ++++ acpica-unix2-20220331/source/compiler/cvparser.c @@ -144,6 +144,7 @@ CvInitFileTree ( char *ChildFilename = NULL; UINT8 *AmlStart; diff --git a/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch b/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch index 1ed3be3..5893e93 100644 --- a/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch +++ b/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/compiler/aslanalyze.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/compiler/aslanalyze.c +Index: acpica-unix2-20220331/source/compiler/aslanalyze.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/aslanalyze.c -+++ acpica-unix2-20210730/source/compiler/aslanalyze.c +--- acpica-unix2-20220331.orig/source/compiler/aslanalyze.c ++++ acpica-unix2-20220331/source/compiler/aslanalyze.c @@ -469,7 +469,7 @@ ApCheckForGpeNameConflict ( /* Need a null-terminated string version of NameSeg */ diff --git a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch index a046fe9..70d83d6 100644 --- a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch +++ b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump.c +Index: acpica-unix2-20220331/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump.c -+++ acpica-unix2-20211217/source/common/dmtbdump.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump.c ++++ acpica-unix2-20220331/source/common/dmtbdump.c @@ -200,6 +200,8 @@ AcpiDmDumpUnicode ( UINT8 *Buffer; UINT32 Length; diff --git a/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch b/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch index 63fa133..9121ab8 100644 --- a/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch +++ b/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c @@ -763,7 +763,7 @@ AcpiDmDumpMadt ( { ACPI_STATUS Status; @@ -21,10 +21,10 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c UINT32 Offset = sizeof (ACPI_TABLE_MADT); ACPI_DMTABLE_INFO *InfoTable; -@@ -779,7 +779,7 @@ AcpiDmDumpMadt ( - /* Subtables */ - +@@ -781,7 +781,7 @@ AcpiDmDumpMadt ( Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); + DbgPrint (ASL_PARSE_OUTPUT, "//0B) Offset %X, from table start: 0x%8.8X%8.8X\n", + Offset, ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table))); - while (Offset < Table->Length) + while (Offset < Length) { diff --git a/0009-Support-ASF-tables-in-a-big-endian-world.patch b/0009-Support-ASF-tables-in-a-big-endian-world.patch index a0cdeb7..a3f815d 100644 --- a/0009-Support-ASF-tables-in-a-big-endian-world.patch +++ b/0009-Support-ASF-tables-in-a-big-endian-world.patch @@ -10,11 +10,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -296,16 +296,18 @@ AcpiDmDumpAsf ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -358,16 +358,18 @@ AcpiDmDumpAsf ( UINT32 DataOffset = 0; UINT32 i; UINT8 Type; @@ -35,7 +35,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c Subtable->Header.Length, AcpiDmTableInfoAsfHdr); if (ACPI_FAILURE (Status)) { -@@ -363,7 +365,7 @@ AcpiDmDumpAsf ( +@@ -425,7 +427,7 @@ AcpiDmDumpAsf ( return; } @@ -44,7 +44,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c Subtable->Header.Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -380,7 +382,7 @@ AcpiDmDumpAsf ( +@@ -442,7 +444,7 @@ AcpiDmDumpAsf ( for (i = 0; i < DataCount; i++) { AcpiOsPrintf ("\n"); diff --git a/0010-Support-CPEP-tables-in-a-big-endian-world.patch b/0010-Support-CPEP-tables-in-a-big-endian-world.patch index a27a312..e9451cd 100644 --- a/0010-Support-CPEP-tables-in-a-big-endian-world.patch +++ b/0010-Support-CPEP-tables-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -536,7 +536,7 @@ AcpiDmDumpCpep ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -614,7 +614,7 @@ AcpiDmDumpCpep ( { ACPI_STATUS Status; ACPI_CPEP_POLLING *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_CPEP); -@@ -551,7 +551,7 @@ AcpiDmDumpCpep ( +@@ -629,7 +629,7 @@ AcpiDmDumpCpep ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); diff --git a/0011-Support-DBG2-table-in-a-big-endian-world.patch b/0011-Support-DBG2-table-in-a-big-endian-world.patch index 5a2c9dd..76cb7ac 100644 --- a/0011-Support-DBG2-table-in-a-big-endian-world.patch +++ b/0011-Support-DBG2-table-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 43 ++++++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 32 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -591,7 +591,7 @@ AcpiDmDumpCsrt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -669,7 +669,7 @@ AcpiDmDumpCsrt ( ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubtable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_CSRT); UINT32 SubOffset; UINT32 SubSubOffset; -@@ -603,7 +603,7 @@ AcpiDmDumpCsrt ( +@@ -681,7 +681,7 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); @@ -31,7 +31,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { /* Resource group subtable */ -@@ -637,7 +637,7 @@ AcpiDmDumpCsrt ( +@@ -715,7 +715,7 @@ AcpiDmDumpCsrt ( Offset + SubOffset); while ((SubOffset < Subtable->Length) && @@ -40,7 +40,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable, -@@ -698,12 +698,13 @@ AcpiDmDumpDbg2 ( +@@ -776,12 +776,13 @@ AcpiDmDumpDbg2 ( { ACPI_STATUS Status; ACPI_DBG2_DEVICE *Subtable; @@ -55,7 +55,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c /* Main table */ -@@ -717,11 +718,12 @@ AcpiDmDumpDbg2 ( +@@ -795,11 +796,12 @@ AcpiDmDumpDbg2 ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); @@ -70,7 +70,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -731,13 +733,13 @@ AcpiDmDumpDbg2 ( +@@ -809,13 +811,13 @@ AcpiDmDumpDbg2 ( for (i = 0; i < Subtable->RegisterCount; i++) { @@ -86,7 +86,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -748,13 +750,13 @@ AcpiDmDumpDbg2 ( +@@ -826,13 +828,13 @@ AcpiDmDumpDbg2 ( for (i = 0; i < Subtable->RegisterCount; i++) { @@ -102,7 +102,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -764,12 +766,12 @@ AcpiDmDumpDbg2 ( +@@ -842,12 +844,12 @@ AcpiDmDumpDbg2 ( /* Dump the Namestring (required) */ AcpiOsPrintf ("\n"); @@ -117,7 +117,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -779,8 +781,11 @@ AcpiDmDumpDbg2 ( +@@ -857,8 +859,11 @@ AcpiDmDumpDbg2 ( if (Subtable->OemDataOffset) { @@ -131,7 +131,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c AcpiDmTableInfoDbg2OemData); if (ACPI_FAILURE (Status)) { -@@ -790,9 +795,9 @@ AcpiDmDumpDbg2 ( +@@ -868,9 +873,9 @@ AcpiDmDumpDbg2 ( /* Point to next subtable */ @@ -143,11 +143,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c } } -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -572,6 +572,7 @@ DtCompileCsrt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -718,6 +718,7 @@ DtCompileCsrt ( DT_FIELD **PFieldList = (DT_FIELD **) List; UINT32 DescriptorCount; UINT32 GroupLength; @@ -155,7 +155,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c /* Subtables (Resource Groups) */ -@@ -590,12 +591,13 @@ DtCompileCsrt ( +@@ -736,12 +737,13 @@ DtCompileCsrt ( /* Compute the number of resource descriptors */ @@ -175,7 +175,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c DescriptorCount = (GroupLength / sizeof (ACPI_CSRT_DESCRIPTOR)); -@@ -683,6 +685,7 @@ DtCompileDbg2 ( +@@ -829,6 +831,7 @@ DtCompileDbg2 ( ACPI_DBG2_DEVICE *DeviceInfo; UINT16 CurrentOffset; UINT32 i; @@ -183,7 +183,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c /* Main table */ -@@ -699,10 +702,12 @@ DtCompileDbg2 ( +@@ -845,10 +848,12 @@ DtCompileDbg2 ( /* Main table fields */ Dbg2Header = ACPI_CAST_PTR (ACPI_DBG2_HEADER, Subtable->Buffer); @@ -199,7 +199,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c DtPushSubtable (Subtable); /* Process all Device Information subtables (Count = InfoCount) */ -@@ -729,7 +734,8 @@ DtCompileDbg2 ( +@@ -875,7 +880,8 @@ DtCompileDbg2 ( /* BaseAddressRegister GAS array (Required, size is RegisterCount) */ @@ -209,7 +209,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Addr, -@@ -745,7 +751,8 @@ DtCompileDbg2 ( +@@ -891,7 +897,8 @@ DtCompileDbg2 ( /* AddressSize array (Required, size = RegisterCount) */ @@ -219,7 +219,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Size, -@@ -761,7 +768,8 @@ DtCompileDbg2 ( +@@ -907,7 +914,8 @@ DtCompileDbg2 ( /* NamespaceString device identifier (Required, size = NamePathLength) */ @@ -229,7 +229,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Name, &Subtable); if (ACPI_FAILURE (Status)) -@@ -771,8 +779,9 @@ DtCompileDbg2 ( +@@ -917,8 +925,9 @@ DtCompileDbg2 ( /* Update the device info header */ @@ -241,7 +241,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c DtInsertSubtable (ParentTable, Subtable); /* OemData - Variable-length data (Optional, size = OemDataLength) */ -@@ -799,8 +808,10 @@ DtCompileDbg2 ( +@@ -945,8 +954,10 @@ DtCompileDbg2 ( if (Subtable && Subtable->Length) { diff --git a/0012-Support-DMAR-in-a-big-endian-world.patch b/0012-Support-DMAR-in-a-big-endian-world.patch index 895f65f..3d54025 100644 --- a/0012-Support-DMAR-in-a-big-endian-world.patch +++ b/0012-Support-DMAR-in-a-big-endian-world.patch @@ -10,11 +10,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 12 +++++++----- 3 files changed, 24 insertions(+), 18 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtable.c +Index: acpica-unix2-20220331/source/common/dmtable.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtable.c -+++ acpica-unix2-20211217/source/common/dmtable.c -@@ -1570,13 +1570,13 @@ AcpiDmDumpTable ( +--- acpica-unix2-20220331.orig/source/common/dmtable.c ++++ acpica-unix2-20220331/source/common/dmtable.c +@@ -1578,13 +1578,13 @@ AcpiDmDumpTable ( /* DMAR subtable types */ @@ -30,11 +30,11 @@ Index: acpica-unix2-20211217/source/common/dmtable.c AcpiDmDmarSubnames[Temp16]); break; -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -821,13 +821,15 @@ AcpiDmDumpDmar ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -899,13 +899,15 @@ AcpiDmDumpDmar ( { ACPI_STATUS Status; ACPI_DMAR_HEADER *Subtable; @@ -51,7 +51,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c /* Main table */ -@@ -841,13 +843,14 @@ AcpiDmDumpDmar ( +@@ -919,13 +921,14 @@ AcpiDmDumpDmar ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); @@ -68,7 +68,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -855,7 +858,8 @@ AcpiDmDumpDmar ( +@@ -933,7 +936,8 @@ AcpiDmDumpDmar ( AcpiOsPrintf ("\n"); @@ -78,7 +78,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { case ACPI_DMAR_TYPE_HARDWARE_UNIT: -@@ -890,12 +894,12 @@ AcpiDmDumpDmar ( +@@ -974,12 +978,12 @@ AcpiDmDumpDmar ( default: AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", @@ -93,7 +93,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -904,8 +908,8 @@ AcpiDmDumpDmar ( +@@ -988,8 +992,8 @@ AcpiDmDumpDmar ( /* * Dump the optional device scope entries */ @@ -104,7 +104,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { /* These types do not support device scopes */ -@@ -913,7 +917,7 @@ AcpiDmDumpDmar ( +@@ -997,7 +1001,7 @@ AcpiDmDumpDmar ( } ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable, ScopeOffset); @@ -113,7 +113,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable, -@@ -954,9 +958,9 @@ AcpiDmDumpDmar ( +@@ -1038,9 +1042,9 @@ AcpiDmDumpDmar ( NextSubtable: /* Point to next subtable */ @@ -125,11 +125,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c } } -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -851,6 +851,7 @@ DtCompileDmar ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -997,6 +997,7 @@ DtCompileDmar ( ACPI_DMAR_DEVICE_SCOPE *DmarDeviceScope; UINT32 DeviceScopeLength; UINT32 PciPathLength; @@ -137,7 +137,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmar, &Subtable); -@@ -881,7 +882,8 @@ DtCompileDmar ( +@@ -1027,7 +1028,8 @@ DtCompileDmar ( DmarHeader = ACPI_CAST_PTR (ACPI_DMAR_HEADER, Subtable->Buffer); @@ -147,7 +147,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c { case ACPI_DMAR_TYPE_HARDWARE_UNIT: -@@ -928,8 +930,8 @@ DtCompileDmar ( +@@ -1079,8 +1081,8 @@ DtCompileDmar ( /* * Optional Device Scope subtables */ @@ -158,7 +158,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c { /* These types do not support device scopes */ -@@ -938,8 +940,8 @@ DtCompileDmar ( +@@ -1089,8 +1091,8 @@ DtCompileDmar ( } DtPushSubtable (Subtable); diff --git a/0013-Support-DRTM-in-a-big-endian-world.patch b/0013-Support-DRTM-in-a-big-endian-world.patch index 02fa91e..02725bb 100644 --- a/0013-Support-DRTM-in-a-big-endian-world.patch +++ b/0013-Support-DRTM-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 6 ++++-- 2 files changed, 19 insertions(+), 12 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -987,11 +987,14 @@ AcpiDmDumpDrtm ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1071,11 +1071,14 @@ AcpiDmDumpDrtm ( ACPI_DRTM_RESOURCE_LIST *DrtmRl; ACPI_DRTM_DPS_ID *DrtmDps; UINT32 Count; @@ -29,7 +29,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c AcpiDmTableInfoDrtm); if (ACPI_FAILURE (Status)) { -@@ -1006,7 +1009,7 @@ AcpiDmDumpDrtm ( +@@ -1090,7 +1093,7 @@ AcpiDmDumpDrtm ( DrtmVtl = ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST, Table, Offset); AcpiOsPrintf ("\n"); @@ -38,7 +38,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c DrtmVtl, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST, ValidatedTables), AcpiDmTableInfoDrtm0); if (ACPI_FAILURE (Status)) -@@ -1019,10 +1022,11 @@ AcpiDmDumpDrtm ( +@@ -1103,10 +1106,11 @@ AcpiDmDumpDrtm ( /* Dump Validated table addresses */ Count = 0; @@ -53,7 +53,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c ACPI_ADD_PTR (void, Table, Offset), sizeof (UINT64), AcpiDmTableInfoDrtm0a); if (ACPI_FAILURE (Status)) -@@ -1038,7 +1042,7 @@ AcpiDmDumpDrtm ( +@@ -1122,7 +1126,7 @@ AcpiDmDumpDrtm ( DrtmRl = ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST, Table, Offset); AcpiOsPrintf ("\n"); @@ -62,7 +62,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c DrtmRl, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST, Resources), AcpiDmTableInfoDrtm1); if (ACPI_FAILURE (Status)) -@@ -1051,10 +1055,11 @@ AcpiDmDumpDrtm ( +@@ -1135,10 +1139,11 @@ AcpiDmDumpDrtm ( /* Dump the Resource List */ Count = 0; @@ -77,7 +77,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c ACPI_ADD_PTR (void, Table, Offset), sizeof (ACPI_DRTM_RESOURCE), AcpiDmTableInfoDrtm1a); if (ACPI_FAILURE (Status)) -@@ -1070,7 +1075,7 @@ AcpiDmDumpDrtm ( +@@ -1154,7 +1159,7 @@ AcpiDmDumpDrtm ( DrtmDps = ACPI_ADD_PTR (ACPI_DRTM_DPS_ID, Table, Offset); AcpiOsPrintf ("\n"); @@ -86,11 +86,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c DrtmDps, sizeof (ACPI_DRTM_DPS_ID), AcpiDmTableInfoDrtm2); } -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -1066,7 +1066,8 @@ DtCompileDrtm ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -1217,7 +1217,8 @@ DtCompileDrtm ( Count++; } @@ -100,7 +100,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c DtPopSubtable (); ParentTable = DtPeekSubtable (); -@@ -1104,7 +1105,8 @@ DtCompileDrtm ( +@@ -1255,7 +1256,8 @@ DtCompileDrtm ( Count++; } diff --git a/0014-Support-EINJ-in-a-big-endian-world.patch b/0014-Support-EINJ-in-a-big-endian-world.patch index 5e360a1..f65e6ff 100644 --- a/0014-Support-EINJ-in-a-big-endian-world.patch +++ b/0014-Support-EINJ-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -1099,7 +1099,7 @@ AcpiDmDumpEinj ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1183,7 +1183,7 @@ AcpiDmDumpEinj ( { ACPI_STATUS Status; ACPI_WHEA_HEADER *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_EINJ); -@@ -1114,7 +1114,7 @@ AcpiDmDumpEinj ( +@@ -1198,7 +1198,7 @@ AcpiDmDumpEinj ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); diff --git a/0015-Support-ERST-in-a-big-endian-world.patch b/0015-Support-ERST-in-a-big-endian-world.patch index db9cade..a6146e2 100644 --- a/0015-Support-ERST-in-a-big-endian-world.patch +++ b/0015-Support-ERST-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -1152,7 +1152,7 @@ AcpiDmDumpErst ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1236,7 +1236,7 @@ AcpiDmDumpErst ( { ACPI_STATUS Status; ACPI_WHEA_HEADER *Subtable; @@ -21,7 +21,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_ERST); -@@ -1167,7 +1167,7 @@ AcpiDmDumpErst ( +@@ -1251,7 +1251,7 @@ AcpiDmDumpErst ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); diff --git a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch index f74a041..1b9b3aa 100644 --- a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch +++ b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/components/tables/tbfadt.c | 34 +++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 21 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump.c +Index: acpica-unix2-20220331/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump.c -+++ acpica-unix2-20211217/source/common/dmtbdump.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump.c ++++ acpica-unix2-20220331/source/common/dmtbdump.c @@ -417,11 +417,12 @@ AcpiDmDumpFadt ( ACPI_TABLE_HEADER *Table) { @@ -91,10 +91,10 @@ Index: acpica-unix2-20211217/source/common/dmtbdump.c } -Index: acpica-unix2-20211217/source/components/tables/tbfadt.c +Index: acpica-unix2-20220331/source/components/tables/tbfadt.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/tables/tbfadt.c -+++ acpica-unix2-20211217/source/components/tables/tbfadt.c +--- acpica-unix2-20220331.orig/source/components/tables/tbfadt.c ++++ acpica-unix2-20220331/source/components/tables/tbfadt.c @@ -289,7 +289,6 @@ AcpiTbSelectAddress ( UINT32 Address32, UINT64 Address64) diff --git a/0017-Support-most-FPDTs-in-a-big-endian-world.patch b/0017-Support-most-FPDTs-in-a-big-endian-world.patch index 058f86a..41c0019 100644 --- a/0017-Support-most-FPDTs-in-a-big-endian-world.patch +++ b/0017-Support-most-FPDTs-in-a-big-endian-world.patch @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -1205,9 +1205,10 @@ AcpiDmDumpFpdt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1289,9 +1289,10 @@ AcpiDmDumpFpdt ( { ACPI_STATUS Status; ACPI_FPDT_HEADER *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c /* There is no main table (other than the standard ACPI header) */ -@@ -1215,19 +1216,20 @@ AcpiDmDumpFpdt ( +@@ -1299,19 +1300,20 @@ AcpiDmDumpFpdt ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset); @@ -52,7 +52,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { case ACPI_FPDT_TYPE_BOOT: -@@ -1254,7 +1256,7 @@ AcpiDmDumpFpdt ( +@@ -1338,7 +1340,7 @@ AcpiDmDumpFpdt ( goto NextSubtable; } @@ -61,11 +61,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -1342,6 +1342,7 @@ DtCompileFpdt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -1493,6 +1493,7 @@ DtCompileFpdt ( ACPI_DMTABLE_INFO *InfoTable; DT_FIELD **PFieldList = (DT_FIELD **) List; DT_FIELD *SubtableStart; @@ -73,7 +73,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c while (*PFieldList) -@@ -1360,7 +1361,8 @@ DtCompileFpdt ( +@@ -1511,7 +1512,8 @@ DtCompileFpdt ( FpdtHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer); diff --git a/0018-Support-GTDT-in-a-big-endian-world.patch b/0018-Support-GTDT-in-a-big-endian-world.patch index fdfcd8d..4bdb9bc 100644 --- a/0018-Support-GTDT-in-a-big-endian-world.patch +++ b/0018-Support-GTDT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 9 +++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -1292,7 +1292,7 @@ AcpiDmDumpGtdt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1376,7 +1376,7 @@ AcpiDmDumpGtdt ( { ACPI_STATUS Status; ACPI_GTDT_HEADER *Subtable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c UINT32 Offset = sizeof (ACPI_TABLE_GTDT); ACPI_DMTABLE_INFO *InfoTable; UINT32 SubtableLength; -@@ -1328,7 +1328,7 @@ AcpiDmDumpGtdt ( +@@ -1412,7 +1412,7 @@ AcpiDmDumpGtdt ( /* Subtables */ @@ -31,7 +31,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { /* Common subtable header */ -@@ -1346,8 +1346,13 @@ AcpiDmDumpGtdt ( +@@ -1430,8 +1430,13 @@ AcpiDmDumpGtdt ( case ACPI_GTDT_TYPE_TIMER_BLOCK: SubtableLength = sizeof (ACPI_GTDT_TIMER_BLOCK); @@ -47,11 +47,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c InfoTable = AcpiDmTableInfoGtdt0; break; -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -1288,8 +1288,13 @@ DtCompileGtdt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -1439,8 +1439,13 @@ DtCompileGtdt ( DtPushSubtable (Subtable); ParentTable = DtPeekSubtable (); diff --git a/0019-Support-HEST-in-a-big-endian-world.patch b/0019-Support-HEST-in-a-big-endian-world.patch index 611e052..e54f2ed 100644 --- a/0019-Support-HEST-in-a-big-endian-world.patch +++ b/0019-Support-HEST-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -1433,12 +1433,13 @@ AcpiDmDumpHest ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1517,12 +1517,13 @@ AcpiDmDumpHest ( { ACPI_STATUS Status; ACPI_HEST_HEADER *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c /* Main table */ -@@ -1452,10 +1453,11 @@ AcpiDmDumpHest ( +@@ -1536,10 +1537,11 @@ AcpiDmDumpHest ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset); @@ -42,7 +42,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { case ACPI_HEST_TYPE_IA32_CHECK: -@@ -1522,7 +1524,7 @@ AcpiDmDumpHest ( +@@ -1606,7 +1608,7 @@ AcpiDmDumpHest ( /* Cannot continue on unknown type - no length */ AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n", @@ -51,11 +51,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c return; } -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -1424,6 +1424,7 @@ DtCompileHest ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -1575,6 +1575,7 @@ DtCompileHest ( DT_FIELD *SubtableStart; ACPI_DMTABLE_INFO *InfoTable; UINT16 Type; @@ -63,7 +63,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c UINT32 BankCount; -@@ -1442,7 +1443,8 @@ DtCompileHest ( +@@ -1593,7 +1594,8 @@ DtCompileHest ( /* Get subtable type */ SubtableStart = *PFieldList; diff --git a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch index 0df5881..e47951d 100644 --- a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch +++ b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump.c +Index: acpica-unix2-20220331/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump.c -+++ acpica-unix2-20211217/source/common/dmtbdump.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump.c ++++ acpica-unix2-20220331/source/common/dmtbdump.c @@ -336,6 +336,7 @@ AcpiDmDumpRsdt ( UINT32 Entries; UINT32 Offset; diff --git a/0021-Support-XSDT-in-a-big-endian-world.patch b/0021-Support-XSDT-in-a-big-endian-world.patch index 40639d6..86ca379 100644 --- a/0021-Support-XSDT-in-a-big-endian-world.patch +++ b/0021-Support-XSDT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump.c +Index: acpica-unix2-20220331/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump.c -+++ acpica-unix2-20211217/source/common/dmtbdump.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump.c ++++ acpica-unix2-20220331/source/common/dmtbdump.c @@ -377,6 +377,7 @@ AcpiDmDumpXsdt ( UINT32 Entries; UINT32 Offset; diff --git a/0022-Support-SRAT-in-a-big-endian-world.patch b/0022-Support-SRAT-in-a-big-endian-world.patch index 896efe9..0993d26 100644 --- a/0022-Support-SRAT-in-a-big-endian-world.patch +++ b/0022-Support-SRAT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -173,11 +173,12 @@ AcpiDmDumpSrat ( UINT32 Offset = sizeof (ACPI_TABLE_SRAT); ACPI_SUBTABLE_HEADER *Subtable; diff --git a/0023-Support-SLIT-in-a-big-endian-world.patch b/0023-Support-SLIT-in-a-big-endian-world.patch index c546b1d..15936a4 100644 --- a/0023-Support-SLIT-in-a-big-endian-world.patch +++ b/0023-Support-SLIT-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -96,11 +96,12 @@ AcpiDmDumpSlit ( UINT32 Localities; UINT32 i; @@ -46,11 +46,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump3.c { AcpiOsPrintf ( "\n**** Not enough room in table for all localities\n"); -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -2221,7 +2221,7 @@ DtCompileSlit ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -2234,7 +2234,7 @@ DtCompileSlit ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); diff --git a/0024-Support-MSCT-in-a-big-endian-world.patch b/0024-Support-MSCT-in-a-big-endian-world.patch index 43dae55..5ee3854 100644 --- a/0024-Support-MSCT-in-a-big-endian-world.patch +++ b/0024-Support-MSCT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -1133,11 +1133,12 @@ AcpiDmDumpMsct ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -1185,11 +1185,12 @@ AcpiDmDumpMsct ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_MSCT); ACPI_MSCT_PROXIMITY *Subtable; @@ -26,7 +26,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1146,12 +1147,12 @@ AcpiDmDumpMsct ( +@@ -1198,12 +1199,12 @@ AcpiDmDumpMsct ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, Table, Offset); diff --git a/0025-Support-MPST-in-a-big-endian-world.patch b/0025-Support-MPST-in-a-big-endian-world.patch index 5a12316..ef704b7 100644 --- a/0025-Support-MPST-in-a-big-endian-world.patch +++ b/0025-Support-MPST-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 8 ++++---- 2 files changed, 23 insertions(+), 18 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -995,11 +995,13 @@ AcpiDmDumpMpst ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -1047,11 +1047,13 @@ AcpiDmDumpMpst ( UINT16 SubtableCount; UINT32 PowerStateCount; UINT32 ComponentCount; @@ -28,7 +28,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1007,13 +1009,14 @@ AcpiDmDumpMpst ( +@@ -1059,13 +1061,14 @@ AcpiDmDumpMpst ( /* Subtable: Memory Power Node(s) */ @@ -46,7 +46,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c sizeof (ACPI_MPST_POWER_NODE), AcpiDmTableInfoMpst0); if (ACPI_FAILURE (Status)) { -@@ -1022,8 +1025,8 @@ AcpiDmDumpMpst ( +@@ -1074,8 +1077,8 @@ AcpiDmDumpMpst ( /* Extract the sub-subtable counts */ @@ -57,7 +57,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c Offset += sizeof (ACPI_MPST_POWER_NODE); /* Sub-subtables - Memory Power State Structure(s) */ -@@ -1034,7 +1037,7 @@ AcpiDmDumpMpst ( +@@ -1086,7 +1089,7 @@ AcpiDmDumpMpst ( while (PowerStateCount) { AcpiOsPrintf ("\n"); @@ -66,7 +66,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c sizeof (ACPI_MPST_POWER_STATE), AcpiDmTableInfoMpst0A); if (ACPI_FAILURE (Status)) { -@@ -1057,7 +1060,7 @@ AcpiDmDumpMpst ( +@@ -1109,7 +1112,7 @@ AcpiDmDumpMpst ( while (ComponentCount) { @@ -75,7 +75,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c sizeof (ACPI_MPST_COMPONENT), AcpiDmTableInfoMpst0B); if (ACPI_FAILURE (Status)) { -@@ -1074,22 +1077,24 @@ AcpiDmDumpMpst ( +@@ -1126,22 +1129,24 @@ AcpiDmDumpMpst ( SubtableCount--; Subtable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Subtable0, sizeof (ACPI_MPST_POWER_NODE) + @@ -104,7 +104,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c Offset += sizeof (ACPI_MPST_DATA_HDR); /* Subtable: Memory Power State Characteristics structure(s) */ -@@ -1097,10 +1102,10 @@ AcpiDmDumpMpst ( +@@ -1149,10 +1154,10 @@ AcpiDmDumpMpst ( Subtable2 = ACPI_ADD_PTR (ACPI_MPST_POWER_DATA, Subtable1, sizeof (ACPI_MPST_DATA_HDR)); @@ -117,11 +117,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c sizeof (ACPI_MPST_POWER_DATA), AcpiDmTableInfoMpst2); if (ACPI_FAILURE (Status)) { -Index: acpica-unix2-20210730/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210730/source/compiler/dttable2.c -@@ -350,7 +350,7 @@ DtCompileMpst ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -359,7 +359,7 @@ DtCompileMpst ( DtPushSubtable (Subtable); MpstChannelInfo = ACPI_CAST_PTR (ACPI_MPST_CHANNEL, Subtable->Buffer); @@ -130,7 +130,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c while (*PFieldList && SubtableCount) { -@@ -368,8 +368,8 @@ DtCompileMpst ( +@@ -377,8 +377,8 @@ DtCompileMpst ( DtPushSubtable (Subtable); MpstPowerNode = ACPI_CAST_PTR (ACPI_MPST_POWER_NODE, Subtable->Buffer); @@ -141,7 +141,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable2.c ParentTable = DtPeekSubtable (); -@@ -422,7 +422,7 @@ DtCompileMpst ( +@@ -431,7 +431,7 @@ DtCompileMpst ( DtPushSubtable (Subtable); MpstDataHeader = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, Subtable->Buffer); diff --git a/0026-Support-NFIT-in-a-big-endian-world.patch b/0026-Support-NFIT-in-a-big-endian-world.patch index 5089e09..6b85634 100644 --- a/0026-Support-NFIT-in-a-big-endian-world.patch +++ b/0026-Support-NFIT-in-a-big-endian-world.patch @@ -13,11 +13,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 11 ++++++--- 3 files changed, 39 insertions(+), 25 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtable.c +Index: acpica-unix2-20220331/source/common/dmtable.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtable.c -+++ acpica-unix2-20211217/source/common/dmtable.c -@@ -1755,13 +1755,13 @@ AcpiDmDumpTable ( +--- acpica-unix2-20220331.orig/source/common/dmtable.c ++++ acpica-unix2-20220331/source/common/dmtable.c +@@ -1766,13 +1766,13 @@ AcpiDmDumpTable ( /* NFIT subtable types */ @@ -33,11 +33,11 @@ Index: acpica-unix2-20211217/source/common/dmtable.c AcpiDmNfitSubnames[Temp16]); break; -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -1192,18 +1192,23 @@ AcpiDmDumpNfit ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -1244,18 +1244,23 @@ AcpiDmDumpNfit ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_NFIT); UINT32 FieldOffset = 0; @@ -63,7 +63,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1212,19 +1217,21 @@ AcpiDmDumpNfit ( +@@ -1264,19 +1269,21 @@ AcpiDmDumpNfit ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_NFIT_HEADER, Table, Offset); @@ -89,7 +89,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c { case ACPI_NFIT_TYPE_SYSTEM_ADDRESS: -@@ -1275,11 +1282,11 @@ AcpiDmDumpNfit ( +@@ -1327,11 +1334,11 @@ AcpiDmDumpNfit ( default: AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n", @@ -103,7 +103,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c { AcpiOsPrintf ("Invalid zero length subtable\n"); return; -@@ -1288,8 +1295,8 @@ AcpiDmDumpNfit ( +@@ -1340,8 +1347,8 @@ AcpiDmDumpNfit ( } AcpiOsPrintf ("\n"); @@ -114,7 +114,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1297,14 +1304,15 @@ AcpiDmDumpNfit ( +@@ -1349,14 +1356,15 @@ AcpiDmDumpNfit ( /* Per-subtable variable-length fields */ @@ -133,7 +133,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c &Interleave->LineOffset[i], sizeof (UINT32), AcpiDmTableInfoNfit2a); if (ACPI_FAILURE (Status)) -@@ -1318,14 +1326,14 @@ AcpiDmDumpNfit ( +@@ -1370,14 +1378,14 @@ AcpiDmDumpNfit ( case ACPI_NFIT_TYPE_SMBIOS: @@ -151,7 +151,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c Length, AcpiDmTableInfoNfit3a); if (ACPI_FAILURE (Status)) { -@@ -1338,9 +1346,10 @@ AcpiDmDumpNfit ( +@@ -1390,9 +1398,10 @@ AcpiDmDumpNfit ( case ACPI_NFIT_TYPE_FLUSH_ADDRESS: Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable); @@ -164,7 +164,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c &Hint->HintAddress[i], sizeof (UINT64), AcpiDmTableInfoNfit6a); if (ACPI_FAILURE (Status)) -@@ -1359,8 +1368,8 @@ AcpiDmDumpNfit ( +@@ -1411,8 +1420,8 @@ AcpiDmDumpNfit ( NextSubtable: /* Point to next subtable */ @@ -175,11 +175,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c } } -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -497,6 +497,7 @@ DtCompileNfit ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -506,6 +506,7 @@ DtCompileNfit ( UINT32 Count; ACPI_NFIT_INTERLEAVE *Interleave = NULL; ACPI_NFIT_FLUSH_ADDRESS *Hint = NULL; @@ -187,7 +187,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c /* Main table */ -@@ -530,7 +531,8 @@ DtCompileNfit ( +@@ -539,7 +540,8 @@ DtCompileNfit ( NfitHeader = ACPI_CAST_PTR (ACPI_NFIT_HEADER, Subtable->Buffer); @@ -197,7 +197,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c { case ACPI_NFIT_TYPE_SYSTEM_ADDRESS: -@@ -590,7 +592,7 @@ DtCompileNfit ( +@@ -599,7 +601,7 @@ DtCompileNfit ( DtInsertSubtable (ParentTable, Subtable); DtPopSubtable (); @@ -206,7 +206,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c { case ACPI_NFIT_TYPE_INTERLEAVE: -@@ -616,7 +618,8 @@ DtCompileNfit ( +@@ -625,7 +627,8 @@ DtCompileNfit ( Count++; } @@ -216,7 +216,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c break; case ACPI_NFIT_TYPE_SMBIOS: -@@ -662,6 +665,8 @@ DtCompileNfit ( +@@ -671,6 +674,8 @@ DtCompileNfit ( } Hint->HintCount = (UINT16) Count; diff --git a/0027-Support-SDEV-in-a-big-endian-world.patch b/0027-Support-SDEV-in-a-big-endian-world.patch index 11adeb5..680961e 100644 --- a/0027-Support-SDEV-in-a-big-endian-world.patch +++ b/0027-Support-SDEV-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 27 ++++++++++++++++++++- 2 files changed, 52 insertions(+), 23 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -2534,7 +2534,7 @@ AcpiDmDumpSdev ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2581,7 +2581,7 @@ AcpiDmDumpSdev ( ACPI_SDEV_NAMESPACE *Namesp; ACPI_DMTABLE_INFO *InfoTable; ACPI_DMTABLE_INFO *SecureComponentInfoTable; @@ -22,7 +22,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c UINT32 Offset = sizeof (ACPI_TABLE_SDEV); UINT16 PathOffset; UINT16 PathLength; -@@ -2542,11 +2542,12 @@ AcpiDmDumpSdev ( +@@ -2589,11 +2589,12 @@ AcpiDmDumpSdev ( UINT16 VendorDataLength; ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; UINT32 CurrentOffset = 0; @@ -36,7 +36,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2555,13 +2556,14 @@ AcpiDmDumpSdev ( +@@ -2602,13 +2603,14 @@ AcpiDmDumpSdev ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_SDEV_HEADER, Table, Offset); @@ -54,7 +54,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2584,8 +2586,8 @@ AcpiDmDumpSdev ( +@@ -2631,8 +2633,8 @@ AcpiDmDumpSdev ( } AcpiOsPrintf ("\n"); @@ -65,7 +65,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2644,12 +2646,12 @@ AcpiDmDumpSdev ( +@@ -2691,12 +2693,12 @@ AcpiDmDumpSdev ( /* Dump the PCIe device ID(s) */ Namesp = ACPI_CAST_PTR (ACPI_SDEV_NAMESPACE, Subtable); @@ -81,7 +81,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (UINT8, Namesp, PathOffset), PathLength, AcpiDmTableInfoSdev0a); if (ACPI_FAILURE (Status)) -@@ -2661,14 +2663,14 @@ AcpiDmDumpSdev ( +@@ -2708,14 +2710,14 @@ AcpiDmDumpSdev ( /* Dump the vendor-specific data */ @@ -100,7 +100,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (UINT8, Namesp, VendorDataOffset), VendorDataLength, AcpiDmTableInfoSdev1b); if (ACPI_FAILURE (Status)) -@@ -2683,12 +2685,12 @@ AcpiDmDumpSdev ( +@@ -2730,12 +2732,12 @@ AcpiDmDumpSdev ( /* PCI path substructures */ Pcie = ACPI_CAST_PTR (ACPI_SDEV_PCIE, Subtable); @@ -116,7 +116,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c PathOffset + Offset, ACPI_ADD_PTR (UINT8, Pcie, PathOffset), sizeof (ACPI_SDEV_PCIE_PATH), AcpiDmTableInfoSdev1a); -@@ -2703,12 +2705,14 @@ AcpiDmDumpSdev ( +@@ -2750,12 +2752,14 @@ AcpiDmDumpSdev ( /* VendorData */ @@ -134,7 +134,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset), VendorDataLength, AcpiDmTableInfoSdev1b); if (ACPI_FAILURE (Status)) -@@ -2725,8 +2729,8 @@ AcpiDmDumpSdev ( +@@ -2772,8 +2776,8 @@ AcpiDmDumpSdev ( NextSubtable: /* Point to next subtable */ @@ -145,11 +145,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c + SubtableLength); } } -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -1877,6 +1877,7 @@ DtCompileSdev ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -1890,6 +1890,7 @@ DtCompileSdev ( UINT32 EntryCount; ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; UINT16 ComponentLength = 0; @@ -157,7 +157,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c /* Subtables */ -@@ -1898,7 +1899,7 @@ DtCompileSdev ( +@@ -1911,7 +1912,7 @@ DtCompileSdev ( DtPushSubtable (Subtable); SdevHeader = ACPI_CAST_PTR (ACPI_SDEV_HEADER, Subtable->Buffer); @@ -166,7 +166,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c switch (SdevHeader->Type) { -@@ -2071,6 +2072,18 @@ DtCompileSdev ( +@@ -2084,6 +2085,18 @@ DtCompileSdev ( } } @@ -185,7 +185,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c break; case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE: -@@ -2133,6 +2146,18 @@ DtCompileSdev ( +@@ -2146,6 +2159,18 @@ DtCompileSdev ( SdevHeader->Length = sizeof (ACPI_SDEV_PCIE) + Pcie->PathLength + Pcie->VendorDataLength; diff --git a/0028-Support-HMAT-in-a-big-endian-world.patch b/0028-Support-HMAT-in-a-big-endian-world.patch index 9cbb611..386db57 100644 --- a/0028-Support-HMAT-in-a-big-endian-world.patch +++ b/0028-Support-HMAT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 24 ++++++++++--- 2 files changed, 59 insertions(+), 35 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -1596,37 +1596,45 @@ AcpiDmDumpHmat ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -1680,37 +1680,45 @@ AcpiDmDumpHmat ( UINT32 Length; ACPI_DMTABLE_INFO *InfoTable; UINT32 i, j; @@ -65,7 +65,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { case ACPI_HMAT_TYPE_ADDRESS_RANGE: -@@ -1649,7 +1657,7 @@ AcpiDmDumpHmat ( +@@ -1733,7 +1741,7 @@ AcpiDmDumpHmat ( default: AcpiOsPrintf ("\n**** Unknown HMAT structure type 0x%X\n", @@ -74,7 +74,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c /* Attempt to continue */ -@@ -1658,13 +1666,13 @@ AcpiDmDumpHmat ( +@@ -1742,13 +1750,13 @@ AcpiDmDumpHmat ( /* Dump HMAT structure body */ @@ -91,7 +91,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -1672,7 +1680,7 @@ AcpiDmDumpHmat ( +@@ -1756,7 +1764,7 @@ AcpiDmDumpHmat ( /* Dump HMAT structure additionals */ @@ -100,7 +100,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c { case ACPI_HMAT_TYPE_LOCALITY: -@@ -1681,15 +1689,16 @@ AcpiDmDumpHmat ( +@@ -1765,15 +1773,16 @@ AcpiDmDumpHmat ( /* Dump initiator proximity domains */ @@ -121,7 +121,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1a); if (ACPI_FAILURE (Status)) -@@ -1702,15 +1711,16 @@ AcpiDmDumpHmat ( +@@ -1786,15 +1795,16 @@ AcpiDmDumpHmat ( /* Dump target proximity domains */ @@ -142,7 +142,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1b); if (ACPI_FAILURE (Status)) -@@ -1723,18 +1733,17 @@ AcpiDmDumpHmat ( +@@ -1807,18 +1817,17 @@ AcpiDmDumpHmat ( /* Dump latency/bandwidth entris */ @@ -166,7 +166,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat1c); if (ACPI_FAILURE(Status)) -@@ -1754,15 +1763,16 @@ AcpiDmDumpHmat ( +@@ -1838,15 +1847,16 @@ AcpiDmDumpHmat ( /* Dump SMBIOS handles */ @@ -187,7 +187,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat2a); if (ACPI_FAILURE (Status)) -@@ -1782,6 +1792,6 @@ AcpiDmDumpHmat ( +@@ -1866,6 +1876,6 @@ AcpiDmDumpHmat ( NextSubtable: /* Point to next HMAT structure subtable */ @@ -195,11 +195,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c + Offset += (HmatStructLength); } } -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -1586,6 +1586,8 @@ DtCompileHmat ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -1737,6 +1737,8 @@ DtCompileHmat ( UINT32 TgtPDNumber; UINT64 EntryNumber; UINT16 SMBIOSHandleNumber; @@ -208,7 +208,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c ParentTable = DtPeekSubtable (); -@@ -1616,7 +1618,8 @@ DtCompileHmat ( +@@ -1767,7 +1769,8 @@ DtCompileHmat ( /* Compile HMAT structure body */ @@ -218,7 +218,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c { case ACPI_HMAT_TYPE_ADDRESS_RANGE: -@@ -1649,7 +1652,7 @@ DtCompileHmat ( +@@ -1800,7 +1803,7 @@ DtCompileHmat ( /* Compile HMAT structure additionals */ @@ -227,7 +227,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c { case ACPI_HMAT_TYPE_LOCALITY: -@@ -1675,7 +1678,7 @@ DtCompileHmat ( +@@ -1826,7 +1829,7 @@ DtCompileHmat ( HmatStruct->Length += Subtable->Length; IntPDNumber++; } @@ -236,7 +236,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c /* Compile target proximity domain list */ -@@ -1696,7 +1699,7 @@ DtCompileHmat ( +@@ -1847,7 +1850,7 @@ DtCompileHmat ( HmatStruct->Length += Subtable->Length; TgtPDNumber++; } @@ -245,7 +245,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c /* Save start of the entries for reporting errors */ -@@ -1722,6 +1725,9 @@ DtCompileHmat ( +@@ -1873,6 +1876,9 @@ DtCompileHmat ( EntryNumber++; } @@ -255,7 +255,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c /* Validate number of entries */ if (EntryNumber != -@@ -1755,11 +1761,19 @@ DtCompileHmat ( +@@ -1906,11 +1912,19 @@ DtCompileHmat ( HmatStruct->Length += Subtable->Length; SMBIOSHandleNumber++; } diff --git a/0029-Support-PDTT-in-a-big-endian-world.patch b/0029-Support-PDTT-in-a-big-endian-world.patch index 3ddabc9..51e41d1 100644 --- a/0029-Support-PDTT-in-a-big-endian-world.patch +++ b/0029-Support-PDTT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -1907,13 +1907,13 @@ AcpiDmDumpPdtt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -1954,13 +1954,13 @@ AcpiDmDumpPdtt ( { ACPI_STATUS Status; ACPI_PDTT_CHANNEL *Subtable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1922,10 +1922,10 @@ AcpiDmDumpPdtt ( +@@ -1969,10 +1969,10 @@ AcpiDmDumpPdtt ( /* Subtables. Currently there is only one type, but can be multiples */ Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Table, Offset); diff --git a/0030-Support-PPTT-in-a-big-endian-world.patch b/0030-Support-PPTT-in-a-big-endian-world.patch index e1fd491..86fb5cd 100644 --- a/0030-Support-PPTT-in-a-big-endian-world.patch +++ b/0030-Support-PPTT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 7 +++++-- 2 files changed, 15 insertions(+), 9 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -2194,6 +2194,8 @@ AcpiDmDumpPptt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2241,6 +2241,8 @@ AcpiDmDumpPptt ( UINT32 Offset = sizeof (ACPI_TABLE_FPDT); ACPI_DMTABLE_INFO *InfoTable; UINT32 i; @@ -22,7 +22,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c /* There is no main table (other than the standard ACPI header) */ -@@ -2201,7 +2203,7 @@ AcpiDmDumpPptt ( +@@ -2248,7 +2250,7 @@ AcpiDmDumpPptt ( /* Subtables */ Offset = sizeof (ACPI_TABLE_HEADER); @@ -31,7 +31,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c { AcpiOsPrintf ("\n"); -@@ -2213,7 +2215,7 @@ AcpiDmDumpPptt ( +@@ -2260,7 +2262,7 @@ AcpiDmDumpPptt ( AcpiOsPrintf ("Invalid subtable length\n"); return; } @@ -40,7 +40,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c Subtable->Length, AcpiDmTableInfoPpttHdr); if (ACPI_FAILURE (Status)) { -@@ -2255,7 +2257,7 @@ AcpiDmDumpPptt ( +@@ -2302,7 +2304,7 @@ AcpiDmDumpPptt ( AcpiOsPrintf ("Invalid subtable length\n"); return; } @@ -49,7 +49,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -2271,15 +2273,16 @@ AcpiDmDumpPptt ( +@@ -2318,15 +2320,16 @@ AcpiDmDumpPptt ( /* Dump SMBIOS handles */ @@ -70,11 +70,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset), 4, AcpiDmTableInfoPptt0a); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -1507,6 +1507,7 @@ DtCompilePptt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -1520,6 +1520,7 @@ DtCompilePptt ( DT_FIELD **PFieldList = (DT_FIELD **) List; DT_FIELD *SubtableStart; ACPI_TABLE_HEADER *PpttAcpiHeader; @@ -82,7 +82,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c ParentTable = DtPeekSubtable (); -@@ -1571,7 +1572,7 @@ DtCompilePptt ( +@@ -1584,7 +1585,7 @@ DtCompilePptt ( { /* Compile initiator proximity domain list */ @@ -91,7 +91,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c while (*PFieldList) { Status = DtCompileTable (PFieldList, -@@ -1587,8 +1588,10 @@ DtCompilePptt ( +@@ -1600,8 +1601,10 @@ DtCompilePptt ( DtInsertSubtable (ParentTable, Subtable); PpttHeader->Length += (UINT8)(Subtable->Length); diff --git a/0031-Support-PCCT-in-a-big-endian-world.patch b/0031-Support-PCCT-in-a-big-endian-world.patch index 970958c..6400618 100644 --- a/0031-Support-PCCT-in-a-big-endian-world.patch +++ b/0031-Support-PCCT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -1803,13 +1803,13 @@ AcpiDmDumpPcct ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -1850,13 +1850,13 @@ AcpiDmDumpPcct ( ACPI_STATUS Status; ACPI_PCCT_SUBSPACE *Subtable; ACPI_DMTABLE_INFO *InfoTable; @@ -28,7 +28,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -1818,12 +1818,12 @@ AcpiDmDumpPcct ( +@@ -1865,12 +1865,12 @@ AcpiDmDumpPcct ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset); @@ -43,7 +43,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c Subtable->Header.Length, AcpiDmTableInfoPcctHdr); if (ACPI_FAILURE (Status)) { -@@ -1871,7 +1871,7 @@ AcpiDmDumpPcct ( +@@ -1918,7 +1918,7 @@ AcpiDmDumpPcct ( } AcpiOsPrintf ("\n"); diff --git a/0032-Support-WDAT-in-a-big-endian-world.patch b/0032-Support-WDAT-in-a-big-endian-world.patch index 83a9c05..9bf59a7 100644 --- a/0032-Support-WDAT-in-a-big-endian-world.patch +++ b/0032-Support-WDAT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -680,11 +680,12 @@ AcpiDmDumpWdat ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_WDAT); diff --git a/0033-Support-TCPA-in-a-big-endian-world.patch b/0033-Support-TCPA-in-a-big-endian-world.patch index 806ea8e..bccfb52 100644 --- a/0033-Support-TCPA-in-a-big-endian-world.patch +++ b/0033-Support-TCPA-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 4 +++- 2 files changed, 11 insertions(+), 6 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -406,11 +406,13 @@ AcpiDmDumpTcpa ( ACPI_TABLE_TCPA_HDR *Subtable = ACPI_ADD_PTR ( ACPI_TABLE_TCPA_HDR, Table, Offset); @@ -52,11 +52,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump3.c break; default: -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -2527,6 +2527,7 @@ DtCompileTcpa ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -2540,6 +2540,7 @@ DtCompileTcpa ( ACPI_TABLE_TCPA_HDR *TcpaHeader; DT_SUBTABLE *ParentTable; ACPI_STATUS Status; @@ -64,7 +64,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c /* Compile the main table */ -@@ -2547,7 +2548,8 @@ DtCompileTcpa ( +@@ -2560,7 +2561,8 @@ DtCompileTcpa ( */ TcpaHeader = ACPI_CAST_PTR (ACPI_TABLE_TCPA_HDR, ParentTable->Buffer); diff --git a/0034-Support-STAO-in-a-big-endian-world.patch b/0034-Support-STAO-in-a-big-endian-world.patch index 120f915..45edf5e 100644 --- a/0034-Support-STAO-in-a-big-endian-world.patch +++ b/0034-Support-STAO-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -290,14 +290,14 @@ AcpiDmDumpStao ( { ACPI_STATUS Status; diff --git a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch index c961086..d30b3d6 100644 --- a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch +++ b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch @@ -13,10 +13,10 @@ Signed-off-by: Al Stone source/common/dmtbdump3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -68,9 +68,11 @@ void AcpiDmDumpSlic ( ACPI_TABLE_HEADER *Table) diff --git a/0036-Support-MCFG-in-a-big-endian-world.patch b/0036-Support-MCFG-in-a-big-endian-world.patch index 634e9b8..b8b09eb 100644 --- a/0036-Support-MCFG-in-a-big-endian-world.patch +++ b/0036-Support-MCFG-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c -@@ -930,11 +930,12 @@ AcpiDmDumpMcfg ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -982,11 +982,12 @@ AcpiDmDumpMcfg ( ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_MCFG); ACPI_MCFG_ALLOCATION *Subtable; @@ -26,7 +26,7 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -943,17 +944,17 @@ AcpiDmDumpMcfg ( +@@ -995,17 +996,17 @@ AcpiDmDumpMcfg ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Table, Offset); diff --git a/0037-Support-LPIT-in-a-big-endian-world.patch b/0037-Support-LPIT-in-a-big-endian-world.patch index d53a3a2..11f3ebc 100644 --- a/0037-Support-LPIT-in-a-big-endian-world.patch +++ b/0037-Support-LPIT-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c @@ -690,7 +690,7 @@ AcpiDmDumpLpit ( { ACPI_STATUS Status; diff --git a/0038-Support-PMTT-in-a-big-endian-world.patch b/0038-Support-PMTT-in-a-big-endian-world.patch index f5853ee..ca3ddc3 100644 --- a/0038-Support-PMTT-in-a-big-endian-world.patch +++ b/0038-Support-PMTT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -2095,8 +2095,9 @@ AcpiDmDumpPmtt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2142,8 +2142,9 @@ AcpiDmDumpPmtt ( { ACPI_STATUS Status; ACPI_PMTT_HEADER *Subtable; @@ -23,7 +23,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c /* Main table */ -@@ -2110,17 +2111,18 @@ AcpiDmDumpPmtt ( +@@ -2157,17 +2158,18 @@ AcpiDmDumpPmtt ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset); @@ -44,7 +44,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2129,7 +2131,7 @@ AcpiDmDumpPmtt ( +@@ -2176,7 +2178,7 @@ AcpiDmDumpPmtt ( case ACPI_PMTT_TYPE_CONTROLLER: Status = AcpiDmDumpTable (Length, Offset, Subtable, @@ -53,7 +53,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2138,7 +2140,7 @@ AcpiDmDumpPmtt ( +@@ -2185,7 +2187,7 @@ AcpiDmDumpPmtt ( case ACPI_PMTT_TYPE_DIMM: Status = AcpiDmDumpTable (Length, Offset, Subtable, @@ -62,7 +62,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2147,7 +2149,7 @@ AcpiDmDumpPmtt ( +@@ -2194,7 +2196,7 @@ AcpiDmDumpPmtt ( case ACPI_PMTT_TYPE_VENDOR: Status = AcpiDmDumpTable (Length, Offset, Subtable, @@ -71,7 +71,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c if (ACPI_FAILURE (Status)) { return; -@@ -2163,9 +2165,9 @@ AcpiDmDumpPmtt ( +@@ -2210,9 +2212,9 @@ AcpiDmDumpPmtt ( /* Point to next subtable */ diff --git a/0039-Support-TPM2-in-a-big-endian-world.patch b/0039-Support-TPM2-in-a-big-endian-world.patch index 177f908..1e26343 100644 --- a/0039-Support-TPM2-in-a-big-endian-world.patch +++ b/0039-Support-TPM2-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 8 +++++--- 2 files changed, 15 insertions(+), 11 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -475,11 +475,12 @@ AcpiDmDumpTpm2Rev3 ( ACPI_TABLE_TPM23 *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM23, Table); ACPI_TPM23_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM23_TRAILER, Table, Offset); @@ -77,11 +77,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump3.c break; default: -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -2655,6 +2655,7 @@ DtCompileTpm2 ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -2668,6 +2668,7 @@ DtCompileTpm2 ( DT_SUBTABLE *ParentTable; ACPI_STATUS Status = AE_OK; ACPI_TABLE_HEADER *Header; @@ -89,7 +89,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c ParentTable = DtPeekSubtable (); -@@ -2698,7 +2699,8 @@ DtCompileTpm2 ( +@@ -2711,7 +2712,8 @@ DtCompileTpm2 ( /* Subtable type depends on the StartMethod */ @@ -99,7 +99,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c { case ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC: -@@ -2729,7 +2731,7 @@ DtCompileTpm2 ( +@@ -2742,7 +2744,7 @@ DtCompileTpm2 ( case ACPI_TPM2_RESERVED10: AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n", @@ -108,7 +108,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c Status = AE_ERROR; break; -@@ -2737,7 +2739,7 @@ DtCompileTpm2 ( +@@ -2750,7 +2752,7 @@ DtCompileTpm2 ( default: AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n", diff --git a/0040-Support-S3PT-in-a-big-endian-world.patch b/0040-Support-S3PT-in-a-big-endian-world.patch index 03bc849..00678b7 100644 --- a/0040-Support-S3PT-in-a-big-endian-world.patch +++ b/0040-Support-S3PT-in-a-big-endian-world.patch @@ -8,11 +8,11 @@ Subject: [PATCH 40/45] Support S3PT in a big-endian world source/compiler/dttable2.c | 4 +++- 2 files changed, 12 insertions(+), 7 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -2448,6 +2448,8 @@ AcpiDmDumpS3pt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2495,6 +2495,8 @@ AcpiDmDumpS3pt ( ACPI_FPDT_HEADER *Subtable; ACPI_DMTABLE_INFO *InfoTable; ACPI_TABLE_S3PT *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables); @@ -21,7 +21,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c /* Main table */ -@@ -2459,19 +2461,20 @@ AcpiDmDumpS3pt ( +@@ -2506,19 +2508,20 @@ AcpiDmDumpS3pt ( } Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, S3ptTable, Offset); @@ -45,7 +45,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c { case ACPI_S3PT_TYPE_RESUME: -@@ -2486,7 +2489,7 @@ AcpiDmDumpS3pt ( +@@ -2533,7 +2536,7 @@ AcpiDmDumpS3pt ( default: AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", @@ -54,7 +54,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c /* Attempt to continue */ -@@ -2499,7 +2502,7 @@ AcpiDmDumpS3pt ( +@@ -2546,7 +2549,7 @@ AcpiDmDumpS3pt ( } AcpiOsPrintf ("\n"); @@ -63,7 +63,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { -@@ -2513,7 +2516,7 @@ NextSubtable: +@@ -2560,7 +2563,7 @@ NextSubtable: Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Subtable, Subtable->Length); } @@ -72,11 +72,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c } -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -1790,6 +1790,7 @@ DtCompileS3pt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -1803,6 +1803,7 @@ DtCompileS3pt ( DT_SUBTABLE *ParentTable; ACPI_DMTABLE_INFO *InfoTable; DT_FIELD *SubtableStart; @@ -84,7 +84,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3pt, -@@ -1817,7 +1818,8 @@ DtCompileS3pt ( +@@ -1830,7 +1831,8 @@ DtCompileS3pt ( S3ptHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer); diff --git a/0041-Support-IORT-in-a-big-endian-world.patch b/0041-Support-IORT-in-a-big-endian-world.patch index 6e10da6..76c9efd 100644 --- a/0041-Support-IORT-in-a-big-endian-world.patch +++ b/0041-Support-IORT-in-a-big-endian-world.patch @@ -9,10 +9,10 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 40 ++++++++++-------- 2 files changed, 72 insertions(+), 53 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c @@ -77,17 +77,20 @@ AcpiDmDumpIort ( ACPI_IORT_RMR *IortRmr = NULL; UINT32 Offset; @@ -246,11 +246,11 @@ Index: acpica-unix2-20210730/source/common/dmtbdump2.c } } -Index: acpica-unix2-20210730/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20210730.orig/source/compiler/dttable1.c -+++ acpica-unix2-20210730/source/compiler/dttable1.c -@@ -1809,6 +1809,7 @@ DtCompileIort ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -1960,6 +1960,7 @@ DtCompileIort ( ACPI_IORT_ITS_GROUP *IortItsGroup; ACPI_IORT_SMMU *IortSmmu; ACPI_IORT_RMR *IortRmr; @@ -258,7 +258,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c UINT32 NodeNumber; UINT32 NodeLength; UINT32 IdMappingNumber; -@@ -1854,7 +1855,7 @@ DtCompileIort ( +@@ -2005,7 +2006,7 @@ DtCompileIort ( * Optionally allows the generic data types to be used for filling * this field. */ @@ -267,7 +267,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortPad, &Subtable); if (ACPI_FAILURE (Status)) -@@ -1864,7 +1865,7 @@ DtCompileIort ( +@@ -2015,7 +2016,7 @@ DtCompileIort ( if (Subtable) { DtInsertSubtable (ParentTable, Subtable); @@ -276,7 +276,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c } else { -@@ -1874,7 +1875,7 @@ DtCompileIort ( +@@ -2025,7 +2026,7 @@ DtCompileIort ( { return (Status); } @@ -285,7 +285,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c } NodeNumber = 0; -@@ -1938,7 +1939,7 @@ DtCompileIort ( +@@ -2089,7 +2090,7 @@ DtCompileIort ( ItsNumber++; } @@ -294,7 +294,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c break; case ACPI_IORT_NODE_NAMED_COMPONENT: -@@ -1972,15 +1973,18 @@ DtCompileIort ( +@@ -2123,15 +2124,18 @@ DtCompileIort ( } else { @@ -316,7 +316,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c &Subtable); if (ACPI_FAILURE (Status)) { -@@ -1988,7 +1992,7 @@ DtCompileIort ( +@@ -2139,7 +2143,7 @@ DtCompileIort ( } DtInsertSubtable (ParentTable, Subtable); @@ -325,7 +325,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c } } break; -@@ -2021,7 +2025,7 @@ DtCompileIort ( +@@ -2172,7 +2176,7 @@ DtCompileIort ( /* Compile global interrupt array */ @@ -334,7 +334,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3a, &Subtable); if (ACPI_FAILURE (Status)) -@@ -2035,7 +2039,7 @@ DtCompileIort ( +@@ -2186,7 +2190,7 @@ DtCompileIort ( /* Compile context interrupt array */ ContextIrptNumber = 0; @@ -343,7 +343,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c while (*PFieldList) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3b, -@@ -2055,12 +2059,12 @@ DtCompileIort ( +@@ -2206,12 +2210,12 @@ DtCompileIort ( ContextIrptNumber++; } @@ -358,7 +358,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c while (*PFieldList) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3c, -@@ -2080,7 +2084,7 @@ DtCompileIort ( +@@ -2231,7 +2235,7 @@ DtCompileIort ( PmuIrptNumber++; } @@ -367,7 +367,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c break; case ACPI_IORT_NODE_SMMU_V3: -@@ -2125,7 +2129,7 @@ DtCompileIort ( +@@ -2276,7 +2280,7 @@ DtCompileIort ( /* Compile RMR Descriptors */ RmrCount = 0; @@ -376,7 +376,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c while (*PFieldList) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort6a, -@@ -2145,7 +2149,7 @@ DtCompileIort ( +@@ -2296,7 +2300,7 @@ DtCompileIort ( RmrCount++; } @@ -384,8 +384,8 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c + IortRmr->RmrCount = AcpiUtReadUint32 (&RmrCount); break; - default: -@@ -2156,7 +2160,7 @@ DtCompileIort ( + default: +@@ -2307,7 +2311,7 @@ DtCompileIort ( /* Compile Array of ID mappings */ @@ -394,7 +394,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c IdMappingNumber = 0; while (*PFieldList) { -@@ -2177,7 +2181,7 @@ DtCompileIort ( +@@ -2328,7 +2332,7 @@ DtCompileIort ( IdMappingNumber++; } @@ -403,7 +403,7 @@ Index: acpica-unix2-20210730/source/compiler/dttable1.c if (!IdMappingNumber) { IortNode->MappingOffset = 0; -@@ -2192,7 +2196,7 @@ DtCompileIort ( +@@ -2343,7 +2347,7 @@ DtCompileIort ( NodeNumber++; } diff --git a/0042-Support-IVRS-in-a-big-endian-world.patch b/0042-Support-IVRS-in-a-big-endian-world.patch index c9b31ef..9d0a88f 100644 --- a/0042-Support-IVRS-in-a-big-endian-world.patch +++ b/0042-Support-IVRS-in-a-big-endian-world.patch @@ -8,10 +8,10 @@ Signed-off-by: Al Stone source/common/dmtbdump2.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) -Index: acpica-unix2-20210730/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20210730.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20210730/source/common/dmtbdump2.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c @@ -419,11 +419,14 @@ AcpiDmDumpIvrs ( ACPI_IVRS_DE_HEADER *DeviceEntry; ACPI_IVRS_HEADER *Subtable; diff --git a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch index e104037..777f74a 100644 --- a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch +++ b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch @@ -42,10 +42,10 @@ Signed-off-by: Al Stone source/components/utilities/utresrc.c | 2 +- 28 files changed, 721 insertions(+), 341 deletions(-) -Index: acpica-unix2-20211217/source/common/adwalk.c +Index: acpica-unix2-20220331/source/common/adwalk.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/adwalk.c -+++ acpica-unix2-20211217/source/common/adwalk.c +--- acpica-unix2-20220331.orig/source/common/adwalk.c ++++ acpica-unix2-20220331/source/common/adwalk.c @@ -679,7 +679,8 @@ AcpiDmLoadDescendingOp ( if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) @@ -56,10 +56,10 @@ Index: acpica-unix2-20211217/source/common/adwalk.c FieldPath[4] = 0; Path = FieldPath; } -Index: acpica-unix2-20211217/source/common/dmrestag.c +Index: acpica-unix2-20220331/source/common/dmrestag.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmrestag.c -+++ acpica-unix2-20211217/source/common/dmrestag.c +--- acpica-unix2-20220331.orig/source/common/dmrestag.c ++++ acpica-unix2-20220331/source/common/dmrestag.c @@ -1048,7 +1048,7 @@ AcpiDmAddResourcesToNamespace ( * NextOp contains the Aml pointer and the Aml length */ @@ -69,10 +69,10 @@ Index: acpica-unix2-20211217/source/common/dmrestag.c AcpiDmAddResourceToNamespace, (void **) BufferNode); } -Index: acpica-unix2-20211217/source/common/dmtables.c +Index: acpica-unix2-20220331/source/common/dmtables.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtables.c -+++ acpica-unix2-20211217/source/common/dmtables.c +--- acpica-unix2-20220331.orig/source/common/dmtables.c ++++ acpica-unix2-20220331/source/common/dmtables.c @@ -142,6 +142,10 @@ AdCreateTableHeader ( ACPI_TABLE_HEADER *Table) { @@ -133,10 +133,10 @@ Index: acpica-unix2-20211217/source/common/dmtables.c AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); AcpiUtSetIntegerWidth (Table->Revision); -Index: acpica-unix2-20211217/source/common/dmtbdump.c +Index: acpica-unix2-20220331/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump.c -+++ acpica-unix2-20211217/source/common/dmtbdump.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump.c ++++ acpica-unix2-20220331/source/common/dmtbdump.c @@ -392,8 +392,7 @@ AcpiDmDumpXsdt ( for (i = 0; i < Entries; i++) { @@ -147,10 +147,10 @@ Index: acpica-unix2-20211217/source/common/dmtbdump.c Offset += sizeof (UINT64); } } -Index: acpica-unix2-20211217/source/common/dmtbdump3.c +Index: acpica-unix2-20220331/source/common/dmtbdump3.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20211217/source/common/dmtbdump3.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c @@ -741,12 +741,13 @@ AcpiDmDumpWpbt ( { ACPI_STATUS Status; @@ -182,10 +182,10 @@ Index: acpica-unix2-20211217/source/common/dmtbdump3.c AcpiDmTableInfoWpbt0); } } -Index: acpica-unix2-20211217/source/compiler/aslcodegen.c +Index: acpica-unix2-20220331/source/compiler/aslcodegen.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslcodegen.c -+++ acpica-unix2-20211217/source/compiler/aslcodegen.c +--- acpica-unix2-20220331.orig/source/compiler/aslcodegen.c ++++ acpica-unix2-20220331/source/compiler/aslcodegen.c @@ -238,6 +238,10 @@ CgWriteAmlOpcode ( { UINT8 PkgLenFirstByte; @@ -348,10 +348,10 @@ Index: acpica-unix2-20211217/source/compiler/aslcodegen.c return; -Index: acpica-unix2-20211217/source/compiler/aslopcodes.c +Index: acpica-unix2-20220331/source/compiler/aslopcodes.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslopcodes.c -+++ acpica-unix2-20211217/source/compiler/aslopcodes.c +--- acpica-unix2-20220331.orig/source/compiler/aslopcodes.c ++++ acpica-unix2-20220331/source/compiler/aslopcodes.c @@ -511,7 +511,8 @@ OpcDoUnicode ( for (i = 0; i < Count; i++) @@ -362,10 +362,10 @@ Index: acpica-unix2-20211217/source/compiler/aslopcodes.c } /* -Index: acpica-unix2-20211217/source/compiler/aslrestype1.c +Index: acpica-unix2-20220331/source/compiler/aslrestype1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype1.c -+++ acpica-unix2-20211217/source/compiler/aslrestype1.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype1.c ++++ acpica-unix2-20220331/source/compiler/aslrestype1.c @@ -143,6 +143,7 @@ RsDoMemory24Descriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -550,10 +550,10 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); break; -Index: acpica-unix2-20211217/source/compiler/aslrestype1i.c +Index: acpica-unix2-20220331/source/compiler/aslrestype1i.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype1i.c -+++ acpica-unix2-20211217/source/compiler/aslrestype1i.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype1i.c ++++ acpica-unix2-20220331/source/compiler/aslrestype1i.c @@ -199,6 +199,7 @@ RsDoFixedDmaDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -671,10 +671,10 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype1i.c + Descriptor->Irq.IrqMask = AcpiUtReadUint16(&IrqMask); return (Rnode); } -Index: acpica-unix2-20211217/source/compiler/aslrestype2.c +Index: acpica-unix2-20220331/source/compiler/aslrestype2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype2.c -+++ acpica-unix2-20211217/source/compiler/aslrestype2.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype2.c ++++ acpica-unix2-20220331/source/compiler/aslrestype2.c @@ -77,6 +77,8 @@ RsDoGeneralRegisterDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; @@ -751,10 +751,10 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype2.c /* Point to end-of-descriptor for vendor data */ -Index: acpica-unix2-20211217/source/compiler/aslrestype2d.c +Index: acpica-unix2-20220331/source/compiler/aslrestype2d.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype2d.c -+++ acpica-unix2-20211217/source/compiler/aslrestype2d.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype2d.c ++++ acpica-unix2-20220331/source/compiler/aslrestype2d.c @@ -84,6 +84,8 @@ RsDoDwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1001,10 +1001,10 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype2d.c Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20211217/source/compiler/aslrestype2q.c +Index: acpica-unix2-20220331/source/compiler/aslrestype2q.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype2q.c -+++ acpica-unix2-20211217/source/compiler/aslrestype2q.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype2q.c ++++ acpica-unix2-20220331/source/compiler/aslrestype2q.c @@ -84,6 +84,7 @@ RsDoQwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1233,10 +1233,10 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype2q.c Descriptor->Address64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20211217/source/compiler/aslrestype2w.c +Index: acpica-unix2-20220331/source/compiler/aslrestype2w.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype2w.c -+++ acpica-unix2-20211217/source/compiler/aslrestype2w.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype2w.c ++++ acpica-unix2-20220331/source/compiler/aslrestype2w.c @@ -84,6 +84,7 @@ RsDoWordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; @@ -1484,11 +1484,11 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -3033,7 +3033,8 @@ DtCompileWpbt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -3046,7 +3046,8 @@ DtCompileWpbt ( /* Extract the length of the Arguments buffer, insert into main table */ @@ -1498,10 +1498,10 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c DtInsertSubtable (ParentTable, Subtable); return (AE_OK); } -Index: acpica-unix2-20211217/source/components/disassembler/dmbuffer.c +Index: acpica-unix2-20220331/source/components/disassembler/dmbuffer.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmbuffer.c -+++ acpica-unix2-20211217/source/components/disassembler/dmbuffer.c +--- acpica-unix2-20220331.orig/source/components/disassembler/dmbuffer.c ++++ acpica-unix2-20220331/source/components/disassembler/dmbuffer.c @@ -204,7 +204,7 @@ AcpiDmByteList ( @@ -1591,10 +1591,10 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmbuffer.c AcpiOsPrintf ("EisaId (\"%s\")", IdBuffer); /* If we know about the ID, emit the description */ -Index: acpica-unix2-20211217/source/components/disassembler/dmopcode.c +Index: acpica-unix2-20220331/source/components/disassembler/dmopcode.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmopcode.c -+++ acpica-unix2-20211217/source/components/disassembler/dmopcode.c +--- acpica-unix2-20220331.orig/source/components/disassembler/dmopcode.c ++++ acpica-unix2-20220331/source/components/disassembler/dmopcode.c @@ -778,7 +778,9 @@ AcpiDmDisassembleOneOp ( } else @@ -1651,10 +1651,10 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmopcode.c Info->BitOffset += Offset; if (Info->BitOffset % 8 == 0) -Index: acpica-unix2-20211217/source/components/disassembler/dmresrc.c +Index: acpica-unix2-20220331/source/components/disassembler/dmresrc.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmresrc.c -+++ acpica-unix2-20211217/source/components/disassembler/dmresrc.c +--- acpica-unix2-20220331.orig/source/components/disassembler/dmresrc.c ++++ acpica-unix2-20220331/source/components/disassembler/dmresrc.c @@ -417,7 +417,7 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } @@ -1664,10 +1664,10 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmresrc.c /* Get the length of the raw initialization byte list */ -Index: acpica-unix2-20211217/source/components/disassembler/dmresrcl.c +Index: acpica-unix2-20220331/source/components/disassembler/dmresrcl.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmresrcl.c -+++ acpica-unix2-20211217/source/components/disassembler/dmresrcl.c +--- acpica-unix2-20220331.orig/source/components/disassembler/dmresrcl.c ++++ acpica-unix2-20220331/source/components/disassembler/dmresrcl.c @@ -141,6 +141,8 @@ AcpiDmMemoryFields ( UINT32 Level) { @@ -1789,10 +1789,10 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmresrcl.c } AcpiDmIndent (Level); -Index: acpica-unix2-20211217/source/components/disassembler/dmresrcl2.c +Index: acpica-unix2-20220331/source/components/disassembler/dmresrcl2.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmresrcl2.c -+++ acpica-unix2-20211217/source/components/disassembler/dmresrcl2.c +--- acpica-unix2-20220331.orig/source/components/disassembler/dmresrcl2.c ++++ acpica-unix2-20220331/source/components/disassembler/dmresrcl2.c @@ -199,22 +199,27 @@ AcpiDmGpioCommon ( char *DeviceName = NULL; UINT32 PinCount; @@ -2134,10 +2134,10 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmresrcl2.c DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); -Index: acpica-unix2-20211217/source/components/disassembler/dmresrcs.c +Index: acpica-unix2-20220331/source/components/disassembler/dmresrcs.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmresrcs.c -+++ acpica-unix2-20211217/source/components/disassembler/dmresrcs.c +--- acpica-unix2-20220331.orig/source/components/disassembler/dmresrcs.c ++++ acpica-unix2-20220331/source/components/disassembler/dmresrcs.c @@ -93,7 +93,7 @@ AcpiDmIrqDescriptor ( AcpiOsPrintf (")\n"); @@ -2188,11 +2188,11 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmresrcs.c /* Insert a descriptor name */ -Index: acpica-unix2-20211217/source/components/disassembler/dmwalk.c +Index: acpica-unix2-20220331/source/components/disassembler/dmwalk.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/disassembler/dmwalk.c -+++ acpica-unix2-20211217/source/components/disassembler/dmwalk.c -@@ -1155,7 +1155,7 @@ AcpiDmAscendingOp ( +--- acpica-unix2-20220331.orig/source/components/disassembler/dmwalk.c ++++ acpica-unix2-20220331/source/components/disassembler/dmwalk.c +@@ -1163,7 +1163,7 @@ AcpiDmAscendingOp ( { ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST; ASL_CV_CLOSE_PAREN (Op, Level); @@ -2201,10 +2201,10 @@ Index: acpica-unix2-20211217/source/components/disassembler/dmwalk.c } } -Index: acpica-unix2-20211217/source/components/namespace/nsaccess.c +Index: acpica-unix2-20220331/source/components/namespace/nsaccess.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/namespace/nsaccess.c -+++ acpica-unix2-20211217/source/components/namespace/nsaccess.c +--- acpica-unix2-20220331.orig/source/components/namespace/nsaccess.c ++++ acpica-unix2-20220331/source/components/namespace/nsaccess.c @@ -644,7 +644,7 @@ AcpiNsLookup ( /* Extract one ACPI name from the front of the pathname */ @@ -2214,10 +2214,10 @@ Index: acpica-unix2-20211217/source/components/namespace/nsaccess.c /* Try to find the single (4 character) ACPI name */ -Index: acpica-unix2-20211217/source/components/namespace/nsnames.c +Index: acpica-unix2-20220331/source/components/namespace/nsnames.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/namespace/nsnames.c -+++ acpica-unix2-20211217/source/components/namespace/nsnames.c +--- acpica-unix2-20220331.orig/source/components/namespace/nsnames.c ++++ acpica-unix2-20220331/source/components/namespace/nsnames.c @@ -297,10 +297,10 @@ AcpiNsBuildNormalizedPath ( { if (NextNode != Node) @@ -2231,10 +2231,10 @@ Index: acpica-unix2-20211217/source/components/namespace/nsnames.c DoNoTrailing = NoTrailing; for (i = 0; i < 4; i++) { -Index: acpica-unix2-20211217/source/components/namespace/nsparse.c +Index: acpica-unix2-20220331/source/components/namespace/nsparse.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/namespace/nsparse.c -+++ acpica-unix2-20211217/source/components/namespace/nsparse.c +--- acpica-unix2-20220331.orig/source/components/namespace/nsparse.c ++++ acpica-unix2-20220331/source/components/namespace/nsparse.c @@ -203,6 +203,7 @@ AcpiNsOneCompleteParse ( ACPI_WALK_STATE *WalkState; ACPI_TABLE_HEADER *Table; @@ -2260,10 +2260,10 @@ Index: acpica-unix2-20211217/source/components/namespace/nsparse.c Status = AcpiTbGetOwnerId (TableIndex, &OwnerId); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20211217/source/components/namespace/nsutils.c +Index: acpica-unix2-20220331/source/components/namespace/nsutils.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20211217/source/components/namespace/nsutils.c +--- acpica-unix2-20220331.orig/source/components/namespace/nsutils.c ++++ acpica-unix2-20220331/source/components/namespace/nsutils.c @@ -272,7 +272,6 @@ AcpiNsBuildInternalName ( const char *ExternalName = Info->NextExternalChar; char *Result = NULL; @@ -2300,10 +2300,10 @@ Index: acpica-unix2-20211217/source/components/namespace/nsutils.c /* Now we must have a path separator, or the pathname is bad */ -Index: acpica-unix2-20211217/source/components/utilities/utresrc.c +Index: acpica-unix2-20220331/source/components/utilities/utresrc.c =================================================================== ---- acpica-unix2-20211217.orig/source/components/utilities/utresrc.c -+++ acpica-unix2-20211217/source/components/utilities/utresrc.c +--- acpica-unix2-20220331.orig/source/components/utilities/utresrc.c ++++ acpica-unix2-20220331/source/components/utilities/utresrc.c @@ -541,7 +541,7 @@ AcpiUtGetResourceLength ( { /* Large Resource type -- bytes 1-2 contain the 16-bit length */ @@ -2313,10 +2313,10 @@ Index: acpica-unix2-20211217/source/components/utilities/utresrc.c } else -Index: acpica-unix2-20211217/source/compiler/aslrestype2e.c +Index: acpica-unix2-20220331/source/compiler/aslrestype2e.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype2e.c -+++ acpica-unix2-20211217/source/compiler/aslrestype2e.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype2e.c ++++ acpica-unix2-20220331/source/compiler/aslrestype2e.c @@ -80,6 +80,7 @@ RsDoExtendedIoDescriptor ( UINT16 StringLength = 0; UINT32 CurrentByteOffset; @@ -2575,10 +2575,10 @@ Index: acpica-unix2-20211217/source/compiler/aslrestype2e.c Descriptor->ExtAddress64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20211217/source/compiler/aslrestype2s.c +Index: acpica-unix2-20220331/source/compiler/aslrestype2s.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/aslrestype2s.c -+++ acpica-unix2-20211217/source/compiler/aslrestype2s.c +--- acpica-unix2-20220331.orig/source/compiler/aslrestype2s.c ++++ acpica-unix2-20220331/source/compiler/aslrestype2s.c @@ -343,6 +343,7 @@ RsDoGpioIntDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; diff --git a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch index 788669c..201e19b 100644 --- a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch +++ b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable1.c | 28 +++++++++++++------------ 2 files changed, 39 insertions(+), 32 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump1.c +Index: acpica-unix2-20220331/source/common/dmtbdump1.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20211217/source/common/dmtbdump1.c -@@ -591,11 +591,13 @@ AcpiDmDumpCsrt ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c ++++ acpica-unix2-20220331/source/common/dmtbdump1.c +@@ -669,11 +669,13 @@ AcpiDmDumpCsrt ( ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; ACPI_CSRT_DESCRIPTOR *SubSubtable; @@ -31,7 +31,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c /* The main table only contains the ACPI header, thus already handled */ -@@ -603,13 +605,14 @@ AcpiDmDumpCsrt ( +@@ -681,13 +683,14 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); @@ -49,7 +49,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -622,26 +625,28 @@ AcpiDmDumpCsrt ( +@@ -700,26 +703,28 @@ AcpiDmDumpCsrt ( Offset + SubOffset); AcpiOsPrintf ("\n"); @@ -85,7 +85,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c if (ACPI_FAILURE (Status)) { return; -@@ -651,11 +656,12 @@ AcpiDmDumpCsrt ( +@@ -729,11 +734,12 @@ AcpiDmDumpCsrt ( /* Resource-specific info buffer */ @@ -101,7 +101,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c InfoLength, AcpiDmTableInfoCsrt2a); if (ACPI_FAILURE (Status)) { -@@ -665,16 +671,15 @@ AcpiDmDumpCsrt ( +@@ -743,16 +749,15 @@ AcpiDmDumpCsrt ( /* Point to next sub-subtable */ @@ -122,11 +122,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump1.c } } -Index: acpica-unix2-20211217/source/compiler/dttable1.c +Index: acpica-unix2-20220331/source/compiler/dttable1.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable1.c -+++ acpica-unix2-20211217/source/compiler/dttable1.c -@@ -570,14 +570,16 @@ DtCompileCsrt ( +--- acpica-unix2-20220331.orig/source/compiler/dttable1.c ++++ acpica-unix2-20220331/source/compiler/dttable1.c +@@ -716,14 +716,16 @@ DtCompileCsrt ( DT_SUBTABLE *Subtable; DT_SUBTABLE *ParentTable; DT_FIELD **PFieldList = (DT_FIELD **) List; @@ -144,7 +144,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c while (*PFieldList) { /* Resource group subtable */ -@@ -592,16 +594,13 @@ DtCompileCsrt ( +@@ -738,16 +740,13 @@ DtCompileCsrt ( /* Compute the number of resource descriptors */ Tmp = AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_CSRT_GROUP, @@ -163,7 +163,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c DtInsertSubtable (ParentTable, Subtable); DtPushSubtable (Subtable); ParentTable = DtPeekSubtable (); -@@ -616,10 +615,13 @@ DtCompileCsrt ( +@@ -762,10 +761,13 @@ DtCompileCsrt ( } DtInsertSubtable (ParentTable, Subtable); @@ -178,7 +178,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c { Status = DtCompileTable (PFieldList, AcpiDmTableInfoCsrt2, -@@ -628,6 +630,10 @@ DtCompileCsrt ( +@@ -774,6 +776,10 @@ DtCompileCsrt ( { return (Status); } @@ -189,7 +189,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c DtInsertSubtable (ParentTable, Subtable); -@@ -637,11 +643,7 @@ DtCompileCsrt ( +@@ -783,11 +789,7 @@ DtCompileCsrt ( { Status = DtCompileTable (PFieldList, AcpiDmTableInfoCsrt2a, &Subtable); @@ -202,7 +202,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable1.c { DtInsertSubtable (ParentTable, Subtable); } -@@ -649,7 +651,7 @@ DtCompileCsrt ( +@@ -795,7 +797,7 @@ DtCompileCsrt ( DtPopSubtable (); ParentTable = DtPeekSubtable (); diff --git a/0046-Support-PHAT-in-a-big-endian-world.patch b/0046-Support-PHAT-in-a-big-endian-world.patch index ea9bea6..9a22b3b 100644 --- a/0046-Support-PHAT-in-a-big-endian-world.patch +++ b/0046-Support-PHAT-in-a-big-endian-world.patch @@ -9,11 +9,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 12 +++++++++--- 2 files changed, 29 insertions(+), 19 deletions(-) -Index: acpica-unix2-20211217/source/common/dmtbdump2.c +Index: acpica-unix2-20220331/source/common/dmtbdump2.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20211217/source/common/dmtbdump2.c -@@ -1982,39 +1982,41 @@ AcpiDmDumpPhat ( +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2029,39 +2029,41 @@ AcpiDmDumpPhat ( ACPI_PHAT_HEADER *Subtable; ACPI_PHAT_VERSION_DATA *VersionData; UINT32 RecordCount; @@ -62,7 +62,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c break; default: -@@ -2025,22 +2027,22 @@ AcpiDmDumpPhat ( +@@ -2072,22 +2074,22 @@ AcpiDmDumpPhat ( return; } @@ -89,7 +89,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)), sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a); if (ACPI_FAILURE (Status)) -@@ -2058,7 +2060,7 @@ AcpiDmDumpPhat ( +@@ -2105,7 +2107,7 @@ AcpiDmDumpPhat ( /* account for the null terminator */ PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1; @@ -98,7 +98,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)), PathLength, AcpiDmTableInfoPhat1a); if (ACPI_FAILURE (Status)) -@@ -2069,8 +2071,8 @@ AcpiDmDumpPhat ( +@@ -2116,8 +2118,8 @@ AcpiDmDumpPhat ( /* Get vendor data - data length is the remaining subtable length */ VendorLength = @@ -109,7 +109,7 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength), VendorLength, AcpiDmTableInfoPhat1b); if (ACPI_FAILURE (Status)) -@@ -2082,15 +2084,15 @@ AcpiDmDumpPhat ( +@@ -2129,15 +2131,15 @@ AcpiDmDumpPhat ( default: AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n", @@ -128,11 +128,11 @@ Index: acpica-unix2-20211217/source/common/dmtbdump2.c } } -Index: acpica-unix2-20211217/source/compiler/dttable2.c +Index: acpica-unix2-20220331/source/compiler/dttable2.c =================================================================== ---- acpica-unix2-20211217.orig/source/compiler/dttable2.c -+++ acpica-unix2-20211217/source/compiler/dttable2.c -@@ -1254,6 +1254,8 @@ DtCompilePhat ( +--- acpica-unix2-20220331.orig/source/compiler/dttable2.c ++++ acpica-unix2-20220331/source/compiler/dttable2.c +@@ -1267,6 +1267,8 @@ DtCompilePhat ( ACPI_DMTABLE_INFO *Info; ACPI_PHAT_VERSION_DATA *VersionData; UINT32 RecordCount; @@ -141,7 +141,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c /* The table consist of subtables */ -@@ -1271,8 +1273,9 @@ DtCompilePhat ( +@@ -1284,8 +1286,9 @@ DtCompilePhat ( DtPushSubtable (Subtable); PhatHeader = ACPI_CAST_PTR (ACPI_PHAT_HEADER, Subtable->Buffer); @@ -152,7 +152,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c { case ACPI_PHAT_TYPE_FW_VERSION_DATA: -@@ -1303,13 +1306,13 @@ DtCompilePhat ( +@@ -1316,13 +1319,13 @@ DtCompilePhat ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); @@ -168,7 +168,7 @@ Index: acpica-unix2-20211217/source/compiler/dttable2.c while (RecordCount) { -@@ -1360,6 +1363,9 @@ DtCompilePhat ( +@@ -1373,6 +1376,9 @@ DtCompilePhat ( DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT"); return (AE_ERROR); } diff --git a/0047-Support-PRMT-in-a-big-endian-world.patch b/0047-Support-PRMT-in-a-big-endian-world.patch new file mode 100644 index 0000000..96df1d5 --- /dev/null +++ b/0047-Support-PRMT-in-a-big-endian-world.patch @@ -0,0 +1,51 @@ +Signed-off-by: Dean Nelson +Reviewed-by: Al Stone +--- + source/common/dmtbdump2.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +Index: acpica-unix2-20220331/source/common/dmtbdump2.c +=================================================================== +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2415,13 +2415,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)) + { +@@ -2433,20 +2434,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); diff --git a/0048-Support-RGRT-in-a-big-endian-world.patch b/0048-Support-RGRT-in-a-big-endian-world.patch new file mode 100644 index 0000000..818d335 --- /dev/null +++ b/0048-Support-RGRT-in-a-big-endian-world.patch @@ -0,0 +1,35 @@ +Signed-off-by: Dean Nelson +Reviewed-by: Al Stone +--- + source/common/dmtbdump2.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: acpica-unix2-20220331/source/common/dmtbdump2.c +=================================================================== +--- acpica-unix2-20220331.orig/source/common/dmtbdump2.c ++++ acpica-unix2-20220331/source/common/dmtbdump2.c +@@ -2475,11 +2475,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; +@@ -2487,8 +2488,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; diff --git a/0049-Support-SVKL-in-a-big-endian-world.patch b/0049-Support-SVKL-in-a-big-endian-world.patch new file mode 100644 index 0000000..8ba5efc --- /dev/null +++ b/0049-Support-SVKL-in-a-big-endian-world.patch @@ -0,0 +1,42 @@ +Signed-off-by: Dean Nelson +Reviewed-by: Al Stone +--- + source/common/dmtbdump3.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: acpica-unix2-20220331/source/common/dmtbdump3.c +=================================================================== +--- acpica-unix2-20220331.orig/source/common/dmtbdump3.c ++++ acpica-unix2-20220331/source/common/dmtbdump3.c +@@ -344,14 +344,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; +@@ -360,12 +360,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)) + { diff --git a/OPT_LDFLAGS.patch b/OPT_LDFLAGS.patch index de12ce1..2afc266 100644 --- a/OPT_LDFLAGS.patch +++ b/OPT_LDFLAGS.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20200925/generate/unix/Makefile.config +Index: acpica-unix2-20220331/generate/unix/Makefile.config =================================================================== ---- acpica-unix2-20200925.orig/generate/unix/Makefile.config -+++ acpica-unix2-20200925/generate/unix/Makefile.config +--- acpica-unix2-20220331.orig/generate/unix/Makefile.config ++++ acpica-unix2-20220331/generate/unix/Makefile.config @@ -23,6 +23,9 @@ # OPT_CFLAGS can be overridden on the make command line by # adding OPT_CFLAGS="..." to the invocation. diff --git a/acpica-tools.spec b/acpica-tools.spec index a2c8772..2d9b4b3 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools -Version: 20211217 -Release: 2%{?dist} +Version: 20220331 +Release: 1%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -71,6 +71,9 @@ Patch41: 0042-Support-IVRS-in-a-big-endian-world.patch Patch42: 0043-Support-DSDT-SSDT-in-a-big-endian-world.patch Patch43: 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch Patch44: 0046-Support-PHAT-in-a-big-endian-world.patch +Patch45: 0047-Support-PRMT-in-a-big-endian-world.patch +Patch46: 0048-Support-RGRT-in-a-big-endian-world.patch +Patch47: 0049-Support-SVKL-in-a-big-endian-world.patch # other miscellaneous patches Patch100: unaligned.patch @@ -256,6 +259,11 @@ fi %changelog +* Sun Apr 3 2022 Al Stone - 20220331-1 +- Update to 20220331 upstream source. Bring all the patches up to date. +- Update the results of misc test cases. +- Add in big-endian patches for PRMT, RGRT and SVKL tables (thanks, Dean!) + * Mon Mar 28 2022 Al Stone - 20211217-2 - Stop building i686; it is the only Arch that stumbles across a problem in using varargs but since the Arch has been essentially deprecated, diff --git a/arm7hl.patch b/arm7hl.patch index 55d4aef..ffe22e9 100644 --- a/arm7hl.patch +++ b/arm7hl.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20210604/source/include/acmacros.h +Index: acpica-unix2-20220331/source/include/acmacros.h =================================================================== ---- acpica-unix2-20210604.orig/source/include/acmacros.h -+++ acpica-unix2-20210604/source/include/acmacros.h +--- acpica-unix2-20220331.orig/source/include/acmacros.h ++++ acpica-unix2-20220331/source/include/acmacros.h @@ -108,6 +108,8 @@ /* 16-bit source, 16/32/64 destination */ diff --git a/armv7-str-fixes.patch b/armv7-str-fixes.patch index 497c92b..69cc5b6 100644 --- a/armv7-str-fixes.patch +++ b/armv7-str-fixes.patch @@ -1,8 +1,8 @@ -Index: acpica-unix2-20211217/source/include/actypes.h +Index: acpica-unix2-20220331/source/include/actypes.h =================================================================== ---- acpica-unix2-20211217.orig/source/include/actypes.h -+++ acpica-unix2-20211217/source/include/actypes.h -@@ -560,7 +560,7 @@ typedef UINT64 +--- acpica-unix2-20220331.orig/source/include/actypes.h ++++ acpica-unix2-20220331/source/include/actypes.h +@@ -564,7 +564,7 @@ typedef UINT64 #define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) #else #define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) diff --git a/badcode.asl.result b/badcode.asl.result index 093c50d..d1229f4 100644 --- a/badcode.asl.result +++ b/badcode.asl.result @@ -256,11 +256,11 @@ Warning 3144 - ^ Method Local is set but never used Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version VVVVVVVV -Copyright (c) 2000 - 2021 Intel Corporation +Copyright (c) 2000 - 2022 Intel Corporation Ignoring all errors, forcing AML file generation ASL Input: badcode.asl - 11588 bytes 81 keywords 408 source lines AML Output: badcode.aml - 1195 bytes 20 opcodes 61 named objects -Compilation successful. 46 Errors, 28 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded +Compilation successful. 0 Errors, 28 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded diff --git a/converterSample.asl.result b/converterSample.asl.result index a3b6ca1..c890c9d 100644 --- a/converterSample.asl.result +++ b/converterSample.asl.result @@ -25,17 +25,14 @@ Remark 2182 - ^ At least one lower case letter found converterSample.asl 68: Name (a1, 0x04) Remark 2089 - Object is not referenced ^ (Name [A1__] is within a method [SCOP]) -converterSample.asl 76: Offset(0),//c37 -Remark 2158 - ^ Unnecessary/redundant use of Offset operator - Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version VVVVVVVV -Copyright (c) 2000 - 2021 Intel Corporation +Copyright (c) 2000 - 2022 Intel Corporation Ignoring all errors, forcing AML file generation ASL Input: converterSample.asl - 1968 bytes 11 keywords 85 source lines -AML Output: converterSample.aml - 182 bytes 2 opcodes 9 named objects +AML Output: converterSample.aml - 184 bytes 2 opcodes 9 named objects -Compilation successful. 0 Errors, 0 Warnings, 10 Remarks, 10 Optimizations +Compilation successful. 0 Errors, 0 Warnings, 9 Remarks, 9 Optimizations diff --git a/cve-2017-13693.patch b/cve-2017-13693.patch index fcda493..7e1a156 100644 --- a/cve-2017-13693.patch +++ b/cve-2017-13693.patch @@ -63,10 +63,10 @@ Github-Location: https://github.com/acpica/acpica/pull/295/commits/987a3b5cf7175 source/components/dispatcher/dsutils.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -Index: acpica-unix2-20200925/source/components/dispatcher/dsutils.c +Index: acpica-unix2-20220331/source/components/dispatcher/dsutils.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/dispatcher/dsutils.c -+++ acpica-unix2-20200925/source/components/dispatcher/dsutils.c +--- acpica-unix2-20220331.orig/source/components/dispatcher/dsutils.c ++++ acpica-unix2-20220331/source/components/dispatcher/dsutils.c @@ -759,6 +759,8 @@ AcpiDsCreateOperands ( ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS]; UINT32 ArgCount = 0; diff --git a/cve-2017-13694.patch b/cve-2017-13694.patch index 40c1c08..d1d3032 100644 --- a/cve-2017-13694.patch +++ b/cve-2017-13694.patch @@ -130,10 +130,10 @@ Github-Location: https://github.com/acpica/acpica/pull/278/commits/4a0243ecb4c94 source/components/parser/psobject.c | 44 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 28 deletions(-) -Index: acpica-unix2-20200925/source/components/parser/psobject.c +Index: acpica-unix2-20220331/source/components/parser/psobject.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/parser/psobject.c -+++ acpica-unix2-20200925/source/components/parser/psobject.c +--- acpica-unix2-20220331.orig/source/components/parser/psobject.c ++++ acpica-unix2-20220331/source/components/parser/psobject.c @@ -707,7 +707,8 @@ AcpiPsCompleteFinalOp ( ACPI_PARSE_OBJECT *Op, ACPI_STATUS Status) diff --git a/cve-2017-13695.patch b/cve-2017-13695.patch index f521a16..e183a46 100644 --- a/cve-2017-13695.patch +++ b/cve-2017-13695.patch @@ -67,10 +67,10 @@ Github-Location: https://github.com/acpica/acpica/pull/296/commits/37f2c716f2c6a source/components/namespace/nseval.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -Index: acpica-unix2-20200925/source/components/namespace/nseval.c +Index: acpica-unix2-20220331/source/components/namespace/nseval.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/namespace/nseval.c -+++ acpica-unix2-20200925/source/components/namespace/nseval.c +--- acpica-unix2-20220331.orig/source/components/namespace/nseval.c ++++ acpica-unix2-20220331/source/components/namespace/nseval.c @@ -329,6 +329,16 @@ AcpiNsEvaluate ( Info->ReturnObject = NULL; } diff --git a/dbtest.patch b/dbtest.patch index 6cf7f28..b33e90b 100644 --- a/dbtest.patch +++ b/dbtest.patch @@ -4,10 +4,10 @@ into an ACPI_OBJECT instead of just the pointer (see the use in the call to memcpy()). So, move the init so GCC recognizes that ValueToWrite is only a pointer, and not a whole string that needs to be moved. -Index: acpica-unix2-20200925/source/components/debugger/dbtest.c +Index: acpica-unix2-20220331/source/components/debugger/dbtest.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/debugger/dbtest.c -+++ acpica-unix2-20200925/source/components/debugger/dbtest.c +--- acpica-unix2-20220331.orig/source/components/debugger/dbtest.c ++++ acpica-unix2-20220331/source/components/debugger/dbtest.c @@ -719,9 +719,10 @@ AcpiDbTestStringType ( ACPI_OBJECT *Temp1 = NULL; ACPI_OBJECT *Temp2 = NULL; diff --git a/f23-harden.patch b/f23-harden.patch index e1fbbbd..4279c50 100644 --- a/f23-harden.patch +++ b/f23-harden.patch @@ -8,10 +8,10 @@ From: Al Stone generate/unix/iasl/Makefile | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) -Index: acpica-unix2-20200925/generate/unix/Makefile.config +Index: acpica-unix2-20220331/generate/unix/Makefile.config =================================================================== ---- acpica-unix2-20200925.orig/generate/unix/Makefile.config -+++ acpica-unix2-20200925/generate/unix/Makefile.config +--- acpica-unix2-20220331.orig/generate/unix/Makefile.config ++++ acpica-unix2-20220331/generate/unix/Makefile.config @@ -189,6 +189,8 @@ ifneq ($(NOFORTIFY),TRUE) OPT_CFLAGS += -D_FORTIFY_SOURCE=2 endif @@ -21,10 +21,10 @@ Index: acpica-unix2-20200925/generate/unix/Makefile.config CFLAGS += \ -D$(ACPI_HOST)\ -D_GNU_SOURCE\ -Index: acpica-unix2-20200925/generate/unix/iasl/Makefile +Index: acpica-unix2-20220331/generate/unix/iasl/Makefile =================================================================== ---- acpica-unix2-20200925.orig/generate/unix/iasl/Makefile -+++ acpica-unix2-20200925/generate/unix/iasl/Makefile +--- acpica-unix2-20220331.orig/generate/unix/iasl/Makefile ++++ acpica-unix2-20220331/generate/unix/iasl/Makefile @@ -359,34 +359,35 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prpa # Cannot use the common compile warning flags since the C files are created # by the utilities above and they are not necessarily ANSI C, etc. diff --git a/grammar.asl.result b/grammar.asl.result index 84cebe4..5517bd6 100644 --- a/grammar.asl.result +++ b/grammar.asl.result @@ -595,11 +595,11 @@ Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version VVVVVVVV -Copyright (c) 2000 - 2021 Intel Corporation +Copyright (c) 2000 - 2022 Intel Corporation Ignoring all errors, forcing AML file generation ASL Input: grammar.asl - 323653 bytes 4818 keywords 10284 source lines AML Output: grammar.aml - 43758 bytes 4148 opcodes 670 named objects -Compilation successful. 60 Errors, 41 Warnings, 97 Remarks, 1106 Optimizations +Compilation successful. 0 Errors, 41 Warnings, 97 Remarks, 1106 Optimizations diff --git a/int-format.patch b/int-format.patch index f98906b..ce98627 100644 --- a/int-format.patch +++ b/int-format.patch @@ -21,23 +21,23 @@ From: Al Stone source/components/utilities/utownerid.c | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) -Index: acpica-unix2-20200925/source/compiler/aslerror.c +Index: acpica-unix2-20220331/source/compiler/aslerror.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslerror.c -+++ acpica-unix2-20200925/source/compiler/aslerror.c +--- acpica-unix2-20220331.orig/source/compiler/aslerror.c ++++ acpica-unix2-20220331/source/compiler/aslerror.c @@ -917,7 +917,7 @@ AslLogNewError ( AslGbl_ExceptionCount[ModifiedLevel]++; if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT) { -- printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT); -+ printf ("\nMaximum error count (%d) exceeded\n", ASL_MAX_ERROR_COUNT); +- printf ("\nMaximum error count (%u) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT); ++ printf ("\nMaximum error count (%d) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT); AslGbl_SourceLine = 0; AslGbl_NextError = AslGbl_ErrorLog; -Index: acpica-unix2-20200925/source/compiler/aslopt.c +Index: acpica-unix2-20220331/source/compiler/aslopt.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslopt.c -+++ acpica-unix2-20200925/source/compiler/aslopt.c +--- acpica-unix2-20220331.orig/source/compiler/aslopt.c ++++ acpica-unix2-20220331/source/compiler/aslopt.c @@ -583,7 +583,7 @@ OptOptimizeNamePath ( } @@ -47,10 +47,10 @@ Index: acpica-unix2-20200925/source/compiler/aslopt.c Op->Asl.LogicalLineNumber, AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), AcpiPsGetOpcodeName (Op->Common.AmlOpcode))); -Index: acpica-unix2-20200925/source/compiler/aslprepkg.c +Index: acpica-unix2-20220331/source/compiler/aslprepkg.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslprepkg.c -+++ acpica-unix2-20200925/source/compiler/aslprepkg.c +--- acpica-unix2-20220331.orig/source/compiler/aslprepkg.c ++++ acpica-unix2-20220331/source/compiler/aslprepkg.c @@ -320,7 +320,7 @@ ApCheckPackage ( if (Count & 1) @@ -60,10 +60,10 @@ Index: acpica-unix2-20200925/source/compiler/aslprepkg.c Predefined->Info.Name, Count); AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, -Index: acpica-unix2-20200925/source/components/debugger/dbexec.c +Index: acpica-unix2-20220331/source/components/debugger/dbexec.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/debugger/dbexec.c -+++ acpica-unix2-20200925/source/components/debugger/dbexec.c +--- acpica-unix2-20220331.orig/source/components/debugger/dbexec.c ++++ acpica-unix2-20220331/source/components/debugger/dbexec.c @@ -231,7 +231,7 @@ AcpiDbExecuteMethod ( ACPI_ERROR ((AE_INFO, "Possible buffer overflow within AML Debugger " @@ -73,10 +73,10 @@ Index: acpica-unix2-20200925/source/components/debugger/dbexec.c } } -Index: acpica-unix2-20200925/source/components/dispatcher/dsmthdat.c +Index: acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/dispatcher/dsmthdat.c -+++ acpica-unix2-20200925/source/components/dispatcher/dsmthdat.c +--- acpica-unix2-20220331.orig/source/components/dispatcher/dsmthdat.c ++++ acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c @@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode ( if (Index > ACPI_METHOD_MAX_LOCAL) { @@ -95,10 +95,10 @@ Index: acpica-unix2-20200925/source/components/dispatcher/dsmthdat.c Index, ACPI_METHOD_MAX_ARG)); return_ACPI_STATUS (AE_AML_INVALID_INDEX); } -Index: acpica-unix2-20200925/source/components/dispatcher/dsutils.c +Index: acpica-unix2-20220331/source/components/dispatcher/dsutils.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/dispatcher/dsutils.c -+++ acpica-unix2-20200925/source/components/dispatcher/dsutils.c +--- acpica-unix2-20220331.orig/source/components/dispatcher/dsutils.c ++++ acpica-unix2-20220331/source/components/dispatcher/dsutils.c @@ -786,7 +786,7 @@ AcpiDsCreateOperands ( } @@ -108,10 +108,10 @@ Index: acpica-unix2-20200925/source/components/dispatcher/dsutils.c WalkState->NumOperands, ArgCount, Index)); /* Create the interpreter arguments, in reverse order */ -Index: acpica-unix2-20200925/source/components/dispatcher/dswscope.c +Index: acpica-unix2-20220331/source/components/dispatcher/dswscope.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/dispatcher/dswscope.c -+++ acpica-unix2-20200925/source/components/dispatcher/dswscope.c +--- acpica-unix2-20220331.orig/source/components/dispatcher/dswscope.c ++++ acpica-unix2-20220331/source/components/dispatcher/dswscope.c @@ -149,7 +149,7 @@ AcpiDsScopeStackPush ( WalkState->ScopeDepth++; @@ -130,10 +130,10 @@ Index: acpica-unix2-20200925/source/components/dispatcher/dswscope.c (UINT32) WalkState->ScopeDepth, AcpiUtGetNodeName (ScopeInfo->Scope.Node), AcpiUtGetTypeName (ScopeInfo->Common.Value))); -Index: acpica-unix2-20200925/source/components/events/evgpe.c +Index: acpica-unix2-20220331/source/components/events/evgpe.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/events/evgpe.c -+++ acpica-unix2-20200925/source/components/events/evgpe.c +--- acpica-unix2-20220331.orig/source/components/events/evgpe.c ++++ acpica-unix2-20220331/source/components/events/evgpe.c @@ -488,7 +488,7 @@ AcpiEvGpeDetect ( "Ignore disabled registers for GPE %02X-%02X: " "RunEnable=%02X, WakeEnable=%02X\n", @@ -143,10 +143,10 @@ Index: acpica-unix2-20200925/source/components/events/evgpe.c GpeRegisterInfo->EnableForRun, GpeRegisterInfo->EnableForWake)); continue; -Index: acpica-unix2-20200925/source/components/executer/exdump.c +Index: acpica-unix2-20220331/source/components/executer/exdump.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/executer/exdump.c -+++ acpica-unix2-20200925/source/components/executer/exdump.c +--- acpica-unix2-20220331.orig/source/components/executer/exdump.c ++++ acpica-unix2-20220331/source/components/executer/exdump.c @@ -678,7 +678,7 @@ AcpiExDumpOperand ( if (Depth > 0) { @@ -156,10 +156,10 @@ Index: acpica-unix2-20200925/source/components/executer/exdump.c } else { -Index: acpica-unix2-20200925/source/components/executer/exfldio.c +Index: acpica-unix2-20220331/source/components/executer/exfldio.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/executer/exfldio.c -+++ acpica-unix2-20200925/source/components/executer/exfldio.c +--- acpica-unix2-20220331.orig/source/components/executer/exfldio.c ++++ acpica-unix2-20220331/source/components/executer/exfldio.c @@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule ( ACPI_ERROR ((AE_INFO, @@ -171,10 +171,10 @@ Index: acpica-unix2-20200925/source/components/executer/exfldio.c return_ACPI_STATUS (AE_AML_OPERAND_VALUE); } } -Index: acpica-unix2-20200925/source/components/executer/exnames.c +Index: acpica-unix2-20220331/source/components/executer/exnames.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/executer/exnames.c -+++ acpica-unix2-20200925/source/components/executer/exnames.c +--- acpica-unix2-20220331.orig/source/components/executer/exnames.c ++++ acpica-unix2-20220331/source/components/executer/exnames.c @@ -237,7 +237,7 @@ AcpiExNameSegment ( */ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, @@ -193,10 +193,10 @@ Index: acpica-unix2-20200925/source/components/executer/exnames.c } *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress); -Index: acpica-unix2-20200925/source/components/hardware/hwregs.c +Index: acpica-unix2-20220331/source/components/hardware/hwregs.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/hardware/hwregs.c -+++ acpica-unix2-20200925/source/components/hardware/hwregs.c +--- acpica-unix2-20220331.orig/source/components/hardware/hwregs.c ++++ acpica-unix2-20220331/source/components/hardware/hwregs.c @@ -460,7 +460,7 @@ AcpiHwClearAcpiStatus ( @@ -206,10 +206,10 @@ Index: acpica-unix2-20200925/source/components/hardware/hwregs.c ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address))); LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock); -Index: acpica-unix2-20200925/source/components/tables/tbfadt.c +Index: acpica-unix2-20220331/source/components/tables/tbfadt.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/tables/tbfadt.c -+++ acpica-unix2-20200925/source/components/tables/tbfadt.c +--- acpica-unix2-20220331.orig/source/components/tables/tbfadt.c ++++ acpica-unix2-20220331/source/components/tables/tbfadt.c @@ -233,7 +233,7 @@ AcpiTbInitGenericAddress ( if (!(Flags & ACPI_FADT_GPE_REGISTER)) { @@ -237,10 +237,10 @@ Index: acpica-unix2-20200925/source/components/tables/tbfadt.c Name, Address32, ACPI_FORMAT_UINT64 (Address64->Address), AcpiGbl_Use32BitFadtAddresses ? 32 : 64)); -Index: acpica-unix2-20200925/source/components/tables/tbxfroot.c +Index: acpica-unix2-20220331/source/components/tables/tbxfroot.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/tables/tbxfroot.c -+++ acpica-unix2-20200925/source/components/tables/tbxfroot.c +--- acpica-unix2-20220331.orig/source/components/tables/tbxfroot.c ++++ acpica-unix2-20220331/source/components/tables/tbxfroot.c @@ -177,7 +177,7 @@ AcpiFindRootPointer ( { ACPI_ERROR ((AE_INFO, @@ -268,10 +268,10 @@ Index: acpica-unix2-20200925/source/components/tables/tbxfroot.c return_ACPI_STATUS (AE_NO_MEMORY); } -Index: acpica-unix2-20200925/source/components/utilities/utownerid.c +Index: acpica-unix2-20220331/source/components/utilities/utownerid.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/utilities/utownerid.c -+++ acpica-unix2-20200925/source/components/utilities/utownerid.c +--- acpica-unix2-20220331.orig/source/components/utilities/utownerid.c ++++ acpica-unix2-20220331/source/components/utilities/utownerid.c @@ -237,7 +237,7 @@ AcpiUtReleaseOwnerId ( else { diff --git a/mips-be-fix.patch b/mips-be-fix.patch index 485fb77..c84e9c8 100644 --- a/mips-be-fix.patch +++ b/mips-be-fix.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20200925/source/compiler/aslparseop.c +Index: acpica-unix2-20220331/source/compiler/aslparseop.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslparseop.c -+++ acpica-unix2-20200925/source/compiler/aslparseop.c +--- acpica-unix2-20220331.orig/source/compiler/aslparseop.c ++++ acpica-unix2-20220331/source/compiler/aslparseop.c @@ -285,7 +285,16 @@ TrCreateValuedLeafOp ( diff --git a/ptr-cast.patch b/ptr-cast.patch index 8f32d8c..0a24429 100644 --- a/ptr-cast.patch +++ b/ptr-cast.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20200925/source/components/tables/tbutils.c +Index: acpica-unix2-20220331/source/components/tables/tbutils.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/tables/tbutils.c -+++ acpica-unix2-20200925/source/components/tables/tbutils.c +--- acpica-unix2-20220331.orig/source/components/tables/tbutils.c ++++ acpica-unix2-20220331/source/components/tables/tbutils.c @@ -238,9 +238,11 @@ AcpiTbGetRootTableEntry ( * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, * return 64-bit @@ -31,10 +31,10 @@ Index: acpica-unix2-20200925/source/components/tables/tbutils.c } } -Index: acpica-unix2-20200925/source/compiler/aslparseop.c +Index: acpica-unix2-20220331/source/compiler/aslparseop.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslparseop.c -+++ acpica-unix2-20200925/source/compiler/aslparseop.c +--- acpica-unix2-20220331.orig/source/compiler/aslparseop.c ++++ acpica-unix2-20220331/source/compiler/aslparseop.c @@ -289,7 +289,11 @@ TrCreateValuedLeafOp ( ParseOpcode == PARSEOP_NAMESEG || ParseOpcode == PARSEOP_STRING_LITERAL) diff --git a/simple-64bit.patch b/simple-64bit.patch index aeead35..c0403c7 100644 --- a/simple-64bit.patch +++ b/simple-64bit.patch @@ -3,11 +3,11 @@ Description: Stop listing all 64bit architectures 64bit architectures. Author: Adrian Bunk -Index: acpica-unix2-20200925/source/include/platform/aclinux.h +Index: acpica-unix2-20220331/source/include/platform/aclinux.h =================================================================== ---- acpica-unix2-20200925.orig/source/include/platform/aclinux.h -+++ acpica-unix2-20200925/source/include/platform/aclinux.h -@@ -215,10 +215,7 @@ +--- acpica-unix2-20220331.orig/source/include/platform/aclinux.h ++++ acpica-unix2-20220331/source/include/platform/aclinux.h +@@ -220,10 +220,7 @@ #define ACPI_FLUSH_CPU_CACHE() #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) diff --git a/sources b/sources index ad07293..d4bf4b2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20211217.tar.gz) = e8e6e4f4543205d2ed9c8fe2b49c8952272d4a1b066018327660c6a4e0fd018d3144e18a759784b6b4a37efe726ec0c61ff36026a1021cdcba6c7627e105385d -SHA512 (acpitests-unix-20211217.tar.gz) = 1dd73746accc78118477d57b01c43d60df02c8a3cea4ebba8ea2dac85871193debe359437f4cd25a3662520063f5f4a28f5e3fdfc3bc979fdd8a136fee7e43ac +SHA512 (acpica-unix2-20220331.tar.gz) = c606396323dc342ae4c7bab9526b04aca09b00a932363146c1791523962ade0bdb4e40b67ff2a0a246df3ce322592879288c3fcc5fb7a450beb87a6d70c5ef40 +SHA512 (acpitests-unix-20220331.tar.gz) = 28ead3ff06fc7e409e5fd02358048470daac6d3a96f24408068b84199f33513b5fcaa7c00a31972e63fc481d4b5980f8b8f131549d9d1bcd19fa20f3a1c2aaaf diff --git a/str-trunc-warn.patch b/str-trunc-warn.patch index eeb47c3..c866985 100644 --- a/str-trunc-warn.patch +++ b/str-trunc-warn.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20200925/source/compiler/aslanalyze.c +Index: acpica-unix2-20220331/source/compiler/aslanalyze.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslanalyze.c -+++ acpica-unix2-20200925/source/compiler/aslanalyze.c +--- acpica-unix2-20220331.orig/source/compiler/aslanalyze.c ++++ acpica-unix2-20220331/source/compiler/aslanalyze.c @@ -358,11 +358,16 @@ AnCheckMethodReturnValue ( */ if (ThisNodeBtype != 0) @@ -21,10 +21,10 @@ Index: acpica-unix2-20200925/source/compiler/aslanalyze.c } } -Index: acpica-unix2-20200925/source/compiler/aslpredef.c +Index: acpica-unix2-20220331/source/compiler/aslpredef.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslpredef.c -+++ acpica-unix2-20200925/source/compiler/aslpredef.c +--- acpica-unix2-20220331.orig/source/compiler/aslpredef.c ++++ acpica-unix2-20220331/source/compiler/aslpredef.c @@ -159,14 +159,19 @@ ApCheckForPredefinedMethod ( if (MethodInfo->NumReturnNoValue && ThisName->Info.ExpectedBtypes) @@ -84,10 +84,10 @@ Index: acpica-unix2-20200925/source/compiler/aslpredef.c return (AE_TYPE); } -Index: acpica-unix2-20200925/source/compiler/aslwalks.c +Index: acpica-unix2-20220331/source/compiler/aslwalks.c =================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslwalks.c -+++ acpica-unix2-20200925/source/compiler/aslwalks.c +--- acpica-unix2-20220331.orig/source/compiler/aslwalks.c ++++ acpica-unix2-20220331/source/compiler/aslwalks.c @@ -515,15 +515,19 @@ AnOperandTypecheckWalkEnd ( else if (!CommonBtypes) { diff --git a/template.patch b/template.patch index 408541a..4f9af9b 100644 --- a/template.patch +++ b/template.patch @@ -7,10 +7,10 @@ From: Al Stone tests/templates/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: acpica-unix2-20200925/tests/templates/Makefile +Index: acpica-unix2-20220331/tests/templates/Makefile =================================================================== ---- acpica-unix2-20200925.orig/tests/templates/Makefile -+++ acpica-unix2-20200925/tests/templates/Makefile +--- acpica-unix2-20220331.orig/tests/templates/Makefile ++++ acpica-unix2-20220331/tests/templates/Makefile @@ -26,7 +26,7 @@ $(aml_obj): %.aml: %.asl diff --git a/ull-32bit.patch b/ull-32bit.patch index 17cfe58..9de0473 100644 --- a/ull-32bit.patch +++ b/ull-32bit.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20211217/source/common/dmtbdump.c +Index: acpica-unix2-20220331/source/common/dmtbdump.c =================================================================== ---- acpica-unix2-20211217.orig/source/common/dmtbdump.c -+++ acpica-unix2-20211217/source/common/dmtbdump.c +--- acpica-unix2-20220331.orig/source/common/dmtbdump.c ++++ acpica-unix2-20220331/source/common/dmtbdump.c @@ -392,7 +392,11 @@ AcpiDmDumpXsdt ( for (i = 0; i < Entries; i++) { diff --git a/unaligned.patch b/unaligned.patch index 6d3f9c6..11d6c86 100644 --- a/unaligned.patch +++ b/unaligned.patch @@ -14,10 +14,10 @@ Signed-off-by: Paolo Bonzini source/include/actypes.h | 26 +++++++++++++------------- 3 files changed, 32 insertions(+), 21 deletions(-) -Index: acpica-unix2-20200925/source/components/executer/exoparg2.c +Index: acpica-unix2-20220331/source/components/executer/exoparg2.c =================================================================== ---- acpica-unix2-20200925.orig/source/components/executer/exoparg2.c -+++ acpica-unix2-20200925/source/components/executer/exoparg2.c +--- acpica-unix2-20220331.orig/source/components/executer/exoparg2.c ++++ acpica-unix2-20220331/source/components/executer/exoparg2.c @@ -172,6 +172,8 @@ AcpiExOpcode_2A_2T_1R ( ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_OPERAND_OBJECT *ReturnDesc1 = NULL; @@ -58,10 +58,10 @@ Index: acpica-unix2-20200925/source/components/executer/exoparg2.c break; case AML_CONCATENATE_OP: /* Concatenate (Data1, Data2, Result) */ -Index: acpica-unix2-20200925/source/include/actypes.h +Index: acpica-unix2-20220331/source/include/actypes.h =================================================================== ---- acpica-unix2-20200925.orig/source/include/actypes.h -+++ acpica-unix2-20200925/source/include/actypes.h +--- acpica-unix2-20220331.orig/source/include/actypes.h ++++ acpica-unix2-20220331/source/include/actypes.h @@ -143,6 +143,19 @@ typedef COMPILER_DEPENDENT_INT64 */ #define ACPI_THREAD_ID UINT64 From 1ac5d772292778a889ccd4743508210832c014e0 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Sun, 3 Apr 2022 15:45:41 -0600 Subject: [PATCH 13/28] Remove all 32-bit architectures (i686 and armv7hl) Signed-off-by: Al Stone --- acpica-tools.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 2d9b4b3..4d81fd1 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,12 +1,12 @@ Name: acpica-tools Version: 20220331 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 URL: https://www.acpica.org/ -ExcludeArch: i686 +ExcludeArch: i686, armv7hl Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz @@ -259,6 +259,10 @@ fi %changelog +* Sun Apr 3 2022 Al Stone - 20220331-2 +- Stop building 32-bit architecture (i686 and armv7hl); they have been + deprecated in Fedora + * Sun Apr 3 2022 Al Stone - 20220331-1 - Update to 20220331 upstream source. Bring all the patches up to date. - Update the results of misc test cases. From a89b86980e7bbce7967682578e0a92ac2d958dae Mon Sep 17 00:00:00 2001 From: Al Stone Date: Sun, 3 Apr 2022 16:00:44 -0600 Subject: [PATCH 14/28] Correct typo in the spec file Signed-off-by: Al Stone --- acpica-tools.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 4d81fd1..239ba5f 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,12 +1,12 @@ Name: acpica-tools Version: 20220331 -Release: 2%{?dist} +Release: 3%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 URL: https://www.acpica.org/ -ExcludeArch: i686, armv7hl +ExcludeArch: i686 armv7hl Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz @@ -259,6 +259,9 @@ fi %changelog +* Sun Apr 3 2022 Al Stone - 20220331-3 +- Correct typo in ExcludeArch syntax + * Sun Apr 3 2022 Al Stone - 20220331-2 - Stop building 32-bit architecture (i686 and armv7hl); they have been deprecated in Fedora From 82469f77212849ed93a332dd5a0f578edba2ae62 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 20:24:26 +0000 Subject: [PATCH 15/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 239ba5f..ca19c0a 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20220331 -Release: 3%{?dist} +Release: 4%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -259,6 +259,9 @@ fi %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 20220331-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sun Apr 3 2022 Al Stone - 20220331-3 - Correct typo in ExcludeArch syntax From 7aef8044540aa7016e0d85445e665df5ae0e604e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:21:52 +0000 Subject: [PATCH 16/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index ca19c0a..7632445 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20220331 -Release: 4%{?dist} +Release: 5%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -259,6 +259,9 @@ fi %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 20220331-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Jul 20 2022 Fedora Release Engineering - 20220331-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 237083a28a076da87278e92ea4dd3ba16db4c407 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 12:52:11 +0000 Subject: [PATCH 17/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 7632445..9ea9928 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20220331 -Release: 5%{?dist} +Release: 6%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -259,6 +259,9 @@ fi %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 20220331-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jan 18 2023 Fedora Release Engineering - 20220331-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 9e790bf25dfe26fd88538eb73ced12d1daf29f3a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 12:06:33 +0000 Subject: [PATCH 18/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 9ea9928..38d23c0 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20220331 -Release: 6%{?dist} +Release: 7%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -259,6 +259,9 @@ fi %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 20220331-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 20220331-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 332bf9f7bad356f5d4e89aafbc9f766e77a3c53b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 22:37:29 +0000 Subject: [PATCH 19/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 38d23c0..4add6f8 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20220331 -Release: 7%{?dist} +Release: 8%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -259,6 +259,9 @@ fi %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 20220331-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 20220331-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 0b430889a9c2769741b356b88a9674ce54795fa9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 16:33:43 +0000 Subject: [PATCH 20/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 4add6f8..0563412 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20220331 -Release: 8%{?dist} +Release: 9%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables License: GPLv2 @@ -259,6 +259,9 @@ fi %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 20220331-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 20220331-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 4617be5167159c6bfc5a67d3e1311da8250d8404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 29 Jul 2024 10:10:03 +0200 Subject: [PATCH 21/28] convert GPLv2 license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- acpica-tools.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 0563412..d63e30e 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,9 +1,10 @@ Name: acpica-tools Version: 20220331 -Release: 9%{?dist} +Release: 10%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables -License: GPLv2 +# Automatically converted from old format: GPLv2 - review is highly recommended. +License: GPL-2.0-only URL: https://www.acpica.org/ ExcludeArch: i686 armv7hl @@ -259,6 +260,9 @@ fi %changelog +* Mon Jul 29 2024 Miroslav Suchý - 20220331-10 +- convert license to SPDX + * Wed Jul 17 2024 Fedora Release Engineering - 20220331-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From bada08a9e12545c2332d6df5f31d31cf81d97606 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Mon, 12 Aug 2024 15:16:04 -0600 Subject: [PATCH 22/28] Update to 20240322 and remove support for big-endian architectures As s390x was the only one remaining, it has now been excluded. This was best done with an update of the source tree to match upstream. This is turn caused additional patch updates. With s390x gone, all of the big-endian patches can be removed, simplifying things enormously. This is the biggest change. Several other patches that are no longer needed due to changes in Fedora builds (ld flags, for example), or that are no longer needed (such as armv7) have also been removed. Further cleanup likely to follow. Signed-off-by: Al Stone --- .gitignore | 6 + ...nfrastructure-for-big-endian-support.patch | 530 --- ...lity-functions-to-be-endian-agnostic.patch | 200 -- ...able-header-content-in-human-readabl.patch | 45 - ...able-support-for-big-endian-machines.patch | 78 - ...n-ness-problem-when-converting-ASL-t.patch | 41 - ...e-ACPI_COPY_NAMSEG-in-GPE-name-check.patch | 32 - ...ing-Unicode-properly-when-big-endian.patch | 53 - ...-MADT-aka-APIC-in-a-big-endian-world.patch | 32 - ...ort-ASF-tables-in-a-big-endian-world.patch | 55 - ...rt-CPEP-tables-in-a-big-endian-world.patch | 32 - ...ort-DBG2-table-in-a-big-endian-world.patch | 256 -- 0012-Support-DMAR-in-a-big-endian-world.patch | 171 - 0013-Support-DRTM-in-a-big-endian-world.patch | 112 - 0014-Support-EINJ-in-a-big-endian-world.patch | 32 - 0015-Support-ERST-in-a-big-endian-world.patch | 32 - ...-FADT-aka-FACP-in-a-big-endian-world.patch | 189 - ...ort-most-FPDTs-in-a-big-endian-world.patch | 85 - 0018-Support-GTDT-in-a-big-endian-world.patch | 69 - 0019-Support-HEST-in-a-big-endian-world.patch | 75 - ...t-RSDT-RSD-PTR-in-a-big-endian-world.patch | 37 - 0021-Support-XSDT-in-a-big-endian-world.patch | 38 - 0022-Support-SRAT-in-a-big-endian-world.patch | 52 - 0023-Support-SLIT-in-a-big-endian-world.patch | 61 - 0024-Support-MSCT-in-a-big-endian-world.patch | 43 - 0025-Support-MPST-in-a-big-endian-world.patch | 152 - 0026-Support-NFIT-in-a-big-endian-world.patch | 227 -- 0027-Support-SDEV-in-a-big-endian-world.patch | 206 -- 0028-Support-HMAT-in-a-big-endian-world.patch | 278 -- 0029-Support-PDTT-in-a-big-endian-world.patch | 43 - 0030-Support-PPTT-in-a-big-endian-world.patch | 105 - 0031-Support-PCCT-in-a-big-endian-world.patch | 54 - 0032-Support-WDAT-in-a-big-endian-world.patch | 43 - 0033-Support-TCPA-in-a-big-endian-world.patch | 76 - 0034-Support-STAO-in-a-big-endian-world.patch | 40 - ...-SLIC-and-MSDM-in-a-big-endian-world.patch | 33 - 0036-Support-MCFG-in-a-big-endian-world.patch | 50 - 0037-Support-LPIT-in-a-big-endian-world.patch | 46 - 0038-Support-PMTT-in-a-big-endian-world.patch | 85 - 0039-Support-TPM2-in-a-big-endian-world.patch | 119 - 0040-Support-S3PT-in-a-big-endian-world.patch | 96 - 0041-Support-IORT-in-a-big-endian-world.patch | 414 --- 0042-Support-IVRS-in-a-big-endian-world.patch | 138 - ...port-DSDT-SSDT-in-a-big-endian-world.patch | 3171 ----------------- ...rt-for-WPBT-in-big-endian-needs-more.patch | 23 - ...T-fixed-use-of-optional-ResourceInfo.patch | 213 -- 0046-Support-PHAT-in-a-big-endian-world.patch | 180 - 0047-Support-PRMT-in-a-big-endian-world.patch | 51 - 0048-Support-RGRT-in-a-big-endian-world.patch | 35 - 0049-Support-SVKL-in-a-big-endian-world.patch | 42 - OPT_LDFLAGS.patch | 6 +- acpica-tools.spec | 91 +- arm7hl.patch | 21 - badcode.asl.result | 15 +- converterSample.asl.result | 19 +- cve-2017-13693.patch | 6 +- cve-2017-13694.patch | 6 +- cve-2017-13695.patch | 6 +- dangling-ptr.patch | 11 +- dbtest.patch | 6 +- f23-harden.patch | 71 - fix-version.patch | 50 + grammar.asl.result | 21 +- run-misc-tests.sh | 2 +- sources | 4 +- str-trunc-warn.patch | 18 +- template.patch | 6 +- ull-32bit.patch | 16 - unaligned.patch | 12 +- uuid-len.patch | 9 +- 70 files changed, 178 insertions(+), 8494 deletions(-) delete mode 100644 0001-Add-in-basic-infrastructure-for-big-endian-support.patch delete mode 100644 0002-Modify-utility-functions-to-be-endian-agnostic.patch delete mode 100644 0003-Always-display-table-header-content-in-human-readabl.patch delete mode 100644 0004-Re-enable-support-for-big-endian-machines.patch delete mode 100644 0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch delete mode 100644 0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch delete mode 100644 0007-Handle-dumping-Unicode-properly-when-big-endian.patch delete mode 100644 0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch delete mode 100644 0009-Support-ASF-tables-in-a-big-endian-world.patch delete mode 100644 0010-Support-CPEP-tables-in-a-big-endian-world.patch delete mode 100644 0011-Support-DBG2-table-in-a-big-endian-world.patch delete mode 100644 0012-Support-DMAR-in-a-big-endian-world.patch delete mode 100644 0013-Support-DRTM-in-a-big-endian-world.patch delete mode 100644 0014-Support-EINJ-in-a-big-endian-world.patch delete mode 100644 0015-Support-ERST-in-a-big-endian-world.patch delete mode 100644 0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch delete mode 100644 0017-Support-most-FPDTs-in-a-big-endian-world.patch delete mode 100644 0018-Support-GTDT-in-a-big-endian-world.patch delete mode 100644 0019-Support-HEST-in-a-big-endian-world.patch delete mode 100644 0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch delete mode 100644 0021-Support-XSDT-in-a-big-endian-world.patch delete mode 100644 0022-Support-SRAT-in-a-big-endian-world.patch delete mode 100644 0023-Support-SLIT-in-a-big-endian-world.patch delete mode 100644 0024-Support-MSCT-in-a-big-endian-world.patch delete mode 100644 0025-Support-MPST-in-a-big-endian-world.patch delete mode 100644 0026-Support-NFIT-in-a-big-endian-world.patch delete mode 100644 0027-Support-SDEV-in-a-big-endian-world.patch delete mode 100644 0028-Support-HMAT-in-a-big-endian-world.patch delete mode 100644 0029-Support-PDTT-in-a-big-endian-world.patch delete mode 100644 0030-Support-PPTT-in-a-big-endian-world.patch delete mode 100644 0031-Support-PCCT-in-a-big-endian-world.patch delete mode 100644 0032-Support-WDAT-in-a-big-endian-world.patch delete mode 100644 0033-Support-TCPA-in-a-big-endian-world.patch delete mode 100644 0034-Support-STAO-in-a-big-endian-world.patch delete mode 100644 0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch delete mode 100644 0036-Support-MCFG-in-a-big-endian-world.patch delete mode 100644 0037-Support-LPIT-in-a-big-endian-world.patch delete mode 100644 0038-Support-PMTT-in-a-big-endian-world.patch delete mode 100644 0039-Support-TPM2-in-a-big-endian-world.patch delete mode 100644 0040-Support-S3PT-in-a-big-endian-world.patch delete mode 100644 0041-Support-IORT-in-a-big-endian-world.patch delete mode 100644 0042-Support-IVRS-in-a-big-endian-world.patch delete mode 100644 0043-Support-DSDT-SSDT-in-a-big-endian-world.patch delete mode 100644 0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch delete mode 100644 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch delete mode 100644 0046-Support-PHAT-in-a-big-endian-world.patch delete mode 100644 0047-Support-PRMT-in-a-big-endian-world.patch delete mode 100644 0048-Support-RGRT-in-a-big-endian-world.patch delete mode 100644 0049-Support-SVKL-in-a-big-endian-world.patch delete mode 100644 arm7hl.patch delete mode 100644 f23-harden.patch create mode 100644 fix-version.patch delete mode 100644 ull-32bit.patch diff --git a/.gitignore b/.gitignore index 8d6a67f..b895859 100644 --- a/.gitignore +++ b/.gitignore @@ -156,3 +156,9 @@ series /acpitests-unix-20211217.tar.gz /acpica-unix2-20220331.tar.gz /acpitests-unix-20220331.tar.gz +/acpica-unix2-20230331.tar.gz +/acpitests-unix-20230331.tar.gz +/acpica-unix2-20240321.tar.gz +/acpitests-unix-20240321.tar.gz +/acpica-unix2-20240322.tar.gz +/acpitests-unix-20240322.tar.gz diff --git a/0001-Add-in-basic-infrastructure-for-big-endian-support.patch b/0001-Add-in-basic-infrastructure-for-big-endian-support.patch deleted file mode 100644 index 4e12c34..0000000 --- a/0001-Add-in-basic-infrastructure-for-big-endian-support.patch +++ /dev/null @@ -1,530 +0,0 @@ -From 4594630ec2e6a33efce3047a86b08fa170b75848 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Thu, 15 Oct 2020 11:53:33 -0600 -Subject: [PATCH 01/45] Add in basic infrastructure for big-endian support - -This adds in some basic functions -- AcpiUtReadUint32(), for example, -to read a UINT32 value in little-endian form and return it in host-native -format -- along with AcpiUtWriteUint() that writes out an integer in -host-native format as a little-endian value. - -But, to do that, I'm adding the functions in a new file: utendian.c. So, -the header files need fixing, and the makefiles need to be sure to compile -the new code. Further, UtIsBigEndianMachine() needed to be moved out of -compiler/aslutils.c so it could be used in the new functions and avoid -having to do some conditional compilation depending on endian-ness. - -However, this sets things up for the future, where endian-aware code can -be added as the need is uncovered. For now, these functions cover all of -the cases I know about. - -Signed-off-by: Al Stone ---- - generate/unix/acpibin/Makefile | 1 + - generate/unix/acpidump/Makefile | 1 + - generate/unix/acpiexamples/Makefile | 1 + - generate/unix/acpiexec/Makefile | 1 + - generate/unix/acpihelp/Makefile | 1 + - generate/unix/iasl/Makefile | 1 + - source/compiler/aslcompiler.h | 4 - - source/compiler/aslutils.c | 27 --- - source/components/utilities/utendian.c | 236 +++++++++++++++++++++++++ - source/include/acmacros.h | 56 ------ - source/include/acutils.h | 32 ++++ - source/include/platform/aclinux.h | 1 + - 12 files changed, 275 insertions(+), 87 deletions(-) - create mode 100644 source/components/utilities/utendian.c - -Index: acpica-unix2-20220331/generate/unix/acpibin/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/acpibin/Makefile -+++ acpica-unix2-20220331/generate/unix/acpibin/Makefile -@@ -37,6 +37,7 @@ OBJECTS = \ - $(OBJDIR)/utcache.o\ - $(OBJDIR)/utdebug.o\ - $(OBJDIR)/utdecode.o\ -+ $(OBJDIR)/utendian.o\ - $(OBJDIR)/utexcep.o\ - $(OBJDIR)/utglobal.o\ - $(OBJDIR)/utlock.o\ -Index: acpica-unix2-20220331/generate/unix/acpidump/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/acpidump/Makefile -+++ acpica-unix2-20220331/generate/unix/acpidump/Makefile -@@ -36,6 +36,7 @@ OBJECTS = \ - $(OBJDIR)/osunixdir.o\ - $(OBJDIR)/osunixmap.o\ - $(OBJDIR)/osunixxf.o\ -+ $(OBJDIR)/utendian.o\ - $(OBJDIR)/tbprint.o\ - $(OBJDIR)/tbxfroot.o\ - $(OBJDIR)/utascii.o\ -Index: acpica-unix2-20220331/generate/unix/acpiexamples/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/acpiexamples/Makefile -+++ acpica-unix2-20220331/generate/unix/acpiexamples/Makefile -@@ -139,6 +139,7 @@ OBJECTS = \ - $(OBJDIR)/utdebug.o\ - $(OBJDIR)/utdecode.o\ - $(OBJDIR)/utdelete.o\ -+ $(OBJDIR)/utendian.o\ - $(OBJDIR)/uterror.o\ - $(OBJDIR)/uteval.o\ - $(OBJDIR)/utexcep.o\ -Index: acpica-unix2-20220331/generate/unix/acpiexec/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/acpiexec/Makefile -+++ acpica-unix2-20220331/generate/unix/acpiexec/Makefile -@@ -214,6 +214,7 @@ OBJECTS = \ - $(OBJDIR)/utdebug.o\ - $(OBJDIR)/utdecode.o\ - $(OBJDIR)/utdelete.o\ -+ $(OBJDIR)/utendian.o\ - $(OBJDIR)/uterror.o\ - $(OBJDIR)/uteval.o\ - $(OBJDIR)/utexcep.o\ -Index: acpica-unix2-20220331/generate/unix/acpihelp/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/acpihelp/Makefile -+++ acpica-unix2-20220331/generate/unix/acpihelp/Makefile -@@ -45,6 +45,7 @@ OBJECTS = \ - $(OBJDIR)/getopt.o\ - $(OBJDIR)/osunixxf.o\ - $(OBJDIR)/utdebug.o\ -+ $(OBJDIR)/utendian.o\ - $(OBJDIR)/utexcep.o\ - $(OBJDIR)/utglobal.o\ - $(OBJDIR)/uthex.o\ -Index: acpica-unix2-20220331/generate/unix/iasl/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/iasl/Makefile -+++ acpica-unix2-20220331/generate/unix/iasl/Makefile -@@ -225,6 +225,7 @@ OBJECTS = \ - $(OBJDIR)/utdebug.o\ - $(OBJDIR)/utdecode.o\ - $(OBJDIR)/utdelete.o\ -+ $(OBJDIR)/utendian.o\ - $(OBJDIR)/uterror.o\ - $(OBJDIR)/utexcep.o\ - $(OBJDIR)/utglobal.o\ -Index: acpica-unix2-20220331/source/compiler/aslcompiler.h -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslcompiler.h -+++ acpica-unix2-20220331/source/compiler/aslcompiler.h -@@ -1120,10 +1120,6 @@ BOOLEAN - UtIsIdInteger ( - UINT8 *Target); - --UINT8 --UtIsBigEndianMachine ( -- void); -- - BOOLEAN - UtQueryForOverwrite ( - char *Pathname); -Index: acpica-unix2-20220331/source/compiler/aslutils.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslutils.c -+++ acpica-unix2-20220331/source/compiler/aslutils.c -@@ -73,33 +73,6 @@ UtDisplayErrorSummary ( - - /******************************************************************************* - * -- * FUNCTION: UtIsBigEndianMachine -- * -- * PARAMETERS: None -- * -- * RETURN: TRUE if machine is big endian -- * FALSE if machine is little endian -- * -- * DESCRIPTION: Detect whether machine is little endian or big endian. -- * -- ******************************************************************************/ -- --UINT8 --UtIsBigEndianMachine ( -- void) --{ -- union { -- UINT32 Integer; -- UINT8 Bytes[4]; -- } Overlay = {0xFF000000}; -- -- -- return (Overlay.Bytes[0]); /* Returns 0xFF (TRUE) for big endian */ --} -- -- --/******************************************************************************* -- * - * FUNCTION: UtIsIdInteger - * - * PARAMETERS: Pointer to an ACPI ID (HID, CID) string -Index: acpica-unix2-20220331/source/components/utilities/utendian.c -=================================================================== ---- /dev/null -+++ acpica-unix2-20220331/source/components/utilities/utendian.c -@@ -0,0 +1,236 @@ -+/****************************************************************************** -+ * -+ * Module Name: utendian -- byte swapping support for other-endianness -+ * -+ *****************************************************************************/ -+ -+/***************************************************************************** -+ * -+ * Copyright (c) 2020, Al Stone -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions, and the following disclaimer, -+ * without modification. -+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer -+ * substantially similar to the "NO WARRANTY" disclaimer below -+ * ("Disclaimer") and any redistribution must be conditioned upon -+ * including a substantially similar Disclaimer requirement for further -+ * binary redistribution. -+ * 3. Neither the names of the above-listed copyright holders nor the names -+ * of any contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Alternatively, you may choose to be licensed under the terms of the -+ * GNU General Public License ("GPL") version 2 as published by the Free -+ * Software Foundation. -+ * -+ *****************************************************************************/ -+ -+#include "acpi.h" -+#include "accommon.h" -+ -+#define _COMPONENT ACPI_COMPILER -+ ACPI_MODULE_NAME ("utendian") -+ -+/* -+ * Endianness support functions. -+ * -+ * Ultimately, everything in ACPI tables or AML must be in little-endian -+ * format. However, we sometimes find it necessary to run on a big-endian -+ * machine and create or read those little-endian values. This is a small -+ * libary of functions to make that easier, and more visible. -+ * -+ */ -+ -+/******************************************************************************* -+ * -+ * FUNCTION: UtIsBigEndianMachine -+ * -+ * PARAMETERS: None -+ * -+ * RETURN: TRUE if machine is big endian -+ * FALSE if machine is little endian -+ * -+ * DESCRIPTION: Detect whether machine is little endian or big endian. -+ * -+ ******************************************************************************/ -+ -+UINT8 -+UtIsBigEndianMachine ( -+ void) -+{ -+ union { -+ UINT32 Integer; -+ UINT8 Bytes[4]; -+ } Overlay = {0xFF000000}; -+ -+ -+ return (Overlay.Bytes[0]); /* Returns 0xFF (TRUE) for big endian */ -+} -+ -+ -+/******************************************************************************* -+ * -+ * FUNCTION: AcpiUtReadUint16 -+ * -+ * PARAMETERS: Src - location containing the little-endian -+ * value -+ * -+ * RETURN: UINT16 value in host-native form -+ * -+ * DESCRIPTION: Read a UINT16 little-endian value from a given location -+ * and return it in host-native form -+ * -+ ******************************************************************************/ -+ -+UINT16 -+AcpiUtReadUint16 ( -+ void *SrcPtr) -+{ -+ UINT16 Result = 0; -+ UINT8 *Dst = (UINT8 *) &Result; -+ UINT8 *Src = (UINT8 *) SrcPtr; -+ -+ if (!UtIsBigEndianMachine()) -+ { -+ return (*(UINT16 *) SrcPtr); -+ } -+ -+ Dst[0] = Src[1]; -+ Dst[1] = Src[0]; -+ -+ return (Result); -+} -+ -+/******************************************************************************* -+ * -+ * FUNCTION: AcpiUtReadUint32 -+ * -+ * PARAMETERS: Src - location containing the little-endian -+ * value -+ * -+ * RETURN: UINT32 value in host-native form -+ * -+ * DESCRIPTION: Read a UINT32 little-endian value from a given location -+ * and return it in host-native form -+ * -+ ******************************************************************************/ -+ -+UINT32 -+AcpiUtReadUint32 ( -+ void *SrcPtr) -+{ -+ UINT32 Result = 0; -+ UINT8 *Dst = (UINT8 *) &Result; -+ UINT8 *Src = (UINT8 *) SrcPtr; -+ -+ if (!UtIsBigEndianMachine()) -+ { -+ return (*(UINT32 *) SrcPtr); -+ } -+ -+ Dst[0] = Src[3]; -+ Dst[1] = Src[2]; -+ Dst[2] = Src[1]; -+ Dst[3] = Src[0]; -+ -+ return (Result); -+} -+ -+/******************************************************************************* -+ * -+ * FUNCTION: AcpiUtReadUint64 -+ * -+ * PARAMETERS: Src - location containing the little-endian -+ * value -+ * -+ * RETURN: UINT64 value in host-native form -+ * -+ * DESCRIPTION: Read a UINT64 little-endian value from a given location -+ * and return it in host-native form -+ * -+ ******************************************************************************/ -+ -+UINT64 -+AcpiUtReadUint64 ( -+ void *SrcPtr) -+{ -+ UINT64 Result = 0; -+ UINT8 *Dst = (UINT8 *) &Result; -+ UINT8 *Src = (UINT8 *) SrcPtr; -+ -+ if (!UtIsBigEndianMachine()) -+ { -+ return (*(UINT64 *) SrcPtr); -+ } -+ -+ Dst[0] = Src[7]; -+ Dst[1] = Src[6]; -+ Dst[2] = Src[5]; -+ Dst[3] = Src[4]; -+ Dst[4] = Src[3]; -+ Dst[5] = Src[2]; -+ Dst[6] = Src[1]; -+ Dst[7] = Src[0]; -+ -+ return (Result); -+} -+ -+/******************************************************************************* -+ * -+ * FUNCTION: AcpiUtWriteUint -+ * -+ * PARAMETERS: DstPtr - where to place the retrieved value -+ * DstLength - space in bytes for this int type -+ * SrcPtr - where the little-endian value lives -+ * SrcLength - space in bytes for this int type -+ * -+ * RETURN: None. -+ * -+ * DESCRIPTION: Write a host-native integer value of the given size, and -+ * store it in the location specified in little-endian form. -+ * Given the amount of integer type casting done, this general -+ * version seems the most useful (vs 32->32, 32->16, 16->32, -+ * ad infinitum) -+ * -+ ******************************************************************************/ -+ -+void -+AcpiUtWriteUint ( -+ void *DstPtr, -+ int DstLength, -+ const void *SrcPtr, -+ const int SrcLength) -+{ -+ UINT8 *Dst = (UINT8 *) DstPtr; -+ UINT8 *Src = (UINT8 *) SrcPtr; -+ int Length; -+ int ii; -+ -+ if (!UtIsBigEndianMachine()) -+ { -+ Length = SrcLength > DstLength ? DstLength : SrcLength; -+ memcpy (Dst, Src, Length); -+ return; -+ } -+ -+ Length = SrcLength >= DstLength ? DstLength : SrcLength; -+ for (ii = 0; ii < Length; ii++) -+ Dst[ii] = Src[SrcLength - ii - 1]; -+ -+} -Index: acpica-unix2-20220331/source/include/acmacros.h -=================================================================== ---- acpica-unix2-20220331.orig/source/include/acmacros.h -+++ acpica-unix2-20220331/source/include/acmacros.h -@@ -76,61 +76,6 @@ - * If the hardware supports the transfer of unaligned data, just do the store. - * Otherwise, we have to move one byte at a time. - */ --#ifdef ACPI_BIG_ENDIAN --/* -- * Macros for big-endian machines -- */ -- --/* These macros reverse the bytes during the move, converting little-endian to big endian */ -- -- /* Big Endian <== Little Endian */ -- /* Hi...Lo Lo...Hi */ --/* 16-bit source, 16/32/64 destination */ -- --#define ACPI_MOVE_16_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\ -- (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[0];} -- --#define ACPI_MOVE_16_TO_32(d, s) {(*(UINT32 *)(void *)(d))=0;\ -- ((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\ -- ((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];} -- --#define ACPI_MOVE_16_TO_64(d, s) {(*(UINT64 *)(void *)(d))=0;\ -- ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\ -- ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];} -- --/* 32-bit source, 16/32/64 destination */ -- --#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */ -- --#define ACPI_MOVE_32_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\ -- (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\ -- (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\ -- (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];} -- --#define ACPI_MOVE_32_TO_64(d, s) {(*(UINT64 *)(void *)(d))=0;\ -- ((UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\ -- ((UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\ -- ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\ -- ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];} -- --/* 64-bit source, 16/32/64 destination */ -- --#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */ -- --#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */ -- --#define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\ -- (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\ -- (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\ -- (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];\ -- (( UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\ -- (( UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\ -- (( UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\ -- (( UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];} --#else --/* -- * Macros for little-endian machines -- */ - - #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED - -@@ -193,7 +138,6 @@ - (( UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[6];\ - (( UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[7];} - #endif --#endif - - - /* -Index: acpica-unix2-20220331/source/include/acutils.h -=================================================================== ---- acpica-unix2-20220331.orig/source/include/acutils.h -+++ acpica-unix2-20220331/source/include/acutils.h -@@ -1167,4 +1167,36 @@ AcpiUtConvertUuidToString ( - char *OutString); - #endif - -+ -+/* -+ * utendian -- byte-swapping for big-endian support -+ */ -+ -+UINT8 -+UtIsBigEndianMachine ( -+ void); -+ -+#if defined(ACPI_ASL_COMPILER) || defined(ACPI_EXEC_APP) || \ -+ defined(ACPI_HELP_APP) || defined(ACPI_DUMP_APP) || \ -+ defined(ACPI_EXAMPLE_APP) || defined(ACPI_BIN_APP) -+UINT32 -+AcpiUtReadUint32 ( -+ void *SrcPtr); -+ -+UINT16 -+AcpiUtReadUint16 ( -+ void *SrcPtr); -+ -+UINT64 -+AcpiUtReadUint64 ( -+ void *SrcPtr); -+ -+void -+AcpiUtWriteUint ( -+ void *DstPtr, -+ int DstLength, -+ const void *SrcPtr, -+ const int SrcLength); -+#endif -+ - #endif /* _ACUTILS_H */ -Index: acpica-unix2-20220331/source/include/platform/aclinux.h -=================================================================== ---- acpica-unix2-20220331.orig/source/include/platform/aclinux.h -+++ acpica-unix2-20220331/source/include/platform/aclinux.h -@@ -203,6 +203,7 @@ - - #ifdef ACPI_USE_STANDARD_HEADERS - #include -+#include - #endif - - /* Define/disable kernel-specific declarators */ diff --git a/0002-Modify-utility-functions-to-be-endian-agnostic.patch b/0002-Modify-utility-functions-to-be-endian-agnostic.patch deleted file mode 100644 index a328096..0000000 --- a/0002-Modify-utility-functions-to-be-endian-agnostic.patch +++ /dev/null @@ -1,200 +0,0 @@ -From 51b0d06c0a6c4d4e19432ebf930299855c8fcf23 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 18 Sep 2020 15:14:30 -0600 -Subject: [PATCH 02/45] Modify utility functions to be endian-agnostic - -All of the modifications here use the big-endian code previously added -(see utendian.c) to make themselves endian-agnostic; i.e., that the code -does not need to change further to work on both big- and little-endian -machines. - -These particular files were changed to handle the reading and writing -of files (the length is often embedded in the binary stream), and to -handle the reading and writing of integer values. The common cases are -to "read" a 32-bit unsigned int in little-endian format, but convert it -to host-native, and to write a byte, word, double word or quad word value -as little-endian, regardless of host-native format. - -Signed-off-by: Al Stone ---- - source/common/acfileio.c | 16 ++++++++++------ - source/common/dmtable.c | 8 ++++---- - source/compiler/dtfield.c | 2 +- - source/compiler/dtsubtable.c | 4 ++-- - source/components/tables/tbprint.c | 13 +++++++++---- - 5 files changed, 26 insertions(+), 17 deletions(-) - -Index: acpica-unix2-20220331/source/common/acfileio.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/acfileio.c -+++ acpica-unix2-20220331/source/common/acfileio.c -@@ -280,6 +280,7 @@ AcGetOneTableFromFile ( - ACPI_TABLE_HEADER *Table; - INT32 Count; - long TableOffset; -+ UINT32 Length; - - - *ReturnTable = NULL; -@@ -319,7 +320,8 @@ AcGetOneTableFromFile ( - - /* Allocate a buffer for the entire table */ - -- Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length); -+ Length = AcpiUtReadUint32 (&TableHeader.Length); -+ Table = AcpiOsAllocate ((ACPI_SIZE) Length); - if (!Table) - { - return (AE_NO_MEMORY); -@@ -329,13 +331,13 @@ AcGetOneTableFromFile ( - - fseek (File, TableOffset, SEEK_SET); - -- Count = fread (Table, 1, TableHeader.Length, File); -+ Count = fread (Table, 1, Length, File); - - /* - * Checks for data table headers happen later in the execution. Only verify - * for Aml tables at this point in the code. - */ -- if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length) -+ if (GetOnlyAmlTables && Count != (INT32) Length) - { - Status = AE_ERROR; - goto ErrorExit; -@@ -343,7 +345,7 @@ AcGetOneTableFromFile ( - - /* Validate the checksum (just issue a warning) */ - -- Status = AcpiTbVerifyChecksum (Table, TableHeader.Length); -+ Status = AcpiTbVerifyChecksum (Table, Length); - if (ACPI_FAILURE (Status)) - { - Status = AcCheckTextModeCorruption (Table); -@@ -436,6 +438,7 @@ AcValidateTableHeader ( - long OriginalOffset; - UINT32 FileSize; - UINT32 i; -+ UINT32 Length; - - - ACPI_FUNCTION_TRACE (AcValidateTableHeader); -@@ -472,11 +475,12 @@ AcValidateTableHeader ( - /* Validate table length against bytes remaining in the file */ - - FileSize = CmGetFileSize (File); -- if (TableHeader.Length > (UINT32) (FileSize - TableOffset)) -+ Length = AcpiUtReadUint32 (&TableHeader.Length); -+ if (Length > (UINT32) (FileSize - TableOffset)) - { - fprintf (stderr, "Table [%4.4s] is too long for file - " - "needs: 0x%.2X, remaining in file: 0x%.2X\n", -- TableHeader.Signature, TableHeader.Length, -+ TableHeader.Signature, Length, - (UINT32) (FileSize - TableOffset)); - return (AE_BAD_HEADER); - } -Index: acpica-unix2-20220331/source/common/dmtable.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtable.c -+++ acpica-unix2-20220331/source/common/dmtable.c -@@ -713,7 +713,7 @@ AcpiDmDumpDataTable ( - { - /* Dump the raw table data */ - -- Length = Table->Length; -+ Length = AcpiUtReadUint32 (&Table->Length); - - AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n", - ACPI_RAW_TABLE_DATA_HEADER, Length, Length); -@@ -730,7 +730,7 @@ AcpiDmDumpDataTable ( - */ - if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) - { -- Length = Table->Length; -+ Length = AcpiUtReadUint32 (&Table->Length); - Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); - if (ACPI_FAILURE (Status)) - { -@@ -751,7 +751,7 @@ AcpiDmDumpDataTable ( - /* - * All other tables must use the common ACPI table header, dump it now - */ -- Length = Table->Length; -+ Length = AcpiUtReadUint32(&Table->Length); - Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader); - if (ACPI_FAILURE (Status)) - { -@@ -1415,7 +1415,7 @@ AcpiDmDumpTable ( - - AcpiOsPrintf ("%2.2X", *Target); - Temp8 = AcpiDmGenerateChecksum (Table, -- ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length, -+ AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length)), - ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); - - if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum) -Index: acpica-unix2-20220331/source/compiler/dtfield.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dtfield.c -+++ acpica-unix2-20220331/source/compiler/dtfield.c -@@ -361,7 +361,7 @@ DtCompileInteger ( - DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, AslGbl_MsgBuffer); - } - -- memcpy (Buffer, &Value, ByteLength); -+ AcpiUtWriteUint (Buffer, ByteLength, &Value, sizeof (UINT64)); - return; - } - -Index: acpica-unix2-20220331/source/compiler/dtsubtable.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dtsubtable.c -+++ acpica-unix2-20220331/source/compiler/dtsubtable.c -@@ -378,6 +378,6 @@ DtSetSubtableLength ( - return; - } - -- memcpy (Subtable->LengthField, &Subtable->TotalLength, -- Subtable->SizeOfLengthField); -+ AcpiUtWriteUint (Subtable->LengthField, Subtable->SizeOfLengthField, -+ &Subtable->TotalLength, sizeof (Subtable->TotalLength)); - } -Index: acpica-unix2-20220331/source/components/tables/tbprint.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/tables/tbprint.c -+++ acpica-unix2-20220331/source/components/tables/tbprint.c -@@ -44,6 +44,8 @@ - #include "acpi.h" - #include "accommon.h" - #include "actables.h" -+#include "platform/acenv.h" -+#include "acutils.h" - - #define _COMPONENT ACPI_TABLES - ACPI_MODULE_NAME ("tbprint") -@@ -151,7 +153,7 @@ AcpiTbPrintTableHeader ( - - ACPI_INFO (("%-4.4s 0x%8.8X%8.8X %06X", - Header->Signature, ACPI_FORMAT_UINT64 (Address), -- Header->Length)); -+ AcpiUtReadUint32 (&Header->Length))); - } - else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP, - Header)->Signature)) -@@ -179,9 +181,12 @@ AcpiTbPrintTableHeader ( - "%-4.4s 0x%8.8X%8.8X" - " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", - LocalHeader.Signature, ACPI_FORMAT_UINT64 (Address), -- LocalHeader.Length, LocalHeader.Revision, LocalHeader.OemId, -- LocalHeader.OemTableId, LocalHeader.OemRevision, -- LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision)); -+ AcpiUtReadUint32 (&LocalHeader.Length), -+ LocalHeader.Revision, LocalHeader.OemId, -+ LocalHeader.OemTableId, -+ AcpiUtReadUint32 (&LocalHeader.OemRevision), -+ LocalHeader.AslCompilerId, -+ AcpiUtReadUint32 (&LocalHeader.AslCompilerRevision))); - } - } - diff --git a/0003-Always-display-table-header-content-in-human-readabl.patch b/0003-Always-display-table-header-content-in-human-readabl.patch deleted file mode 100644 index f540ac1..0000000 --- a/0003-Always-display-table-header-content-in-human-readabl.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 62cc2f4ae212bd0fad83f643921ac216ebb9a986 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 18 Sep 2020 15:20:37 -0600 -Subject: [PATCH 03/45] Always display table header content in human-readable - form - -When comparing two binary data tables, little-endian values are read -from each table header and printed out. Make sure they show up in a -form that makes sense to humans. - -Signed-off-by: Al Stone ---- - source/tools/acpibin/abcompare.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: acpica-unix2-20220331/source/tools/acpibin/abcompare.c -=================================================================== ---- acpica-unix2-20220331.orig/source/tools/acpibin/abcompare.c -+++ acpica-unix2-20220331/source/tools/acpibin/abcompare.c -@@ -42,6 +42,7 @@ - */ - - #include "acpibin.h" -+#include "acutils.h" - - - ACPI_TABLE_HEADER Header1; -@@ -179,14 +180,14 @@ AbPrintHeadersInfo ( - /* Display header information for both headers */ - - printf ("Signature %8.4s : %4.4s\n", Header->Signature, Header2->Signature); -- printf ("Length %8.8X : %8.8X\n", Header->Length, Header2->Length); -+ printf ("Length %8.8X : %8.8X\n", AcpiUtReadUint32 (&Header->Length), AcpiUtReadUint32 (&Header2->Length)); - printf ("Revision %8.2X : %2.2X\n", Header->Revision, Header2->Revision); - printf ("Checksum %8.2X : %2.2X\n", Header->Checksum, Header2->Checksum); - printf ("OEM ID %8.6s : %.6s\n", Header->OemId, Header2->OemId); - printf ("OEM Table ID %8.8s : %.8s\n", Header->OemTableId, Header2->OemTableId); -- printf ("OEM Revision %8.8X : %8.8X\n", Header->OemRevision, Header2->OemRevision); -+ printf ("OEM Revision %8.8X : %8.8X\n", AcpiUtReadUint32 (&Header->OemRevision), AcpiUtReadUint32 (&Header2->OemRevision)); - printf ("ASL Compiler ID %8.4s : %.4s\n", Header->AslCompilerId, Header2->AslCompilerId); -- printf ("Compiler Revision %8.8X : %8.8X\n", Header->AslCompilerRevision, Header2->AslCompilerRevision); -+ printf ("Compiler Revision %8.8X : %8.8X\n", AcpiUtReadUint32 (&Header->AslCompilerRevision), AcpiUtReadUint32 (&Header2->AslCompilerRevision)); - printf ("\n"); - } - diff --git a/0004-Re-enable-support-for-big-endian-machines.patch b/0004-Re-enable-support-for-big-endian-machines.patch deleted file mode 100644 index d2dc432..0000000 --- a/0004-Re-enable-support-for-big-endian-machines.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 16734feab4204d6930c1ede62e527920607daace Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 16 Sep 2020 16:27:06 -0600 -Subject: [PATCH 04/45] Re-enable support for big-endian machines - -First, disable the big-endian check and fail. Then, make sure the -namespace gets initialized properly (NB: needed even if we are only -compiling/disassembling data tables). - -Signed-off-by: Al Stone ---- - source/compiler/aslmain.c | 12 ------------ - source/components/namespace/nsutils.c | 7 +++++-- - 2 files changed, 5 insertions(+), 14 deletions(-) - -Index: acpica-unix2-20220331/source/compiler/aslmain.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslmain.c -+++ acpica-unix2-20220331/source/compiler/aslmain.c -@@ -101,18 +101,6 @@ main ( - - signal (SIGINT, AslSignalHandler); - -- /* -- * Big-endian machines are not currently supported. ACPI tables must -- * be little-endian, and support for big-endian machines needs to -- * be implemented. -- */ -- if (UtIsBigEndianMachine ()) -- { -- fprintf (stderr, -- "iASL is not currently supported on big-endian machines.\n"); -- return (-1); -- } -- - AcpiOsInitialize (); - ACPI_DEBUG_INITIALIZE (); /* For debug version only */ - -Index: acpica-unix2-20220331/source/components/namespace/nsutils.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20220331/source/components/namespace/nsutils.c -@@ -272,6 +272,7 @@ AcpiNsBuildInternalName ( - const char *ExternalName = Info->NextExternalChar; - char *Result = NULL; - UINT32 i; -+ char TmpSeg[ACPI_NAMESEG_SIZE+1]; - - - ACPI_FUNCTION_TRACE (NsBuildInternalName); -@@ -335,6 +336,7 @@ AcpiNsBuildInternalName ( - - for (; NumSegments; NumSegments--) - { -+ memset (TmpSeg, 0, ACPI_NAMESEG_SIZE+1); - for (i = 0; i < ACPI_NAMESEG_SIZE; i++) - { - if (ACPI_IS_PATH_SEPARATOR (*ExternalName) || -@@ -342,16 +344,17 @@ AcpiNsBuildInternalName ( - { - /* Pad the segment with underscore(s) if segment is short */ - -- Result[i] = '_'; -+ TmpSeg[i] = '_'; - } - else - { - /* Convert the character to uppercase and save it */ - -- Result[i] = (char) toupper ((int) *ExternalName); -+ TmpSeg[i] = (char) toupper ((int) *ExternalName); - ExternalName++; - } - } -+ AcpiUtWriteUint (Result, ACPI_NAMESEG_SIZE, TmpSeg, ACPI_NAMESEG_SIZE); - - /* Now we must have a path separator, or the pathname is bad */ - diff --git a/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch b/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch deleted file mode 100644 index e5a9dc5..0000000 --- a/0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 055fee09d8f9244b6c437ad18b98edb81a87e8bc Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 27 Oct 2020 17:50:52 -0600 -Subject: [PATCH 05/45] Correct an endian-ness problem when converting ASL to - ASL+ - -Signed-off-by: Al Stone ---- - source/compiler/cvparser.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/compiler/cvparser.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/cvparser.c -+++ acpica-unix2-20220331/source/compiler/cvparser.c -@@ -144,6 +144,7 @@ CvInitFileTree ( - char *ChildFilename = NULL; - UINT8 *AmlStart; - UINT32 AmlLength; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - if (!AcpiGbl_CaptureComments) -@@ -152,7 +153,7 @@ CvInitFileTree ( - } - - -- AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER); -+ AmlLength = TableLength - sizeof (ACPI_TABLE_HEADER); - AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); - - CvDbgPrint ("AmlLength: %x\n", AmlLength); -@@ -162,7 +163,7 @@ CvInitFileTree ( - AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache); - - AcpiGbl_FileTreeRoot->FileStart = (char *)(AmlStart); -- AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + Table->Length); -+ AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + TableLength); - AcpiGbl_FileTreeRoot->Next = NULL; - AcpiGbl_FileTreeRoot->Parent = NULL; - AcpiGbl_FileTreeRoot->Filename = (char *)(AmlStart+2); diff --git a/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch b/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch deleted file mode 100644 index 5893e93..0000000 --- a/0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 790c016107e98ded2d0ae579f84dd4cd3fa06587 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 29 Jun 2021 17:48:31 -0600 -Subject: [PATCH 06/45] Use more reliable ACPI_COPY_NAMSEG in GPE name checks - -Signed-off-by: Al Stone ---- - source/compiler/aslanalyze.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/compiler/aslanalyze.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslanalyze.c -+++ acpica-unix2-20220331/source/compiler/aslanalyze.c -@@ -469,7 +469,7 @@ ApCheckForGpeNameConflict ( - - /* Need a null-terminated string version of NameSeg */ - -- ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg); -+ ACPI_COPY_NAMESEG (Name, Op->Asl.NameSeg); - Name[ACPI_NAMESEG_SIZE] = 0; - - /* -@@ -496,7 +496,7 @@ ApCheckForGpeNameConflict ( - * We are now sure we have an _Lxx or _Exx. - * Create the target name that would cause collision (Flip E/L) - */ -- ACPI_MOVE_32_TO_32 (Target, Name); -+ ACPI_COPY_NAMESEG (Target, Name); - - /* Inject opposite letter ("L" versus "E") */ - diff --git a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch b/0007-Handle-dumping-Unicode-properly-when-big-endian.patch deleted file mode 100644 index 70d83d6..0000000 --- a/0007-Handle-dumping-Unicode-properly-when-big-endian.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 9a4a32c597fcdfa8a3bc33230c40a18e39c3449d Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Thu, 1 Jul 2021 17:46:19 -0600 -Subject: [PATCH 07/45] Handle dumping Unicode properly when big-endian - -Signed-off-by: Al Stone ---- - source/common/dmtbdump.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump.c -+++ acpica-unix2-20220331/source/common/dmtbdump.c -@@ -200,6 +200,8 @@ AcpiDmDumpUnicode ( - UINT8 *Buffer; - UINT32 Length; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 start; - - - Buffer = ((UINT8 *) Table) + BufferOffset; -@@ -209,7 +211,8 @@ AcpiDmDumpUnicode ( - - for (i = 0; i < Length; i += 2) - { -- if (!isprint (Buffer[i])) -+ Tmp16 = AcpiUtReadUint16 (&Buffer[i]); -+ if (!isprint (Tmp16)) - { - goto DumpRawBuffer; - } -@@ -217,7 +220,8 @@ AcpiDmDumpUnicode ( - - /* Ensure all high bytes are zero */ - -- for (i = 1; i < Length; i += 2) -+ start = UtIsBigEndianMachine() ? 0 : 1; -+ for (i = start; i < Length; i += 2) - { - if (Buffer[i]) - { -@@ -230,7 +234,8 @@ AcpiDmDumpUnicode ( - AcpiOsPrintf ("\""); - for (i = 0; i < Length; i += 2) - { -- AcpiOsPrintf ("%c", Buffer[i]); -+ Tmp16 = AcpiUtReadUint16 (&Buffer[i]); -+ AcpiOsPrintf ("%c", Tmp16); - } - - AcpiOsPrintf ("\"\n"); diff --git a/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch b/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch deleted file mode 100644 index 9121ab8..0000000 --- a/0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7b107ab7348d903108140f6033e90596b12325c4 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Thu, 15 Oct 2020 12:12:11 -0600 -Subject: [PATCH 08/45] Support MADT (aka APIC) in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -763,7 +763,7 @@ AcpiDmDumpMadt ( - { - ACPI_STATUS Status; - ACPI_SUBTABLE_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_MADT); - ACPI_DMTABLE_INFO *InfoTable; - -@@ -781,7 +781,7 @@ AcpiDmDumpMadt ( - Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); - DbgPrint (ASL_PARSE_OUTPUT, "//0B) Offset %X, from table start: 0x%8.8X%8.8X\n", - Offset, ACPI_FORMAT_UINT64 (ACPI_CAST_PTR (char, Subtable) - ACPI_CAST_PTR (char, Table))); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - /* Common subtable header */ - diff --git a/0009-Support-ASF-tables-in-a-big-endian-world.patch b/0009-Support-ASF-tables-in-a-big-endian-world.patch deleted file mode 100644 index a3f815d..0000000 --- a/0009-Support-ASF-tables-in-a-big-endian-world.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ce811b4c38b9a09533ee8bafa22813f6e43c023d Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 18 Sep 2020 16:41:02 -0600 -Subject: [PATCH 09/45] Support ASF! tables in a big-endian world - -Read the table length properly and it all works right for big-endian. - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -358,16 +358,18 @@ AcpiDmDumpAsf ( - UINT32 DataOffset = 0; - UINT32 i; - UINT8 Type; -+ UINT32 TableLength; - - - /* No main table, only subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset); -- while (Offset < Table->Length) -+ TableLength = AcpiUtReadUint32 (&Table->Length); -+ while (Offset < TableLength) - { - /* Common subtable header */ - -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Header.Length, AcpiDmTableInfoAsfHdr); - if (ACPI_FAILURE (Status)) - { -@@ -425,7 +427,7 @@ AcpiDmDumpAsf ( - return; - } - -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Header.Length, InfoTable); - if (ACPI_FAILURE (Status)) - { -@@ -442,7 +444,7 @@ AcpiDmDumpAsf ( - for (i = 0; i < DataCount; i++) - { - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, DataOffset, -+ Status = AcpiDmDumpTable (TableLength, DataOffset, - DataTable, DataLength, DataInfoTable); - if (ACPI_FAILURE (Status)) - { diff --git a/0010-Support-CPEP-tables-in-a-big-endian-world.patch b/0010-Support-CPEP-tables-in-a-big-endian-world.patch deleted file mode 100644 index e9451cd..0000000 --- a/0010-Support-CPEP-tables-in-a-big-endian-world.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0c4be57a5e0e45b4197c2d9a0b26462d3b1a9b80 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 18 Sep 2020 16:54:13 -0600 -Subject: [PATCH 10/45] Support CPEP tables in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -614,7 +614,7 @@ AcpiDmDumpCpep ( - { - ACPI_STATUS Status; - ACPI_CPEP_POLLING *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_CPEP); - - -@@ -629,7 +629,7 @@ AcpiDmDumpCpep ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, Subtable, diff --git a/0011-Support-DBG2-table-in-a-big-endian-world.patch b/0011-Support-DBG2-table-in-a-big-endian-world.patch deleted file mode 100644 index 76cb7ac..0000000 --- a/0011-Support-DBG2-table-in-a-big-endian-world.patch +++ /dev/null @@ -1,256 +0,0 @@ -From 2cb0b87a15682da4f19f707fa3ffece504f94b5a Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sat, 19 Sep 2020 13:37:38 -0600 -Subject: [PATCH 11/45] Support DBG2 table in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 37 ++++++++++++++++++-------------- - source/compiler/dttable1.c | 43 ++++++++++++++++++++++++-------------- - 2 files changed, 48 insertions(+), 32 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -669,7 +669,7 @@ AcpiDmDumpCsrt ( - ACPI_CSRT_GROUP *Subtable; - ACPI_CSRT_SHARED_INFO *SharedInfoTable; - ACPI_CSRT_DESCRIPTOR *SubSubtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_CSRT); - UINT32 SubOffset; - UINT32 SubSubOffset; -@@ -681,7 +681,7 @@ AcpiDmDumpCsrt ( - /* Subtables (Resource Groups) */ - - Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - /* Resource group subtable */ - -@@ -715,7 +715,7 @@ AcpiDmDumpCsrt ( - Offset + SubOffset); - - while ((SubOffset < Subtable->Length) && -- ((Offset + SubOffset) < Table->Length)) -+ ((Offset + SubOffset) < Length)) - { - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable, -@@ -776,12 +776,13 @@ AcpiDmDumpDbg2 ( - { - ACPI_STATUS Status; - ACPI_DBG2_DEVICE *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_DBG2); - UINT32 i; - UINT32 ArrayOffset; - UINT32 AbsoluteOffset; - UINT8 *Array; -+ UINT16 SubtableLength; - - - /* Main table */ -@@ -795,11 +796,12 @@ AcpiDmDumpDbg2 ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - AcpiOsPrintf ("\n"); -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoDbg2Device); -+ SubtableLength, AcpiDmTableInfoDbg2Device); - if (ACPI_FAILURE (Status)) - { - return; -@@ -809,13 +811,13 @@ AcpiDmDumpDbg2 ( - - for (i = 0; i < Subtable->RegisterCount; i++) - { -- ArrayOffset = Subtable->BaseAddressOffset + -+ ArrayOffset = AcpiUtReadUint16 (&Subtable->BaseAddressOffset) + - (sizeof (ACPI_GENERIC_ADDRESS) * i); - AbsoluteOffset = Offset + ArrayOffset; - Array = (UINT8 *) Subtable + ArrayOffset; - - Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, -- Subtable->Length, AcpiDmTableInfoDbg2Addr); -+ SubtableLength, AcpiDmTableInfoDbg2Addr); - if (ACPI_FAILURE (Status)) - { - return; -@@ -826,13 +828,13 @@ AcpiDmDumpDbg2 ( - - for (i = 0; i < Subtable->RegisterCount; i++) - { -- ArrayOffset = Subtable->AddressSizeOffset + -+ ArrayOffset = AcpiUtReadUint16 (&Subtable->AddressSizeOffset) + - (sizeof (UINT32) * i); - AbsoluteOffset = Offset + ArrayOffset; - Array = (UINT8 *) Subtable + ArrayOffset; - - Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, -- Subtable->Length, AcpiDmTableInfoDbg2Size); -+ SubtableLength, AcpiDmTableInfoDbg2Size); - if (ACPI_FAILURE (Status)) - { - return; -@@ -842,12 +844,12 @@ AcpiDmDumpDbg2 ( - /* Dump the Namestring (required) */ - - AcpiOsPrintf ("\n"); -- ArrayOffset = Subtable->NamepathOffset; -+ ArrayOffset = AcpiUtReadUint16 (&Subtable->NamepathOffset); - AbsoluteOffset = Offset + ArrayOffset; - Array = (UINT8 *) Subtable + ArrayOffset; - - Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, -- Subtable->Length, AcpiDmTableInfoDbg2Name); -+ SubtableLength, AcpiDmTableInfoDbg2Name); - if (ACPI_FAILURE (Status)) - { - return; -@@ -857,8 +859,11 @@ AcpiDmDumpDbg2 ( - - if (Subtable->OemDataOffset) - { -- Status = AcpiDmDumpTable (Length, Offset + Subtable->OemDataOffset, -- Table, Subtable->OemDataLength, -+ Array = (UINT8 *) Subtable + AcpiUtReadUint16 (&Subtable->OemDataOffset); -+ -+ Status = AcpiDmDumpTable (Length, -+ Offset + AcpiUtReadUint16 (&Subtable->OemDataOffset), -+ Array, AcpiUtReadUint16 (&Subtable->OemDataLength), - AcpiDmTableInfoDbg2OemData); - if (ACPI_FAILURE (Status)) - { -@@ -868,9 +873,9 @@ AcpiDmDumpDbg2 ( - - /* Point to next subtable */ - -- Offset += Subtable->Length; -+ Offset += SubtableLength; - Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Subtable, -- Subtable->Length); -+ SubtableLength); - } - } - -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -718,6 +718,7 @@ DtCompileCsrt ( - DT_FIELD **PFieldList = (DT_FIELD **) List; - UINT32 DescriptorCount; - UINT32 GroupLength; -+ UINT32 Tmp; - - - /* Subtables (Resource Groups) */ -@@ -736,12 +737,13 @@ DtCompileCsrt ( - - /* Compute the number of resource descriptors */ - -- GroupLength = -- (ACPI_CAST_PTR (ACPI_CSRT_GROUP, -- Subtable->Buffer))->Length - -- (ACPI_CAST_PTR (ACPI_CSRT_GROUP, -- Subtable->Buffer))->SharedInfoLength - -- sizeof (ACPI_CSRT_GROUP); -+ Tmp = AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_CSRT_GROUP, -+ Subtable->Buffer))->Length); -+ GroupLength = Tmp; -+ Tmp = AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_CSRT_GROUP, -+ Subtable->Buffer))->SharedInfoLength); -+ GroupLength -= Tmp; -+ GroupLength -= sizeof (ACPI_CSRT_GROUP); - - DescriptorCount = (GroupLength / - sizeof (ACPI_CSRT_DESCRIPTOR)); -@@ -829,6 +831,7 @@ DtCompileDbg2 ( - ACPI_DBG2_DEVICE *DeviceInfo; - UINT16 CurrentOffset; - UINT32 i; -+ UINT32 Tmp; - - - /* Main table */ -@@ -845,10 +848,12 @@ DtCompileDbg2 ( - /* Main table fields */ - - Dbg2Header = ACPI_CAST_PTR (ACPI_DBG2_HEADER, Subtable->Buffer); -- Dbg2Header->InfoOffset = sizeof (ACPI_TABLE_HEADER) + ACPI_PTR_DIFF ( -- ACPI_ADD_PTR (UINT8, Dbg2Header, sizeof (ACPI_DBG2_HEADER)), Dbg2Header); -+ Tmp = sizeof (ACPI_TABLE_HEADER) + ACPI_PTR_DIFF ( -+ ACPI_ADD_PTR (UINT8, Dbg2Header, sizeof (ACPI_DBG2_HEADER)), Dbg2Header); -+ AcpiUtWriteUint (&Dbg2Header->InfoOffset, sizeof (UINT32), -+ &Tmp, sizeof (UINT32)); - -- SubtableCount = Dbg2Header->InfoCount; -+ SubtableCount = Tmp; - DtPushSubtable (Subtable); - - /* Process all Device Information subtables (Count = InfoCount) */ -@@ -875,7 +880,8 @@ DtCompileDbg2 ( - - /* BaseAddressRegister GAS array (Required, size is RegisterCount) */ - -- DeviceInfo->BaseAddressOffset = CurrentOffset; -+ AcpiUtWriteUint (&DeviceInfo->BaseAddressOffset, sizeof (UINT16), -+ &CurrentOffset, sizeof (UINT16)); - for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++) - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Addr, -@@ -891,7 +897,8 @@ DtCompileDbg2 ( - - /* AddressSize array (Required, size = RegisterCount) */ - -- DeviceInfo->AddressSizeOffset = CurrentOffset; -+ AcpiUtWriteUint (&DeviceInfo->AddressSizeOffset, sizeof (UINT16), -+ &CurrentOffset, sizeof (UINT16)); - for (i = 0; *PFieldList && (i < DeviceInfo->RegisterCount); i++) - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Size, -@@ -907,7 +914,8 @@ DtCompileDbg2 ( - - /* NamespaceString device identifier (Required, size = NamePathLength) */ - -- DeviceInfo->NamepathOffset = CurrentOffset; -+ AcpiUtWriteUint (&DeviceInfo->NamepathOffset, sizeof (UINT16), -+ &CurrentOffset, sizeof (UINT16)); - Status = DtCompileTable (PFieldList, AcpiDmTableInfoDbg2Name, - &Subtable); - if (ACPI_FAILURE (Status)) -@@ -917,8 +925,9 @@ DtCompileDbg2 ( - - /* Update the device info header */ - -- DeviceInfo->NamepathLength = (UINT16) Subtable->Length; -- CurrentOffset += (UINT16) DeviceInfo->NamepathLength; -+ AcpiUtWriteUint (&DeviceInfo->NamepathLength, sizeof (UINT16), -+ &Subtable->Length, sizeof (UINT32)); -+ CurrentOffset += AcpiUtReadUint16 (&DeviceInfo->NamepathLength); - DtInsertSubtable (ParentTable, Subtable); - - /* OemData - Variable-length data (Optional, size = OemDataLength) */ -@@ -945,8 +954,10 @@ DtCompileDbg2 ( - - if (Subtable && Subtable->Length) - { -- DeviceInfo->OemDataOffset = CurrentOffset; -- DeviceInfo->OemDataLength = (UINT16) Subtable->Length; -+ AcpiUtWriteUint (&DeviceInfo->OemDataOffset, sizeof (UINT16), -+ &CurrentOffset, sizeof (UINT16)); -+ AcpiUtWriteUint (&DeviceInfo->OemDataLength, sizeof (UINT16), -+ &Subtable->Length, sizeof (UINT32)); - - DtInsertSubtable (ParentTable, Subtable); - } diff --git a/0012-Support-DMAR-in-a-big-endian-world.patch b/0012-Support-DMAR-in-a-big-endian-world.patch deleted file mode 100644 index 3d54025..0000000 --- a/0012-Support-DMAR-in-a-big-endian-world.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 06623392351dfea54bd69507b6672c933a5e3fd2 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sat, 19 Sep 2020 15:22:00 -0600 -Subject: [PATCH 12/45] Support DMAR in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtable.c | 4 ++-- - source/common/dmtbdump1.c | 26 +++++++++++++++----------- - source/compiler/dttable1.c | 12 +++++++----- - 3 files changed, 24 insertions(+), 18 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtable.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtable.c -+++ acpica-unix2-20220331/source/common/dmtable.c -@@ -1578,13 +1578,13 @@ AcpiDmDumpTable ( - - /* DMAR subtable types */ - -- Temp16 = ACPI_GET16 (Target); -+ Temp16 = AcpiUtReadUint16 (Target); - if (Temp16 > ACPI_DMAR_TYPE_RESERVED) - { - Temp16 = ACPI_DMAR_TYPE_RESERVED; - } - -- AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), -+ AcpiOsPrintf (UINT16_FORMAT, Temp16, - AcpiDmDmarSubnames[Temp16]); - break; - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -899,13 +899,15 @@ AcpiDmDumpDmar ( - { - ACPI_STATUS Status; - ACPI_DMAR_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_DMAR); - ACPI_DMTABLE_INFO *InfoTable; - ACPI_DMAR_DEVICE_SCOPE *ScopeTable; - UINT32 ScopeOffset; - UINT8 *PciPath; - UINT32 PathOffset; -+ UINT16 SubtableType; -+ UINT16 SubtableLength; - - - /* Main table */ -@@ -919,13 +921,14 @@ AcpiDmDumpDmar ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoDmarHdr); -+ SubtableLength, AcpiDmTableInfoDmarHdr); - if (ACPI_FAILURE (Status)) - { - return; -@@ -933,7 +936,8 @@ AcpiDmDumpDmar ( - - AcpiOsPrintf ("\n"); - -- switch (Subtable->Type) -+ SubtableType = AcpiUtReadUint16 (&Subtable->Type); -+ switch (SubtableType) - { - case ACPI_DMAR_TYPE_HARDWARE_UNIT: - -@@ -974,12 +978,12 @@ AcpiDmDumpDmar ( - default: - - AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", -- Subtable->Type); -+ SubtableType); - return; - } - - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, InfoTable); -+ SubtableLength, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; -@@ -988,8 +992,8 @@ AcpiDmDumpDmar ( - /* - * Dump the optional device scope entries - */ -- if ((Subtable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || -- (Subtable->Type == ACPI_DMAR_TYPE_NAMESPACE)) -+ if ((SubtableType == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || -+ (SubtableType == ACPI_DMAR_TYPE_NAMESPACE)) - { - /* These types do not support device scopes */ - -@@ -997,7 +1001,7 @@ AcpiDmDumpDmar ( - } - - ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable, ScopeOffset); -- while (ScopeOffset < Subtable->Length) -+ while (ScopeOffset < SubtableLength) - { - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable, -@@ -1038,9 +1042,9 @@ AcpiDmDumpDmar ( - NextSubtable: - /* Point to next subtable */ - -- Offset += Subtable->Length; -+ Offset += SubtableLength; - Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Subtable, -- Subtable->Length); -+ SubtableLength); - } - } - -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -997,6 +997,7 @@ DtCompileDmar ( - ACPI_DMAR_DEVICE_SCOPE *DmarDeviceScope; - UINT32 DeviceScopeLength; - UINT32 PciPathLength; -+ UINT16 DmarHeaderType; - - - Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmar, &Subtable); -@@ -1027,7 +1028,8 @@ DtCompileDmar ( - - DmarHeader = ACPI_CAST_PTR (ACPI_DMAR_HEADER, Subtable->Buffer); - -- switch (DmarHeader->Type) -+ DmarHeaderType = AcpiUtReadUint16 (&DmarHeader->Type); -+ switch (DmarHeaderType) - { - case ACPI_DMAR_TYPE_HARDWARE_UNIT: - -@@ -1079,8 +1081,8 @@ DtCompileDmar ( - /* - * Optional Device Scope subtables - */ -- if ((DmarHeader->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || -- (DmarHeader->Type == ACPI_DMAR_TYPE_NAMESPACE)) -+ if ((DmarHeaderType == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || -+ (DmarHeaderType == ACPI_DMAR_TYPE_NAMESPACE)) - { - /* These types do not support device scopes */ - -@@ -1089,8 +1091,8 @@ DtCompileDmar ( - } - - DtPushSubtable (Subtable); -- DeviceScopeLength = DmarHeader->Length - Subtable->Length - -- ParentTable->Length; -+ DeviceScopeLength = AcpiUtReadUint16 (&DmarHeader->Length) - -+ Subtable->Length - ParentTable->Length; - while (DeviceScopeLength) - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmarScope, diff --git a/0013-Support-DRTM-in-a-big-endian-world.patch b/0013-Support-DRTM-in-a-big-endian-world.patch deleted file mode 100644 index 02725bb..0000000 --- a/0013-Support-DRTM-in-a-big-endian-world.patch +++ /dev/null @@ -1,112 +0,0 @@ -From bcdec27f562b0df37546b5e8ad2eab76348062eb Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sat, 19 Sep 2020 15:44:06 -0600 -Subject: [PATCH 13/45] Support DRTM in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 25 +++++++++++++++---------- - source/compiler/dttable1.c | 6 ++++-- - 2 files changed, 19 insertions(+), 12 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1071,11 +1071,14 @@ AcpiDmDumpDrtm ( - ACPI_DRTM_RESOURCE_LIST *DrtmRl; - ACPI_DRTM_DPS_ID *DrtmDps; - UINT32 Count; -+ UINT32 ResourceCount; -+ UINT32 ValidatedTableCount; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, - AcpiDmTableInfoDrtm); - if (ACPI_FAILURE (Status)) - { -@@ -1090,7 +1093,7 @@ AcpiDmDumpDrtm ( - - DrtmVtl = ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST, Table, Offset); - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - DrtmVtl, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST, ValidatedTables), - AcpiDmTableInfoDrtm0); - if (ACPI_FAILURE (Status)) -@@ -1103,10 +1106,11 @@ AcpiDmDumpDrtm ( - /* Dump Validated table addresses */ - - Count = 0; -- while ((Offset < Table->Length) && -- (DrtmVtl->ValidatedTableCount > Count)) -+ ValidatedTableCount = AcpiUtReadUint32 (&DrtmVtl->ValidatedTableCount); -+ while ((Offset < TableLength) && -+ (ValidatedTableCount > Count)) - { -- Status = AcpiDmDumpTable (Table->Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - ACPI_ADD_PTR (void, Table, Offset), sizeof (UINT64), - AcpiDmTableInfoDrtm0a); - if (ACPI_FAILURE (Status)) -@@ -1122,7 +1126,7 @@ AcpiDmDumpDrtm ( - - DrtmRl = ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST, Table, Offset); - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - DrtmRl, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST, Resources), - AcpiDmTableInfoDrtm1); - if (ACPI_FAILURE (Status)) -@@ -1135,10 +1139,11 @@ AcpiDmDumpDrtm ( - /* Dump the Resource List */ - - Count = 0; -- while ((Offset < Table->Length) && -- (DrtmRl->ResourceCount > Count)) -+ ResourceCount = AcpiUtReadUint32 (&DrtmRl->ResourceCount); -+ while ((Offset < TableLength) && -+ (ResourceCount > Count)) - { -- Status = AcpiDmDumpTable (Table->Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - ACPI_ADD_PTR (void, Table, Offset), - sizeof (ACPI_DRTM_RESOURCE), AcpiDmTableInfoDrtm1a); - if (ACPI_FAILURE (Status)) -@@ -1154,7 +1159,7 @@ AcpiDmDumpDrtm ( - - DrtmDps = ACPI_ADD_PTR (ACPI_DRTM_DPS_ID, Table, Offset); - AcpiOsPrintf ("\n"); -- (void) AcpiDmDumpTable (Table->Length, Offset, -+ (void) AcpiDmDumpTable (TableLength, Offset, - DrtmDps, sizeof (ACPI_DRTM_DPS_ID), AcpiDmTableInfoDrtm2); - } - -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -1217,7 +1217,8 @@ DtCompileDrtm ( - Count++; - } - -- DrtmVtl->ValidatedTableCount = Count; -+ AcpiUtWriteUint (&DrtmVtl->ValidatedTableCount, sizeof (UINT32), -+ &Count, sizeof (UINT32)); - DtPopSubtable (); - ParentTable = DtPeekSubtable (); - -@@ -1255,7 +1256,8 @@ DtCompileDrtm ( - Count++; - } - -- DrtmRl->ResourceCount = Count; -+ AcpiUtWriteUint(&DrtmRl->ResourceCount, sizeof(UINT32), -+ &Count, sizeof(UINT32)); - DtPopSubtable (); - ParentTable = DtPeekSubtable (); - diff --git a/0014-Support-EINJ-in-a-big-endian-world.patch b/0014-Support-EINJ-in-a-big-endian-world.patch deleted file mode 100644 index f65e6ff..0000000 --- a/0014-Support-EINJ-in-a-big-endian-world.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 70d1047abe010c80c2dd74f6afdc7005b91e6163 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sat, 19 Sep 2020 15:50:19 -0600 -Subject: [PATCH 14/45] Support EINJ in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1183,7 +1183,7 @@ AcpiDmDumpEinj ( - { - ACPI_STATUS Status; - ACPI_WHEA_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_EINJ); - - -@@ -1198,7 +1198,7 @@ AcpiDmDumpEinj ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, Subtable, diff --git a/0015-Support-ERST-in-a-big-endian-world.patch b/0015-Support-ERST-in-a-big-endian-world.patch deleted file mode 100644 index a6146e2..0000000 --- a/0015-Support-ERST-in-a-big-endian-world.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e588961ca36e70c24aa1c49e96bcd1997bf98f89 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sat, 19 Sep 2020 15:54:56 -0600 -Subject: [PATCH 15/45] Support ERST in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1236,7 +1236,7 @@ AcpiDmDumpErst ( - { - ACPI_STATUS Status; - ACPI_WHEA_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_ERST); - - -@@ -1251,7 +1251,7 @@ AcpiDmDumpErst ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, Subtable, diff --git a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch b/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch deleted file mode 100644 index 1b9b3aa..0000000 --- a/0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch +++ /dev/null @@ -1,189 +0,0 @@ -From b3051bc2bad8988f3ad81a8307de6f1d0eef4ace Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sun, 20 Sep 2020 11:42:21 -0600 -Subject: [PATCH 16/45] Support FADT (aka, FACP) in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump.c | 25 ++++++++++++----------- - source/components/tables/tbfadt.c | 34 +++++++++++++++++++++++-------- - 2 files changed, 38 insertions(+), 21 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump.c -+++ acpica-unix2-20220331/source/common/dmtbdump.c -@@ -417,11 +417,12 @@ AcpiDmDumpFadt ( - ACPI_TABLE_HEADER *Table) - { - ACPI_STATUS Status; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, - AcpiDmTableInfoFadt1); - if (ACPI_FAILURE (Status)) - { -@@ -430,10 +431,10 @@ AcpiDmDumpFadt ( - - /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */ - -- if ((Table->Length > ACPI_FADT_V1_SIZE) && -- (Table->Length <= ACPI_FADT_V2_SIZE)) -+ if ((TableLength > ACPI_FADT_V1_SIZE) && -+ (TableLength <= ACPI_FADT_V2_SIZE)) - { -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, - AcpiDmTableInfoFadt2); - if (ACPI_FAILURE (Status)) - { -@@ -443,9 +444,9 @@ AcpiDmDumpFadt ( - - /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */ - -- else if (Table->Length > ACPI_FADT_V2_SIZE) -+ else if (TableLength > ACPI_FADT_V2_SIZE) - { -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, - AcpiDmTableInfoFadt3); - if (ACPI_FAILURE (Status)) - { -@@ -454,9 +455,9 @@ AcpiDmDumpFadt ( - - /* Check for FADT revision 5 fields and up (ACPI 5.0+) */ - -- if (Table->Length > ACPI_FADT_V3_SIZE) -+ if (TableLength > ACPI_FADT_V3_SIZE) - { -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, - AcpiDmTableInfoFadt5); - if (ACPI_FAILURE (Status)) - { -@@ -466,9 +467,9 @@ AcpiDmDumpFadt ( - - /* Check for FADT revision 6 fields and up (ACPI 6.0+) */ - -- if (Table->Length > ACPI_FADT_V3_SIZE) -+ if (TableLength > ACPI_FADT_V3_SIZE) - { -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, - AcpiDmTableInfoFadt6); - if (ACPI_FAILURE (Status)) - { -@@ -479,11 +480,11 @@ AcpiDmDumpFadt ( - - /* Validate various fields in the FADT, including length */ - -- AcpiTbCreateLocalFadt (Table, Table->Length); -+ AcpiTbCreateLocalFadt (Table, TableLength); - - /* Validate FADT length against the revision */ - -- AcpiDmValidateFadtLength (Table->Revision, Table->Length); -+ AcpiDmValidateFadtLength (Table->Revision, TableLength); - } - - -Index: acpica-unix2-20220331/source/components/tables/tbfadt.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/tables/tbfadt.c -+++ acpica-unix2-20220331/source/components/tables/tbfadt.c -@@ -289,7 +289,6 @@ AcpiTbSelectAddress ( - UINT32 Address32, - UINT64 Address64) - { -- - if (!Address64) - { - /* 64-bit address is zero, use 32-bit address */ -@@ -520,6 +519,9 @@ AcpiTbConvertFadt ( - UINT8 Length; - UINT8 Flags; - UINT32 i; -+ UINT32 Tmp; -+ UINT32 Value32; -+ UINT64 Value64; - - - /* -@@ -533,7 +535,7 @@ AcpiTbConvertFadt ( - * Note: The FADT revision value is unreliable. Only the length can be - * trusted. - */ -- if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V2_SIZE) -+ if (AcpiUtReadUint32 (&AcpiGbl_FADT.Header.Length) <= ACPI_FADT_V2_SIZE) - { - AcpiGbl_FADT.PreferredProfile = 0; - AcpiGbl_FADT.PstateControl = 0; -@@ -546,14 +548,19 @@ AcpiTbConvertFadt ( - * current FADT version as defined by the ACPI specification. - * Thus, we will have a common FADT internally. - */ -- AcpiGbl_FADT.Header.Length = sizeof (ACPI_TABLE_FADT); -+ Tmp = sizeof (ACPI_TABLE_FADT); -+ AcpiUtWriteUint (&AcpiGbl_FADT.Header.Length, sizeof (UINT32), -+ &Tmp, sizeof (UINT32)); - - /* - * Expand the 32-bit DSDT addresses to 64-bit as necessary. - * Later ACPICA code will always use the X 64-bit field. - */ -- AcpiGbl_FADT.XDsdt = AcpiTbSelectAddress ("DSDT", -- AcpiGbl_FADT.Dsdt, AcpiGbl_FADT.XDsdt); -+ Value32 = AcpiUtReadUint32 (&AcpiGbl_FADT.Dsdt); -+ Value64 = AcpiUtReadUint64 (&AcpiGbl_FADT.XDsdt); -+ Value64 = AcpiTbSelectAddress ("DSDT", Value32, Value64); -+ AcpiUtWriteUint (&AcpiGbl_FADT.XDsdt, sizeof (UINT64), -+ &Value64, sizeof (UINT64)); - - /* If Hardware Reduced flag is set, we are all done */ - -@@ -614,7 +621,11 @@ AcpiTbConvertFadt ( - { - if (Address64->Address) - { -- if (Address64->Address != (UINT64) Address32) -+ Value32 = AcpiUtReadUint32 (&Address32); -+ Value64 = AcpiUtReadUint64 (&Address64->Address); -+ -+ /* if (Address64->Address != (UINT64) Address32) */ -+ if (Value64 != (UINT64) Value32) - { - /* Address mismatch */ - -@@ -655,9 +666,10 @@ AcpiTbConvertFadt ( - */ - if (!Address64->Address || AcpiGbl_Use32BitFadtAddresses) - { -+ Value32 = AcpiUtReadUint32 (&Address32); - AcpiTbInitGenericAddress (Address64, - ACPI_ADR_SPACE_SYSTEM_IO, Length, -- (UINT64) Address32, Name, Flags); -+ (UINT64) Value32, Name, Flags); - } - } - -@@ -780,10 +792,14 @@ AcpiTbSetupFadtRegisters ( - - if (Source64->Address) - { -+ UINT64 Address64; -+ -+ Address64 = AcpiUtReadUint64 (&Source64->Address); -+ Address64 += -+ (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth); - AcpiTbInitGenericAddress (FadtPmInfoTable[i].Target, - Source64->SpaceId, Pm1RegisterByteWidth, -- Source64->Address + -- (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth), -+ Address64, - "PmRegisters", 0); - } - } diff --git a/0017-Support-most-FPDTs-in-a-big-endian-world.patch b/0017-Support-most-FPDTs-in-a-big-endian-world.patch deleted file mode 100644 index 41c0019..0000000 --- a/0017-Support-most-FPDTs-in-a-big-endian-world.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 35f533074fb78d52e87c5a14406a136480a6fe62 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 22 Sep 2020 17:51:45 -0600 -Subject: [PATCH 17/45] Support most FPDTs in a big-endian world - -NB: there is no support for vendor specific records even in -the little-endian version. - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 12 +++++++----- - source/compiler/dttable1.c | 4 +++- - 2 files changed, 10 insertions(+), 6 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1289,9 +1289,10 @@ AcpiDmDumpFpdt ( - { - ACPI_STATUS Status; - ACPI_FPDT_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_FPDT); - ACPI_DMTABLE_INFO *InfoTable; -+ UINT16 SubtableType; - - - /* There is no main table (other than the standard ACPI header) */ -@@ -1299,19 +1300,20 @@ AcpiDmDumpFpdt ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Length, AcpiDmTableInfoFpdtHdr); - if (ACPI_FAILURE (Status)) - { - return; - } - -- switch (Subtable->Type) -+ SubtableType = AcpiUtReadUint16 (&Subtable->Type); -+ switch (SubtableType) - { - case ACPI_FPDT_TYPE_BOOT: - -@@ -1338,7 +1340,7 @@ AcpiDmDumpFpdt ( - goto NextSubtable; - } - -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Length, InfoTable); - if (ACPI_FAILURE (Status)) - { -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -1493,6 +1493,7 @@ DtCompileFpdt ( - ACPI_DMTABLE_INFO *InfoTable; - DT_FIELD **PFieldList = (DT_FIELD **) List; - DT_FIELD *SubtableStart; -+ UINT16 SubtableType; - - - while (*PFieldList) -@@ -1511,7 +1512,8 @@ DtCompileFpdt ( - - FpdtHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer); - -- switch (FpdtHeader->Type) -+ SubtableType = AcpiUtReadUint16 (&FpdtHeader->Type); -+ switch (SubtableType) - { - case ACPI_FPDT_TYPE_BOOT: - diff --git a/0018-Support-GTDT-in-a-big-endian-world.patch b/0018-Support-GTDT-in-a-big-endian-world.patch deleted file mode 100644 index 4bdb9bc..0000000 --- a/0018-Support-GTDT-in-a-big-endian-world.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 492e41a24fd088c7ab609ee8ad518f69c9cd29e3 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 22 Sep 2020 18:12:01 -0600 -Subject: [PATCH 18/45] Support GTDT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 13 +++++++++---- - source/compiler/dttable1.c | 9 +++++++-- - 2 files changed, 16 insertions(+), 6 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1376,7 +1376,7 @@ AcpiDmDumpGtdt ( - { - ACPI_STATUS Status; - ACPI_GTDT_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_GTDT); - ACPI_DMTABLE_INFO *InfoTable; - UINT32 SubtableLength; -@@ -1412,7 +1412,7 @@ AcpiDmDumpGtdt ( - - /* Subtables */ - -- while (Offset < Table->Length) -+ while (Offset < Length) - { - /* Common subtable header */ - -@@ -1430,8 +1430,13 @@ AcpiDmDumpGtdt ( - case ACPI_GTDT_TYPE_TIMER_BLOCK: - - SubtableLength = sizeof (ACPI_GTDT_TIMER_BLOCK); -- GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK, -- Subtable))->TimerCount; -+ { -+ UINT32 Tmp32; -+ -+ Tmp32 = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK, -+ Subtable))->TimerCount; -+ GtCount = AcpiUtReadUint32 (&Tmp32); -+ } - - InfoTable = AcpiDmTableInfoGtdt0; - break; -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -1439,8 +1439,13 @@ DtCompileGtdt ( - DtPushSubtable (Subtable); - ParentTable = DtPeekSubtable (); - -- GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK, -- Subtable->Buffer - sizeof(ACPI_GTDT_HEADER)))->TimerCount; -+ { -+ UINT32 Tmp32; -+ -+ Tmp32 = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK, -+ Subtable->Buffer - sizeof (ACPI_GTDT_HEADER)))->TimerCount; -+ GtCount = AcpiUtReadUint32 (&Tmp32); -+ } - - while (GtCount) - { diff --git a/0019-Support-HEST-in-a-big-endian-world.patch b/0019-Support-HEST-in-a-big-endian-world.patch deleted file mode 100644 index e54f2ed..0000000 --- a/0019-Support-HEST-in-a-big-endian-world.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 6b73a4881e436bb8cf86c05c1cc4b5360efe1c7f Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 11:54:49 -0600 -Subject: [PATCH 19/45] Support HEST in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 10 ++++++---- - source/compiler/dttable1.c | 4 +++- - 2 files changed, 9 insertions(+), 5 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1517,12 +1517,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 */ -@@ -1536,10 +1537,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: - -@@ -1606,7 +1608,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-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -1575,6 +1575,7 @@ DtCompileHest ( - DT_FIELD *SubtableStart; - ACPI_DMTABLE_INFO *InfoTable; - UINT16 Type; -+ UINT16 Tmp16; - UINT32 BankCount; - - -@@ -1593,7 +1594,8 @@ DtCompileHest ( - /* Get subtable type */ - - SubtableStart = *PFieldList; -- DtCompileInteger ((UINT8 *) &Type, *PFieldList, 2, 0); -+ DtCompileInteger ((UINT8 *) &Tmp16, *PFieldList, 2, 0); -+ Type = AcpiUtReadUint32 (&Tmp16); - - switch (Type) - { diff --git a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch b/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch deleted file mode 100644 index e47951d..0000000 --- a/0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 198abe6e9fcb03676513146bf2f9b8ccc49e5827 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 12:11:46 -0600 -Subject: [PATCH 20/45] Support RSDT ('RSD PTR') in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump.c -+++ acpica-unix2-20220331/source/common/dmtbdump.c -@@ -336,6 +336,7 @@ AcpiDmDumpRsdt ( - UINT32 Entries; - UINT32 Offset; - UINT32 i; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Point to start of table pointer array */ -@@ -345,12 +346,12 @@ AcpiDmDumpRsdt ( - - /* RSDT uses 32-bit pointers */ - -- Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT32); -+ Entries = (TableLength - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT32); - - for (i = 0; i < Entries; i++) - { - AcpiDmLineHeader2 (Offset, sizeof (UINT32), "ACPI Table Address", i); -- AcpiOsPrintf ("%8.8X\n", Array[i]); -+ AcpiOsPrintf ("%8.8X\n", AcpiUtReadUint32 (&Array[i])); - Offset += sizeof (UINT32); - } - } diff --git a/0021-Support-XSDT-in-a-big-endian-world.patch b/0021-Support-XSDT-in-a-big-endian-world.patch deleted file mode 100644 index 86ca379..0000000 --- a/0021-Support-XSDT-in-a-big-endian-world.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 75d974e42fefabfd6684d62f58bff678b55f396b Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 12:16:37 -0600 -Subject: [PATCH 21/45] Support XSDT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump.c -+++ acpica-unix2-20220331/source/common/dmtbdump.c -@@ -377,6 +377,7 @@ AcpiDmDumpXsdt ( - UINT32 Entries; - UINT32 Offset; - UINT32 i; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Point to start of table pointer array */ -@@ -386,12 +387,13 @@ AcpiDmDumpXsdt ( - - /* XSDT uses 64-bit pointers */ - -- Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64); -+ Entries = (TableLength - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64); - - for (i = 0; i < Entries; i++) - { - AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); -- AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array[i])); -+ AcpiOsPrintf ("%8.8X%8.8X\n", -+ ACPI_FORMAT_UINT64 (AcpiUtReadUint64 (&Array[i]))); - Offset += sizeof (UINT64); - } - } diff --git a/0022-Support-SRAT-in-a-big-endian-world.patch b/0022-Support-SRAT-in-a-big-endian-world.patch deleted file mode 100644 index 0993d26..0000000 --- a/0022-Support-SRAT-in-a-big-endian-world.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 724fcc83d359e4c8abbd2a48755e96049afa06d6 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 12:25:38 -0600 -Subject: [PATCH 22/45] Support SRAT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -173,11 +173,12 @@ AcpiDmDumpSrat ( - UINT32 Offset = sizeof (ACPI_TABLE_SRAT); - ACPI_SUBTABLE_HEADER *Subtable; - ACPI_DMTABLE_INFO *InfoTable; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSrat); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSrat); - if (ACPI_FAILURE (Status)) - { - return; -@@ -186,12 +187,12 @@ AcpiDmDumpSrat ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Length, AcpiDmTableInfoSratHdr); - if (ACPI_FAILURE (Status)) - { -@@ -250,7 +251,7 @@ AcpiDmDumpSrat ( - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Length, InfoTable); - if (ACPI_FAILURE (Status)) - { diff --git a/0023-Support-SLIT-in-a-big-endian-world.patch b/0023-Support-SLIT-in-a-big-endian-world.patch deleted file mode 100644 index 15936a4..0000000 --- a/0023-Support-SLIT-in-a-big-endian-world.patch +++ /dev/null @@ -1,61 +0,0 @@ -From b11d50752feb9f1b52db076d1fb4753b30a53642 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 12:49:52 -0600 -Subject: [PATCH 23/45] Support SLIT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 8 +++++--- - source/compiler/dttable2.c | 2 +- - 2 files changed, 6 insertions(+), 4 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -96,11 +96,12 @@ AcpiDmDumpSlit ( - UINT32 Localities; - UINT32 i; - UINT32 j; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSlit); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSlit); - if (ACPI_FAILURE (Status)) - { - return; -@@ -108,7 +109,8 @@ AcpiDmDumpSlit ( - - /* Display the Locality NxN Matrix */ - -- Localities = (UINT32) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount; -+ Localities = (UINT32) -+ AcpiUtReadUint64 (&ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount); - Offset = ACPI_OFFSET (ACPI_TABLE_SLIT, Entry[0]); - Row = (UINT8 *) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->Entry; - -@@ -121,7 +123,7 @@ AcpiDmDumpSlit ( - { - /* Check for beyond EOT */ - -- if (Offset >= Table->Length) -+ if (Offset >= TableLength) - { - AcpiOsPrintf ( - "\n**** Not enough room in table for all localities\n"); -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -2234,7 +2234,7 @@ DtCompileSlit ( - ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); - -- Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer); -+ Localities = (UINT32) AcpiUtReadUint64 (Subtable->Buffer); - LocalityBuffer = UtLocalCalloc (Localities); - LocalityListLength = 0; - diff --git a/0024-Support-MSCT-in-a-big-endian-world.patch b/0024-Support-MSCT-in-a-big-endian-world.patch deleted file mode 100644 index 5ee3854..0000000 --- a/0024-Support-MSCT-in-a-big-endian-world.patch +++ /dev/null @@ -1,43 +0,0 @@ -From ae38e1578d18abf41330bb3dbaef9ea56a52f49b Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 15:44:21 -0600 -Subject: [PATCH 24/45] Support MSCT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -1185,11 +1185,12 @@ AcpiDmDumpMsct ( - ACPI_STATUS Status; - UINT32 Offset = sizeof (ACPI_TABLE_MSCT); - ACPI_MSCT_PROXIMITY *Subtable; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMsct); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoMsct); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1198,12 +1199,12 @@ AcpiDmDumpMsct ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - sizeof (ACPI_MSCT_PROXIMITY), AcpiDmTableInfoMsct0); - if (ACPI_FAILURE (Status)) - { diff --git a/0025-Support-MPST-in-a-big-endian-world.patch b/0025-Support-MPST-in-a-big-endian-world.patch deleted file mode 100644 index ef704b7..0000000 --- a/0025-Support-MPST-in-a-big-endian-world.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 0a25688f36df62579f4dd0444ceba33a0f8d4dcc Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 23 Sep 2020 16:08:24 -0600 -Subject: [PATCH 25/45] Support MPST in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 33 +++++++++++++++++++-------------- - source/compiler/dttable2.c | 8 ++++---- - 2 files changed, 23 insertions(+), 18 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -1047,11 +1047,13 @@ AcpiDmDumpMpst ( - UINT16 SubtableCount; - UINT32 PowerStateCount; - UINT32 ComponentCount; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); -+ UINT16 Tmp16; - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMpst); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoMpst); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1059,13 +1061,14 @@ AcpiDmDumpMpst ( - - /* Subtable: Memory Power Node(s) */ - -- SubtableCount = (ACPI_CAST_PTR (ACPI_TABLE_MPST, Table))->PowerNodeCount; -+ Tmp16 = (ACPI_CAST_PTR (ACPI_TABLE_MPST, Table))->PowerNodeCount; -+ SubtableCount = AcpiUtReadUint16 (&Tmp16); - Subtable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Table, Offset); - -- while ((Offset < Table->Length) && SubtableCount) -+ while ((Offset < TableLength) && SubtableCount) - { - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable0, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable0, - sizeof (ACPI_MPST_POWER_NODE), AcpiDmTableInfoMpst0); - if (ACPI_FAILURE (Status)) - { -@@ -1074,8 +1077,8 @@ AcpiDmDumpMpst ( - - /* Extract the sub-subtable counts */ - -- PowerStateCount = Subtable0->NumPowerStates; -- ComponentCount = Subtable0->NumPhysicalComponents; -+ PowerStateCount = AcpiUtReadUint16 (&Subtable0->NumPowerStates); -+ ComponentCount = AcpiUtReadUint16 (&Subtable0->NumPhysicalComponents); - Offset += sizeof (ACPI_MPST_POWER_NODE); - - /* Sub-subtables - Memory Power State Structure(s) */ -@@ -1086,7 +1089,7 @@ AcpiDmDumpMpst ( - while (PowerStateCount) - { - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable0A, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable0A, - sizeof (ACPI_MPST_POWER_STATE), AcpiDmTableInfoMpst0A); - if (ACPI_FAILURE (Status)) - { -@@ -1109,7 +1112,7 @@ AcpiDmDumpMpst ( - - while (ComponentCount) - { -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable0B, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable0B, - sizeof (ACPI_MPST_COMPONENT), AcpiDmTableInfoMpst0B); - if (ACPI_FAILURE (Status)) - { -@@ -1126,22 +1129,24 @@ AcpiDmDumpMpst ( - SubtableCount--; - Subtable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Subtable0, - sizeof (ACPI_MPST_POWER_NODE) + -- (sizeof (ACPI_MPST_POWER_STATE) * Subtable0->NumPowerStates) + -- (sizeof (ACPI_MPST_COMPONENT) * Subtable0->NumPhysicalComponents)); -+ (sizeof (ACPI_MPST_POWER_STATE) * -+ AcpiUtReadUint16 (&Subtable0->NumPowerStates)) + -+ (sizeof (ACPI_MPST_COMPONENT) * -+ AcpiUtReadUint16 (&Subtable0->NumPhysicalComponents))); - } - - /* Subtable: Count of Memory Power State Characteristic structures */ - - AcpiOsPrintf ("\n"); - Subtable1 = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, Subtable0); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable1, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable1, - sizeof (ACPI_MPST_DATA_HDR), AcpiDmTableInfoMpst1); - if (ACPI_FAILURE (Status)) - { - return; - } - -- SubtableCount = Subtable1->CharacteristicsCount; -+ SubtableCount = AcpiUtReadUint16 (&Subtable1->CharacteristicsCount); - Offset += sizeof (ACPI_MPST_DATA_HDR); - - /* Subtable: Memory Power State Characteristics structure(s) */ -@@ -1149,10 +1154,10 @@ AcpiDmDumpMpst ( - Subtable2 = ACPI_ADD_PTR (ACPI_MPST_POWER_DATA, Subtable1, - sizeof (ACPI_MPST_DATA_HDR)); - -- while ((Offset < Table->Length) && SubtableCount) -+ while ((Offset < TableLength) && SubtableCount) - { - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable2, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable2, - sizeof (ACPI_MPST_POWER_DATA), AcpiDmTableInfoMpst2); - if (ACPI_FAILURE (Status)) - { -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -359,7 +359,7 @@ DtCompileMpst ( - DtPushSubtable (Subtable); - - MpstChannelInfo = ACPI_CAST_PTR (ACPI_MPST_CHANNEL, Subtable->Buffer); -- SubtableCount = MpstChannelInfo->PowerNodeCount; -+ SubtableCount = AcpiUtReadUint16 (&MpstChannelInfo->PowerNodeCount); - - while (*PFieldList && SubtableCount) - { -@@ -377,8 +377,8 @@ DtCompileMpst ( - DtPushSubtable (Subtable); - - MpstPowerNode = ACPI_CAST_PTR (ACPI_MPST_POWER_NODE, Subtable->Buffer); -- PowerStateCount = MpstPowerNode->NumPowerStates; -- ComponentCount = MpstPowerNode->NumPhysicalComponents; -+ PowerStateCount = AcpiUtReadUint16 (&MpstPowerNode->NumPowerStates); -+ ComponentCount = AcpiUtReadUint16 (&MpstPowerNode->NumPhysicalComponents); - - ParentTable = DtPeekSubtable (); - -@@ -431,7 +431,7 @@ DtCompileMpst ( - DtPushSubtable (Subtable); - - MpstDataHeader = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, Subtable->Buffer); -- SubtableCount = MpstDataHeader->CharacteristicsCount; -+ SubtableCount = AcpiUtReadUint16(&MpstDataHeader->CharacteristicsCount); - - ParentTable = DtPeekSubtable (); - diff --git a/0026-Support-NFIT-in-a-big-endian-world.patch b/0026-Support-NFIT-in-a-big-endian-world.patch deleted file mode 100644 index 6b85634..0000000 --- a/0026-Support-NFIT-in-a-big-endian-world.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 5aec8511fc433a71cb8b6d26be464355d0c3f5cc Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Thu, 24 Sep 2020 15:25:53 -0600 -Subject: [PATCH 26/45] Support NFIT in a big-endian world - -NB: this required correcting the starting pointer for the NFIT -SMBIOS subtable; otherwise, disassembly did not work properly. - -Signed-off-by: Al Stone ---- - source/common/dmtable.c | 4 ++-- - source/common/dmtbdump2.c | 49 ++++++++++++++++++++++---------------- - source/compiler/dttable2.c | 11 ++++++--- - 3 files changed, 39 insertions(+), 25 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtable.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtable.c -+++ acpica-unix2-20220331/source/common/dmtable.c -@@ -1766,13 +1766,13 @@ AcpiDmDumpTable ( - - /* NFIT subtable types */ - -- Temp16 = ACPI_GET16 (Target); -+ Temp16 = AcpiUtReadUint16 (Target); - if (Temp16 > ACPI_NFIT_TYPE_RESERVED) - { - Temp16 = ACPI_NFIT_TYPE_RESERVED; - } - -- AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), -+ AcpiOsPrintf (UINT16_FORMAT, Temp16, - AcpiDmNfitSubnames[Temp16]); - break; - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -1244,18 +1244,23 @@ AcpiDmDumpNfit ( - ACPI_STATUS Status; - UINT32 Offset = sizeof (ACPI_TABLE_NFIT); - UINT32 FieldOffset = 0; -- UINT32 Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - ACPI_NFIT_HEADER *Subtable; - ACPI_DMTABLE_INFO *InfoTable; - ACPI_NFIT_INTERLEAVE *Interleave = NULL; - ACPI_NFIT_SMBIOS *SmbiosInfo = NULL; - ACPI_NFIT_FLUSH_ADDRESS *Hint = NULL; - UINT32 i; -+ UINT32 Length; -+ UINT32 LineCount; -+ UINT16 SubtableLength; -+ UINT16 SubtableType; -+ UINT16 HintCount; - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoNfit); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoNfit); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1264,19 +1269,21 @@ AcpiDmDumpNfit ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_NFIT_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* NFIT subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoNfitHdr); -+ SubtableType = AcpiUtReadUint16 (&Subtable->Type); -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ SubtableLength, AcpiDmTableInfoNfitHdr); - if (ACPI_FAILURE (Status)) - { - return; - } - -- switch (Subtable->Type) -+ switch (SubtableType) - { - case ACPI_NFIT_TYPE_SYSTEM_ADDRESS: - -@@ -1327,11 +1334,11 @@ AcpiDmDumpNfit ( - - default: - AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n", -- Subtable->Type); -+ SubtableType); - - /* Attempt to continue */ - -- if (!Subtable->Length) -+ if (!SubtableLength) - { - AcpiOsPrintf ("Invalid zero length subtable\n"); - return; -@@ -1340,8 +1347,8 @@ AcpiDmDumpNfit ( - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Subtable->Length, InfoTable); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ SubtableLength, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1349,14 +1356,15 @@ AcpiDmDumpNfit ( - - /* Per-subtable variable-length fields */ - -- switch (Subtable->Type) -+ switch (SubtableType) - { - case ACPI_NFIT_TYPE_INTERLEAVE: - - Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable); -- for (i = 0; i < Interleave->LineCount; i++) -+ LineCount = AcpiUtReadUint32 (&Interleave->LineCount); -+ for (i = 0; i < LineCount; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + FieldOffset, - &Interleave->LineOffset[i], - sizeof (UINT32), AcpiDmTableInfoNfit2a); - if (ACPI_FAILURE (Status)) -@@ -1370,14 +1378,14 @@ AcpiDmDumpNfit ( - - case ACPI_NFIT_TYPE_SMBIOS: - -- Length = Subtable->Length - -+ Length = SubtableLength - - sizeof (ACPI_NFIT_SMBIOS) + sizeof (UINT8); - - if (Length) - { -- Status = AcpiDmDumpTable (Table->Length, -+ Status = AcpiDmDumpTable (TableLength, - sizeof (ACPI_NFIT_SMBIOS) - sizeof (UINT8), -- SmbiosInfo, -+ SmbiosInfo + Offset, - Length, AcpiDmTableInfoNfit3a); - if (ACPI_FAILURE (Status)) - { -@@ -1390,9 +1398,10 @@ AcpiDmDumpNfit ( - case ACPI_NFIT_TYPE_FLUSH_ADDRESS: - - Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable); -- for (i = 0; i < Hint->HintCount; i++) -+ HintCount = AcpiUtReadUint16 (&Hint->HintCount); -+ for (i = 0; i < HintCount; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + FieldOffset, - &Hint->HintAddress[i], - sizeof (UINT64), AcpiDmTableInfoNfit6a); - if (ACPI_FAILURE (Status)) -@@ -1411,8 +1420,8 @@ AcpiDmDumpNfit ( - NextSubtable: - /* Point to next subtable */ - -- Offset += Subtable->Length; -- Subtable = ACPI_ADD_PTR (ACPI_NFIT_HEADER, Subtable, Subtable->Length); -+ Offset += SubtableLength; -+ Subtable = ACPI_ADD_PTR (ACPI_NFIT_HEADER, Subtable, SubtableLength); - } - } - -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -506,6 +506,7 @@ DtCompileNfit ( - UINT32 Count; - ACPI_NFIT_INTERLEAVE *Interleave = NULL; - ACPI_NFIT_FLUSH_ADDRESS *Hint = NULL; -+ UINT16 NfitHeaderType; - - - /* Main table */ -@@ -539,7 +540,8 @@ DtCompileNfit ( - - NfitHeader = ACPI_CAST_PTR (ACPI_NFIT_HEADER, Subtable->Buffer); - -- switch (NfitHeader->Type) -+ NfitHeaderType = AcpiUtReadUint16 (&NfitHeader->Type); -+ switch (NfitHeaderType) - { - case ACPI_NFIT_TYPE_SYSTEM_ADDRESS: - -@@ -599,7 +601,7 @@ DtCompileNfit ( - DtInsertSubtable (ParentTable, Subtable); - DtPopSubtable (); - -- switch (NfitHeader->Type) -+ switch (NfitHeaderType) - { - case ACPI_NFIT_TYPE_INTERLEAVE: - -@@ -625,7 +627,8 @@ DtCompileNfit ( - Count++; - } - -- Interleave->LineCount = Count; -+ AcpiUtWriteUint (&Interleave->LineCount, sizeof (UINT32), -+ &Count, sizeof (UINT32)); - break; - - case ACPI_NFIT_TYPE_SMBIOS: -@@ -671,6 +674,8 @@ DtCompileNfit ( - } - - Hint->HintCount = (UINT16) Count; -+ AcpiUtWriteUint (&Hint->HintCount, sizeof (UINT16), -+ &Count, sizeof (UINT32)); - break; - - default: diff --git a/0027-Support-SDEV-in-a-big-endian-world.patch b/0027-Support-SDEV-in-a-big-endian-world.patch deleted file mode 100644 index 680961e..0000000 --- a/0027-Support-SDEV-in-a-big-endian-world.patch +++ /dev/null @@ -1,206 +0,0 @@ -From 3d1ac6e76ad0c0d6454671b190ccbbfafb0cb4cc Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 29 Jun 2021 16:03:36 -0600 -Subject: [PATCH 27/45] Support SDEV in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 48 +++++++++++++++++++++----------------- - source/compiler/dttable2.c | 27 ++++++++++++++++++++- - 2 files changed, 52 insertions(+), 23 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2581,7 +2581,7 @@ AcpiDmDumpSdev ( - ACPI_SDEV_NAMESPACE *Namesp; - ACPI_DMTABLE_INFO *InfoTable; - ACPI_DMTABLE_INFO *SecureComponentInfoTable; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_SDEV); - UINT16 PathOffset; - UINT16 PathLength; -@@ -2589,11 +2589,12 @@ AcpiDmDumpSdev ( - UINT16 VendorDataLength; - ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; - UINT32 CurrentOffset = 0; -+ UINT16 SubtableLength; - - - /* Main table */ - -- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSdev); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoSdev); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2602,13 +2603,14 @@ AcpiDmDumpSdev ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_SDEV_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoSdevHdr); -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ SubtableLength, AcpiDmTableInfoSdevHdr); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2631,8 +2633,8 @@ AcpiDmDumpSdev ( - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, 0, Subtable, -- Subtable->Length, InfoTable); -+ Status = AcpiDmDumpTable (TableLength, 0, Subtable, -+ SubtableLength, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2691,12 +2693,12 @@ AcpiDmDumpSdev ( - /* Dump the PCIe device ID(s) */ - - Namesp = ACPI_CAST_PTR (ACPI_SDEV_NAMESPACE, Subtable); -- PathOffset = Namesp->DeviceIdOffset; -- PathLength = Namesp->DeviceIdLength; -+ PathOffset = AcpiUtReadUint16 (&Namesp->DeviceIdOffset); -+ PathLength = AcpiUtReadUint16 (&Namesp->DeviceIdLength); - - if (PathLength) - { -- Status = AcpiDmDumpTable (Table->Length, CurrentOffset, -+ Status = AcpiDmDumpTable (TableLength, CurrentOffset, - ACPI_ADD_PTR (UINT8, Namesp, PathOffset), - PathLength, AcpiDmTableInfoSdev0a); - if (ACPI_FAILURE (Status)) -@@ -2708,14 +2710,14 @@ AcpiDmDumpSdev ( - - /* Dump the vendor-specific data */ - -- VendorDataLength = -- Namesp->VendorDataLength; -+ VendorDataLength = AcpiUtReadUint16 (&Namesp->VendorDataLength); - VendorDataOffset = -- Namesp->DeviceIdOffset + Namesp->DeviceIdLength; -+ AcpiUtReadUint16 (&Namesp->DeviceIdOffset) + -+ AcpiUtReadUint16 (&Namesp->DeviceIdLength); - - if (VendorDataLength) - { -- Status = AcpiDmDumpTable (Table->Length, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, - ACPI_ADD_PTR (UINT8, Namesp, VendorDataOffset), - VendorDataLength, AcpiDmTableInfoSdev1b); - if (ACPI_FAILURE (Status)) -@@ -2730,12 +2732,12 @@ AcpiDmDumpSdev ( - /* PCI path substructures */ - - Pcie = ACPI_CAST_PTR (ACPI_SDEV_PCIE, Subtable); -- PathOffset = Pcie->PathOffset; -- PathLength = Pcie->PathLength; -+ PathOffset = AcpiUtReadUint16 (&Pcie->PathOffset); -+ PathLength = AcpiUtReadUint16 (&Pcie->PathLength); - - while (PathLength) - { -- Status = AcpiDmDumpTable (Table->Length, -+ Status = AcpiDmDumpTable (TableLength, - PathOffset + Offset, - ACPI_ADD_PTR (UINT8, Pcie, PathOffset), - sizeof (ACPI_SDEV_PCIE_PATH), AcpiDmTableInfoSdev1a); -@@ -2750,12 +2752,14 @@ AcpiDmDumpSdev ( - - /* VendorData */ - -- VendorDataLength = Pcie->VendorDataLength; -- VendorDataOffset = Pcie->PathOffset + Pcie->PathLength; -+ VendorDataLength = AcpiUtReadUint16 (&Pcie->VendorDataLength); -+ VendorDataOffset = -+ AcpiUtReadUint16 (&Pcie->PathOffset) + -+ AcpiUtReadUint16 (&Pcie->PathLength); - - if (VendorDataLength) - { -- Status = AcpiDmDumpTable (Table->Length, 0, -+ Status = AcpiDmDumpTable (TableLength, 0, - ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset), - VendorDataLength, AcpiDmTableInfoSdev1b); - if (ACPI_FAILURE (Status)) -@@ -2772,8 +2776,8 @@ AcpiDmDumpSdev ( - NextSubtable: - /* Point to next subtable */ - -- Offset += Subtable->Length; -+ Offset += SubtableLength; - Subtable = ACPI_ADD_PTR (ACPI_SDEV_HEADER, Subtable, -- Subtable->Length); -+ SubtableLength); - } - } -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -1890,6 +1890,7 @@ DtCompileSdev ( - UINT32 EntryCount; - ACPI_SDEV_SECURE_COMPONENT *SecureComponent = NULL; - UINT16 ComponentLength = 0; -+ UINT16 Tmp16; - - - /* Subtables */ -@@ -1911,7 +1912,7 @@ DtCompileSdev ( - DtPushSubtable (Subtable); - - SdevHeader = ACPI_CAST_PTR (ACPI_SDEV_HEADER, Subtable->Buffer); -- SdevHeader->Length = (UINT8)(sizeof (ACPI_SDEV_HEADER)); -+ SdevHeader->Length = (UINT16) (sizeof (ACPI_SDEV_HEADER)); - - switch (SdevHeader->Type) - { -@@ -2084,6 +2085,18 @@ DtCompileSdev ( - } - } - -+ /* Make sure everything is now little-endian */ -+ Tmp16 = AcpiUtReadUint16 (&SdevHeader->Length); -+ SdevHeader->Length = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Namesp->DeviceIdOffset); -+ Namesp->DeviceIdOffset = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Namesp->DeviceIdLength); -+ Namesp->DeviceIdLength = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Namesp->VendorDataOffset); -+ Namesp->VendorDataOffset = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Namesp->VendorDataLength); -+ Namesp->VendorDataLength = Tmp16; -+ - break; - - case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE: -@@ -2146,6 +2159,18 @@ DtCompileSdev ( - SdevHeader->Length = - sizeof (ACPI_SDEV_PCIE) + - Pcie->PathLength + Pcie->VendorDataLength; -+ -+ Tmp16 = AcpiUtReadUint16 (&SdevHeader->Length); -+ SdevHeader->Length = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Pcie->PathOffset); -+ Pcie->PathOffset = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Pcie->PathLength); -+ Pcie->PathLength = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Pcie->VendorDataOffset); -+ Pcie->VendorDataOffset = Tmp16; -+ Tmp16 = AcpiUtReadUint16 (&Pcie->VendorDataLength); -+ Pcie->VendorDataLength = Tmp16; -+ - break; - - default: diff --git a/0028-Support-HMAT-in-a-big-endian-world.patch b/0028-Support-HMAT-in-a-big-endian-world.patch deleted file mode 100644 index 386db57..0000000 --- a/0028-Support-HMAT-in-a-big-endian-world.patch +++ /dev/null @@ -1,278 +0,0 @@ -From 915b8b70726fd01befdeac0c8630db528ac40552 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 25 Sep 2020 16:56:55 -0600 -Subject: [PATCH 28/45] Support HMAT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 70 ++++++++++++++++++++++---------------- - source/compiler/dttable1.c | 24 ++++++++++--- - 2 files changed, 59 insertions(+), 35 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -1680,37 +1680,45 @@ AcpiDmDumpHmat ( - UINT32 Length; - ACPI_DMTABLE_INFO *InfoTable; - UINT32 i, j; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); -+ UINT16 HmatStructType; -+ UINT32 HmatStructLength; -+ UINT32 InitPDs; -+ UINT32 TgtPDs; -+ UINT16 SMBIOSHandles; - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoHmat); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoHmat); - if (ACPI_FAILURE (Status)) - { - return; - } - Offset = sizeof (ACPI_TABLE_HMAT); - -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - AcpiOsPrintf ("\n"); - - /* Dump HMAT structure header */ - - HmatStruct = ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, Table, Offset); -- if (HmatStruct->Length < sizeof (ACPI_HMAT_STRUCTURE)) -+ HmatStructLength = AcpiUtReadUint32 (&HmatStruct->Length); -+ if (HmatStructLength < sizeof (ACPI_HMAT_STRUCTURE)) - { - AcpiOsPrintf ("Invalid HMAT structure length\n"); - return; - } -- Status = AcpiDmDumpTable (Table->Length, Offset, HmatStruct, -- HmatStruct->Length, AcpiDmTableInfoHmatHdr); -+ Status = AcpiDmDumpTable (TableLength, Offset, HmatStruct, -+ HmatStructLength, AcpiDmTableInfoHmatHdr); - if (ACPI_FAILURE (Status)) - { - return; - } - -- switch (HmatStruct->Type) -+ HmatStructType = AcpiUtReadUint16 (&HmatStruct->Type); -+ switch (HmatStructType) - { - case ACPI_HMAT_TYPE_ADDRESS_RANGE: - -@@ -1733,7 +1741,7 @@ AcpiDmDumpHmat ( - default: - - AcpiOsPrintf ("\n**** Unknown HMAT structure type 0x%X\n", -- HmatStruct->Type); -+ HmatStructType); - - /* Attempt to continue */ - -@@ -1742,13 +1750,13 @@ AcpiDmDumpHmat ( - - /* Dump HMAT structure body */ - -- if (HmatStruct->Length < Length) -+ if (HmatStructLength < Length) - { - AcpiOsPrintf ("Invalid HMAT structure length\n"); - return; - } -- Status = AcpiDmDumpTable (Table->Length, Offset, HmatStruct, -- HmatStruct->Length, InfoTable); -+ Status = AcpiDmDumpTable (TableLength, Offset, HmatStruct, -+ HmatStructLength, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1756,7 +1764,7 @@ AcpiDmDumpHmat ( - - /* Dump HMAT structure additionals */ - -- switch (HmatStruct->Type) -+ switch (HmatStructType) - { - case ACPI_HMAT_TYPE_LOCALITY: - -@@ -1765,15 +1773,16 @@ AcpiDmDumpHmat ( - - /* Dump initiator proximity domains */ - -- if ((UINT32)(HmatStruct->Length - SubtableOffset) < -- (UINT32)(HmatLocality->NumberOfInitiatorPDs * 4)) -+ InitPDs = AcpiUtReadUint32 (&HmatLocality->NumberOfInitiatorPDs); -+ if ((UINT32) (HmatStructLength - SubtableOffset) < -+ (UINT32) (InitPDs * 4)) - { - AcpiOsPrintf ("Invalid initiator proximity domain number\n"); - return; - } -- for (i = 0; i < HmatLocality->NumberOfInitiatorPDs; i++) -+ for (i = 0; i < InitPDs; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + SubtableOffset, - ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), - 4, AcpiDmTableInfoHmat1a); - if (ACPI_FAILURE (Status)) -@@ -1786,15 +1795,16 @@ AcpiDmDumpHmat ( - - /* Dump target proximity domains */ - -- if ((UINT32)(HmatStruct->Length - SubtableOffset) < -- (UINT32)(HmatLocality->NumberOfTargetPDs * 4)) -+ TgtPDs = AcpiUtReadUint32 (&HmatLocality->NumberOfTargetPDs); -+ if ((UINT32) (HmatStructLength - SubtableOffset) < -+ (UINT32) (TgtPDs * 4)) - { - AcpiOsPrintf ("Invalid target proximity domain number\n"); - return; - } -- for (i = 0; i < HmatLocality->NumberOfTargetPDs; i++) -+ for (i = 0; i < TgtPDs; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + SubtableOffset, - ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), - 4, AcpiDmTableInfoHmat1b); - if (ACPI_FAILURE (Status)) -@@ -1807,18 +1817,17 @@ AcpiDmDumpHmat ( - - /* Dump latency/bandwidth entris */ - -- if ((UINT32)(HmatStruct->Length - SubtableOffset) < -- (UINT32)(HmatLocality->NumberOfInitiatorPDs * -- HmatLocality->NumberOfTargetPDs * 2)) -+ if ((UINT32) (HmatStructLength - SubtableOffset) < -+ (UINT32) (InitPDs * TgtPDs * 2)) - { - AcpiOsPrintf ("Invalid latency/bandwidth entry number\n"); - return; - } -- for (i = 0; i < HmatLocality->NumberOfInitiatorPDs; i++) -+ for (i = 0; i < InitPDs; i++) - { -- for (j = 0; j < HmatLocality->NumberOfTargetPDs; j++) -+ for (j = 0; j < TgtPDs; j++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + SubtableOffset, - ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), - 2, AcpiDmTableInfoHmat1c); - if (ACPI_FAILURE(Status)) -@@ -1838,15 +1847,16 @@ AcpiDmDumpHmat ( - - /* Dump SMBIOS handles */ - -- if ((UINT32)(HmatStruct->Length - SubtableOffset) < -- (UINT32)(HmatCache->NumberOfSMBIOSHandles * 2)) -+ SMBIOSHandles = AcpiUtReadUint16 (&HmatCache->NumberOfSMBIOSHandles); -+ if ((UINT32) (HmatStructLength - SubtableOffset) < -+ (UINT32) (SMBIOSHandles * 2)) - { - AcpiOsPrintf ("Invalid SMBIOS handle number\n"); - return; - } -- for (i = 0; i < HmatCache->NumberOfSMBIOSHandles; i++) -+ for (i = 0; i < SMBIOSHandles; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + SubtableOffset, - ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), - 2, AcpiDmTableInfoHmat2a); - if (ACPI_FAILURE (Status)) -@@ -1866,6 +1876,6 @@ AcpiDmDumpHmat ( - NextSubtable: - /* Point to next HMAT structure subtable */ - -- Offset += (HmatStruct->Length); -+ Offset += (HmatStructLength); - } - } -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -1737,6 +1737,8 @@ DtCompileHmat ( - UINT32 TgtPDNumber; - UINT64 EntryNumber; - UINT16 SMBIOSHandleNumber; -+ UINT16 HmatStructType; -+ UINT32 Length; - - - ParentTable = DtPeekSubtable (); -@@ -1767,7 +1769,8 @@ DtCompileHmat ( - - /* Compile HMAT structure body */ - -- switch (HmatStruct->Type) -+ HmatStructType = AcpiUtReadUint16 (&HmatStruct->Type); -+ switch (HmatStructType) - { - case ACPI_HMAT_TYPE_ADDRESS_RANGE: - -@@ -1800,7 +1803,7 @@ DtCompileHmat ( - - /* Compile HMAT structure additionals */ - -- switch (HmatStruct->Type) -+ switch (HmatStructType) - { - case ACPI_HMAT_TYPE_LOCALITY: - -@@ -1826,7 +1829,7 @@ DtCompileHmat ( - HmatStruct->Length += Subtable->Length; - IntPDNumber++; - } -- HmatLocality->NumberOfInitiatorPDs = IntPDNumber; -+ HmatLocality->NumberOfInitiatorPDs = AcpiUtReadUint32 (&IntPDNumber); - - /* Compile target proximity domain list */ - -@@ -1847,7 +1850,7 @@ DtCompileHmat ( - HmatStruct->Length += Subtable->Length; - TgtPDNumber++; - } -- HmatLocality->NumberOfTargetPDs = TgtPDNumber; -+ HmatLocality->NumberOfTargetPDs = AcpiUtReadUint32 (&TgtPDNumber); - - /* Save start of the entries for reporting errors */ - -@@ -1873,6 +1876,9 @@ DtCompileHmat ( - EntryNumber++; - } - -+ Length = AcpiUtReadUint32 (&HmatStruct->Length); -+ HmatStruct->Length = Length; -+ - /* Validate number of entries */ - - if (EntryNumber != -@@ -1906,11 +1912,19 @@ DtCompileHmat ( - HmatStruct->Length += Subtable->Length; - SMBIOSHandleNumber++; - } -- HmatCache->NumberOfSMBIOSHandles = SMBIOSHandleNumber; -+ HmatCache->NumberOfSMBIOSHandles = -+ AcpiUtReadUint16 (&SMBIOSHandleNumber); -+ -+ Length = AcpiUtReadUint32 (&HmatStruct->Length); -+ HmatStruct->Length = Length; -+ - break; - - default: - -+ Length = AcpiUtReadUint32(&HmatStruct->Length); -+ HmatStruct->Length = Length; -+ - break; - } - } diff --git a/0029-Support-PDTT-in-a-big-endian-world.patch b/0029-Support-PDTT-in-a-big-endian-world.patch deleted file mode 100644 index 51e41d1..0000000 --- a/0029-Support-PDTT-in-a-big-endian-world.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 253fe3545e7d4eaa9cb93c771c9619f410109a02 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 25 Sep 2020 17:03:05 -0600 -Subject: [PATCH 29/45] Support PDTT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -1954,13 +1954,13 @@ AcpiDmDumpPdtt ( - { - ACPI_STATUS Status; - ACPI_PDTT_CHANNEL *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_PDTT); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPdtt); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoPdtt); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1969,10 +1969,10 @@ AcpiDmDumpPdtt ( - /* Subtables. Currently there is only one type, but can be multiples */ - - Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - sizeof (ACPI_PDTT_CHANNEL), AcpiDmTableInfoPdtt0); - if (ACPI_FAILURE (Status)) - { diff --git a/0030-Support-PPTT-in-a-big-endian-world.patch b/0030-Support-PPTT-in-a-big-endian-world.patch deleted file mode 100644 index 86fb5cd..0000000 --- a/0030-Support-PPTT-in-a-big-endian-world.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 8923211d8bc1b0e4d3af6ff31ed6479057f612f6 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 25 Sep 2020 17:16:12 -0600 -Subject: [PATCH 30/45] Support PPTT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 17 ++++++++++------- - source/compiler/dttable2.c | 7 +++++-- - 2 files changed, 15 insertions(+), 9 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2241,6 +2241,8 @@ AcpiDmDumpPptt ( - UINT32 Offset = sizeof (ACPI_TABLE_FPDT); - ACPI_DMTABLE_INFO *InfoTable; - UINT32 i; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); -+ UINT32 NumPrivRes; - - - /* There is no main table (other than the standard ACPI header) */ -@@ -2248,7 +2250,7 @@ AcpiDmDumpPptt ( - /* Subtables */ - - Offset = sizeof (ACPI_TABLE_HEADER); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - AcpiOsPrintf ("\n"); - -@@ -2260,7 +2262,7 @@ AcpiDmDumpPptt ( - AcpiOsPrintf ("Invalid subtable length\n"); - return; - } -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Length, AcpiDmTableInfoPpttHdr); - if (ACPI_FAILURE (Status)) - { -@@ -2302,7 +2304,7 @@ AcpiDmDumpPptt ( - AcpiOsPrintf ("Invalid subtable length\n"); - return; - } -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Length, InfoTable); - if (ACPI_FAILURE (Status)) - { -@@ -2318,15 +2320,16 @@ AcpiDmDumpPptt ( - - /* Dump SMBIOS handles */ - -- if ((UINT8)(Subtable->Length - SubtableOffset) < -- (UINT8)(PpttProcessor->NumberOfPrivResources * 4)) -+ NumPrivRes = AcpiUtReadUint32 (&PpttProcessor->NumberOfPrivResources); -+ if ((UINT8) (Subtable->Length - SubtableOffset) < -+ (UINT8) (NumPrivRes * 4)) - { - AcpiOsPrintf ("Invalid private resource number\n"); - return; - } -- for (i = 0; i < PpttProcessor->NumberOfPrivResources; i++) -+ for (i = 0; i < NumPrivRes; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + SubtableOffset, - ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset), - 4, AcpiDmTableInfoPptt0a); - if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -1520,6 +1520,7 @@ DtCompilePptt ( - DT_FIELD **PFieldList = (DT_FIELD **) List; - DT_FIELD *SubtableStart; - ACPI_TABLE_HEADER *PpttAcpiHeader; -+ UINT32 NumPrivRes; - - - ParentTable = DtPeekSubtable (); -@@ -1584,7 +1585,7 @@ DtCompilePptt ( - { - /* Compile initiator proximity domain list */ - -- PpttProcessor->NumberOfPrivResources = 0; -+ NumPrivRes = 0; - while (*PFieldList) - { - Status = DtCompileTable (PFieldList, -@@ -1600,8 +1601,10 @@ DtCompilePptt ( - - DtInsertSubtable (ParentTable, Subtable); - PpttHeader->Length += (UINT8)(Subtable->Length); -- PpttProcessor->NumberOfPrivResources++; -+ NumPrivRes++; - } -+ PpttProcessor->NumberOfPrivResources = -+ AcpiUtReadUint32 (&NumPrivRes); - } - break; - diff --git a/0031-Support-PCCT-in-a-big-endian-world.patch b/0031-Support-PCCT-in-a-big-endian-world.patch deleted file mode 100644 index 6400618..0000000 --- a/0031-Support-PCCT-in-a-big-endian-world.patch +++ /dev/null @@ -1,54 +0,0 @@ -From a58ff76fc6e68488d93b55016a7aeb257971a252 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 25 Sep 2020 17:39:34 -0600 -Subject: [PATCH 31/45] Support PCCT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -1850,13 +1850,13 @@ AcpiDmDumpPcct ( - ACPI_STATUS Status; - ACPI_PCCT_SUBSPACE *Subtable; - ACPI_DMTABLE_INFO *InfoTable; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_PCCT); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPcct); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoPcct); - if (ACPI_FAILURE (Status)) - { - return; -@@ -1865,12 +1865,12 @@ AcpiDmDumpPcct ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Header.Length, AcpiDmTableInfoPcctHdr); - if (ACPI_FAILURE (Status)) - { -@@ -1918,7 +1918,7 @@ AcpiDmDumpPcct ( - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Subtable->Header.Length, InfoTable); - if (ACPI_FAILURE (Status)) - { diff --git a/0032-Support-WDAT-in-a-big-endian-world.patch b/0032-Support-WDAT-in-a-big-endian-world.patch deleted file mode 100644 index 9bf59a7..0000000 --- a/0032-Support-WDAT-in-a-big-endian-world.patch +++ /dev/null @@ -1,43 +0,0 @@ -From ff1449919ee7d395d301e3a56a4ba333604d0458 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 25 Sep 2020 18:13:20 -0600 -Subject: [PATCH 32/45] Support WDAT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -680,11 +680,12 @@ AcpiDmDumpWdat ( - ACPI_STATUS Status; - UINT32 Offset = sizeof (ACPI_TABLE_WDAT); - ACPI_WDAT_ENTRY *Subtable; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWdat); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoWdat); - if (ACPI_FAILURE (Status)) - { - return; -@@ -693,12 +694,12 @@ AcpiDmDumpWdat ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - sizeof (ACPI_WDAT_ENTRY), AcpiDmTableInfoWdat0); - if (ACPI_FAILURE (Status)) - { diff --git a/0033-Support-TCPA-in-a-big-endian-world.patch b/0033-Support-TCPA-in-a-big-endian-world.patch deleted file mode 100644 index bccfb52..0000000 --- a/0033-Support-TCPA-in-a-big-endian-world.patch +++ /dev/null @@ -1,76 +0,0 @@ -From b69b833f5a9205080b27d83379a31fad7fca1575 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Sun, 27 Sep 2020 12:09:28 -0600 -Subject: [PATCH 33/45] Support TCPA in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 13 ++++++++----- - source/compiler/dttable2.c | 4 +++- - 2 files changed, 11 insertions(+), 6 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -406,11 +406,13 @@ AcpiDmDumpTcpa ( - ACPI_TABLE_TCPA_HDR *Subtable = ACPI_ADD_PTR ( - ACPI_TABLE_TCPA_HDR, Table, Offset); - ACPI_STATUS Status; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); -+ UINT16 PlatformClass; - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, -+ Status = AcpiDmDumpTable (TableLength, 0, Table, - 0, AcpiDmTableInfoTcpaHdr); - if (ACPI_FAILURE (Status)) - { -@@ -421,18 +423,19 @@ AcpiDmDumpTcpa ( - * Examine the PlatformClass field to determine the table type. - * Either a client or server table. Only one. - */ -- switch (CommonHeader->PlatformClass) -+ PlatformClass = AcpiUtReadUint16 (&CommonHeader->PlatformClass); -+ switch (PlatformClass) - { - case ACPI_TCPA_CLIENT_TABLE: - -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - Table->Length - Offset, AcpiDmTableInfoTcpaClient); - break; - - case ACPI_TCPA_SERVER_TABLE: - -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Table->Length - Offset, AcpiDmTableInfoTcpaServer); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ TableLength - Offset, AcpiDmTableInfoTcpaServer); - break; - - default: -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -2540,6 +2540,7 @@ DtCompileTcpa ( - ACPI_TABLE_TCPA_HDR *TcpaHeader; - DT_SUBTABLE *ParentTable; - ACPI_STATUS Status; -+ UINT16 PlatformClass; - - - /* Compile the main table */ -@@ -2560,7 +2561,8 @@ DtCompileTcpa ( - */ - TcpaHeader = ACPI_CAST_PTR (ACPI_TABLE_TCPA_HDR, ParentTable->Buffer); - -- switch (TcpaHeader->PlatformClass) -+ PlatformClass = AcpiUtReadUint16 (&TcpaHeader->PlatformClass); -+ switch (PlatformClass) - { - case ACPI_TCPA_CLIENT_TABLE: - diff --git a/0034-Support-STAO-in-a-big-endian-world.patch b/0034-Support-STAO-in-a-big-endian-world.patch deleted file mode 100644 index 45edf5e..0000000 --- a/0034-Support-STAO-in-a-big-endian-world.patch +++ /dev/null @@ -1,40 +0,0 @@ -From c313a76ce818135f02ab158a9f0c8e4b8e96698a Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Mon, 28 Sep 2020 11:49:42 -0600 -Subject: [PATCH 34/45] Support STAO in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -290,14 +290,14 @@ AcpiDmDumpStao ( - { - ACPI_STATUS Status; - char *Namepath; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 StringLength; - UINT32 Offset = sizeof (ACPI_TABLE_STAO); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoStao); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoStao); - if (ACPI_FAILURE (Status)) - { - return; -@@ -305,7 +305,7 @@ AcpiDmDumpStao ( - - /* The rest of the table consists of Namepath strings */ - -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - Namepath = ACPI_ADD_PTR (char, Table, Offset); - StringLength = strlen (Namepath) + 1; diff --git a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch b/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch deleted file mode 100644 index d30b3d6..0000000 --- a/0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 948bebd1a0999bc3481641d3fc996c49432709c6 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Mon, 28 Sep 2020 12:49:23 -0600 -Subject: [PATCH 35/45] Support SLIC and MSDM in a big-endian world - -When dumping the SLIC table, it was also found that the code was -not starting at the proper offset on disassembly. Set the offset -to the first byte after the header instead of the very beginning -of the table. - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -68,9 +68,11 @@ void - AcpiDmDumpSlic ( - ACPI_TABLE_HEADER *Table) - { -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - -- (void) AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), Table, -- Table->Length - sizeof (*Table), AcpiDmTableInfoSlic); -+ (void) AcpiDmDumpTable (TableLength, sizeof (ACPI_TABLE_HEADER), -+ (void *) (Table + sizeof (*Table)), -+ TableLength - sizeof (*Table), AcpiDmTableInfoSlic); - } - - diff --git a/0036-Support-MCFG-in-a-big-endian-world.patch b/0036-Support-MCFG-in-a-big-endian-world.patch deleted file mode 100644 index b8b09eb..0000000 --- a/0036-Support-MCFG-in-a-big-endian-world.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0fb79a24fb70ab1e1e4879220af82a9fa00af586 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Mon, 28 Sep 2020 13:01:18 -0600 -Subject: [PATCH 36/45] Support MCFG in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -982,11 +982,12 @@ AcpiDmDumpMcfg ( - ACPI_STATUS Status; - UINT32 Offset = sizeof (ACPI_TABLE_MCFG); - ACPI_MCFG_ALLOCATION *Subtable; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoMcfg); - if (ACPI_FAILURE (Status)) - { - return; -@@ -995,17 +996,17 @@ AcpiDmDumpMcfg ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { -- if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > Table->Length) -+ if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > TableLength) - { - AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n", -- (UINT32) sizeof (ACPI_MCFG_ALLOCATION) - (Offset - Table->Length)); -+ (UINT32) sizeof (ACPI_MCFG_ALLOCATION) - (Offset - TableLength)); - return; - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - sizeof (ACPI_MCFG_ALLOCATION), AcpiDmTableInfoMcfg0); - if (ACPI_FAILURE (Status)) - { diff --git a/0037-Support-LPIT-in-a-big-endian-world.patch b/0037-Support-LPIT-in-a-big-endian-world.patch deleted file mode 100644 index 11f3ebc..0000000 --- a/0037-Support-LPIT-in-a-big-endian-world.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d10bfd67b5352ff5587e06fc1f82b896bab49614 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Mon, 28 Sep 2020 16:49:30 -0600 -Subject: [PATCH 37/45] Support LPIT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -690,7 +690,7 @@ AcpiDmDumpLpit ( - { - ACPI_STATUS Status; - ACPI_LPIT_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_LPIT); - ACPI_DMTABLE_INFO *InfoTable; - UINT32 SubtableLength; -@@ -699,11 +699,11 @@ AcpiDmDumpLpit ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - sizeof (ACPI_LPIT_HEADER), AcpiDmTableInfoLpitHdr); - if (ACPI_FAILURE (Status)) - { -@@ -727,7 +727,7 @@ AcpiDmDumpLpit ( - return; - } - -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, - SubtableLength, InfoTable); - if (ACPI_FAILURE (Status)) - { diff --git a/0038-Support-PMTT-in-a-big-endian-world.patch b/0038-Support-PMTT-in-a-big-endian-world.patch deleted file mode 100644 index ca3ddc3..0000000 --- a/0038-Support-PMTT-in-a-big-endian-world.patch +++ /dev/null @@ -1,85 +0,0 @@ -From bd19995fa268ed3e93c071162d0e9c2d35ada0d4 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 29 Jun 2021 16:23:30 -0600 -Subject: [PATCH 38/45] Support PMTT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2142,8 +2142,9 @@ AcpiDmDumpPmtt ( - { - ACPI_STATUS Status; - ACPI_PMTT_HEADER *Subtable; -- UINT32 Length = Table->Length; -+ UINT32 Length = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_PMTT); -+ UINT16 SubtableLength; - - - /* Main table */ -@@ -2157,17 +2158,18 @@ AcpiDmDumpPmtt ( - /* Subtables */ - - Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset); -- while (Offset < Table->Length) -+ while (Offset < Length) - { - /* Each of the types below contain the common subtable header */ - - AcpiOsPrintf ("\n"); -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); - switch (Subtable->Type) - { - case ACPI_PMTT_TYPE_SOCKET: - - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoPmtt0); -+ SubtableLength, AcpiDmTableInfoPmtt0); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2176,7 +2178,7 @@ AcpiDmDumpPmtt ( - - case ACPI_PMTT_TYPE_CONTROLLER: - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoPmtt1); -+ SubtableLength, AcpiDmTableInfoPmtt1); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2185,7 +2187,7 @@ AcpiDmDumpPmtt ( - - case ACPI_PMTT_TYPE_DIMM: - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoPmtt2); -+ SubtableLength, AcpiDmTableInfoPmtt2); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2194,7 +2196,7 @@ AcpiDmDumpPmtt ( - - case ACPI_PMTT_TYPE_VENDOR: - Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoPmttVendor); -+ SubtableLength, AcpiDmTableInfoPmttVendor); - if (ACPI_FAILURE (Status)) - { - return; -@@ -2210,9 +2212,9 @@ AcpiDmDumpPmtt ( - - /* Point to next subtable */ - -- Offset += Subtable->Length; -+ Offset += SubtableLength; - Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, -- Subtable, Subtable->Length); -+ Subtable, SubtableLength); - } - } - diff --git a/0039-Support-TPM2-in-a-big-endian-world.patch b/0039-Support-TPM2-in-a-big-endian-world.patch deleted file mode 100644 index 1e26343..0000000 --- a/0039-Support-TPM2-in-a-big-endian-world.patch +++ /dev/null @@ -1,119 +0,0 @@ -From c240ab3af6a4ad4405def7188e3d64da06a69f37 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 30 Sep 2020 18:42:38 -0600 -Subject: [PATCH 39/45] Support TPM2 in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump3.c | 18 ++++++++++-------- - source/compiler/dttable2.c | 8 +++++--- - 2 files changed, 15 insertions(+), 11 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -475,11 +475,12 @@ AcpiDmDumpTpm2Rev3 ( - ACPI_TABLE_TPM23 *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM23, Table); - ACPI_TPM23_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM23_TRAILER, Table, Offset); - ACPI_STATUS Status; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoTpm23); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoTpm23); - if (ACPI_FAILURE (Status)) - { - return; -@@ -491,8 +492,8 @@ AcpiDmDumpTpm2Rev3 ( - { - case ACPI_TPM23_ACPI_START_METHOD: - -- (void) AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Table->Length - Offset, AcpiDmTableInfoTpm23a); -+ (void) AcpiDmDumpTable (TableLength, Offset, Subtable, -+ TableLength - Offset, AcpiDmTableInfoTpm23a); - break; - - default: -@@ -522,6 +523,7 @@ AcpiDmDumpTpm2 ( - ACPI_TPM2_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM2_TRAILER, Table, Offset); - ACPI_TPM2_ARM_SMC *ArmSubtable; - ACPI_STATUS Status; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - if (Table->Revision == 3) -@@ -532,7 +534,7 @@ AcpiDmDumpTpm2 ( - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoTpm2); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoTpm2); - - if (ACPI_FAILURE (Status)) - { -@@ -540,8 +542,8 @@ AcpiDmDumpTpm2 ( - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Table->Length - Offset, AcpiDmTableInfoTpm2a); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ TableLength - Offset, AcpiDmTableInfoTpm2a); - if (ACPI_FAILURE (Status)) - { - return; -@@ -556,8 +558,8 @@ AcpiDmDumpTpm2 ( - Offset += sizeof (ACPI_TPM2_TRAILER); - - AcpiOsPrintf ("\n"); -- (void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable, -- Table->Length - Offset, AcpiDmTableInfoTpm211); -+ (void) AcpiDmDumpTable (TableLength, Offset, ArmSubtable, -+ TableLength - Offset, AcpiDmTableInfoTpm211); - break; - - default: -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -2668,6 +2668,7 @@ DtCompileTpm2 ( - DT_SUBTABLE *ParentTable; - ACPI_STATUS Status = AE_OK; - ACPI_TABLE_HEADER *Header; -+ UINT8 StartMethod; - - - ParentTable = DtPeekSubtable (); -@@ -2711,7 +2712,8 @@ DtCompileTpm2 ( - - /* Subtable type depends on the StartMethod */ - -- switch (Tpm2Header->StartMethod) -+ StartMethod = *(UINT8 *) &Tpm2Header->StartMethod; -+ switch (StartMethod) - { - case ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC: - -@@ -2742,7 +2744,7 @@ DtCompileTpm2 ( - case ACPI_TPM2_RESERVED10: - - AcpiOsPrintf ("\n**** Reserved TPM2 Start Method type 0x%X\n", -- Tpm2Header->StartMethod); -+ StartMethod); - Status = AE_ERROR; - break; - -@@ -2750,7 +2752,7 @@ DtCompileTpm2 ( - default: - - AcpiOsPrintf ("\n**** Unknown TPM2 Start Method type 0x%X\n", -- Tpm2Header->StartMethod); -+ StartMethod); - Status = AE_ERROR; - break; - } diff --git a/0040-Support-S3PT-in-a-big-endian-world.patch b/0040-Support-S3PT-in-a-big-endian-world.patch deleted file mode 100644 index 00678b7..0000000 --- a/0040-Support-S3PT-in-a-big-endian-world.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9fc0e46189feb926b13713422ea2722e273a31b5 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Mon, 19 Oct 2020 17:30:30 -0400 -Subject: [PATCH 40/45] Support S3PT in a big-endian world - ---- - source/common/dmtbdump2.c | 15 +++++++++------ - source/compiler/dttable2.c | 4 +++- - 2 files changed, 12 insertions(+), 7 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2495,6 +2495,8 @@ AcpiDmDumpS3pt ( - ACPI_FPDT_HEADER *Subtable; - ACPI_DMTABLE_INFO *InfoTable; - ACPI_TABLE_S3PT *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables); -+ UINT32 S3ptTableLength = AcpiUtReadUint32 (&S3ptTable->Length); -+ UINT16 SubtableType; - - - /* Main table */ -@@ -2506,19 +2508,20 @@ AcpiDmDumpS3pt ( - } - - Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, S3ptTable, Offset); -- while (Offset < S3ptTable->Length) -+ while (Offset < S3ptTableLength) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (S3ptTable->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (S3ptTableLength, Offset, Subtable, - Subtable->Length, AcpiDmTableInfoS3ptHdr); - if (ACPI_FAILURE (Status)) - { - return 0; - } - -- switch (Subtable->Type) -+ SubtableType = AcpiUtReadUint16 (&Subtable->Type); -+ switch (SubtableType) - { - case ACPI_S3PT_TYPE_RESUME: - -@@ -2533,7 +2536,7 @@ AcpiDmDumpS3pt ( - default: - - AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", -- Subtable->Type); -+ SubtableType); - - /* Attempt to continue */ - -@@ -2546,7 +2549,7 @@ AcpiDmDumpS3pt ( - } - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (S3ptTable->Length, Offset, Subtable, -+ Status = AcpiDmDumpTable (S3ptTableLength, Offset, Subtable, - Subtable->Length, InfoTable); - if (ACPI_FAILURE (Status)) - { -@@ -2560,7 +2563,7 @@ NextSubtable: - Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Subtable, Subtable->Length); - } - -- return (S3ptTable->Length); -+ return (S3ptTableLength); - } - - -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -1803,6 +1803,7 @@ DtCompileS3pt ( - DT_SUBTABLE *ParentTable; - ACPI_DMTABLE_INFO *InfoTable; - DT_FIELD *SubtableStart; -+ UINT16 S3ptHeaderType; - - - Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3pt, -@@ -1830,7 +1831,8 @@ DtCompileS3pt ( - - S3ptHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer); - -- switch (S3ptHeader->Type) -+ S3ptHeaderType = AcpiUtReadUint16 (&S3ptHeader->Type); -+ switch (S3ptHeaderType) - { - case ACPI_S3PT_TYPE_RESUME: - diff --git a/0041-Support-IORT-in-a-big-endian-world.patch b/0041-Support-IORT-in-a-big-endian-world.patch deleted file mode 100644 index 76c9efd..0000000 --- a/0041-Support-IORT-in-a-big-endian-world.patch +++ /dev/null @@ -1,414 +0,0 @@ -From 5bd43bca1708a56d32e63da0278e04caf2865927 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 29 Jun 2021 17:38:20 -0600 -Subject: [PATCH 41/45] Support IORT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 85 ++++++++++++++++++++++---------------- - source/compiler/dttable1.c | 40 ++++++++++-------- - 2 files changed, 72 insertions(+), 53 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -77,17 +77,20 @@ AcpiDmDumpIort ( - ACPI_IORT_RMR *IortRmr = NULL; - UINT32 Offset; - UINT32 NodeOffset; -+ UINT32 NodeLength; - UINT32 Length; - ACPI_DMTABLE_INFO *InfoTable; - char *String; - UINT32 i; - UINT32 MappingByteLength; - UINT8 Revision; -+ UINT32 MappingCount; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoIort); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoIort); - if (ACPI_FAILURE (Status)) - { - return; -@@ -109,18 +112,19 @@ AcpiDmDumpIort ( - - /* Dump the OptionalPadding (optional) */ - -- if (Iort->NodeOffset > Offset) -+ NodeOffset = AcpiUtReadUint32 (&Iort->NodeOffset); -+ if (NodeOffset > Offset) - { -- Status = AcpiDmDumpTable (Table->Length, Offset, Table, -- Iort->NodeOffset - Offset, AcpiDmTableInfoIortPad); -+ Status = AcpiDmDumpTable (TableLength, Offset, Table, -+ NodeOffset - Offset, AcpiDmTableInfoIortPad); - if (ACPI_FAILURE (Status)) - { - return; - } - } - -- Offset = Iort->NodeOffset; -- while (Offset < Table->Length) -+ Offset = AcpiUtReadUint32 (&Iort->NodeOffset); -+ while (Offset < TableLength) - { - /* Common subtable header */ - -@@ -130,12 +134,12 @@ AcpiDmDumpIort ( - - if (Revision == 0) - { -- Status = AcpiDmDumpTable (Table->Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - IortNode, Length, AcpiDmTableInfoIortHdr); - } - else if (Revision >= 3) - { -- Status = AcpiDmDumpTable (Table->Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - IortNode, Length, AcpiDmTableInfoIortHdr3); - } - -@@ -166,7 +170,7 @@ AcpiDmDumpIort ( - case ACPI_IORT_NODE_PCI_ROOT_COMPLEX: - - InfoTable = AcpiDmTableInfoIort2; -- Length = IortNode->Length - NodeOffset; -+ Length = AcpiUtReadUint16 (&IortNode->Length) - NodeOffset; - break; - - case ACPI_IORT_NODE_SMMU: -@@ -179,19 +183,19 @@ AcpiDmDumpIort ( - case ACPI_IORT_NODE_SMMU_V3: - - InfoTable = AcpiDmTableInfoIort4; -- Length = IortNode->Length - NodeOffset; -+ Length = AcpiUtReadUint16 (&IortNode->Length) - NodeOffset; - break; - - case ACPI_IORT_NODE_PMCG: - - InfoTable = AcpiDmTableInfoIort5; -- Length = IortNode->Length - NodeOffset; -+ Length = AcpiUtReadUint16 (&IortNode->Length) - NodeOffset; - break; - - case ACPI_IORT_NODE_RMR: - - InfoTable = AcpiDmTableInfoIort6; -- Length = IortNode->Length - NodeOffset; -+ Length = AcpiUtReadUint16 (&IortNode->Length) - NodeOffset; - IortRmr = ACPI_ADD_PTR (ACPI_IORT_RMR, IortNode, NodeOffset); - break; - -@@ -202,7 +206,7 @@ AcpiDmDumpIort ( - - /* Attempt to continue */ - -- if (!IortNode->Length) -+ if (!AcpiUtReadUint16 (&IortNode->Length)) - { - AcpiOsPrintf ("Invalid zero length IORT node\n"); - return; -@@ -213,7 +217,7 @@ AcpiDmDumpIort ( - /* Dump the node subtable header */ - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - Length, InfoTable); - if (ACPI_FAILURE (Status)) -@@ -233,9 +237,10 @@ AcpiDmDumpIort ( - - if (IortItsGroup) - { -- for (i = 0; i < IortItsGroup->ItsCount; i++) -+ UINT32 ItsCount = AcpiUtReadUint32 (&IortItsGroup->ItsCount); -+ for (i = 0; i < ItsCount; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - 4, AcpiDmTableInfoIort0a); - if (ACPI_FAILURE (Status)) -@@ -252,12 +257,14 @@ AcpiDmDumpIort ( - - /* Dump the Padding (optional) */ - -- if (IortNode->Length > NodeOffset) -+ NodeLength = AcpiUtReadUint16 (&IortNode->Length); -+ if (NodeLength > NodeOffset) - { - MappingByteLength = -- IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING); -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -- Table, IortNode->Length - NodeOffset - MappingByteLength, -+ AcpiUtReadUint32 (&IortNode->MappingCount) * -+ sizeof (ACPI_IORT_ID_MAPPING); -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, -+ Table, NodeLength - NodeOffset - MappingByteLength, - AcpiDmTableInfoIort1a); - if (ACPI_FAILURE (Status)) - { -@@ -274,9 +281,11 @@ AcpiDmDumpIort ( - - if (IortSmmu) - { -+ UINT32 InterruptCount; -+ - Length = 2 * sizeof (UINT64); -- NodeOffset = IortSmmu->GlobalInterruptOffset; -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ NodeOffset = AcpiUtReadUint32 (&IortSmmu->GlobalInterruptOffset); -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - Length, AcpiDmTableInfoIort3a); - if (ACPI_FAILURE (Status)) -@@ -284,10 +293,11 @@ AcpiDmDumpIort ( - return; - } - -- NodeOffset = IortSmmu->ContextInterruptOffset; -- for (i = 0; i < IortSmmu->ContextInterruptCount; i++) -+ NodeOffset = AcpiUtReadUint32 (&IortSmmu->ContextInterruptOffset); -+ InterruptCount = AcpiUtReadUint32 (&IortSmmu->ContextInterruptCount); -+ for (i = 0; i < InterruptCount; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - 8, AcpiDmTableInfoIort3b); - if (ACPI_FAILURE (Status)) -@@ -298,10 +308,11 @@ AcpiDmDumpIort ( - NodeOffset += 8; - } - -- NodeOffset = IortSmmu->PmuInterruptOffset; -- for (i = 0; i < IortSmmu->PmuInterruptCount; i++) -+ NodeOffset = AcpiUtReadUint32 (&IortSmmu->PmuInterruptOffset); -+ InterruptCount = AcpiUtReadUint32 (&IortSmmu->PmuInterruptCount); -+ for (i = 0; i < InterruptCount; i++) - { -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - 8, AcpiDmTableInfoIort3c); - if (ACPI_FAILURE (Status)) -@@ -319,12 +330,15 @@ AcpiDmDumpIort ( - /* Validate IortRmr to avoid compiler warnings */ - if (IortRmr) - { -- NodeOffset = IortRmr->RmrOffset; -+ UINT32 RmrCount; -+ -+ NodeOffset = AcpiUtReadUint32 (&IortRmr->RmrOffset); -+ RmrCount = AcpiUtReadUint32 (&IortRmr->RmrCount); - Length = sizeof (ACPI_IORT_RMR_DESC); -- for (i = 0; i < IortRmr->RmrCount; i++) -+ for (i = 0; i < RmrCount; i++) - { - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - Length, AcpiDmTableInfoIort6a); - if (ACPI_FAILURE (Status)) -@@ -344,12 +358,13 @@ AcpiDmDumpIort ( - - /* Dump the ID mappings */ - -- NodeOffset = IortNode->MappingOffset; -- for (i = 0; i < IortNode->MappingCount; i++) -+ NodeOffset = AcpiUtReadUint32 (&IortNode->MappingOffset); -+ MappingCount = AcpiUtReadUint32 (&IortNode->MappingCount); -+ for (i = 0; i < MappingCount; i++) - { - AcpiOsPrintf ("\n"); - Length = sizeof (ACPI_IORT_ID_MAPPING); -- Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, -+ Status = AcpiDmDumpTable (TableLength, Offset + NodeOffset, - ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), - Length, AcpiDmTableInfoIortMap); - if (ACPI_FAILURE (Status)) -@@ -363,7 +378,7 @@ AcpiDmDumpIort ( - NextSubtable: - /* Point to next node subtable */ - -- Offset += IortNode->Length; -+ Offset += AcpiUtReadUint16 (&IortNode->Length); - } - } - -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -1960,6 +1960,7 @@ DtCompileIort ( - ACPI_IORT_ITS_GROUP *IortItsGroup; - ACPI_IORT_SMMU *IortSmmu; - ACPI_IORT_RMR *IortRmr; -+ UINT32 IortNodeOffset; - UINT32 NodeNumber; - UINT32 NodeLength; - UINT32 IdMappingNumber; -@@ -2005,7 +2006,7 @@ DtCompileIort ( - * Optionally allows the generic data types to be used for filling - * this field. - */ -- Iort->NodeOffset = sizeof (ACPI_TABLE_IORT); -+ IortNodeOffset = sizeof (ACPI_TABLE_IORT); - Status = DtCompileTable (PFieldList, AcpiDmTableInfoIortPad, - &Subtable); - if (ACPI_FAILURE (Status)) -@@ -2015,7 +2016,7 @@ DtCompileIort ( - if (Subtable) - { - DtInsertSubtable (ParentTable, Subtable); -- Iort->NodeOffset += Subtable->Length; -+ IortNodeOffset += Subtable->Length; - } - else - { -@@ -2025,7 +2026,7 @@ DtCompileIort ( - { - return (Status); - } -- Iort->NodeOffset += PaddingLength; -+ IortNodeOffset += PaddingLength; - } - - NodeNumber = 0; -@@ -2089,7 +2090,7 @@ DtCompileIort ( - ItsNumber++; - } - -- IortItsGroup->ItsCount = ItsNumber; -+ IortItsGroup->ItsCount = AcpiUtReadUint32 (&ItsNumber); - break; - - case ACPI_IORT_NODE_NAMED_COMPONENT: -@@ -2123,15 +2124,18 @@ DtCompileIort ( - } - else - { -- if (NodeLength > IortNode->MappingOffset) -+ UINT32 MappingOffset; -+ -+ MappingOffset = IortNode->MappingOffset; -+ if (NodeLength > MappingOffset) - { - return (AE_BAD_DATA); - } - -- if (NodeLength < IortNode->MappingOffset) -+ if (NodeLength < MappingOffset) - { - Status = DtCompilePadding ( -- IortNode->MappingOffset - NodeLength, -+ MappingOffset - NodeLength, - &Subtable); - if (ACPI_FAILURE (Status)) - { -@@ -2139,7 +2143,7 @@ DtCompileIort ( - } - - DtInsertSubtable (ParentTable, Subtable); -- NodeLength = IortNode->MappingOffset; -+ NodeLength = MappingOffset; - } - } - break; -@@ -2172,7 +2176,7 @@ DtCompileIort ( - - /* Compile global interrupt array */ - -- IortSmmu->GlobalInterruptOffset = NodeLength; -+ IortSmmu->GlobalInterruptOffset = AcpiUtReadUint32 (&NodeLength); - Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3a, - &Subtable); - if (ACPI_FAILURE (Status)) -@@ -2186,7 +2190,7 @@ DtCompileIort ( - /* Compile context interrupt array */ - - ContextIrptNumber = 0; -- IortSmmu->ContextInterruptOffset = NodeLength; -+ IortSmmu->ContextInterruptOffset = AcpiUtReadUint32 (&NodeLength); - while (*PFieldList) - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3b, -@@ -2206,12 +2210,12 @@ DtCompileIort ( - ContextIrptNumber++; - } - -- IortSmmu->ContextInterruptCount = ContextIrptNumber; -+ IortSmmu->ContextInterruptCount = AcpiUtReadUint32 (&ContextIrptNumber); - - /* Compile PMU interrupt array */ - - PmuIrptNumber = 0; -- IortSmmu->PmuInterruptOffset = NodeLength; -+ IortSmmu->PmuInterruptOffset = AcpiUtReadUint32 (&NodeLength); - while (*PFieldList) - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort3c, -@@ -2231,7 +2235,7 @@ DtCompileIort ( - PmuIrptNumber++; - } - -- IortSmmu->PmuInterruptCount = PmuIrptNumber; -+ IortSmmu->PmuInterruptCount = AcpiUtReadUint32 (&PmuIrptNumber); - break; - - case ACPI_IORT_NODE_SMMU_V3: -@@ -2276,7 +2280,7 @@ DtCompileIort ( - /* Compile RMR Descriptors */ - - RmrCount = 0; -- IortRmr->RmrOffset = NodeLength; -+ IortRmr->RmrOffset = AcpiUtReadUint32 (&NodeLength); - while (*PFieldList) - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort6a, -@@ -2296,7 +2300,7 @@ DtCompileIort ( - RmrCount++; - } - -- IortRmr->RmrCount = RmrCount; -+ IortRmr->RmrCount = AcpiUtReadUint32 (&RmrCount); - break; - - default: -@@ -2307,7 +2311,7 @@ DtCompileIort ( - - /* Compile Array of ID mappings */ - -- IortNode->MappingOffset = NodeLength; -+ IortNode->MappingOffset = AcpiUtReadUint32 (&NodeLength); - IdMappingNumber = 0; - while (*PFieldList) - { -@@ -2328,7 +2332,7 @@ DtCompileIort ( - IdMappingNumber++; - } - -- IortNode->MappingCount = IdMappingNumber; -+ IortNode->MappingCount = AcpiUtReadUint32 (&IdMappingNumber); - if (!IdMappingNumber) - { - IortNode->MappingOffset = 0; -@@ -2343,7 +2347,7 @@ DtCompileIort ( - NodeNumber++; - } - -- Iort->NodeCount = NodeNumber; -+ Iort->NodeCount = AcpiUtReadUint32 (&NodeNumber); - return (AE_OK); - } - diff --git a/0042-Support-IVRS-in-a-big-endian-world.patch b/0042-Support-IVRS-in-a-big-endian-world.patch deleted file mode 100644 index 9d0a88f..0000000 --- a/0042-Support-IVRS-in-a-big-endian-world.patch +++ /dev/null @@ -1,138 +0,0 @@ -From b64cff82b2b33ed659826d777d2db039f64fd198 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 29 Jun 2021 17:45:24 -0600 -Subject: [PATCH 42/45] Support IVRS in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 34 +++++++++++++++++++--------------- - 1 file changed, 19 insertions(+), 15 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -419,11 +419,14 @@ AcpiDmDumpIvrs ( - ACPI_IVRS_DE_HEADER *DeviceEntry; - ACPI_IVRS_HEADER *Subtable; - ACPI_DMTABLE_INFO *InfoTable; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); -+ UINT16 SubtableLength; -+ - - - /* Main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoIvrs); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoIvrs); - if (ACPI_FAILURE (Status)) - { - return; -@@ -433,8 +436,9 @@ AcpiDmDumpIvrs ( - - Subtable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Table, Offset); - -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); - switch (Subtable->Type) - { - /* Type 10h, IVHD (I/O Virtualization Hardware Definition) */ -@@ -471,7 +475,7 @@ AcpiDmDumpIvrs ( - - /* Attempt to continue */ - -- if (!Subtable->Length) -+ if (!SubtableLength) - { - AcpiOsPrintf ("Invalid zero length subtable\n"); - return; -@@ -481,8 +485,8 @@ AcpiDmDumpIvrs ( - - /* Dump the subtable */ - -- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, -- Subtable->Length, InfoTable); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ SubtableLength, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; -@@ -511,7 +515,7 @@ AcpiDmDumpIvrs ( - - /* Process all of the Device Entries */ - -- while (EntryOffset < (Offset + Subtable->Length)) -+ while (EntryOffset < (Offset + SubtableLength)) - { - AcpiOsPrintf ("\n"); - -@@ -581,7 +585,7 @@ AcpiDmDumpIvrs ( - - /* Dump the Device Entry */ - -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - DeviceEntry, EntryLength, InfoTable); - if (ACPI_FAILURE (Status)) - { -@@ -605,12 +609,12 @@ AcpiDmDumpIvrs ( - */ - if (UtIsIdInteger ((UINT8 *) &HidSubtable->AcpiHid)) - { -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - &HidSubtable->AcpiHid, 8, AcpiDmTableInfoIvrsHidInteger); - } - else - { -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - &HidSubtable->AcpiHid, 8, AcpiDmTableInfoIvrsHidString); - } - if (ACPI_FAILURE (Status)) -@@ -628,12 +632,12 @@ AcpiDmDumpIvrs ( - */ - if (UtIsIdInteger ((UINT8 *) &HidSubtable->AcpiCid)) - { -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - &HidSubtable->AcpiCid, 8, AcpiDmTableInfoIvrsCidInteger); - } - else - { -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - &HidSubtable->AcpiCid, 8, AcpiDmTableInfoIvrsCidString); - } - if (ACPI_FAILURE (Status)) -@@ -650,7 +654,7 @@ AcpiDmDumpIvrs ( - - if (HidSubtable->UidType == ACPI_IVRS_UID_IS_STRING) - { -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - &HidSubtable->UidType, EntryLength, AcpiDmTableInfoIvrsUidString); - if (ACPI_FAILURE (Status)) - { -@@ -659,7 +663,7 @@ AcpiDmDumpIvrs ( - } - else /* ACPI_IVRS_UID_IS_INTEGER */ - { -- Status = AcpiDmDumpTable (Table->Length, EntryOffset, -+ Status = AcpiDmDumpTable (TableLength, EntryOffset, - &HidSubtable->UidType, EntryLength, AcpiDmTableInfoIvrsUidInteger); - if (ACPI_FAILURE (Status)) - { -@@ -678,8 +682,8 @@ AcpiDmDumpIvrs ( - NextSubtable: - /* Point to next subtable */ - -- Offset += Subtable->Length; -- Subtable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Subtable, Subtable->Length); -+ Offset += SubtableLength; -+ Subtable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Subtable, SubtableLength); - } - } - diff --git a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch b/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch deleted file mode 100644 index 777f74a..0000000 --- a/0043-Support-DSDT-SSDT-in-a-big-endian-world.patch +++ /dev/null @@ -1,3171 +0,0 @@ -From 14d220a34462e61fe69141c86f4c3cd2ae68c279 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 30 Sep 2020 18:59:57 -0600 -Subject: [PATCH 43/45] Support DSDT/SSDT in a big-endian world. - -NB: this is a very large diff. The problem is that ResourceTemplates -are treated differently during compilation and disassembly so each of -the resource types had code that needed to be touched directly. - -In general, however, just reading or writing individual AML opcodes -wasn't that much of a change, and most of it was on the codegen side. - -Signed-off-by: Al Stone ---- - source/common/adwalk.c | 3 +- - source/common/dmrestag.c | 2 +- - source/common/dmtables.c | 17 +- - source/common/dmtbdump.c | 3 +- - source/common/dmtbdump3.c | 8 +- - source/compiler/aslcodegen.c | 59 ++++-- - source/compiler/aslopcodes.c | 3 +- - source/compiler/aslrestype1.c | 60 ++++-- - source/compiler/aslrestype1i.c | 35 ++-- - source/compiler/aslrestype2.c | 20 +- - source/compiler/aslrestype2d.c | 99 ++++++---- - source/compiler/aslrestype2e.c | 90 ++++++--- - source/compiler/aslrestype2q.c | 81 +++++--- - source/compiler/aslrestype2s.c | 214 +++++++++++++++++---- - source/compiler/aslrestype2w.c | 94 +++++---- - source/compiler/dttable2.c | 3 +- - source/components/disassembler/dmbuffer.c | 37 +++- - source/components/disassembler/dmopcode.c | 21 +- - source/components/disassembler/dmresrc.c | 2 +- - source/components/disassembler/dmresrcl.c | 43 +++-- - source/components/disassembler/dmresrcl2.c | 128 +++++++----- - source/components/disassembler/dmresrcs.c | 18 +- - source/components/disassembler/dmwalk.c | 2 +- - source/components/namespace/nsaccess.c | 2 +- - source/components/namespace/nsnames.c | 4 +- - source/components/namespace/nsparse.c | 6 +- - source/components/namespace/nsutils.c | 7 +- - source/components/utilities/utresrc.c | 2 +- - 28 files changed, 721 insertions(+), 341 deletions(-) - -Index: acpica-unix2-20220331/source/common/adwalk.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/adwalk.c -+++ acpica-unix2-20220331/source/common/adwalk.c -@@ -679,7 +679,8 @@ AcpiDmLoadDescendingOp ( - - if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) - { -- *ACPI_CAST_PTR (UINT32, &FieldPath[0]) = Op->Named.Name; -+ AcpiUtWriteUint (FieldPath, ACPI_NAMESEG_SIZE, -+ &Op->Named.Name, ACPI_NAMESEG_SIZE); - FieldPath[4] = 0; - Path = FieldPath; - } -Index: acpica-unix2-20220331/source/common/dmrestag.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmrestag.c -+++ acpica-unix2-20220331/source/common/dmrestag.c -@@ -1048,7 +1048,7 @@ AcpiDmAddResourcesToNamespace ( - * NextOp contains the Aml pointer and the Aml length - */ - AcpiUtWalkAmlResources (NULL, (UINT8 *) NextOp->Named.Data, -- (ACPI_SIZE) NextOp->Common.Value.Integer, -+ (ACPI_SIZE) NextOp->Common.Value.Size, - AcpiDmAddResourceToNamespace, (void **) BufferNode); - } - -Index: acpica-unix2-20220331/source/common/dmtables.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtables.c -+++ acpica-unix2-20220331/source/common/dmtables.c -@@ -142,6 +142,10 @@ AdCreateTableHeader ( - ACPI_TABLE_HEADER *Table) - { - UINT8 Checksum; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); -+ UINT32 OemRevision = AcpiUtReadUint32 (&Table->OemRevision); -+ UINT32 CompilerRevision = -+ AcpiUtReadUint32 (&Table->AslCompilerRevision); - - - /* Reset globals for External statements */ -@@ -156,7 +160,7 @@ AdCreateTableHeader ( - - AcpiOsPrintf (" * Original Table Header:\n"); - AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature); -- AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length); -+ AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", TableLength, TableLength); - - /* Print and validate the revision */ - -@@ -188,7 +192,7 @@ AdCreateTableHeader ( - - AcpiOsPrintf ("\n * Checksum 0x%2.2X", Table->Checksum); - -- Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length); -+ Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), TableLength); - if (Checksum) - { - AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X", -@@ -198,9 +202,9 @@ AdCreateTableHeader ( - AcpiOsPrintf ("\n"); - AcpiOsPrintf (" * OEM ID \"%.6s\"\n", Table->OemId); - AcpiOsPrintf (" * OEM Table ID \"%.8s\"\n", Table->OemTableId); -- AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision); -+ AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", OemRevision, OemRevision); - AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId); -- AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision); -+ AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", CompilerRevision, CompilerRevision); - AcpiOsPrintf (" */\n"); - - /* -@@ -221,7 +225,7 @@ AdCreateTableHeader ( - AcpiOsPrintf ( - "DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n", - Table->Signature, Table->Revision, -- Table->OemId, Table->OemTableId, Table->OemRevision); -+ Table->OemId, Table->OemTableId, OemRevision); - } - - -@@ -396,7 +400,8 @@ AdParseTable ( - - fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature); - -- AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER); -+ AmlLength = AcpiUtReadUint32 (&Table->Length); -+ AmlLength -= sizeof (ACPI_TABLE_HEADER); - AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); - - AcpiUtSetIntegerWidth (Table->Revision); -Index: acpica-unix2-20220331/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump.c -+++ acpica-unix2-20220331/source/common/dmtbdump.c -@@ -392,8 +392,7 @@ AcpiDmDumpXsdt ( - for (i = 0; i < Entries; i++) - { - AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); -- AcpiOsPrintf ("%8.8X%8.8X\n", -- ACPI_FORMAT_UINT64 (AcpiUtReadUint64 (&Array[i]))); -+ AcpiOsPrintf ("%16.16lX\n", AcpiUtReadUint64 (&Array[i])); - Offset += sizeof (UINT64); - } - } -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -741,12 +741,13 @@ AcpiDmDumpWpbt ( - { - ACPI_STATUS Status; - ACPI_TABLE_WPBT *Subtable; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT16 ArgumentsLength; - - - /* Dump the main table */ - -- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWpbt); -+ Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoWpbt); - if (ACPI_FAILURE (Status)) - { - return; -@@ -755,13 +756,13 @@ AcpiDmDumpWpbt ( - /* Extract the arguments buffer length from the main table */ - - Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); -- ArgumentsLength = Subtable->ArgumentsLength; -+ ArgumentsLength = AcpiUtReadUint16 (&Subtable->ArgumentsLength); - - /* Dump the arguments buffer if present */ - - if (ArgumentsLength) - { -- (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength, -+ (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength, - AcpiDmTableInfoWpbt0); - } - } -Index: acpica-unix2-20220331/source/compiler/aslcodegen.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslcodegen.c -+++ acpica-unix2-20220331/source/compiler/aslcodegen.c -@@ -238,6 +238,10 @@ CgWriteAmlOpcode ( - { - UINT8 PkgLenFirstByte; - UINT32 i; -+ UINT8 Tmp8; -+ UINT16 Tmp16; -+ UINT32 Tmp32; -+ UINT64 Tmp64; - union { - UINT16 Opcode; - UINT8 OpcodeBytes[2]; -@@ -312,14 +316,15 @@ CgWriteAmlOpcode ( - - /* Check for two-byte opcode */ - -+ Tmp16 = AcpiUtReadUint16 (&Aml.Opcode); - if (Aml.Opcode > 0x00FF) - { - /* Write the high byte first */ - -- CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1); -+ CgLocalWriteAmlData (Op, ((UINT8 *) &Tmp16)+1, 1); - } - -- CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1); -+ CgLocalWriteAmlData (Op, (UINT8 *) &Tmp16, 1); - - /* Subtreelength doesn't include length of package length bytes */ - -@@ -335,7 +340,8 @@ CgWriteAmlOpcode ( - { - /* Simplest case -- no bytes to follow, just write the count */ - -- CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1); -+ Tmp8 = (UINT8) PkgLen.Len; -+ CgLocalWriteAmlData (Op, &Tmp8, 1); - } - else if (Op->Asl.AmlPkgLenBytes != 0) - { -@@ -343,9 +349,10 @@ CgWriteAmlOpcode ( - * Encode the "bytes to follow" in the first byte, top two bits. - * The low-order nybble of the length is in the bottom 4 bits - */ -+ Tmp8 = (UINT8) PkgLen.Len; - PkgLenFirstByte = (UINT8) - (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) | -- (PkgLen.LenBytes[0] & 0x0F)); -+ (Tmp8 & 0x0F)); - - CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1); - -@@ -359,6 +366,9 @@ CgWriteAmlOpcode ( - * Now we can write the remaining bytes - - * either 1, 2, or 3 bytes - */ -+ Tmp32 = PkgLen.Len; -+ AcpiUtWriteUint (&PkgLen.Len, Op->Asl.AmlPkgLenBytes, -+ &Tmp32, sizeof (UINT32)); - for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++) - { - CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1); -@@ -370,22 +380,30 @@ CgWriteAmlOpcode ( - { - case AML_BYTE_OP: - -- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1); -+ Tmp64 = 0; -+ AcpiUtWriteUint (&Tmp64, 1, &Op->Asl.Value.Integer, 8); -+ CgLocalWriteAmlData (Op, &Tmp64, 1); - break; - - case AML_WORD_OP: - -- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2); -- break; -+ Tmp64 = 0; -+ AcpiUtWriteUint (&Tmp64, 2, &Op->Asl.Value.Integer, 8); -+ CgLocalWriteAmlData (Op, &Tmp64, 2); -+ break; - - case AML_DWORD_OP: - -- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4); -+ Tmp64 = 0; -+ AcpiUtWriteUint (&Tmp64, 4, &Op->Asl.Value.Integer, 8); -+ CgLocalWriteAmlData (Op, &Tmp64, 4); - break; - - case AML_QWORD_OP: - -- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8); -+ Tmp64 = 0; -+ AcpiUtWriteUint (&Tmp64, 8, &Op->Asl.Value.Integer, 8); -+ CgLocalWriteAmlData (Op, &Tmp64, 8); - break; - - case AML_STRING_OP: -@@ -423,6 +441,7 @@ CgWriteTableHeader ( - ACPI_PARSE_OBJECT *Child; - UINT32 CommentLength; - ACPI_COMMENT_NODE *Current; -+ UINT32 Tmp32; - - - memset (&AslGbl_TableHeader, 0, sizeof (ACPI_TABLE_HEADER)); -@@ -478,7 +497,9 @@ CgWriteTableHeader ( - /* OEM Revision */ - - Child = Child->Asl.Next; -- AslGbl_TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer; -+ AcpiUtWriteUint (&Tmp32, sizeof (UINT32), -+ &Child->Asl.Value.Integer, sizeof (Child->Asl.Value.Integer)); -+ AslGbl_TableHeader.OemRevision = Tmp32; - - /* Compiler ID */ - -@@ -486,7 +507,8 @@ CgWriteTableHeader ( - - /* Compiler version */ - -- AslGbl_TableHeader.AslCompilerRevision = ACPI_CA_VERSION; -+ Tmp32 = ACPI_CA_VERSION; -+ AslGbl_TableHeader.AslCompilerRevision = AcpiUtReadUint32 (&Tmp32); - - /* Table length. Checksum zero for now, will rewrite later */ - -@@ -541,6 +563,15 @@ CgWriteTableHeader ( - AslGbl_TableHeader.Checksum = 0; - Op->Asl.FinalAmlOffset = ftell (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle); - -+ /* -+ * Adjust the Table length; it will only change when big-endian -+ * but we have to wait until here in case there is arithmetic to -+ * be done on the length before this step in the function -+ */ -+ -+ Tmp32 = AslGbl_TableHeader.Length; -+ AslGbl_TableHeader.Length = AcpiUtReadUint32 (&Tmp32); -+ - /* Write entire header and clear the table header global */ - - CgLocalWriteAmlData (Op, &AslGbl_TableHeader, sizeof (ACPI_TABLE_HEADER)); -@@ -625,6 +656,7 @@ CgWriteNode ( - ACPI_PARSE_OBJECT *Op) - { - ASL_RESOURCE_NODE *Rnode; -+ UINT64 Tmp64; - - - /* Write all comments here. */ -@@ -653,7 +685,10 @@ CgWriteNode ( - case AML_RAW_DATA_DWORD: - case AML_RAW_DATA_QWORD: - -- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength); -+ Tmp64 = 0; -+ AcpiUtWriteUint (&Tmp64, Op->Asl.AmlLength, -+ &Op->Asl.Value.Integer, sizeof (UINT64)); -+ CgLocalWriteAmlData (Op, &Tmp64, Op->Asl.AmlLength); - return; - - -Index: acpica-unix2-20220331/source/compiler/aslopcodes.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslopcodes.c -+++ acpica-unix2-20220331/source/compiler/aslopcodes.c -@@ -511,7 +511,8 @@ OpcDoUnicode ( - - for (i = 0; i < Count; i++) - { -- UnicodeString[i] = (UINT16) AsciiString[i]; -+ AcpiUtWriteUint (&UnicodeString[i], sizeof (UINT16), -+ &AsciiString[i], sizeof (UINT8)); - } - - /* -Index: acpica-unix2-20220331/source/compiler/aslrestype1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype1.c -+++ acpica-unix2-20220331/source/compiler/aslrestype1.c -@@ -143,6 +143,7 @@ RsDoMemory24Descriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -151,7 +152,8 @@ RsDoMemory24Descriptor ( - - Descriptor = Rnode->Buffer; - Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24; -- Descriptor->Memory24.ResourceLength = 9; -+ Tmp16 = 9; -+ Descriptor->Memory24.ResourceLength = AcpiUtReadUint16 (&Tmp16); - - /* Process all child initialization nodes */ - -@@ -168,7 +170,8 @@ RsDoMemory24Descriptor ( - - case 1: /* Min Address */ - -- Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory24.Minimum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum)); - MinOp = InitializerOp; -@@ -176,7 +179,8 @@ RsDoMemory24Descriptor ( - - case 2: /* Max Address */ - -- Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory24.Maximum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum)); - MaxOp = InitializerOp; -@@ -184,14 +188,16 @@ RsDoMemory24Descriptor ( - - case 3: /* Alignment */ - -- Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory24.Alignment = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment)); - break; - - case 4: /* Length */ - -- Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory24.AddressLength = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength)); - LengthOp = InitializerOp; -@@ -214,10 +220,10 @@ RsDoMemory24Descriptor ( - /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */ - - RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24, -- Descriptor->Memory24.Minimum, -- Descriptor->Memory24.Maximum, -- Descriptor->Memory24.AddressLength, -- Descriptor->Memory24.Alignment, -+ (UINT32) AcpiUtReadUint16 (&Descriptor->Memory24.Minimum), -+ (UINT32) AcpiUtReadUint16 (&Descriptor->Memory24.Maximum), -+ (UINT32) AcpiUtReadUint16 (&Descriptor->Memory24.AddressLength), -+ (UINT32) AcpiUtReadUint16 (&Descriptor->Memory24.Alignment), - MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp); - - return (Rnode); -@@ -249,6 +255,8 @@ RsDoMemory32Descriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -257,7 +265,8 @@ RsDoMemory32Descriptor ( - - Descriptor = Rnode->Buffer; - Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32; -- Descriptor->Memory32.ResourceLength = 17; -+ Tmp16 = 17; -+ Descriptor->Memory32.ResourceLength = AcpiUtReadUint16 (&Tmp16); - - /* Process all child initialization nodes */ - -@@ -274,7 +283,8 @@ RsDoMemory32Descriptor ( - - case 1: /* Min Address */ - -- Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory32.Minimum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum)); - MinOp = InitializerOp; -@@ -282,7 +292,8 @@ RsDoMemory32Descriptor ( - - case 2: /* Max Address */ - -- Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory32.Maximum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum)); - MaxOp = InitializerOp; -@@ -290,7 +301,8 @@ RsDoMemory32Descriptor ( - - case 3: /* Alignment */ - -- Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory32.Alignment = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment)); - AlignOp = InitializerOp; -@@ -298,7 +310,8 @@ RsDoMemory32Descriptor ( - - case 4: /* Length */ - -- Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Memory32.AddressLength = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength)); - LengthOp = InitializerOp; -@@ -321,10 +334,10 @@ RsDoMemory32Descriptor ( - /* Validate the Min/Max/Len/Align values */ - - RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32, -- Descriptor->Memory32.Minimum, -- Descriptor->Memory32.Maximum, -- Descriptor->Memory32.AddressLength, -- Descriptor->Memory32.Alignment, -+ AcpiUtReadUint32 (&Descriptor->Memory32.Minimum), -+ AcpiUtReadUint32 (&Descriptor->Memory32.Maximum), -+ AcpiUtReadUint32 (&Descriptor->Memory32.AddressLength), -+ AcpiUtReadUint32 (&Descriptor->Memory32.Alignment), - MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp); - - return (Rnode); -@@ -352,6 +365,8 @@ RsDoMemory32FixedDescriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -360,7 +375,8 @@ RsDoMemory32FixedDescriptor ( - - Descriptor = Rnode->Buffer; - Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32; -- Descriptor->FixedMemory32.ResourceLength = 9; -+ Tmp16 = 9; -+ Descriptor->FixedMemory32.ResourceLength = AcpiUtReadUint16 (&Tmp16); - - /* Process all child initialization nodes */ - -@@ -377,14 +393,16 @@ RsDoMemory32FixedDescriptor ( - - case 1: /* Address */ - -- Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->FixedMemory32.Address = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS, - CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address)); - break; - - case 2: /* Length */ - -- Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->FixedMemory32.AddressLength = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); - break; -Index: acpica-unix2-20220331/source/compiler/aslrestype1i.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype1i.c -+++ acpica-unix2-20220331/source/compiler/aslrestype1i.c -@@ -199,6 +199,7 @@ RsDoFixedDmaDescriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -217,14 +218,16 @@ RsDoFixedDmaDescriptor ( - { - case 0: /* DMA Request Lines [WORD] (_DMA) */ - -- Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->FixedDma.RequestLines = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA, - CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines)); - break; - - case 1: /* DMA Channel [WORD] (_TYP) */ - -- Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->FixedDma.Channels = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE, - CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels)); - break; -@@ -275,6 +278,7 @@ RsDoFixedIoDescriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -293,8 +297,8 @@ RsDoFixedIoDescriptor ( - { - case 0: /* Base Address */ - -- Descriptor->FixedIo.Address = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->FixedIo.Address = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS, - CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address)); - AddressOp = InitializerOp; -@@ -324,7 +328,7 @@ RsDoFixedIoDescriptor ( - - /* Error checks */ - -- if (Descriptor->FixedIo.Address > 0x03FF) -+ if (AcpiUtReadUint16 (&Descriptor->FixedIo.Address) > 0x03FF) - { - AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL); - } -@@ -358,6 +362,7 @@ RsDoIoDescriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -383,8 +388,8 @@ RsDoIoDescriptor ( - - case 1: /* Min Address */ - -- Descriptor->Io.Minimum = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Io.Minimum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum)); - MinOp = InitializerOp; -@@ -392,8 +397,8 @@ RsDoIoDescriptor ( - - case 2: /* Max Address */ - -- Descriptor->Io.Maximum = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Io.Maximum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum)); - MaxOp = InitializerOp; -@@ -434,10 +439,10 @@ RsDoIoDescriptor ( - /* Validate the Min/Max/Len/Align values */ - - RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO, -- Descriptor->Io.Minimum, -- Descriptor->Io.Maximum, -- Descriptor->Io.AddressLength, -- Descriptor->Io.Alignment, -+ (UINT32) (AcpiUtReadUint16 (&Descriptor->Io.Minimum)), -+ (UINT32) (AcpiUtReadUint16 (&Descriptor->Io.Maximum)), -+ (UINT32) Descriptor->Io.AddressLength, -+ (UINT32) Descriptor->Io.Alignment, - MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp); - - return (Rnode); -@@ -561,7 +566,7 @@ RsDoIrqDescriptor ( - - /* Now we can set the channel mask */ - -- Descriptor->Irq.IrqMask = IrqMask; -+ Descriptor->Irq.IrqMask = AcpiUtReadUint16 (&IrqMask); - return (Rnode); - } - -@@ -660,6 +665,6 @@ RsDoIrqNoFlagsDescriptor ( - - /* Now we can set the interrupt mask */ - -- Descriptor->Irq.IrqMask = IrqMask; -+ Descriptor->Irq.IrqMask = AcpiUtReadUint16(&IrqMask); - return (Rnode); - } -Index: acpica-unix2-20220331/source/compiler/aslrestype2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype2.c -+++ acpica-unix2-20220331/source/compiler/aslrestype2.c -@@ -77,6 +77,8 @@ RsDoGeneralRegisterDescriptor ( - ASL_RESOURCE_NODE *Rnode; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT64 Tmp64; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -85,7 +87,8 @@ RsDoGeneralRegisterDescriptor ( - - Descriptor = Rnode->Buffer; - Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER; -- Descriptor->GenericReg.ResourceLength = 12; -+ Tmp16 = 12; -+ Descriptor->GenericReg.ResourceLength = AcpiUtReadUint16 (&Tmp16); - - /* Process all child initialization nodes */ - -@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor ( - - case 3: /* Register Address */ - -- Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer; -+ Tmp64 = InitializerOp->Asl.Value.Integer; -+ Descriptor->GenericReg.Address = AcpiUtReadUint64 (&Tmp64); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS, - CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address)); - break; -@@ -184,6 +188,8 @@ RsDoInterruptDescriptor ( - BOOLEAN HasResSourceIndex = FALSE; - UINT8 ResSourceIndex = 0; - UINT8 *ResSourceString = NULL; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -225,7 +231,7 @@ RsDoInterruptDescriptor ( - * Initial descriptor length -- may be enlarged if there are - * optional fields present - */ -- Descriptor->ExtendedIrq.ResourceLength = 2; /* Flags and table length byte */ -+ Descriptor->ExtendedIrq.ResourceLength = 2; /* Flags and table length byte */ - Descriptor->ExtendedIrq.InterruptCount = 0; - - Rover = ACPI_CAST_PTR (AML_RESOURCE, -@@ -333,7 +339,8 @@ RsDoInterruptDescriptor ( - - /* Save the integer and move pointer to the next one */ - -- Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Rover->DwordItem = AcpiUtReadUint32 (&Tmp32); - Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4); - Descriptor->ExtendedIrq.InterruptCount++; - Descriptor->ExtendedIrq.ResourceLength += 4; -@@ -384,6 +391,8 @@ RsDoInterruptDescriptor ( - Descriptor->ExtendedIrq.ResourceLength = (UINT16) - (Descriptor->ExtendedIrq.ResourceLength + StringLength); - } -+ Tmp16 = Descriptor->ExtendedIrq.ResourceLength; -+ Descriptor->ExtendedIrq.ResourceLength = AcpiUtReadUint16 (&Tmp16); - - Rnode->BufferLength = - (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) - -@@ -436,7 +445,8 @@ RsDoVendorLargeDescriptor ( - - Descriptor = Rnode->Buffer; - Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE; -- Descriptor->VendorLarge.ResourceLength = (UINT16) i; -+ AcpiUtWriteUint (&Descriptor->VendorLarge.ResourceLength, sizeof (UINT16), -+ &i, sizeof (UINT32)); - - /* Point to end-of-descriptor for vendor data */ - -Index: acpica-unix2-20220331/source/compiler/aslrestype2d.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype2d.c -+++ acpica-unix2-20220331/source/compiler/aslrestype2d.c -@@ -84,6 +84,8 @@ RsDoDwordIoDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -147,8 +149,8 @@ RsDoDwordIoDescriptor ( - - case 5: /* Address Granularity */ - -- Descriptor->Address32.Granularity = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Granularity = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); - GranOp = InitializerOp; -@@ -156,8 +158,8 @@ RsDoDwordIoDescriptor ( - - case 6: /* Address Min */ - -- Descriptor->Address32.Minimum = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Minimum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); - MinOp = InitializerOp; -@@ -165,8 +167,8 @@ RsDoDwordIoDescriptor ( - - case 7: /* Address Max */ - -- Descriptor->Address32.Maximum = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Maximum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); - MaxOp = InitializerOp; -@@ -174,16 +176,16 @@ RsDoDwordIoDescriptor ( - - case 8: /* Translation Offset */ - -- Descriptor->Address32.TranslationOffset = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.TranslationOffset = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset)); - break; - - case 9: /* Address Length */ - -- Descriptor->Address32.AddressLength = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.AddressLength = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); - LengthOp = InitializerOp; -@@ -271,11 +273,14 @@ RsDoDwordIoDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->Address32.ResourceLength; -+ Descriptor->Address32.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- (UINT64) Descriptor->Address32.Minimum, -- (UINT64) Descriptor->Address32.Maximum, -- (UINT64) Descriptor->Address32.AddressLength, -- (UINT64) Descriptor->Address32.Granularity, -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Minimum), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Maximum), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.AddressLength), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Granularity), - Descriptor->Address32.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -@@ -314,6 +319,8 @@ RsDoDwordMemoryDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -385,8 +392,8 @@ RsDoDwordMemoryDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->Address32.Granularity = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Granularity = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); - GranOp = InitializerOp; -@@ -394,8 +401,8 @@ RsDoDwordMemoryDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->Address32.Minimum = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Minimum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); - MinOp = InitializerOp; -@@ -403,8 +410,8 @@ RsDoDwordMemoryDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->Address32.Maximum = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Maximum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); - MaxOp = InitializerOp; -@@ -412,16 +419,16 @@ RsDoDwordMemoryDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->Address32.TranslationOffset = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.TranslationOffset = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->Address32.AddressLength = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.AddressLength = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); - LengthOp = InitializerOp; -@@ -506,11 +513,14 @@ RsDoDwordMemoryDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->Address32.ResourceLength; -+ Descriptor->Address32.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- (UINT64) Descriptor->Address32.Minimum, -- (UINT64) Descriptor->Address32.Maximum, -- (UINT64) Descriptor->Address32.AddressLength, -- (UINT64) Descriptor->Address32.Granularity, -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Minimum), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Maximum), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.AddressLength), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Granularity), - Descriptor->Address32.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -@@ -549,6 +559,8 @@ RsDoDwordSpaceDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -616,8 +628,8 @@ RsDoDwordSpaceDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->Address32.Granularity = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Granularity = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); - GranOp = InitializerOp; -@@ -625,8 +637,8 @@ RsDoDwordSpaceDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->Address32.Minimum = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Minimum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); - MinOp = InitializerOp; -@@ -634,8 +646,8 @@ RsDoDwordSpaceDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->Address32.Maximum = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.Maximum = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); - MaxOp = InitializerOp; -@@ -643,16 +655,16 @@ RsDoDwordSpaceDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->Address32.TranslationOffset = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.TranslationOffset = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->Address32.AddressLength = -- (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address32.AddressLength = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); - LengthOp = InitializerOp; -@@ -723,11 +735,14 @@ RsDoDwordSpaceDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->Address32.ResourceLength; -+ Descriptor->Address32.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- (UINT64) Descriptor->Address32.Minimum, -- (UINT64) Descriptor->Address32.Maximum, -- (UINT64) Descriptor->Address32.AddressLength, -- (UINT64) Descriptor->Address32.Granularity, -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Minimum), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Maximum), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.AddressLength), -+ (UINT64) AcpiUtReadUint32 (&Descriptor->Address32.Granularity), - Descriptor->Address32.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -Index: acpica-unix2-20220331/source/compiler/aslrestype2q.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype2q.c -+++ acpica-unix2-20220331/source/compiler/aslrestype2q.c -@@ -84,6 +84,7 @@ RsDoQwordIoDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -147,7 +148,8 @@ RsDoQwordIoDescriptor ( - - case 5: /* Address Granularity */ - -- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Granularity = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); - GranOp = InitializerOp; -@@ -155,7 +157,8 @@ RsDoQwordIoDescriptor ( - - case 6: /* Address Min */ - -- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Minimum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); - MinOp = InitializerOp; -@@ -163,7 +166,8 @@ RsDoQwordIoDescriptor ( - - case 7: /* Address Max */ - -- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Maximum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); - MaxOp = InitializerOp; -@@ -171,14 +175,16 @@ RsDoQwordIoDescriptor ( - - case 8: /* Translation Offset */ - -- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.TranslationOffset = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset)); - break; - - case 9: /* Address Length */ - -- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.AddressLength = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); - LengthOp = InitializerOp; -@@ -262,11 +268,14 @@ RsDoQwordIoDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->Address64.ResourceLength; -+ Descriptor->Address64.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- Descriptor->Address64.Minimum, -- Descriptor->Address64.Maximum, -- Descriptor->Address64.AddressLength, -- Descriptor->Address64.Granularity, -+ AcpiUtReadUint64 (&Descriptor->Address64.Minimum), -+ AcpiUtReadUint64 (&Descriptor->Address64.Maximum), -+ AcpiUtReadUint64 (&Descriptor->Address64.AddressLength), -+ AcpiUtReadUint64 (&Descriptor->Address64.Granularity), - Descriptor->Address64.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -@@ -305,6 +314,7 @@ RsDoQwordMemoryDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -375,7 +385,8 @@ RsDoQwordMemoryDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Granularity = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); - GranOp = InitializerOp; -@@ -383,7 +394,8 @@ RsDoQwordMemoryDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Minimum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); - MinOp = InitializerOp; -@@ -391,7 +403,8 @@ RsDoQwordMemoryDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Maximum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); - MaxOp = InitializerOp; -@@ -399,14 +412,16 @@ RsDoQwordMemoryDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.TranslationOffset = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.AddressLength = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); - LengthOp = InitializerOp; -@@ -491,11 +506,14 @@ RsDoQwordMemoryDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->Address64.ResourceLength; -+ Descriptor->Address64.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- Descriptor->Address64.Minimum, -- Descriptor->Address64.Maximum, -- Descriptor->Address64.AddressLength, -- Descriptor->Address64.Granularity, -+ AcpiUtReadUint64 (&Descriptor->Address64.Minimum), -+ AcpiUtReadUint64 (&Descriptor->Address64.Maximum), -+ AcpiUtReadUint64 (&Descriptor->Address64.AddressLength), -+ AcpiUtReadUint64 (&Descriptor->Address64.Granularity), - Descriptor->Address64.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -@@ -534,6 +552,7 @@ RsDoQwordSpaceDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -601,7 +620,8 @@ RsDoQwordSpaceDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Granularity = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); - GranOp = InitializerOp; -@@ -609,7 +629,8 @@ RsDoQwordSpaceDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Minimum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); - MinOp = InitializerOp; -@@ -617,7 +638,8 @@ RsDoQwordSpaceDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.Maximum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); - MaxOp = InitializerOp; -@@ -625,14 +647,16 @@ RsDoQwordSpaceDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.TranslationOffset = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer; -+ Descriptor->Address64.AddressLength = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); - LengthOp = InitializerOp; -@@ -702,11 +726,14 @@ RsDoQwordSpaceDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->Address64.ResourceLength; -+ Descriptor->Address64.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- Descriptor->Address64.Minimum, -- Descriptor->Address64.Maximum, -- Descriptor->Address64.AddressLength, -- Descriptor->Address64.Granularity, -+ AcpiUtReadUint64 (&Descriptor->Address64.Minimum), -+ AcpiUtReadUint64 (&Descriptor->Address64.Maximum), -+ AcpiUtReadUint64 (&Descriptor->Address64.AddressLength), -+ AcpiUtReadUint64 (&Descriptor->Address64.Granularity), - Descriptor->Address64.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -Index: acpica-unix2-20220331/source/compiler/aslrestype2w.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype2w.c -+++ acpica-unix2-20220331/source/compiler/aslrestype2w.c -@@ -84,6 +84,7 @@ RsDoWordIoDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -147,7 +148,8 @@ RsDoWordIoDescriptor ( - - case 5: /* Address Granularity */ - -- Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Granularity = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); - GranOp = InitializerOp; -@@ -155,7 +157,8 @@ RsDoWordIoDescriptor ( - - case 6: /* Address Min */ - -- Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Minimum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); - MinOp = InitializerOp; -@@ -163,7 +166,8 @@ RsDoWordIoDescriptor ( - - case 7: /* Address Max */ - -- Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Maximum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); - MaxOp = InitializerOp; -@@ -171,14 +175,16 @@ RsDoWordIoDescriptor ( - - case 8: /* Translation Offset */ - -- Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.TranslationOffset = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset)); - break; - - case 9: /* Address Length */ - -- Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.AddressLength = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); - LengthOp = InitializerOp; -@@ -263,13 +269,17 @@ RsDoWordIoDescriptor ( - /* Validate the Min/Max/Len/Gran values */ - - RsLargeAddressCheck ( -- (UINT64) Descriptor->Address16.Minimum, -- (UINT64) Descriptor->Address16.Maximum, -- (UINT64) Descriptor->Address16.AddressLength, -- (UINT64) Descriptor->Address16.Granularity, -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Minimum), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Maximum), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.AddressLength), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Granularity), - Descriptor->Address16.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -+ /* correct enddianness */ -+ Tmp16 = Descriptor->Address16.ResourceLength; -+ Descriptor->Address16.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + - OptionIndex + StringLength; - return (Rnode); -@@ -305,6 +315,7 @@ RsDoWordBusNumberDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -361,8 +372,8 @@ RsDoWordBusNumberDescriptor ( - - case 4: /* Address Granularity */ - -- Descriptor->Address16.Granularity = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Granularity = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); - GranOp = InitializerOp; -@@ -370,8 +381,8 @@ RsDoWordBusNumberDescriptor ( - - case 5: /* Min Address */ - -- Descriptor->Address16.Minimum = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Minimum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); - MinOp = InitializerOp; -@@ -379,8 +390,8 @@ RsDoWordBusNumberDescriptor ( - - case 6: /* Max Address */ - -- Descriptor->Address16.Maximum = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Maximum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); - MaxOp = InitializerOp; -@@ -388,16 +399,16 @@ RsDoWordBusNumberDescriptor ( - - case 7: /* Translation Offset */ - -- Descriptor->Address16.TranslationOffset = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.TranslationOffset = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset)); - break; - - case 8: /* Address Length */ - -- Descriptor->Address16.AddressLength = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.AddressLength = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); - LengthOp = InitializerOp; -@@ -468,13 +479,17 @@ RsDoWordBusNumberDescriptor ( - /* Validate the Min/Max/Len/Gran values */ - - RsLargeAddressCheck ( -- (UINT64) Descriptor->Address16.Minimum, -- (UINT64) Descriptor->Address16.Maximum, -- (UINT64) Descriptor->Address16.AddressLength, -- (UINT64) Descriptor->Address16.Granularity, -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Minimum), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Maximum), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.AddressLength), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Granularity), - Descriptor->Address16.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -+ /* correct enddianness */ -+ Tmp16 = Descriptor->Address16.ResourceLength; -+ Descriptor->Address16.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + - OptionIndex + StringLength; - return (Rnode); -@@ -510,6 +525,7 @@ RsDoWordSpaceDescriptor ( - UINT32 CurrentByteOffset; - UINT32 i; - BOOLEAN ResSourceIndex = FALSE; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -577,8 +593,8 @@ RsDoWordSpaceDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->Address16.Granularity = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Granularity = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); - GranOp = InitializerOp; -@@ -586,8 +602,8 @@ RsDoWordSpaceDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->Address16.Minimum = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Minimum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); - MinOp = InitializerOp; -@@ -595,8 +611,8 @@ RsDoWordSpaceDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->Address16.Maximum = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.Maximum = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); - MaxOp = InitializerOp; -@@ -604,16 +620,16 @@ RsDoWordSpaceDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->Address16.TranslationOffset = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.TranslationOffset = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->Address16.AddressLength = -- (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->Address16.AddressLength = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); - LengthOp = InitializerOp; -@@ -684,13 +700,17 @@ RsDoWordSpaceDescriptor ( - /* Validate the Min/Max/Len/Gran values */ - - RsLargeAddressCheck ( -- (UINT64) Descriptor->Address16.Minimum, -- (UINT64) Descriptor->Address16.Maximum, -- (UINT64) Descriptor->Address16.AddressLength, -- (UINT64) Descriptor->Address16.Granularity, -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Minimum), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Maximum), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.AddressLength), -+ (UINT64) AcpiUtReadUint16 (&Descriptor->Address16.Granularity), - Descriptor->Address16.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -+ /* correct enddianness */ -+ Tmp16 = Descriptor->Address16.ResourceLength; -+ Descriptor->Address16.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + - OptionIndex + StringLength; - return (Rnode); -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -3046,7 +3046,8 @@ DtCompileWpbt ( - - /* Extract the length of the Arguments buffer, insert into main table */ - -- Table->ArgumentsLength = (UINT16) Subtable->TotalLength; -+ AcpiUtWriteUint (&Table->ArgumentsLength, sizeof (UINT16), -+ &Subtable->TotalLength, sizeof (UINT32)); - DtInsertSubtable (ParentTable, Subtable); - return (AE_OK); - } -Index: acpica-unix2-20220331/source/components/disassembler/dmbuffer.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmbuffer.c -+++ acpica-unix2-20220331/source/components/disassembler/dmbuffer.c -@@ -204,7 +204,7 @@ AcpiDmByteList ( - - - ByteData = Op->Named.Data; -- ByteCount = (UINT32) Op->Common.Value.Integer; -+ ByteCount = (UINT32) Op->Common.Value.Size; - - /* - * The byte list belongs to a buffer, and can be produced by either -@@ -308,7 +308,7 @@ AcpiDmIsUuidBuffer ( - /* Extract the byte list info */ - - ByteData = NextOp->Named.Data; -- ByteCount = (UINT32) NextOp->Common.Value.Integer; -+ ByteCount = (UINT32) NextOp->Common.Value.Size; - - /* Byte count must be exactly 16 */ - -@@ -436,7 +436,7 @@ AcpiDmIsUnicodeBuffer ( - /* Extract the byte list info */ - - ByteData = NextOp->Named.Data; -- ByteCount = (UINT32) NextOp->Common.Value.Integer; -+ ByteCount = (UINT32) NextOp->Common.Value.Size; - WordCount = ACPI_DIV_2 (ByteCount); - - /* -@@ -878,14 +878,14 @@ AcpiDmUnicode ( - /* Extract the buffer info as a WORD buffer */ - - WordData = ACPI_CAST_PTR (UINT16, Op->Named.Data); -- WordCount = ACPI_DIV_2 (((UINT32) Op->Common.Value.Integer)); -+ WordCount = ACPI_DIV_2 (((UINT32) Op->Common.Value.Size)); - - /* Write every other byte as an ASCII character */ - - AcpiOsPrintf ("\""); - for (i = 0; i < (WordCount - 1); i++) - { -- OutputValue = (int) WordData[i]; -+ OutputValue = (int) AcpiUtReadUint16 (&WordData[i]); - - /* Handle values that must be escaped */ - -@@ -947,7 +947,29 @@ AcpiDmGetHardwareIdType ( - - /* Swap from little-endian to big-endian to simplify conversion */ - -- BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer); -+ BigEndianId = (UINT32) Op->Common.Value.Integer; -+ if (UtIsBigEndianMachine()) -+ { -+ /* -+ * We'll need to store the bytes in little-endian order -+ * so they can be re-used properly later since everything is -+ * assumed to be in little-endian form. -+ */ -+ -+ UINT32 *Ptr = (UINT32 *)(&Op->Common.Value.Integer); -+ *Ptr = AcpiUtDwordByteSwap (BigEndianId); -+ } -+ else -+ { -+ /* -+ * We'll need to just use the bytes in big-endian order; -+ * they're already in little-endian order. -+ */ -+ -+ UINT32 Tmp32 = BigEndianId; -+ -+ BigEndianId = AcpiUtDwordByteSwap ((UINT32) Tmp32); -+ } - - /* Create the 3 leading ASCII letters */ - -@@ -1073,11 +1095,12 @@ AcpiDmDecompressEisaId ( - { - char IdBuffer[ACPI_EISAID_STRING_SIZE]; - const AH_DEVICE_ID *Info; -+ UINT32 Tmp32 = EncodedId; - - - /* Convert EISAID to a string an emit the statement */ - -- AcpiExEisaIdToString (IdBuffer, EncodedId); -+ AcpiExEisaIdToString (IdBuffer, AcpiUtReadUint32 (&Tmp32)); - AcpiOsPrintf ("EisaId (\"%s\")", IdBuffer); - - /* If we know about the ID, emit the description */ -Index: acpica-unix2-20220331/source/components/disassembler/dmopcode.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmopcode.c -+++ acpica-unix2-20220331/source/components/disassembler/dmopcode.c -@@ -778,7 +778,9 @@ AcpiDmDisassembleOneOp ( - } - else - { -- AcpiOsPrintf ("0x%4.4X", (UINT32) Op->Common.Value.Integer); -+ UINT16 Tmp16 = (UINT16) Op->Common.Value.Integer; -+ -+ AcpiOsPrintf ("0x%4.4X", (UINT32) AcpiUtReadUint16 (&Tmp16)); - } - break; - -@@ -790,14 +792,19 @@ AcpiDmDisassembleOneOp ( - } - else - { -- AcpiOsPrintf ("0x%8.8X", (UINT32) Op->Common.Value.Integer); -+ UINT32 Tmp32 = (UINT32) Op->Common.Value.Integer; -+ -+ AcpiOsPrintf ("0x%8.8X", (UINT32) AcpiUtReadUint32 (&Tmp32)); - } - break; - - case AML_QWORD_OP: - -- AcpiOsPrintf ("0x%8.8X%8.8X", -- ACPI_FORMAT_UINT64 (Op->Common.Value.Integer)); -+ { -+ UINT64 Tmp64 = AcpiUtReadUint64 (&Op->Common.Value.Integer); -+ -+ AcpiOsPrintf ("0x%8.8X%8.8X", ACPI_FORMAT_UINT64 (Tmp64)); -+ } - break; - - case AML_STRING_OP: -@@ -887,18 +894,18 @@ AcpiDmDisassembleOneOp ( - AcpiOsPrintf (","); - ASL_CV_PRINT_ONE_COMMENT (Op, AML_NAMECOMMENT, NULL, 0); - AcpiOsPrintf ("%*.s %u", (unsigned) (5 - Length), " ", -- (UINT32) Op->Common.Value.Integer); -+ (UINT32) Op->Common.Value.Size); - - AcpiDmCommaIfFieldMember (Op); - -- Info->BitOffset += (UINT32) Op->Common.Value.Integer; -+ Info->BitOffset += (UINT32) Op->Common.Value.Size; - break; - - case AML_INT_RESERVEDFIELD_OP: - - /* Offset() -- Must account for previous offsets */ - -- Offset = (UINT32) Op->Common.Value.Integer; -+ Offset = (UINT32) Op->Common.Value.Size; - Info->BitOffset += Offset; - - if (Info->BitOffset % 8 == 0) -Index: acpica-unix2-20220331/source/components/disassembler/dmresrc.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmresrc.c -+++ acpica-unix2-20220331/source/components/disassembler/dmresrc.c -@@ -417,7 +417,7 @@ AcpiDmIsResourceTemplate ( - return (AE_TYPE); - } - -- DeclaredBufferLength = NextOp->Common.Value.Size; -+ DeclaredBufferLength = NextOp->Common.Value.Integer; - - /* Get the length of the raw initialization byte list */ - -Index: acpica-unix2-20220331/source/components/disassembler/dmresrcl.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmresrcl.c -+++ acpica-unix2-20220331/source/components/disassembler/dmresrcl.c -@@ -141,6 +141,8 @@ AcpiDmMemoryFields ( - UINT32 Level) - { - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - for (i = 0; i < 4; i++) -@@ -151,14 +153,16 @@ AcpiDmMemoryFields ( - { - case 16: - -- AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], -- AcpiDmMemoryNames[i]); -+ Tmp16 = ACPI_CAST_PTR (UINT16, Source)[i]; -+ AcpiDmDumpInteger16 (AcpiUtReadUint16 (&Tmp16), -+ AcpiDmMemoryNames[i]); - break; - - case 32: - -- AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], -- AcpiDmMemoryNames[i]); -+ Tmp32 = ACPI_CAST_PTR (UINT32, Source)[i]; -+ AcpiDmDumpInteger32 (AcpiUtReadUint32 (&Tmp32), -+ AcpiDmMemoryNames[i]); - break; - - default: -@@ -190,6 +194,9 @@ AcpiDmAddressFields ( - UINT32 Level) - { - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; -+ UINT64 Tmp64; - - - AcpiOsPrintf ("\n"); -@@ -202,20 +209,23 @@ AcpiDmAddressFields ( - { - case 16: - -- AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], -- AcpiDmAddressNames[i]); -+ Tmp16 = ACPI_CAST_PTR (UINT16, Source)[i]; -+ AcpiDmDumpInteger16 (AcpiUtReadUint16 (&Tmp16), -+ AcpiDmAddressNames[i]); - break; - - case 32: - -- AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], -- AcpiDmAddressNames[i]); -+ Tmp32 = ACPI_CAST_PTR (UINT32, Source)[i]; -+ AcpiDmDumpInteger32 (AcpiUtReadUint32 (&Tmp32), -+ AcpiDmAddressNames[i]); - break; - - case 64: - -- AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i], -- AcpiDmAddressNames[i]); -+ Tmp64 = ACPI_CAST_PTR (UINT64, Source)[i]; -+ AcpiDmDumpInteger64 (AcpiUtReadUint64 (&Tmp64), -+ AcpiDmAddressNames[i]); - break; - - default: -@@ -749,7 +759,7 @@ AcpiDmExtendedDescriptor ( - /* Extra field for this descriptor only */ - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific, -+ AcpiDmDumpInteger64 (AcpiUtReadUint64 (&Resource->ExtAddress64.TypeSpecific), - "Type-Specific Attributes"); - - /* Insert a descriptor name */ -@@ -876,11 +886,11 @@ AcpiDmFixedMemory32Descriptor ( - AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->FixedMemory32.Flags)]); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, -+ AcpiDmDumpInteger32 (AcpiUtReadUint32 (&Resource->FixedMemory32.Address), - "Address Base"); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, -+ AcpiDmDumpInteger32 (AcpiUtReadUint32 (&Resource->FixedMemory32.AddressLength), - "Address Length"); - - /* Insert a descriptor name */ -@@ -926,7 +936,8 @@ AcpiDmGenericRegisterDescriptor ( - AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset"); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address"); -+ AcpiDmDumpInteger64 (AcpiUtReadUint64 (&Resource->GenericReg.Address), -+ "Address"); - - /* Optional field for ACPI 3.0 */ - -@@ -989,7 +1000,7 @@ AcpiDmInterruptDescriptor ( - AcpiDmResourceSource (Resource, - sizeof (AML_RESOURCE_EXTENDED_IRQ) + - ((UINT32) Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32), -- Resource->ExtendedIrq.ResourceLength); -+ AcpiUtReadUint16 (&Resource->ExtendedIrq.ResourceLength)); - - /* Insert a descriptor name */ - -@@ -1004,7 +1015,7 @@ AcpiDmInterruptDescriptor ( - { - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("0x%8.8X,\n", -- (UINT32) Resource->ExtendedIrq.Interrupts[i]); -+ AcpiUtReadUint32 (&Resource->ExtendedIrq.Interrupts[i])); - } - - AcpiDmIndent (Level); -Index: acpica-unix2-20220331/source/components/disassembler/dmresrcl2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmresrcl2.c -+++ acpica-unix2-20220331/source/components/disassembler/dmresrcl2.c -@@ -199,22 +199,27 @@ AcpiDmGpioCommon ( - char *DeviceName = NULL; - UINT32 PinCount; - UINT32 i; -+ UINT16 ResSourceOffset; -+ UINT16 VendorOffset; -+ UINT16 VendorLength; -+ UINT16 Tmp16; - - - /* ResourceSource, ResourceSourceIndex, ResourceType */ - - AcpiDmIndent (Level + 1); -- if (Resource->Gpio.ResSourceOffset) -+ ResSourceOffset = AcpiUtReadUint16 (&Resource->Gpio.ResSourceOffset); -+ if (ResSourceOffset) - { - DeviceName = ACPI_ADD_PTR (char, -- Resource, Resource->Gpio.ResSourceOffset), -+ Resource, ResSourceOffset), - AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); - } - - AcpiOsPrintf (", "); - AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.ResSourceIndex); -- AcpiOsPrintf ("%s, ", -- AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.Flags)]); -+ Tmp16 = AcpiUtReadUint16 (&Resource->Gpio.Flags); -+ AcpiOsPrintf ("%s, ", AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Tmp16)]); - - /* Insert a descriptor name */ - -@@ -223,15 +228,15 @@ AcpiDmGpioCommon ( - - /* Dump the vendor data */ - -- if (Resource->Gpio.VendorOffset) -+ VendorOffset = AcpiUtReadUint16 (&Resource->Gpio.VendorOffset); -+ VendorLength = AcpiUtReadUint16 (&Resource->Gpio.VendorLength); -+ if (VendorOffset) - { - AcpiOsPrintf ("\n"); - AcpiDmIndent (Level + 1); -- VendorData = ACPI_ADD_PTR (UINT8, Resource, -- Resource->Gpio.VendorOffset); -+ VendorData = ACPI_ADD_PTR (UINT8, Resource, VendorOffset); - -- AcpiDmDumpRawDataBuffer (VendorData, -- Resource->Gpio.VendorLength, Level); -+ AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level); - } - - AcpiOsPrintf (")\n"); -@@ -241,17 +246,17 @@ AcpiDmGpioCommon ( - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("{ // Pin list\n"); - -- PinCount = ((UINT32) (Resource->Gpio.ResSourceOffset - -- Resource->Gpio.PinTableOffset)) / -- sizeof (UINT16); -+ PinCount = (UINT32) AcpiUtReadUint16 (&Resource->Gpio.ResSourceOffset); -+ PinCount -= (UINT32) AcpiUtReadUint16 (&Resource->Gpio.PinTableOffset); -+ PinCount /= sizeof (UINT16); - - PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, -- Resource->Gpio.PinTableOffset); -+ AcpiUtReadUint16 (&Resource->Gpio.PinTableOffset)); - - for (i = 0; i < PinCount; i++) - { - AcpiDmIndent (Level + 2); -- AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], -+ AcpiOsPrintf ("0x%4.4X%s\n", AcpiUtReadUint16 (&(PinList[i])), - ((i + 1) < PinCount) ? "," : ""); - } - -@@ -285,16 +290,18 @@ AcpiDmGpioIntDescriptor ( - UINT32 Length, - UINT32 Level) - { -+ UINT16 Tmp16; - - /* Dump the GpioInt-specific portion of the descriptor */ - - /* EdgeLevel, ActiveLevel, Shared */ - - AcpiDmIndent (Level); -+ Tmp16 = AcpiUtReadUint16 (&Resource->Gpio.IntFlags); - AcpiOsPrintf ("GpioInt (%s, %s, %s, ", -- AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.IntFlags)], -- AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 1)], -- AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]); -+ AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Tmp16)], -+ AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 1)], -+ AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 3)]); - - /* PinConfig, DebounceTimeout */ - -@@ -307,7 +314,8 @@ AcpiDmGpioIntDescriptor ( - { - AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig); - } -- AcpiOsPrintf ("0x%4.4X,\n", Resource->Gpio.DebounceTimeout); -+ AcpiOsPrintf ("0x%4.4X,\n", -+ AcpiUtReadUint16 (&Resource->Gpio.DebounceTimeout)); - - /* Dump the GpioInt/GpioIo common portion of the descriptor */ - -@@ -337,14 +345,16 @@ AcpiDmGpioIoDescriptor ( - UINT32 Length, - UINT32 Level) - { -+ UINT16 Tmp16; - - /* Dump the GpioIo-specific portion of the descriptor */ - - /* Shared, PinConfig */ - - AcpiDmIndent (Level); -+ Tmp16 = AcpiUtReadUint16 (&Resource->Gpio.IntFlags); - AcpiOsPrintf ("GpioIo (%s, ", -- AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]); -+ AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 3)]); - - if (Resource->Gpio.PinConfig <= 3) - { -@@ -358,10 +368,10 @@ AcpiDmGpioIoDescriptor ( - - /* DebounceTimeout, DriveStrength, IoRestriction */ - -- AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DebounceTimeout); -- AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DriveStrength); -- AcpiOsPrintf ("%s,\n", -- AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Resource->Gpio.IntFlags)]); -+ AcpiOsPrintf ("0x%4.4X, ", AcpiUtReadUint16 (&Resource->Gpio.DebounceTimeout)); -+ AcpiOsPrintf ("0x%4.4X, ", AcpiUtReadUint16 (&Resource->Gpio.DriveStrength)); -+ Tmp16 = AcpiUtReadUint16 (&Resource->Gpio.IntFlags); -+ AcpiOsPrintf ("%s,\n", AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Tmp16)]); - - /* Dump the GpioInt/GpioIo common portion of the descriptor */ - -@@ -442,6 +452,9 @@ AcpiDmPinFunctionDescriptor ( - char *DeviceName = NULL; - UINT32 PinCount; - UINT32 i; -+ UINT16 ResSourceOffset; -+ UINT16 VendorOffset; -+ UINT16 VendorLength; - - AcpiDmIndent (Level); - AcpiOsPrintf ("PinFunction (%s, ", -@@ -459,12 +472,14 @@ AcpiDmPinFunctionDescriptor ( - - /* FunctionNumber */ - -- AcpiOsPrintf ("0x%4.4X, ", Resource->PinFunction.FunctionNumber); -+ AcpiOsPrintf ("0x%4.4X, ", -+ AcpiUtReadUint16 (&Resource->PinFunction.FunctionNumber)); - -- if (Resource->PinFunction.ResSourceOffset) -+ ResSourceOffset = AcpiUtReadUint16 (&Resource->PinFunction.ResSourceOffset); -+ if (ResSourceOffset) - { - DeviceName = ACPI_ADD_PTR (char, -- Resource, Resource->PinFunction.ResSourceOffset), -+ Resource, ResSourceOffset), - AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); - } - -@@ -484,15 +499,15 @@ AcpiDmPinFunctionDescriptor ( - - /* Dump the vendor data */ - -- if (Resource->PinFunction.VendorLength) -+ VendorOffset = AcpiUtReadUint16 (&Resource->PinFunction.VendorOffset); -+ VendorLength = AcpiUtReadUint16 (&Resource->PinFunction.VendorLength); -+ if (VendorLength) - { - AcpiOsPrintf ("\n"); - AcpiDmIndent (Level + 1); -- VendorData = ACPI_ADD_PTR (UINT8, Resource, -- Resource->PinFunction.VendorOffset); -+ VendorData = ACPI_ADD_PTR (UINT8, Resource, VendorOffset); - -- AcpiDmDumpRawDataBuffer (VendorData, -- Resource->PinFunction.VendorLength, Level); -+ AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level); - } - - AcpiOsPrintf (")\n"); -@@ -503,17 +518,17 @@ AcpiDmPinFunctionDescriptor ( - - AcpiOsPrintf ("{ // Pin list\n"); - -- PinCount = ((UINT32) (Resource->PinFunction.ResSourceOffset - -- Resource->PinFunction.PinTableOffset)) / -- sizeof (UINT16); -+ PinCount = AcpiUtReadUint16 (&Resource->PinFunction.ResSourceOffset); -+ PinCount -= AcpiUtReadUint16 (&Resource->PinFunction.PinTableOffset); -+ PinCount /= sizeof (UINT16); - - PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, -- Resource->PinFunction.PinTableOffset); -+ AcpiUtReadUint16 (&Resource->PinFunction.PinTableOffset)); - - for (i = 0; i < PinCount; i++) - { - AcpiDmIndent (Level + 2); -- AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], -+ AcpiOsPrintf ("0x%4.4X%s\n", AcpiUtReadUint16 (&(PinList[i])), - ((i + 1) < PinCount) ? "," : ""); - } - -@@ -549,7 +564,8 @@ AcpiDmDumpSerialBusVendorData ( - { - case AML_RESOURCE_I2C_SERIALBUSTYPE: - -- VendorLength = Resource->CommonSerialBus.TypeDataLength - -+ VendorLength = -+ AcpiUtReadUint16 (&Resource->CommonSerialBus.TypeDataLength) - - AML_RESOURCE_I2C_MIN_DATA_LEN; - - VendorData = ACPI_ADD_PTR (UINT8, Resource, -@@ -558,7 +574,8 @@ AcpiDmDumpSerialBusVendorData ( - - case AML_RESOURCE_SPI_SERIALBUSTYPE: - -- VendorLength = Resource->CommonSerialBus.TypeDataLength - -+ VendorLength = -+ AcpiUtReadUint16 (&Resource->CommonSerialBus.TypeDataLength) - - AML_RESOURCE_SPI_MIN_DATA_LEN; - - VendorData = ACPI_ADD_PTR (UINT8, Resource, -@@ -567,7 +584,8 @@ AcpiDmDumpSerialBusVendorData ( - - case AML_RESOURCE_UART_SERIALBUSTYPE: - -- VendorLength = Resource->CommonSerialBus.TypeDataLength - -+ VendorLength = -+ AcpiUtReadUint16 (&Resource->CommonSerialBus.TypeDataLength) - - AML_RESOURCE_UART_MIN_DATA_LEN; - - VendorData = ACPI_ADD_PTR (UINT8, Resource, -@@ -693,9 +711,9 @@ AcpiDmI2cSerialBusDescriptor ( - - AcpiDmIndent (Level); - AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n", -- Resource->I2cSerialBus.SlaveAddress, -+ AcpiUtReadUint16 (&Resource->I2cSerialBus.SlaveAddress), - AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)], -- Resource->I2cSerialBus.ConnectionSpeed); -+ AcpiUtReadUint32 (&Resource->I2cSerialBus.ConnectionSpeed)); - - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("%s, ", -@@ -704,7 +722,7 @@ AcpiDmI2cSerialBusDescriptor ( - /* ResourceSource is a required field */ - - ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) + -- Resource->CommonSerialBus.TypeDataLength; -+ AcpiUtReadUint16 (&Resource->CommonSerialBus.TypeDataLength); - - DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); - AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); -@@ -761,15 +779,17 @@ AcpiDmSpiSerialBusDescriptor ( - { - UINT32 ResourceSourceOffset; - char *DeviceName; -+ UINT16 Tmp16; - - - /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */ - - AcpiDmIndent (Level); -+ Tmp16 = AcpiUtReadUint16 (&Resource->SpiSerialBus.TypeSpecificFlags); - AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n", -- Resource->SpiSerialBus.DeviceSelection, -- AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)], -- AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)], -+ AcpiUtReadUint16 (&Resource->SpiSerialBus.DeviceSelection), -+ AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Tmp16, 1)], -+ AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Tmp16)], - Resource->SpiSerialBus.DataBitLength); - - /* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */ -@@ -777,7 +797,7 @@ AcpiDmSpiSerialBusDescriptor ( - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("%s, 0x%8.8X, %s,\n", - AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.Flags)], -- Resource->SpiSerialBus.ConnectionSpeed, -+ AcpiUtReadUint32 (&Resource->SpiSerialBus.ConnectionSpeed), - AcpiGbl_CpoDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPolarity)]); - - AcpiDmIndent (Level + 1); -@@ -787,7 +807,7 @@ AcpiDmSpiSerialBusDescriptor ( - /* ResourceSource is a required field */ - - ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) + -- Resource->CommonSerialBus.TypeDataLength; -+ AcpiUtReadUint16 (&Resource->CommonSerialBus.TypeDataLength); - - DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); - AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); -@@ -844,15 +864,17 @@ AcpiDmUartSerialBusDescriptor ( - { - UINT32 ResourceSourceOffset; - char *DeviceName; -+ UINT16 Tmp16; - - - /* ConnectionSpeed, BitsPerByte, StopBits */ - - AcpiDmIndent (Level); -+ Tmp16 = AcpiUtReadUint16 (&Resource->UartSerialBus.TypeSpecificFlags); - AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n", -- Resource->UartSerialBus.DefaultBaudRate, -- AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)], -- AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]); -+ AcpiUtReadUint32 (&Resource->UartSerialBus.DefaultBaudRate), -+ AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Tmp16, 4)], -+ AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Tmp16, 2)]); - - /* LinesInUse, IsBigEndian, Parity, FlowControl */ - -@@ -867,13 +889,13 @@ AcpiDmUartSerialBusDescriptor ( - - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ", -- Resource->UartSerialBus.RxFifoSize, -- Resource->UartSerialBus.TxFifoSize); -+ AcpiUtReadUint16 (&Resource->UartSerialBus.RxFifoSize), -+ AcpiUtReadUint16 (&Resource->UartSerialBus.TxFifoSize)); - - /* ResourceSource is a required field */ - - ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) + -- Resource->CommonSerialBus.TypeDataLength; -+ AcpiUtReadUint16 (&Resource->CommonSerialBus.TypeDataLength); - - DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset); - AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); -Index: acpica-unix2-20220331/source/components/disassembler/dmresrcs.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmresrcs.c -+++ acpica-unix2-20220331/source/components/disassembler/dmresrcs.c -@@ -93,7 +93,7 @@ AcpiDmIrqDescriptor ( - AcpiOsPrintf (")\n"); - - AcpiDmIndent (Level + 1); -- AcpiDmBitList (Resource->Irq.IrqMask); -+ AcpiDmBitList (AcpiUtReadUint16 (&Resource->Irq.IrqMask)); - } - - -@@ -161,8 +161,8 @@ AcpiDmFixedDmaDescriptor ( - - AcpiDmIndent (Level); - AcpiOsPrintf ("FixedDMA (0x%4.4X, 0x%4.4X, ", -- Resource->FixedDma.RequestLines, -- Resource->FixedDma.Channels); -+ AcpiUtReadUint16 (&Resource->FixedDma.RequestLines), -+ AcpiUtReadUint16 (&Resource->FixedDma.Channels)); - - if (Resource->FixedDma.Width <= 5) - { -@@ -210,10 +210,12 @@ AcpiDmIoDescriptor ( - AcpiGbl_IoDecode [ACPI_GET_1BIT_FLAG (Resource->Io.Flags)]); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger16 (Resource->Io.Minimum, "Range Minimum"); -+ AcpiDmDumpInteger16 (AcpiUtReadUint16 (&Resource->Io.Minimum), -+ "Range Minimum"); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger16 (Resource->Io.Maximum, "Range Maximum"); -+ AcpiDmDumpInteger16 (AcpiUtReadUint16 (&Resource->Io.Maximum), -+ "Range Maximum"); - - AcpiDmIndent (Level + 1); - AcpiDmDumpInteger8 (Resource->Io.Alignment, "Alignment"); -@@ -256,10 +258,12 @@ AcpiDmFixedIoDescriptor ( - AcpiOsPrintf ("FixedIO (\n"); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger16 (Resource->FixedIo.Address, "Address"); -+ AcpiDmDumpInteger16 (AcpiUtReadUint16 (&Resource->FixedIo.Address), -+ "Address"); - - AcpiDmIndent (Level + 1); -- AcpiDmDumpInteger8 (Resource->FixedIo.AddressLength, "Length"); -+ AcpiDmDumpInteger8 (AcpiUtReadUint16 (&Resource->FixedIo.AddressLength), -+ "Length"); - - /* Insert a descriptor name */ - -Index: acpica-unix2-20220331/source/components/disassembler/dmwalk.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/disassembler/dmwalk.c -+++ acpica-unix2-20220331/source/components/disassembler/dmwalk.c -@@ -1163,7 +1163,7 @@ AcpiDmAscendingOp ( - { - ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST; - ASL_CV_CLOSE_PAREN (Op, Level); -- AcpiOsPrintf ("{"); -+ AcpiOsPrintf (" {"); - } - } - -Index: acpica-unix2-20220331/source/components/namespace/nsaccess.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/namespace/nsaccess.c -+++ acpica-unix2-20220331/source/components/namespace/nsaccess.c -@@ -644,7 +644,7 @@ AcpiNsLookup ( - - /* Extract one ACPI name from the front of the pathname */ - -- ACPI_MOVE_32_TO_32 (&SimpleName, Path); -+ ACPI_COPY_NAMESEG (&SimpleName, Path); - - /* Try to find the single (4 character) ACPI name */ - -Index: acpica-unix2-20220331/source/components/namespace/nsnames.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/namespace/nsnames.c -+++ acpica-unix2-20220331/source/components/namespace/nsnames.c -@@ -297,10 +297,10 @@ AcpiNsBuildNormalizedPath ( - { - if (NextNode != Node) - { -- ACPI_PATH_PUT8(FullPath, PathSize, AML_DUAL_NAME_PREFIX, Length); -+ ACPI_PATH_PUT8 (FullPath, PathSize, AML_DUAL_NAME_PREFIX, Length); - } - -- ACPI_MOVE_32_TO_32 (Name, &NextNode->Name); -+ ACPI_COPY_NAMESEG (Name, &NextNode->Name); - DoNoTrailing = NoTrailing; - for (i = 0; i < 4; i++) - { -Index: acpica-unix2-20220331/source/components/namespace/nsparse.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/namespace/nsparse.c -+++ acpica-unix2-20220331/source/components/namespace/nsparse.c -@@ -203,6 +203,7 @@ AcpiNsOneCompleteParse ( - ACPI_WALK_STATE *WalkState; - ACPI_TABLE_HEADER *Table; - ACPI_OWNER_ID OwnerId; -+ UINT32 TableLength; - - - ACPI_FUNCTION_TRACE (NsOneCompleteParse); -@@ -216,13 +217,14 @@ AcpiNsOneCompleteParse ( - - /* Table must consist of at least a complete header */ - -- if (Table->Length < sizeof (ACPI_TABLE_HEADER)) -+ TableLength = AcpiUtReadUint32 (&Table->Length); -+ if (TableLength < sizeof (ACPI_TABLE_HEADER)) - { - return_ACPI_STATUS (AE_BAD_HEADER); - } - - AmlStart = (UINT8 *) Table + sizeof (ACPI_TABLE_HEADER); -- AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER); -+ AmlLength = TableLength - sizeof (ACPI_TABLE_HEADER); - - Status = AcpiTbGetOwnerId (TableIndex, &OwnerId); - if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20220331/source/components/namespace/nsutils.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20220331/source/components/namespace/nsutils.c -@@ -272,7 +272,6 @@ AcpiNsBuildInternalName ( - const char *ExternalName = Info->NextExternalChar; - char *Result = NULL; - UINT32 i; -- char TmpSeg[ACPI_NAMESEG_SIZE+1]; - - - ACPI_FUNCTION_TRACE (NsBuildInternalName); -@@ -336,7 +335,6 @@ AcpiNsBuildInternalName ( - - for (; NumSegments; NumSegments--) - { -- memset (TmpSeg, 0, ACPI_NAMESEG_SIZE+1); - for (i = 0; i < ACPI_NAMESEG_SIZE; i++) - { - if (ACPI_IS_PATH_SEPARATOR (*ExternalName) || -@@ -344,17 +342,16 @@ AcpiNsBuildInternalName ( - { - /* Pad the segment with underscore(s) if segment is short */ - -- TmpSeg[i] = '_'; -+ Result[i] = '_'; - } - else - { - /* Convert the character to uppercase and save it */ - -- TmpSeg[i] = (char) toupper ((int) *ExternalName); -+ Result[i] = (char) toupper ((int) *ExternalName); - ExternalName++; - } - } -- AcpiUtWriteUint (Result, ACPI_NAMESEG_SIZE, TmpSeg, ACPI_NAMESEG_SIZE); - - /* Now we must have a path separator, or the pathname is bad */ - -Index: acpica-unix2-20220331/source/components/utilities/utresrc.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/utilities/utresrc.c -+++ acpica-unix2-20220331/source/components/utilities/utresrc.c -@@ -541,7 +541,7 @@ AcpiUtGetResourceLength ( - { - /* Large Resource type -- bytes 1-2 contain the 16-bit length */ - -- ACPI_MOVE_16_TO_16 (&ResourceLength, ACPI_ADD_PTR (UINT8, Aml, 1)); -+ ResourceLength = AcpiUtReadUint16 (ACPI_ADD_PTR (UINT8, Aml, 1)); - - } - else -Index: acpica-unix2-20220331/source/compiler/aslrestype2e.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype2e.c -+++ acpica-unix2-20220331/source/compiler/aslrestype2e.c -@@ -80,6 +80,7 @@ RsDoExtendedIoDescriptor ( - UINT16 StringLength = 0; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -139,7 +140,8 @@ RsDoExtendedIoDescriptor ( - - case 5: /* Address Granularity */ - -- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Granularity = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); - GranOp = InitializerOp; -@@ -147,7 +149,8 @@ RsDoExtendedIoDescriptor ( - - case 6: /* Address Min */ - -- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Minimum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); - MinOp = InitializerOp; -@@ -155,7 +158,8 @@ RsDoExtendedIoDescriptor ( - - case 7: /* Address Max */ - -- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Maximum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); - MaxOp = InitializerOp; -@@ -163,14 +167,16 @@ RsDoExtendedIoDescriptor ( - - case 8: /* Translation Offset */ - -- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.TranslationOffset = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); - break; - - case 9: /* Address Length */ - -- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.AddressLength = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); - LengthOp = InitializerOp; -@@ -178,7 +184,8 @@ RsDoExtendedIoDescriptor ( - - case 10: /* Type-Specific Attributes */ - -- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.TypeSpecific = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); - break; -@@ -213,11 +220,14 @@ RsDoExtendedIoDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->ExtAddress64.ResourceLength; -+ Descriptor->ExtAddress64.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- Descriptor->ExtAddress64.Minimum, -- Descriptor->ExtAddress64.Maximum, -- Descriptor->ExtAddress64.AddressLength, -- Descriptor->ExtAddress64.Granularity, -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Minimum), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Maximum), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.AddressLength), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Granularity), - Descriptor->ExtAddress64.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -@@ -253,6 +263,7 @@ RsDoExtendedMemoryDescriptor ( - UINT16 StringLength = 0; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -319,7 +330,8 @@ RsDoExtendedMemoryDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Granularity = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); - GranOp = InitializerOp; -@@ -327,7 +339,8 @@ RsDoExtendedMemoryDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Minimum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); - MinOp = InitializerOp; -@@ -335,7 +348,8 @@ RsDoExtendedMemoryDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Maximum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); - MaxOp = InitializerOp; -@@ -343,14 +357,16 @@ RsDoExtendedMemoryDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.TranslationOffset = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.AddressLength = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); - LengthOp = InitializerOp; -@@ -358,7 +374,8 @@ RsDoExtendedMemoryDescriptor ( - - case 11: /* Type-Specific Attributes */ - -- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.TypeSpecific = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); - break; -@@ -394,11 +411,14 @@ RsDoExtendedMemoryDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->ExtAddress64.ResourceLength; -+ Descriptor->ExtAddress64.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- Descriptor->ExtAddress64.Minimum, -- Descriptor->ExtAddress64.Maximum, -- Descriptor->ExtAddress64.AddressLength, -- Descriptor->ExtAddress64.Granularity, -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Minimum), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Maximum), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.AddressLength), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Granularity), - Descriptor->ExtAddress64.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -@@ -434,6 +454,7 @@ RsDoExtendedSpaceDescriptor ( - UINT16 StringLength = 0; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -497,7 +518,8 @@ RsDoExtendedSpaceDescriptor ( - - case 6: /* Address Granularity */ - -- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Granularity = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); - GranOp = InitializerOp; -@@ -505,7 +527,8 @@ RsDoExtendedSpaceDescriptor ( - - case 7: /* Min Address */ - -- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Minimum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); - MinOp = InitializerOp; -@@ -513,7 +536,8 @@ RsDoExtendedSpaceDescriptor ( - - case 8: /* Max Address */ - -- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.Maximum = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); - MaxOp = InitializerOp; -@@ -521,14 +545,16 @@ RsDoExtendedSpaceDescriptor ( - - case 9: /* Translation Offset */ - -- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.TranslationOffset = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); - break; - - case 10: /* Address Length */ - -- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.AddressLength = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); - LengthOp = InitializerOp; -@@ -536,7 +562,8 @@ RsDoExtendedSpaceDescriptor ( - - case 11: /* Type-Specific Attributes */ - -- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; -+ Descriptor->ExtAddress64.TypeSpecific = -+ AcpiUtReadUint64 (&InitializerOp->Asl.Value.Integer); - RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, - CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); - break; -@@ -557,11 +584,14 @@ RsDoExtendedSpaceDescriptor ( - - /* Validate the Min/Max/Len/Gran values */ - -+ Tmp16 = Descriptor->ExtAddress64.ResourceLength; -+ Descriptor->ExtAddress64.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ - RsLargeAddressCheck ( -- Descriptor->ExtAddress64.Minimum, -- Descriptor->ExtAddress64.Maximum, -- Descriptor->ExtAddress64.AddressLength, -- Descriptor->ExtAddress64.Granularity, -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Minimum), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Maximum), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.AddressLength), -+ AcpiUtReadUint64 (&Descriptor->ExtAddress64.Granularity), - Descriptor->ExtAddress64.Flags, - MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); - -Index: acpica-unix2-20220331/source/compiler/aslrestype2s.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslrestype2s.c -+++ acpica-unix2-20220331/source/compiler/aslrestype2s.c -@@ -343,6 +343,7 @@ RsDoGpioIntDescriptor ( - UINT32 CurrentByteOffset; - UINT32 PinCount = 0; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -485,7 +486,8 @@ RsDoGpioIntDescriptor ( - * (implies resource source must immediately follow the pin list.) - * Name: _PIN - */ -- *InterruptList = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ *InterruptList = AcpiUtReadUint16 (&Tmp16); - InterruptList++; - PinCount++; - -@@ -518,6 +520,27 @@ RsDoGpioIntDescriptor ( - - MpSaveGpioInfo (Info->MappingOp, Descriptor, - PinCount, PinList, ResourceSource); -+ -+ /* correct endian-ness issues */ -+ Tmp16 = Descriptor->Gpio.ResourceLength; -+ Descriptor->Gpio.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.Flags; -+ Descriptor->Gpio.Flags = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.IntFlags; -+ Descriptor->Gpio.IntFlags = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.DriveStrength; -+ Descriptor->Gpio.DriveStrength = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.DebounceTimeout; -+ Descriptor->Gpio.DebounceTimeout = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.PinTableOffset; -+ Descriptor->Gpio.PinTableOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.ResSourceOffset; -+ Descriptor->Gpio.ResSourceOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.VendorOffset; -+ Descriptor->Gpio.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.VendorLength; -+ Descriptor->Gpio.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } - -@@ -552,6 +575,7 @@ RsDoGpioIoDescriptor ( - UINT32 CurrentByteOffset; - UINT32 PinCount = 0; - UINT32 i; -+ UINT16 Tmp16; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -691,7 +715,8 @@ RsDoGpioIoDescriptor ( - * (implies resource source must immediately follow the pin list.) - * Name: _PIN - */ -- *InterruptList = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ *InterruptList = AcpiUtReadUint16 (&Tmp16); - InterruptList++; - PinCount++; - -@@ -724,6 +749,27 @@ RsDoGpioIoDescriptor ( - - MpSaveGpioInfo (Info->MappingOp, Descriptor, - PinCount, PinList, ResourceSource); -+ -+ /* correct endian-ness issues */ -+ Tmp16 = Descriptor->Gpio.ResourceLength; -+ Descriptor->Gpio.ResourceLength = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.Flags; -+ Descriptor->Gpio.Flags = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.IntFlags; -+ Descriptor->Gpio.IntFlags = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.DriveStrength; -+ Descriptor->Gpio.DriveStrength = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.DebounceTimeout; -+ Descriptor->Gpio.DebounceTimeout = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.PinTableOffset; -+ Descriptor->Gpio.PinTableOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.ResSourceOffset; -+ Descriptor->Gpio.ResSourceOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.VendorOffset; -+ Descriptor->Gpio.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->Gpio.VendorLength; -+ Descriptor->Gpio.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } - -@@ -754,6 +800,8 @@ RsDoI2cSerialBusDescriptor ( - UINT16 DescriptorSize; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -781,7 +829,8 @@ RsDoI2cSerialBusDescriptor ( - Descriptor->I2cSerialBus.RevisionId = AML_RESOURCE_I2C_REVISION; - Descriptor->I2cSerialBus.TypeRevisionId = AML_RESOURCE_I2C_TYPE_REVISION; - Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE; -- Descriptor->I2cSerialBus.TypeDataLength = AML_RESOURCE_I2C_MIN_DATA_LEN + VendorLength; -+ Tmp16 = AML_RESOURCE_I2C_MIN_DATA_LEN + VendorLength; -+ Descriptor->I2cSerialBus.TypeDataLength = AcpiUtReadUint16 (&Tmp16); - - if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_I2C_SERIALBUS_V2) - { -@@ -795,13 +844,15 @@ RsDoI2cSerialBusDescriptor ( - - /* Process all child initialization nodes */ - -+ Descriptor->I2cSerialBus.TypeSpecificFlags = 0; - for (i = 0; InitializerOp; i++) - { - switch (i) - { - case 0: /* Slave Address [WORD] (_ADR) */ - -- Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->I2cSerialBus.SlaveAddress = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS, - CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress)); - break; -@@ -815,16 +866,19 @@ RsDoI2cSerialBusDescriptor ( - - case 2: /* Connection Speed [DWORD] (_SPE) */ - -- Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->I2cSerialBus.ConnectionSpeed = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, - CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed)); - break; - - case 3: /* Addressing Mode [Flag] (_MOD) */ - -- RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->I2cSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 0, 0); - RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE, - CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0); -+ Descriptor->I2cSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16); - break; - - case 4: /* ResSource [Optional Field - STRING] */ -@@ -882,6 +936,8 @@ RsDoI2cSerialBusDescriptor ( - InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); - } - -+ Tmp16 = Descriptor->I2cSerialBus.ResourceLength; -+ Descriptor->I2cSerialBus.ResourceLength = AcpiUtReadUint16 (&Tmp16); - MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource); - return (Rnode); - } -@@ -913,6 +969,8 @@ RsDoSpiSerialBusDescriptor ( - UINT16 DescriptorSize; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -935,12 +993,13 @@ RsDoSpiSerialBusDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->SpiSerialBus.ResourceLength = DescriptorSize; -+ Descriptor->SpiSerialBus.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->SpiSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS; - Descriptor->SpiSerialBus.RevisionId = AML_RESOURCE_SPI_REVISION; - Descriptor->SpiSerialBus.TypeRevisionId = AML_RESOURCE_SPI_TYPE_REVISION; - Descriptor->SpiSerialBus.Type = AML_RESOURCE_SPI_SERIALBUSTYPE; -- Descriptor->SpiSerialBus.TypeDataLength = AML_RESOURCE_SPI_MIN_DATA_LEN + VendorLength; -+ Tmp16 = AML_RESOURCE_SPI_MIN_DATA_LEN + VendorLength; -+ Descriptor->SpiSerialBus.TypeDataLength = AcpiUtReadUint16 (&Tmp16); - - if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_SPI_SERIALBUS_V2) - { -@@ -955,29 +1014,35 @@ RsDoSpiSerialBusDescriptor ( - - /* Process all child initialization nodes */ - -+ Descriptor->SpiSerialBus.TypeSpecificFlags = 0; - for (i = 0; InitializerOp; i++) - { - switch (i) - { - case 0: /* Device Selection [WORD] (_ADR) */ - -- Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->SpiSerialBus.DeviceSelection = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS, - CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection)); - break; - - case 1: /* Device Polarity [Flag] (_DPL) */ - -- RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->SpiSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 1, 0); - RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY, - CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1); -+ Descriptor->SpiSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16); - break; - - case 2: /* Wire Mode [Flag] (_MOD) */ - -- RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->SpiSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 0, 0); - RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE, - CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0); -+ Descriptor->SpiSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16); - break; - - case 3: /* Device Bit Length [BYTE] (_LEN) */ -@@ -996,7 +1061,8 @@ RsDoSpiSerialBusDescriptor ( - - case 5: /* Connection Speed [DWORD] (_SPE) */ - -- Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->SpiSerialBus.ConnectionSpeed = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, - CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed)); - break; -@@ -1101,6 +1167,8 @@ RsDoUartSerialBusDescriptor ( - UINT16 DescriptorSize; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -1123,12 +1191,13 @@ RsDoUartSerialBusDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->UartSerialBus.ResourceLength = DescriptorSize; -+ Descriptor->UartSerialBus.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->UartSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS; - Descriptor->UartSerialBus.RevisionId = AML_RESOURCE_UART_REVISION; - Descriptor->UartSerialBus.TypeRevisionId = AML_RESOURCE_UART_TYPE_REVISION; - Descriptor->UartSerialBus.Type = AML_RESOURCE_UART_SERIALBUSTYPE; -- Descriptor->UartSerialBus.TypeDataLength = AML_RESOURCE_UART_MIN_DATA_LEN + VendorLength; -+ Tmp16 = AML_RESOURCE_UART_MIN_DATA_LEN + VendorLength; -+ Descriptor->UartSerialBus.TypeDataLength = AcpiUtReadUint16 (&Tmp16); - - if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_UART_SERIALBUS_V2) - { -@@ -1142,29 +1211,35 @@ RsDoUartSerialBusDescriptor ( - - /* Process all child initialization nodes */ - -+ Descriptor->UartSerialBus.TypeSpecificFlags = 0; - for (i = 0; InitializerOp; i++) - { - switch (i) - { - case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */ - -- Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->UartSerialBus.DefaultBaudRate = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate)); - break; - - case 1: /* Bits Per Byte [Flags] (_LEN) */ - -- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->UartSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 4, 3); - RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3); -+ Descriptor->UartSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16);; - break; - - case 2: /* Stop Bits [Flags] (_STB) */ - -- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->UartSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 2, 1); - RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2); -+ Descriptor->UartSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16);; - break; - - case 3: /* Lines In Use [BYTE] (_LIN) */ -@@ -1176,9 +1251,11 @@ RsDoUartSerialBusDescriptor ( - - case 4: /* Endianness [Flag] (_END) */ - -- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->UartSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 7, 0); - RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7); -+ Descriptor->UartSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16);; - break; - - case 5: /* Parity [BYTE] (_PAR) */ -@@ -1190,21 +1267,25 @@ RsDoUartSerialBusDescriptor ( - - case 6: /* Flow Control [Flags] (_FLC) */ - -- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0); -+ Tmp16 = AcpiUtReadUint16 (&Descriptor->UartSerialBus.TypeSpecificFlags); -+ RsSetFlagBits16 (&Tmp16, InitializerOp, 0, 0); - RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2); -+ Descriptor->UartSerialBus.TypeSpecificFlags = AcpiUtReadUint16 (&Tmp16);; - break; - - case 7: /* Rx Buffer Size [WORD] (_RXL) */ - -- Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->UartSerialBus.RxFifoSize = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize)); - break; - - case 8: /* Tx Buffer Size [WORD] (_TXL) */ - -- Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->UartSerialBus.TxFifoSize = AcpiUtReadUint16 (&Tmp16); - RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX, - CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize)); - break; -@@ -1444,6 +1525,7 @@ RsDoPinFunctionDescriptor ( - UINT32 CurrentByteOffset; - UINT32 PinCount = 0; - UINT32 i; -+ UINT16 Tmp16; - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; - CurrentByteOffset = Info->CurrentByteOffset; -@@ -1467,7 +1549,7 @@ RsDoPinFunctionDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->PinFunction.ResourceLength = DescriptorSize; -+ Descriptor->PinFunction.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->PinFunction.DescriptorType = ACPI_RESOURCE_NAME_PIN_FUNCTION; - Descriptor->PinFunction.RevisionId = AML_RESOURCE_PIN_FUNCTION_REVISION; - -@@ -1507,7 +1589,8 @@ RsDoPinFunctionDescriptor ( - - case 2: /* Function Number [WORD] (_FUN) */ - -- Descriptor->PinFunction.FunctionNumber = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->PinFunction.FunctionNumber = AcpiUtReadUint16 (&Tmp16); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_FUNCTION, - CurrentByteOffset + ASL_RESDESC_OFFSET (PinFunction.FunctionNumber)); - break; -@@ -1555,6 +1638,12 @@ RsDoPinFunctionDescriptor ( - { - Descriptor->PinFunction.VendorLength = VendorLength; - } -+ Tmp16 = (UINT16) ACPI_PTR_DIFF (VendorData, Descriptor); -+ Descriptor->PinFunction.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ -+ Tmp16 = Descriptor->PinFunction.VendorLength; -+ Descriptor->PinFunction.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - break; - - default: -@@ -1566,7 +1655,8 @@ RsDoPinFunctionDescriptor ( - * (implies resource source must immediately follow the pin list.) - * Name: _PIN - */ -- *PinList = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ *PinList = AcpiUtReadUint16 (&Tmp16); - PinList++; - PinCount++; - -@@ -1597,6 +1687,13 @@ RsDoPinFunctionDescriptor ( - InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); - } - -+ /* correct the endian-ness of the values */ -+ Tmp16 = Descriptor->PinFunction.PinTableOffset; -+ Descriptor->PinFunction.PinTableOffset = AcpiUtReadUint16 (&Tmp16); -+ -+ Tmp16 = Descriptor->PinFunction.ResSourceOffset; -+ Descriptor->PinFunction.ResSourceOffset = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } - -@@ -1630,6 +1727,8 @@ RsDoPinConfigDescriptor ( - UINT32 CurrentByteOffset; - UINT32 PinCount = 0; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; - CurrentByteOffset = Info->CurrentByteOffset; -@@ -1653,7 +1752,7 @@ RsDoPinConfigDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->PinConfig.ResourceLength = DescriptorSize; -+ Descriptor->PinConfig.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->PinConfig.DescriptorType = ACPI_RESOURCE_NAME_PIN_CONFIG; - Descriptor->PinConfig.RevisionId = AML_RESOURCE_PIN_CONFIG_REVISION; - -@@ -1707,7 +1806,8 @@ RsDoPinConfigDescriptor ( - - case 2: /* Pin Config Value [DWORD] (_VAL) */ - -- Descriptor->PinConfig.PinConfigValue = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->PinConfig.PinConfigValue = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_PINCONFIG_VALUE, - CurrentByteOffset + ASL_RESDESC_OFFSET (PinConfig.PinConfigValue)); - break; -@@ -1766,7 +1866,8 @@ RsDoPinConfigDescriptor ( - * (implies resource source must immediately follow the pin list.) - * Name: _PIN - */ -- *PinList = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ *PinList = AcpiUtReadUint16 (&Tmp16); - PinList++; - PinCount++; - -@@ -1797,6 +1898,16 @@ RsDoPinConfigDescriptor ( - InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); - } - -+ /* correct the endianness if needed */ -+ Tmp16 = Descriptor->PinConfig.PinTableOffset; -+ Descriptor->PinConfig.PinTableOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinConfig.ResSourceOffset; -+ Descriptor->PinConfig.ResSourceOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinConfig.VendorOffset; -+ Descriptor->PinConfig.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinConfig.VendorLength; -+ Descriptor->PinConfig.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } - -@@ -1830,6 +1941,7 @@ RsDoPinGroupDescriptor ( - UINT32 CurrentByteOffset; - UINT32 PinCount = 0; - UINT32 i; -+ UINT16 Tmp16; - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; - CurrentByteOffset = Info->CurrentByteOffset; -@@ -1853,7 +1965,7 @@ RsDoPinGroupDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->PinGroup.ResourceLength = DescriptorSize; -+ Descriptor->PinGroup.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->PinGroup.DescriptorType = ACPI_RESOURCE_NAME_PIN_GROUP; - Descriptor->PinGroup.RevisionId = AML_RESOURCE_PIN_GROUP_REVISION; - -@@ -1920,7 +2032,8 @@ RsDoPinGroupDescriptor ( - * (implies resource source must immediately follow the pin list.) - * Name: _PIN - */ -- *PinList = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ *PinList = AcpiUtReadUint16 (&Tmp16); - PinList++; - PinCount++; - -@@ -1951,6 +2064,16 @@ RsDoPinGroupDescriptor ( - InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); - } - -+ /* correct enddianness as needed */ -+ Tmp16 = Descriptor->PinGroup.PinTableOffset; -+ Descriptor->PinGroup.PinTableOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroup.LabelOffset; -+ Descriptor->PinGroup.LabelOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroup.VendorOffset; -+ Descriptor->PinGroup.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroup.VendorLength; -+ Descriptor->PinGroup.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } - -@@ -1983,6 +2106,7 @@ RsDoPinGroupFunctionDescriptor ( - UINT16 DescriptorSize; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; - CurrentByteOffset = Info->CurrentByteOffset; -@@ -2006,7 +2130,7 @@ RsDoPinGroupFunctionDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->PinGroupFunction.ResourceLength = DescriptorSize; -+ Descriptor->PinGroupFunction.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->PinGroupFunction.DescriptorType = ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION; - Descriptor->PinGroupFunction.RevisionId = AML_RESOURCE_PIN_GROUP_FUNCTION_REVISION; - -@@ -2038,7 +2162,8 @@ RsDoPinGroupFunctionDescriptor ( - - case 1: /* Function Number [WORD] */ - -- Descriptor->PinGroupFunction.FunctionNumber = (UINT16) InitializerOp->Asl.Value.Integer; -+ Tmp16 = (UINT16) InitializerOp->Asl.Value.Integer; -+ Descriptor->PinGroupFunction.FunctionNumber = AcpiUtReadUint16 (&Tmp16); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_FUNCTION, - CurrentByteOffset + ASL_RESDESC_OFFSET (PinGroupFunction.FunctionNumber)); - break; -@@ -2097,6 +2222,16 @@ RsDoPinGroupFunctionDescriptor ( - InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); - } - -+ /* correct enddianness as needed */ -+ Tmp16 = Descriptor->PinGroupFunction.ResSourceOffset; -+ Descriptor->PinGroupFunction.ResSourceOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroupFunction.ResSourceLabelOffset; -+ Descriptor->PinGroupFunction.ResSourceLabelOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroupFunction.VendorOffset; -+ Descriptor->PinGroupFunction.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroupFunction.VendorLength; -+ Descriptor->PinGroupFunction.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } - -@@ -2129,6 +2264,8 @@ RsDoPinGroupConfigDescriptor ( - UINT16 DescriptorSize; - UINT32 CurrentByteOffset; - UINT32 i; -+ UINT16 Tmp16; -+ UINT32 Tmp32; - - InitializerOp = Info->DescriptorTypeOp->Asl.Child; - CurrentByteOffset = Info->CurrentByteOffset; -@@ -2152,7 +2289,7 @@ RsDoPinGroupConfigDescriptor ( - sizeof (AML_RESOURCE_LARGE_HEADER)); - - Descriptor = Rnode->Buffer; -- Descriptor->PinGroupConfig.ResourceLength = DescriptorSize; -+ Descriptor->PinGroupConfig.ResourceLength = AcpiUtReadUint16 (&DescriptorSize); - Descriptor->PinGroupConfig.DescriptorType = ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG; - Descriptor->PinGroupConfig.RevisionId = AML_RESOURCE_PIN_GROUP_CONFIG_REVISION; - -@@ -2205,7 +2342,8 @@ RsDoPinGroupConfigDescriptor ( - - case 2: /* Pin Config Value [DWORD] (_VAL) */ - -- Descriptor->PinGroupConfig.PinConfigValue = (UINT32) InitializerOp->Asl.Value.Integer; -+ Tmp32 = (UINT32) InitializerOp->Asl.Value.Integer; -+ Descriptor->PinGroupConfig.PinConfigValue = AcpiUtReadUint32 (&Tmp32); - RsCreateDwordField (InitializerOp, ACPI_RESTAG_PINCONFIG_VALUE, - CurrentByteOffset + ASL_RESDESC_OFFSET (PinGroupConfig.PinConfigValue)); - break; -@@ -2266,5 +2404,15 @@ RsDoPinGroupConfigDescriptor ( - InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); - } - -+ /* correct enddianness as needed */ -+ Tmp16 = Descriptor->PinGroupConfig.ResSourceOffset; -+ Descriptor->PinGroupConfig.ResSourceOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroupConfig.ResSourceLabelOffset; -+ Descriptor->PinGroupConfig.ResSourceLabelOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroupConfig.VendorOffset; -+ Descriptor->PinGroupConfig.VendorOffset = AcpiUtReadUint16 (&Tmp16); -+ Tmp16 = Descriptor->PinGroupConfig.VendorLength; -+ Descriptor->PinGroupConfig.VendorLength = AcpiUtReadUint16 (&Tmp16); -+ - return (Rnode); - } diff --git a/0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch b/0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch deleted file mode 100644 index 1a2b1a2..0000000 --- a/0044-Initial-support-for-WPBT-in-big-endian-needs-more.patch +++ /dev/null @@ -1,23 +0,0 @@ -From bd137d3712e6bc7e4d2d11350a208a36750e4063 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 6 Jul 2021 18:26:41 -0600 -Subject: [PATCH 44/45] Initial support for WPBT in big-endian, needs more - -Signed-off-by: Al Stone ---- - source/compiler/dttable2.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: acpica-unix2-20210604/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c -@@ -2638,7 +2638,7 @@ DtCompileWpbt ( - AcpiUtWriteUint (&Length, sizeof (UINT16), - &Subtable->TotalLength, sizeof (UINT32)); - Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); -- Table->ArgumentsLength = Length; -+ Table->ArgumentsLength = AcpiUtReadUint16 (&Length); - - ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); diff --git a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch b/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch deleted file mode 100644 index 201e19b..0000000 --- a/0045-CSRT-fixed-use-of-optional-ResourceInfo.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 0d87ee42adda7837bec3cc0ff86e40c2f2e8dc4f Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Fri, 9 Jul 2021 14:52:55 -0600 -Subject: [PATCH 45/45] CSRT: fixed use of optional ResourceInfo - -In a resource sub-sub-table, there may be a ResourceInfo entry. Neither -the compiler nor disassembler accounted for that possibility properly. - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 43 +++++++++++++++++++++----------------- - source/compiler/dttable1.c | 28 +++++++++++++------------ - 2 files changed, 39 insertions(+), 32 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump1.c -+++ acpica-unix2-20220331/source/common/dmtbdump1.c -@@ -669,11 +669,13 @@ AcpiDmDumpCsrt ( - ACPI_CSRT_GROUP *Subtable; - ACPI_CSRT_SHARED_INFO *SharedInfoTable; - ACPI_CSRT_DESCRIPTOR *SubSubtable; -- UINT32 Length = AcpiUtReadUint32 (&Table->Length); -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_CSRT); - UINT32 SubOffset; - UINT32 SubSubOffset; - UINT32 InfoLength; -+ UINT32 SubtableLength; -+ UINT32 SubSubtableLength; - - - /* The main table only contains the ACPI header, thus already handled */ -@@ -681,13 +683,14 @@ AcpiDmDumpCsrt ( - /* Subtables (Resource Groups) */ - - Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); -- while (Offset < Length) -+ while (Offset < TableLength) - { - /* Resource group subtable */ - -+ SubtableLength = AcpiUtReadUint32 (&Subtable->Length); - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset, Subtable, -- Subtable->Length, AcpiDmTableInfoCsrt0); -+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable, -+ SubtableLength, AcpiDmTableInfoCsrt0); - if (ACPI_FAILURE (Status)) - { - return; -@@ -700,26 +703,28 @@ AcpiDmDumpCsrt ( - Offset + SubOffset); - - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset + SubOffset, SharedInfoTable, -- sizeof (ACPI_CSRT_SHARED_INFO), AcpiDmTableInfoCsrt1); -+ Status = AcpiDmDumpTable (TableLength, Offset + SubOffset, -+ SharedInfoTable, sizeof (ACPI_CSRT_SHARED_INFO), -+ AcpiDmTableInfoCsrt1); - if (ACPI_FAILURE (Status)) - { - return; - } - -- SubOffset += Subtable->SharedInfoLength; -+ SubOffset += AcpiUtReadUint32 (&Subtable->SharedInfoLength); - - /* Sub-Subtables (Resource Descriptors) */ - - SubSubtable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table, - Offset + SubOffset); - -- while ((SubOffset < Subtable->Length) && -- ((Offset + SubOffset) < Length)) -+ while ((SubOffset < SubtableLength) && -+ ((Offset + SubOffset) < TableLength)) - { -+ SubSubtableLength = AcpiUtReadUint32 (&SubSubtable->Length); - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable, -- SubSubtable->Length, AcpiDmTableInfoCsrt2); -+ Status = AcpiDmDumpTable (TableLength, Offset + SubOffset, -+ SubSubtable, SubSubtableLength, AcpiDmTableInfoCsrt2); - if (ACPI_FAILURE (Status)) - { - return; -@@ -729,11 +734,12 @@ AcpiDmDumpCsrt ( - - /* Resource-specific info buffer */ - -- InfoLength = SubSubtable->Length - SubSubOffset; -+ InfoLength = SubSubtableLength - SubSubOffset; - if (InfoLength) - { -- Status = AcpiDmDumpTable (Length, -- Offset + SubOffset + SubSubOffset, Table, -+ Status = AcpiDmDumpTable (TableLength, -+ Offset + SubOffset + SubSubOffset, -+ (UINT8 *)SubSubtable + SubSubOffset, - InfoLength, AcpiDmTableInfoCsrt2a); - if (ACPI_FAILURE (Status)) - { -@@ -743,16 +749,15 @@ AcpiDmDumpCsrt ( - - /* Point to next sub-subtable */ - -- SubOffset += SubSubtable->Length; -+ SubOffset += SubSubtableLength; - SubSubtable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubtable, -- SubSubtable->Length); -+ SubSubtableLength); - } - - /* Point to next subtable */ - -- Offset += Subtable->Length; -- Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Subtable, -- Subtable->Length); -+ Offset += SubtableLength; -+ Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Subtable, SubtableLength); - } - } - -Index: acpica-unix2-20220331/source/compiler/dttable1.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable1.c -+++ acpica-unix2-20220331/source/compiler/dttable1.c -@@ -716,14 +716,16 @@ DtCompileCsrt ( - DT_SUBTABLE *Subtable; - DT_SUBTABLE *ParentTable; - DT_FIELD **PFieldList = (DT_FIELD **) List; -- UINT32 DescriptorCount; -+ UINT32 DescriptorLength; - UINT32 GroupLength; - UINT32 Tmp; -+ UINT32 Offset; - - - /* Subtables (Resource Groups) */ - - ParentTable = DtPeekSubtable (); -+ - while (*PFieldList) - { - /* Resource group subtable */ -@@ -738,16 +740,13 @@ DtCompileCsrt ( - /* Compute the number of resource descriptors */ - - Tmp = AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_CSRT_GROUP, -- Subtable->Buffer))->Length); -+ Subtable->Buffer))->Length); - GroupLength = Tmp; - Tmp = AcpiUtReadUint32 (&(ACPI_CAST_PTR (ACPI_CSRT_GROUP, -- Subtable->Buffer))->SharedInfoLength); -+ Subtable->Buffer))->SharedInfoLength); - GroupLength -= Tmp; - GroupLength -= sizeof (ACPI_CSRT_GROUP); - -- DescriptorCount = (GroupLength / -- sizeof (ACPI_CSRT_DESCRIPTOR)); -- - DtInsertSubtable (ParentTable, Subtable); - DtPushSubtable (Subtable); - ParentTable = DtPeekSubtable (); -@@ -762,10 +761,13 @@ DtCompileCsrt ( - } - - DtInsertSubtable (ParentTable, Subtable); -+ DtPushSubtable (Subtable); -+ ParentTable = DtPeekSubtable (); - - /* Sub-Subtables (Resource Descriptors) */ - -- while (*PFieldList && DescriptorCount) -+ Offset = 0; -+ while (*PFieldList && (Offset < GroupLength)) - { - - Status = DtCompileTable (PFieldList, AcpiDmTableInfoCsrt2, -@@ -774,6 +776,10 @@ DtCompileCsrt ( - { - return (Status); - } -+ DescriptorLength = AcpiUtReadUint32 ( -+ &(ACPI_CAST_PTR (ACPI_CSRT_GROUP, -+ Subtable->Buffer))->Length); -+ - - DtInsertSubtable (ParentTable, Subtable); - -@@ -783,11 +789,7 @@ DtCompileCsrt ( - { - Status = DtCompileTable (PFieldList, AcpiDmTableInfoCsrt2a, - &Subtable); -- if (ACPI_FAILURE (Status)) -- { -- return (Status); -- } -- if (Subtable) -+ if (ACPI_SUCCESS (Status) && Subtable) - { - DtInsertSubtable (ParentTable, Subtable); - } -@@ -795,7 +797,7 @@ DtCompileCsrt ( - - DtPopSubtable (); - ParentTable = DtPeekSubtable (); -- DescriptorCount--; -+ Offset += DescriptorLength; - } - - DtPopSubtable (); diff --git a/0046-Support-PHAT-in-a-big-endian-world.patch b/0046-Support-PHAT-in-a-big-endian-world.patch deleted file mode 100644 index 9a22b3b..0000000 --- a/0046-Support-PHAT-in-a-big-endian-world.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 5fd729c8f6c4ce295edd142fc41e03e831ba4afb Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Mon, 12 Jul 2021 09:39:38 -0600 -Subject: [PATCH] Support PHAT in a big-endian world - -Signed-off-by: Al Stone ---- - source/common/dmtbdump2.c | 36 ++++++++++++++++++++---------------- - source/compiler/dttable2.c | 12 +++++++++--- - 2 files changed, 29 insertions(+), 19 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2029,39 +2029,41 @@ AcpiDmDumpPhat ( - ACPI_PHAT_HEADER *Subtable; - ACPI_PHAT_VERSION_DATA *VersionData; - UINT32 RecordCount; -- UINT32 Length = Table->Length; -+ UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); - UINT32 Offset = sizeof (ACPI_TABLE_PHAT); -- UINT32 SubtableLength; -+ UINT16 SubtableLength; - UINT32 PathLength; - UINT32 VendorLength; -+ UINT16 SubtableType; - - - Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, sizeof (ACPI_TABLE_PHAT)); - -- while (Offset < Table->Length) -+ while (Offset < TableLength) - { - /* Common subtable header */ - -+ SubtableType = AcpiUtReadUint16 (&Subtable->Type); -+ SubtableLength = AcpiUtReadUint16 (&Subtable->Length); -+ - AcpiOsPrintf ("\n"); -- Status = AcpiDmDumpTable (Length, 0, Subtable, -+ Status = AcpiDmDumpTable (TableLength, 0, Subtable, - sizeof (ACPI_PHAT_HEADER), AcpiDmTableInfoPhatHdr); - if (ACPI_FAILURE (Status)) - { - return; - } - -- switch (Subtable->Type) -+ switch (SubtableType) - { - case ACPI_PHAT_TYPE_FW_VERSION_DATA: - - InfoTable = AcpiDmTableInfoPhat0; -- SubtableLength = sizeof (ACPI_PHAT_VERSION_DATA); - break; - - case ACPI_PHAT_TYPE_FW_HEALTH_DATA: - - InfoTable = AcpiDmTableInfoPhat1; -- SubtableLength = sizeof (ACPI_PHAT_HEALTH_DATA); - break; - - default: -@@ -2072,22 +2074,22 @@ AcpiDmDumpPhat ( - return; - } - -- Status = AcpiDmDumpTable (Length, 0, Subtable, -+ Status = AcpiDmDumpTable (TableLength, 0, Subtable, - SubtableLength, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; - } - -- switch (Subtable->Type) -+ switch (SubtableType) - { - case ACPI_PHAT_TYPE_FW_VERSION_DATA: - - VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA, Subtable); -- RecordCount = VersionData->ElementCount; -+ RecordCount = AcpiUtReadUint32 (&VersionData->ElementCount); - while (RecordCount) - { -- Status = AcpiDmDumpTable (Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)), - sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a); - if (ACPI_FAILURE (Status)) -@@ -2105,7 +2107,7 @@ AcpiDmDumpPhat ( - /* account for the null terminator */ - - PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1; -- Status = AcpiDmDumpTable (Length, Offset, -+ Status = AcpiDmDumpTable (TableLength, Offset, - ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)), - PathLength, AcpiDmTableInfoPhat1a); - if (ACPI_FAILURE (Status)) -@@ -2116,8 +2118,8 @@ AcpiDmDumpPhat ( - /* Get vendor data - data length is the remaining subtable length */ - - VendorLength = -- Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength; -- Status = AcpiDmDumpTable (Length, 0, -+ SubtableLength - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength; -+ Status = AcpiDmDumpTable (TableLength, 0, - ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength), - VendorLength, AcpiDmTableInfoPhat1b); - if (ACPI_FAILURE (Status)) -@@ -2129,15 +2131,15 @@ AcpiDmDumpPhat ( - default: - - AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n", -- Subtable->Type); -+ SubtableType); - return; - } - - /* Next subtable */ - -- Offset += Subtable->Length; -+ Offset += SubtableLength; - Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, -- Subtable->Length); -+ SubtableLength); - } - } - -Index: acpica-unix2-20220331/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/dttable2.c -+++ acpica-unix2-20220331/source/compiler/dttable2.c -@@ -1267,6 +1267,8 @@ DtCompilePhat ( - ACPI_DMTABLE_INFO *Info; - ACPI_PHAT_VERSION_DATA *VersionData; - UINT32 RecordCount; -+ UINT16 SubtableType; -+ UINT16 Tmp16; - - - /* The table consist of subtables */ -@@ -1284,8 +1286,9 @@ DtCompilePhat ( - DtPushSubtable (Subtable); - - PhatHeader = ACPI_CAST_PTR (ACPI_PHAT_HEADER, Subtable->Buffer); -+ SubtableType = AcpiUtReadUint16 (&PhatHeader->Type); - -- switch (PhatHeader->Type) -+ switch (SubtableType) - { - case ACPI_PHAT_TYPE_FW_VERSION_DATA: - -@@ -1316,13 +1319,13 @@ DtCompilePhat ( - ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); - -- switch (PhatHeader->Type) -+ switch (SubtableType) - { - case ACPI_PHAT_TYPE_FW_VERSION_DATA: - - VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA, - (Subtable->Buffer - sizeof (ACPI_PHAT_HEADER))); -- RecordCount = VersionData->ElementCount; -+ RecordCount = AcpiUtReadUint32 (&VersionData->ElementCount); - - while (RecordCount) - { -@@ -1373,6 +1376,9 @@ DtCompilePhat ( - DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT"); - return (AE_ERROR); - } -+ -+ Tmp16 = AcpiUtReadUint16 (&PhatHeader->Length); -+ PhatHeader->Length = Tmp16; - } - - return (Status); diff --git a/0047-Support-PRMT-in-a-big-endian-world.patch b/0047-Support-PRMT-in-a-big-endian-world.patch deleted file mode 100644 index 96df1d5..0000000 --- a/0047-Support-PRMT-in-a-big-endian-world.patch +++ /dev/null @@ -1,51 +0,0 @@ -Signed-off-by: Dean Nelson -Reviewed-by: Al Stone ---- - source/common/dmtbdump2.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2415,13 +2415,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)) - { -@@ -2433,20 +2434,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); diff --git a/0048-Support-RGRT-in-a-big-endian-world.patch b/0048-Support-RGRT-in-a-big-endian-world.patch deleted file mode 100644 index 818d335..0000000 --- a/0048-Support-RGRT-in-a-big-endian-world.patch +++ /dev/null @@ -1,35 +0,0 @@ -Signed-off-by: Dean Nelson -Reviewed-by: Al Stone ---- - source/common/dmtbdump2.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump2.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump2.c -+++ acpica-unix2-20220331/source/common/dmtbdump2.c -@@ -2475,11 +2475,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; -@@ -2487,8 +2488,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; diff --git a/0049-Support-SVKL-in-a-big-endian-world.patch b/0049-Support-SVKL-in-a-big-endian-world.patch deleted file mode 100644 index 8ba5efc..0000000 --- a/0049-Support-SVKL-in-a-big-endian-world.patch +++ /dev/null @@ -1,42 +0,0 @@ -Signed-off-by: Dean Nelson -Reviewed-by: Al Stone ---- - source/common/dmtbdump3.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -Index: acpica-unix2-20220331/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20220331/source/common/dmtbdump3.c -@@ -344,14 +344,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; -@@ -360,12 +360,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)) - { diff --git a/OPT_LDFLAGS.patch b/OPT_LDFLAGS.patch index 2afc266..ff454b7 100644 --- a/OPT_LDFLAGS.patch +++ b/OPT_LDFLAGS.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20220331/generate/unix/Makefile.config +Index: acpica-unix2-20240321/generate/unix/Makefile.config =================================================================== ---- acpica-unix2-20220331.orig/generate/unix/Makefile.config -+++ acpica-unix2-20220331/generate/unix/Makefile.config +--- acpica-unix2-20240321.orig/generate/unix/Makefile.config ++++ acpica-unix2-20240321/generate/unix/Makefile.config @@ -23,6 +23,9 @@ # OPT_CFLAGS can be overridden on the make command line by # adding OPT_CFLAGS="..." to the invocation. diff --git a/acpica-tools.spec b/acpica-tools.spec index d63e30e..f654307 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,13 +1,13 @@ Name: acpica-tools -Version: 20220331 -Release: 10%{?dist} +Version: 20240322 +Release: 1%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only URL: https://www.acpica.org/ -ExcludeArch: i686 armv7hl +ExcludeArch: i686 armv7hl s390x Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz @@ -26,75 +26,23 @@ Source14: converterSample.asl.result Source15: run-misc-tests.sh Source16: COPYING -# the big-endian patch set -Patch0: 0001-Add-in-basic-infrastructure-for-big-endian-support.patch -Patch1: 0002-Modify-utility-functions-to-be-endian-agnostic.patch -Patch2: 0003-Always-display-table-header-content-in-human-readabl.patch -Patch3: 0004-Re-enable-support-for-big-endian-machines.patch -Patch4: 0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch -Patch5: 0006-Use-more-reliable-ACPI_COPY_NAMSEG-in-GPE-name-check.patch -Patch6: 0007-Handle-dumping-Unicode-properly-when-big-endian.patch -Patch7: 0008-Support-MADT-aka-APIC-in-a-big-endian-world.patch -Patch8: 0009-Support-ASF-tables-in-a-big-endian-world.patch -Patch9: 0010-Support-CPEP-tables-in-a-big-endian-world.patch -Patch10: 0011-Support-DBG2-table-in-a-big-endian-world.patch -Patch11: 0012-Support-DMAR-in-a-big-endian-world.patch -Patch12: 0013-Support-DRTM-in-a-big-endian-world.patch -Patch13: 0014-Support-EINJ-in-a-big-endian-world.patch -Patch14: 0015-Support-ERST-in-a-big-endian-world.patch -Patch15: 0016-Support-FADT-aka-FACP-in-a-big-endian-world.patch -Patch16: 0017-Support-most-FPDTs-in-a-big-endian-world.patch -Patch17: 0018-Support-GTDT-in-a-big-endian-world.patch -Patch18: 0019-Support-HEST-in-a-big-endian-world.patch -Patch19: 0020-Support-RSDT-RSD-PTR-in-a-big-endian-world.patch -Patch20: 0021-Support-XSDT-in-a-big-endian-world.patch -Patch21: 0022-Support-SRAT-in-a-big-endian-world.patch -Patch22: 0023-Support-SLIT-in-a-big-endian-world.patch -Patch23: 0024-Support-MSCT-in-a-big-endian-world.patch -Patch24: 0025-Support-MPST-in-a-big-endian-world.patch -Patch25: 0026-Support-NFIT-in-a-big-endian-world.patch -Patch26: 0027-Support-SDEV-in-a-big-endian-world.patch -Patch27: 0028-Support-HMAT-in-a-big-endian-world.patch -Patch28: 0029-Support-PDTT-in-a-big-endian-world.patch -Patch29: 0030-Support-PPTT-in-a-big-endian-world.patch -Patch30: 0031-Support-PCCT-in-a-big-endian-world.patch -Patch31: 0032-Support-WDAT-in-a-big-endian-world.patch -Patch32: 0033-Support-TCPA-in-a-big-endian-world.patch -Patch33: 0034-Support-STAO-in-a-big-endian-world.patch -Patch34: 0035-Support-SLIC-and-MSDM-in-a-big-endian-world.patch -Patch35: 0036-Support-MCFG-in-a-big-endian-world.patch -Patch36: 0037-Support-LPIT-in-a-big-endian-world.patch -Patch37: 0038-Support-PMTT-in-a-big-endian-world.patch -Patch38: 0039-Support-TPM2-in-a-big-endian-world.patch -Patch39: 0040-Support-S3PT-in-a-big-endian-world.patch -Patch40: 0041-Support-IORT-in-a-big-endian-world.patch -Patch41: 0042-Support-IVRS-in-a-big-endian-world.patch -Patch42: 0043-Support-DSDT-SSDT-in-a-big-endian-world.patch -Patch43: 0045-CSRT-fixed-use-of-optional-ResourceInfo.patch -Patch44: 0046-Support-PHAT-in-a-big-endian-world.patch -Patch45: 0047-Support-PRMT-in-a-big-endian-world.patch -Patch46: 0048-Support-RGRT-in-a-big-endian-world.patch -Patch47: 0049-Support-SVKL-in-a-big-endian-world.patch - # other miscellaneous patches Patch100: unaligned.patch -Patch101: OPT_LDFLAGS.patch -Patch102: int-format.patch -Patch103: f23-harden.patch +#Patch101: OPT_LDFLAGS.patch +#Patch102: int-format.patch Patch104: template.patch -Patch105: arm7hl.patch -Patch106: simple-64bit.patch -Patch107: mips-be-fix.patch +#Patch106: simple-64bit.patch +#Patch107: mips-be-fix.patch Patch108: cve-2017-13693.patch Patch109: cve-2017-13694.patch Patch110: cve-2017-13695.patch Patch111: str-trunc-warn.patch -Patch112: ptr-cast.patch -Patch113: armv7-str-fixes.patch +#Patch112: ptr-cast.patch +#Patch113: armv7-str-fixes.patch Patch114: dbtest.patch -Patch115: ull-32bit.patch Patch116: dangling-ptr.patch Patch117: uuid-len.patch +Patch118: fix-version.patch BuildRequires: make BuildRequires: bison patchutils flex gcc @@ -204,7 +152,7 @@ OPT_LDFLAGS="%{__global_ldflags}" export OPT_CFLAGS export OPT_LDFLAGS -make +%{make_build} %install @@ -260,6 +208,23 @@ fi %changelog +* Mon Aug 12 2024 Al Stone - 20240322-1 +- Update source tree to 20240322 version from upstream. NB: this update + is done in conjunction with removing s390x support due to the large + number of patches that are now rendered obsolete. Closes BZ#2138250. +- Note, too, that the upstream version of the tarball is missing two + commits and has the wrong name; discussed this with upstream and + included a patch with the two commits to correct this, and renamed + the tarballs to try to maintain consistency. So, upstream is actually + named version 20240321, but it should be 20240322 according to their + own git tree (see tag G20240322 on github). +- Removed executable bit from all the upstream source files +- Remove big-endian support, aka s390x. Closes BZ#2298855. +- Remove several 32-bit only patches that are also obsolete since they + are for unsupported architectures (thanks to pbonzini and PR#5). +- Remove PIE patches since that is currently the default (again, thanks + to pbonzini and PR#5) + * Mon Jul 29 2024 Miroslav Suchý - 20220331-10 - convert license to SPDX diff --git a/arm7hl.patch b/arm7hl.patch deleted file mode 100644 index ffe22e9..0000000 --- a/arm7hl.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: acpica-unix2-20220331/source/include/acmacros.h -=================================================================== ---- acpica-unix2-20220331.orig/source/include/acmacros.h -+++ acpica-unix2-20220331/source/include/acmacros.h -@@ -108,6 +108,8 @@ - - /* 16-bit source, 16/32/64 destination */ - -+#define ACPI_MOVE_16_TO_8(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];} -+ - #define ACPI_MOVE_16_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\ - (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];} - -@@ -127,6 +129,7 @@ - - /* 64-bit source, 16/32/64 destination */ - -+#define ACPI_MOVE_64_TO_8(d, s) ACPI_MOVE_16_TO_8(d, s) /* Truncate to 8 */ - #define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */ - #define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */ - #define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\ diff --git a/badcode.asl.result b/badcode.asl.result index d1229f4..a2e1a2c 100644 --- a/badcode.asl.result +++ b/badcode.asl.result @@ -1,3 +1,12 @@ +badcode.asl 37: Name (PATH, Buffer() {"\_SB_.PCI2._CRS"}) +Warning 3046 - ^ Invalid or unknown escape sequence + +badcode.asl 41: Name (ESC1, "abcdefg\x00hijklmn") +Warning 3055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL + +badcode.asl 268: QWordSpace (0xB0, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5, +Error 6139 - Constant out of range ^ (0xB0, allowable: 0xC0-0xFF) + badcode.asl 25: Mutex (MTX1, 32) Error 6125 - ^ SyncLevel must be in the range 0-15 @@ -256,11 +265,11 @@ Warning 3144 - ^ Method Local is set but never used Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version VVVVVVVV -Copyright (c) 2000 - 2022 Intel Corporation +Copyright (c) 2000 - 2023 Intel Corporation Ignoring all errors, forcing AML file generation -ASL Input: badcode.asl - 11588 bytes 81 keywords 408 source lines +ASL Input: badcode.asl - 11588 bytes 81 keywords 0 source lines AML Output: badcode.aml - 1195 bytes 20 opcodes 61 named objects -Compilation successful. 0 Errors, 28 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded +Compilation successful. 46 Errors, 28 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded diff --git a/converterSample.asl.result b/converterSample.asl.result index c890c9d..ccc9971 100644 --- a/converterSample.asl.result +++ b/converterSample.asl.result @@ -4,6 +4,21 @@ Remark 2182 - ^ At least one lower case letter found in N converterSample.asl 16: Name(p008, Package() Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (P008) +converterSample.asl 48: Name(b,0); +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (B___) + +converterSample.asl 53: Name (a, +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (A___) + +converterSample.asl 68: Name (a1, 0x04) +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (A1__) + +converterSample.asl 15: Name (b, 5) +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (B___) + +converterSample.asl 16: Name(p008, Package() +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (P008) + converterSample.asl 37: Method(MAIN) { Remark 2120 - ^ Control Method should be made Serialized due to creation of named objects within (\MAIN) @@ -28,11 +43,11 @@ Remark 2089 - Object is not referenced ^ (Name [A1__] is within a method [SC Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version VVVVVVVV -Copyright (c) 2000 - 2022 Intel Corporation +Copyright (c) 2000 - 2023 Intel Corporation Ignoring all errors, forcing AML file generation -ASL Input: converterSample.asl - 1968 bytes 11 keywords 85 source lines +ASL Input: converterSample.asl - 1968 bytes 11 keywords 0 source lines AML Output: converterSample.aml - 184 bytes 2 opcodes 9 named objects Compilation successful. 0 Errors, 0 Warnings, 9 Remarks, 9 Optimizations diff --git a/cve-2017-13693.patch b/cve-2017-13693.patch index 7e1a156..3e1849c 100644 --- a/cve-2017-13693.patch +++ b/cve-2017-13693.patch @@ -63,10 +63,10 @@ Github-Location: https://github.com/acpica/acpica/pull/295/commits/987a3b5cf7175 source/components/dispatcher/dsutils.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -Index: acpica-unix2-20220331/source/components/dispatcher/dsutils.c +Index: acpica-unix2-20240321/source/components/dispatcher/dsutils.c =================================================================== ---- acpica-unix2-20220331.orig/source/components/dispatcher/dsutils.c -+++ acpica-unix2-20220331/source/components/dispatcher/dsutils.c +--- acpica-unix2-20240321.orig/source/components/dispatcher/dsutils.c ++++ acpica-unix2-20240321/source/components/dispatcher/dsutils.c @@ -759,6 +759,8 @@ AcpiDsCreateOperands ( ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS]; UINT32 ArgCount = 0; diff --git a/cve-2017-13694.patch b/cve-2017-13694.patch index d1d3032..8ae2da4 100644 --- a/cve-2017-13694.patch +++ b/cve-2017-13694.patch @@ -130,10 +130,10 @@ Github-Location: https://github.com/acpica/acpica/pull/278/commits/4a0243ecb4c94 source/components/parser/psobject.c | 44 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 28 deletions(-) -Index: acpica-unix2-20220331/source/components/parser/psobject.c +Index: acpica-unix2-20240321/source/components/parser/psobject.c =================================================================== ---- acpica-unix2-20220331.orig/source/components/parser/psobject.c -+++ acpica-unix2-20220331/source/components/parser/psobject.c +--- acpica-unix2-20240321.orig/source/components/parser/psobject.c ++++ acpica-unix2-20240321/source/components/parser/psobject.c @@ -707,7 +707,8 @@ AcpiPsCompleteFinalOp ( ACPI_PARSE_OBJECT *Op, ACPI_STATUS Status) diff --git a/cve-2017-13695.patch b/cve-2017-13695.patch index e183a46..1a80450 100644 --- a/cve-2017-13695.patch +++ b/cve-2017-13695.patch @@ -67,10 +67,10 @@ Github-Location: https://github.com/acpica/acpica/pull/296/commits/37f2c716f2c6a source/components/namespace/nseval.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -Index: acpica-unix2-20220331/source/components/namespace/nseval.c +Index: acpica-unix2-20240321/source/components/namespace/nseval.c =================================================================== ---- acpica-unix2-20220331.orig/source/components/namespace/nseval.c -+++ acpica-unix2-20220331/source/components/namespace/nseval.c +--- acpica-unix2-20240321.orig/source/components/namespace/nseval.c ++++ acpica-unix2-20240321/source/components/namespace/nseval.c @@ -329,6 +329,16 @@ AcpiNsEvaluate ( Info->ReturnObject = NULL; } diff --git a/dangling-ptr.patch b/dangling-ptr.patch index 582fb9e..178020d 100644 --- a/dangling-ptr.patch +++ b/dangling-ptr.patch @@ -1,7 +1,8 @@ -diff -Naur acpica-unix2-20211217/source/components/utilities/utdebug.c acpica-unix2-20211217.orig/source/components/utilities/utdebug.c ---- acpica-unix2-20211217/source/components/utilities/utdebug.c 2022-03-15 17:05:07.992387565 -0600 -+++ acpica-unix2-20211217.orig/source/components/utilities/utdebug.c 2021-12-17 10:48:16.000000000 -0700 -@@ -58,6 +58,10 @@ +Index: acpica-unix2-20240321/source/components/utilities/utdebug.c +=================================================================== +--- acpica-unix2-20240321.orig/source/components/utilities/utdebug.c ++++ acpica-unix2-20240321/source/components/utilities/utdebug.c +@@ -58,6 +58,10 @@ static const char *AcpiGbl_Fun static const char *AcpiGbl_FunctionExitPrefix = "----Exit-"; @@ -12,7 +13,7 @@ diff -Naur acpica-unix2-20211217/source/components/utilities/utdebug.c acpica-un /******************************************************************************* * * FUNCTION: AcpiUtInitStackPtrTrace -@@ -114,6 +110,9 @@ +@@ -120,6 +124,9 @@ AcpiUtTrackStackPtr ( AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel; } } diff --git a/dbtest.patch b/dbtest.patch index b33e90b..54faf57 100644 --- a/dbtest.patch +++ b/dbtest.patch @@ -4,10 +4,10 @@ into an ACPI_OBJECT instead of just the pointer (see the use in the call to memcpy()). So, move the init so GCC recognizes that ValueToWrite is only a pointer, and not a whole string that needs to be moved. -Index: acpica-unix2-20220331/source/components/debugger/dbtest.c +Index: acpica-unix2-20240321/source/components/debugger/dbtest.c =================================================================== ---- acpica-unix2-20220331.orig/source/components/debugger/dbtest.c -+++ acpica-unix2-20220331/source/components/debugger/dbtest.c +--- acpica-unix2-20240321.orig/source/components/debugger/dbtest.c ++++ acpica-unix2-20240321/source/components/debugger/dbtest.c @@ -719,9 +719,10 @@ AcpiDbTestStringType ( ACPI_OBJECT *Temp1 = NULL; ACPI_OBJECT *Temp2 = NULL; diff --git a/f23-harden.patch b/f23-harden.patch deleted file mode 100644 index 4279c50..0000000 --- a/f23-harden.patch +++ /dev/null @@ -1,71 +0,0 @@ -Introduce build hardening flags for f23 - -From: Al Stone - - ---- - generate/unix/Makefile.config | 2 ++ - generate/unix/iasl/Makefile | 13 +++++++------ - 2 files changed, 9 insertions(+), 6 deletions(-) - -Index: acpica-unix2-20220331/generate/unix/Makefile.config -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/Makefile.config -+++ acpica-unix2-20220331/generate/unix/Makefile.config -@@ -189,6 +189,8 @@ ifneq ($(NOFORTIFY),TRUE) - OPT_CFLAGS += -D_FORTIFY_SOURCE=2 - endif - -+OPT_CFLAGS += -fPIC -pie -+ - CFLAGS += \ - -D$(ACPI_HOST)\ - -D_GNU_SOURCE\ -Index: acpica-unix2-20220331/generate/unix/iasl/Makefile -=================================================================== ---- acpica-unix2-20220331.orig/generate/unix/iasl/Makefile -+++ acpica-unix2-20220331/generate/unix/iasl/Makefile -@@ -359,34 +359,35 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prpa - # Cannot use the common compile warning flags since the C files are created - # by the utilities above and they are not necessarily ANSI C, etc. - # -+HARDENING_FLAGS = -fPIC -pie - $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/dtcompilerparserlex.o : $(OBJDIR)/dtcompilerparserlex.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/dtcompilerparserparse.o : $(OBJDIR)/dtcompilerparserparse.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< - - $(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c - @echo "- " "Intermediate" $< -- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< -+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $< diff --git a/fix-version.patch b/fix-version.patch new file mode 100644 index 0000000..2ff7407 --- /dev/null +++ b/fix-version.patch @@ -0,0 +1,50 @@ +The two changes that follow were inadvertently dropped by upstream +when creating the source tarball; the G20240322 tag in github contains +them. + +Signed-off-by: Al Stone + +diff -Naur acpica-unix-20240321/changes.txt acpica-unix-20240808/changes.txt +--- acpica-unix-20240321/changes.txt 2024-03-22 00:16:29.000000000 -0600 ++++ acpica-unix-20240808/changes.txt 2024-08-08 10:54:25.000000000 -0600 +@@ -1,4 +1,28 @@ + ---------------------------------------- ++22 March 2024. Summary of changes for version 20240322: ++ ++Major changes: ++ ++Update all the license header year from 2023 to 2024. ++ ++Fix table argument ordering to work properly with iasl. ++ ++Get rid of the annoying repeated warning types in MSVC and Windows. ++ ++Fix a test in ASLTS with edge case failure. ++ ++Fix a couple of issues with how GPEs are counted and enabled. ++ ++Add new tables for various architectures/OS, mainly RISC-V and also update many more. ++ ++Add an option to either make the output deterministic or non-deterministic. ++ ++Remove redundant checks, duplicated code and fix spellings in various files. ++ ++Fix flex arrays for C++ compilers and also make ACPICA overall more compatible with different compilers which throw warnings related to memory sanitization etc. ++ ++ ++---------------------------------------- + 28 June 2023. Summary of changes for version 20230628: + + 0) Global changes: +diff -Naur acpica-unix-20240321/source/include/acpixf.h acpica-unix-20240808/source/include/acpixf.h +--- acpica-unix-20240321/source/include/acpixf.h 2024-03-22 00:16:32.000000000 -0600 ++++ acpica-unix-20240808/source/include/acpixf.h 2024-08-08 10:54:25.000000000 -0600 +@@ -154,7 +154,7 @@ + + /* Current ACPICA subsystem version in YYYYMMDD format */ + +-#define ACPI_CA_VERSION 0x20230628 ++#define ACPI_CA_VERSION 0x20240322 + + #include "acconfig.h" + #include "actypes.h" diff --git a/grammar.asl.result b/grammar.asl.result index 5517bd6..8bc361b 100644 --- a/grammar.asl.result +++ b/grammar.asl.result @@ -1,3 +1,18 @@ +grammar.asl 522: NAME (ESC1, "abcdefg\x00hijklmn") +Warning 3055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL + +grammar.asl 523: NAME (ESC2, "abcdefg\000hijklmn") +Warning 3055 - ^ Invalid Hex/Octal Escape - Non-ASCII or NULL + +grammar.asl 552: IRQNoFlags(xxxt){3,4,10,11} +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (XXXT) + +grammar.asl 566: Name(Bxxx,0xFFFFFFFF) +Remark 2182 - ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (BXXX) + +grammar.asl 6478: Name (_CRS, Buffer(26) {"\_SB_.PCI2._CRS..........."}) +Warning 3046 - Invalid or unknown escape sequence ^ + grammar.asl 120: Device (A1) Error 6141 - ^ Missing dependency (Device object requires a _HID or _ADR) @@ -595,11 +610,11 @@ Error 6141 - Missing dependency ^ (Device object requires a _HID or _ADR) Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version VVVVVVVV -Copyright (c) 2000 - 2022 Intel Corporation +Copyright (c) 2000 - 2023 Intel Corporation Ignoring all errors, forcing AML file generation -ASL Input: grammar.asl - 323653 bytes 4818 keywords 10284 source lines +ASL Input: grammar.asl - 323653 bytes 4818 keywords 0 source lines AML Output: grammar.aml - 43758 bytes 4148 opcodes 670 named objects -Compilation successful. 0 Errors, 41 Warnings, 97 Remarks, 1106 Optimizations +Compilation successful. 60 Errors, 41 Warnings, 97 Remarks, 1106 Optimizations diff --git a/run-misc-tests.sh b/run-misc-tests.sh index c0da397..41e788c 100644 --- a/run-misc-tests.sh +++ b/run-misc-tests.sh @@ -16,7 +16,7 @@ BINDIR="$1" VERSION="$2" # create files to compare against -$BINDIR/iasl -hZZ +$BINDIR/iasl -h sed -e "s/VVVVVVVV/$VERSION/" \ ../badcode.asl.result > misc/badcode.asl.expected diff --git a/sources b/sources index d4bf4b2..3f9ece6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20220331.tar.gz) = c606396323dc342ae4c7bab9526b04aca09b00a932363146c1791523962ade0bdb4e40b67ff2a0a246df3ce322592879288c3fcc5fb7a450beb87a6d70c5ef40 -SHA512 (acpitests-unix-20220331.tar.gz) = 28ead3ff06fc7e409e5fd02358048470daac6d3a96f24408068b84199f33513b5fcaa7c00a31972e63fc481d4b5980f8b8f131549d9d1bcd19fa20f3a1c2aaaf +SHA512 (acpica-unix2-20240322.tar.gz) = 199a5acb93193f22b9f85690ad87cdf914185fdf52beafaec8c4299c29f4c9d5b618c72a62413b228307f5be3933cf51cdcd91a6728d9caea66408534006e3f8 +SHA512 (acpitests-unix-20240322.tar.gz) = e09b0b953d53e28b9849b1ed41068c5542f0e36eb47f442bba6238727bfd96ad94584c0aa1e8d92c307c317dbd208388d3d9c83c2d17e146571a7373bff40b98 diff --git a/str-trunc-warn.patch b/str-trunc-warn.patch index c866985..e510c7a 100644 --- a/str-trunc-warn.patch +++ b/str-trunc-warn.patch @@ -1,7 +1,7 @@ -Index: acpica-unix2-20220331/source/compiler/aslanalyze.c +Index: acpica-unix2-20240321/source/compiler/aslanalyze.c =================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslanalyze.c -+++ acpica-unix2-20220331/source/compiler/aslanalyze.c +--- acpica-unix2-20240321.orig/source/compiler/aslanalyze.c ++++ acpica-unix2-20240321/source/compiler/aslanalyze.c @@ -358,11 +358,16 @@ AnCheckMethodReturnValue ( */ if (ThisNodeBtype != 0) @@ -21,10 +21,10 @@ Index: acpica-unix2-20220331/source/compiler/aslanalyze.c } } -Index: acpica-unix2-20220331/source/compiler/aslpredef.c +Index: acpica-unix2-20240321/source/compiler/aslpredef.c =================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslpredef.c -+++ acpica-unix2-20220331/source/compiler/aslpredef.c +--- acpica-unix2-20240321.orig/source/compiler/aslpredef.c ++++ acpica-unix2-20240321/source/compiler/aslpredef.c @@ -159,14 +159,19 @@ ApCheckForPredefinedMethod ( if (MethodInfo->NumReturnNoValue && ThisName->Info.ExpectedBtypes) @@ -84,10 +84,10 @@ Index: acpica-unix2-20220331/source/compiler/aslpredef.c return (AE_TYPE); } -Index: acpica-unix2-20220331/source/compiler/aslwalks.c +Index: acpica-unix2-20240321/source/compiler/aslwalks.c =================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslwalks.c -+++ acpica-unix2-20220331/source/compiler/aslwalks.c +--- acpica-unix2-20240321.orig/source/compiler/aslwalks.c ++++ acpica-unix2-20240321/source/compiler/aslwalks.c @@ -515,15 +515,19 @@ AnOperandTypecheckWalkEnd ( else if (!CommonBtypes) { diff --git a/template.patch b/template.patch index 4f9af9b..c80287c 100644 --- a/template.patch +++ b/template.patch @@ -7,10 +7,10 @@ From: Al Stone tests/templates/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: acpica-unix2-20220331/tests/templates/Makefile +Index: acpica-unix2-20240321/tests/templates/Makefile =================================================================== ---- acpica-unix2-20220331.orig/tests/templates/Makefile -+++ acpica-unix2-20220331/tests/templates/Makefile +--- acpica-unix2-20240321.orig/tests/templates/Makefile ++++ acpica-unix2-20240321/tests/templates/Makefile @@ -26,7 +26,7 @@ $(aml_obj): %.aml: %.asl diff --git a/ull-32bit.patch b/ull-32bit.patch deleted file mode 100644 index 9de0473..0000000 --- a/ull-32bit.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: acpica-unix2-20220331/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/common/dmtbdump.c -+++ acpica-unix2-20220331/source/common/dmtbdump.c -@@ -392,7 +392,11 @@ AcpiDmDumpXsdt ( - for (i = 0; i < Entries; i++) - { - AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); -+#if ACPI_MACHINE_WIDTH == 32 -+ AcpiOsPrintf ("%16.16llX\n", AcpiUtReadUint64 (&Array[i])); -+#else - AcpiOsPrintf ("%16.16lX\n", AcpiUtReadUint64 (&Array[i])); -+#endif - Offset += sizeof (UINT64); - } - } diff --git a/unaligned.patch b/unaligned.patch index 11d6c86..ff5c729 100644 --- a/unaligned.patch +++ b/unaligned.patch @@ -14,10 +14,10 @@ Signed-off-by: Paolo Bonzini source/include/actypes.h | 26 +++++++++++++------------- 3 files changed, 32 insertions(+), 21 deletions(-) -Index: acpica-unix2-20220331/source/components/executer/exoparg2.c +Index: acpica-unix2-20240321/source/components/executer/exoparg2.c =================================================================== ---- acpica-unix2-20220331.orig/source/components/executer/exoparg2.c -+++ acpica-unix2-20220331/source/components/executer/exoparg2.c +--- acpica-unix2-20240321.orig/source/components/executer/exoparg2.c ++++ acpica-unix2-20240321/source/components/executer/exoparg2.c @@ -172,6 +172,8 @@ AcpiExOpcode_2A_2T_1R ( ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_OPERAND_OBJECT *ReturnDesc1 = NULL; @@ -58,10 +58,10 @@ Index: acpica-unix2-20220331/source/components/executer/exoparg2.c break; case AML_CONCATENATE_OP: /* Concatenate (Data1, Data2, Result) */ -Index: acpica-unix2-20220331/source/include/actypes.h +Index: acpica-unix2-20240321/source/include/actypes.h =================================================================== ---- acpica-unix2-20220331.orig/source/include/actypes.h -+++ acpica-unix2-20220331/source/include/actypes.h +--- acpica-unix2-20240321.orig/source/include/actypes.h ++++ acpica-unix2-20240321/source/include/actypes.h @@ -143,6 +143,19 @@ typedef COMPILER_DEPENDENT_INT64 */ #define ACPI_THREAD_ID UINT64 diff --git a/uuid-len.patch b/uuid-len.patch index 26fd798..8e240e9 100644 --- a/uuid-len.patch +++ b/uuid-len.patch @@ -1,7 +1,8 @@ -diff -Naur acpica-unix2-20211217.orig/source/tools/acpiexec/aeregion.c acpica-unix2-20211217/source/tools/acpiexec/aeregion.c ---- acpica-unix2-20211217.orig/source/tools/acpiexec/aeregion.c 2021-12-17 10:48:17.000000000 -0700 -+++ acpica-unix2-20211217/source/tools/acpiexec/aeregion.c 2022-03-18 15:53:25.032687782 -0600 -@@ -97,7 +97,7 @@ +Index: acpica-unix2-20240321/source/tools/acpiexec/aeregion.c +=================================================================== +--- acpica-unix2-20240321.orig/source/tools/acpiexec/aeregion.c ++++ acpica-unix2-20240321/source/tools/acpiexec/aeregion.c +@@ -97,7 +97,7 @@ AeRegionHandler ( UINT32 Value1; UINT32 Value2; ACPI_RESOURCE *Resource; From b0faa22b607566893f7a59a8f4fde83e475f0460 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Tue, 13 Aug 2024 12:48:42 -0600 Subject: [PATCH 23/28] Final patch cleanup Added three new patches to fix problems with dumping various tables, and removed all the remaining patches that no longer serve a purpose. Thanks to the contributors for PR#4 and PR#5 for the suggestions. These have all been incorporated even if they are not in exactly the same form. Signed-off-by: Al Stone --- 0001-Correct-DBG2-dump-of-OemData.patch | 34 +++ 0002-Correct-dumping-of-SLIC-tables.patch | 30 ++ ...T-FW-health-table-can-be-zero-length.patch | 37 +++ OPT_LDFLAGS.patch | 26 -- acpica-tools.spec | 29 +- armv7-str-fixes.patch | 13 - int-format.patch | 283 ------------------ mips-be-fix.patch | 22 -- ptr-cast.patch | 49 --- simple-64bit.patch | 21 -- wpbt-unicode.patch | 196 ------------ 11 files changed, 114 insertions(+), 626 deletions(-) create mode 100644 0001-Correct-DBG2-dump-of-OemData.patch create mode 100644 0002-Correct-dumping-of-SLIC-tables.patch create mode 100644 0003-PHAT-FW-health-table-can-be-zero-length.patch delete mode 100644 OPT_LDFLAGS.patch delete mode 100644 armv7-str-fixes.patch delete mode 100644 int-format.patch delete mode 100644 mips-be-fix.patch delete mode 100644 ptr-cast.patch delete mode 100644 simple-64bit.patch delete mode 100644 wpbt-unicode.patch diff --git a/0001-Correct-DBG2-dump-of-OemData.patch b/0001-Correct-DBG2-dump-of-OemData.patch new file mode 100644 index 0000000..b185343 --- /dev/null +++ b/0001-Correct-DBG2-dump-of-OemData.patch @@ -0,0 +1,34 @@ +From ec87f7e157a23078dc5458d6d26951fe4e2ac926 Mon Sep 17 00:00:00 2001 +From: Al Stone +Date: Wed, 14 Apr 2021 20:52:05 -0600 +Subject: [PATCH 1/2] Correct DBG2 dump of OemData + +When OemData is present in a Device subtable, the original code was +reading data to put in OemData from the beginning of the DBG2 table, +not from the subtable that was being built. So, when dumping the +table, read from the proper place (the subtable) and not the beginning +of the DBG2 table. + +Signed-off-by: Al Stone +--- + source/common/dmtbdump1.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c +index bcf985325..56d959fd0 100644 +--- a/source/common/dmtbdump1.c ++++ b/source/common/dmtbdump1.c +@@ -1371,8 +1371,8 @@ AcpiDmDumpDbg2 ( + + if (Subtable->OemDataOffset) + { +- Status = AcpiDmDumpTable (Length, Offset + Subtable->OemDataOffset, +- Table, Subtable->OemDataLength, ++ Status = AcpiDmDumpTable (Length, Subtable->OemDataOffset, ++ Subtable, Subtable->OemDataLength, + AcpiDmTableInfoDbg2OemData); + if (ACPI_FAILURE (Status)) + { +-- +2.45.2 + diff --git a/0002-Correct-dumping-of-SLIC-tables.patch b/0002-Correct-dumping-of-SLIC-tables.patch new file mode 100644 index 0000000..76dcf57 --- /dev/null +++ b/0002-Correct-dumping-of-SLIC-tables.patch @@ -0,0 +1,30 @@ +From 957662e99f6ec38849a9cf47eaebe1c232f74bbd Mon Sep 17 00:00:00 2001 +From: Al Stone +Date: Wed, 14 Apr 2021 21:18:12 -0600 +Subject: [PATCH 2/2] Correct dumping of SLIC tables + +When dumping the SLIC table, the code was not starting at the proper +offset. Set the offset to the first byte after the header. + +Signed-off-by: Al Stone +--- + source/common/dmtbdump3.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/source/common/dmtbdump3.c b/source/common/dmtbdump3.c +index 6e5f5d7ff..9a5b5ecd5 100644 +--- a/source/common/dmtbdump3.c ++++ b/source/common/dmtbdump3.c +@@ -177,7 +177,8 @@ AcpiDmDumpSlic ( + ACPI_TABLE_HEADER *Table) + { + +- (void) AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), Table, ++ (void) AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), ++ (void *) (Table + sizeof (*Table)), + Table->Length - sizeof (*Table), AcpiDmTableInfoSlic); + } + +-- +2.45.2 + diff --git a/0003-PHAT-FW-health-table-can-be-zero-length.patch b/0003-PHAT-FW-health-table-can-be-zero-length.patch new file mode 100644 index 0000000..159b56e --- /dev/null +++ b/0003-PHAT-FW-health-table-can-be-zero-length.patch @@ -0,0 +1,37 @@ +From 1fb473e41bcbfbe21c02bcb30983b87aa94a6cb8 Mon Sep 17 00:00:00 2001 +From: Al Stone +Date: Tue, 13 Aug 2024 09:50:37 -0600 +Subject: [PATCH] PHAT FW health table can be zero-length + +When calculating the VendorLength of the PHAT FW health data subtable, +the result becomes a negative integer. However, since UINT32 is being +used, it looks like a huge positive integer instead. Conditionalize +the length calculation to handle this case properly. + +This was discovered by using the command: iasl -T phat + +Signed-off-by: Al Stone +--- + source/common/dmtbdump2.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c +index 32b76b382..dd4d4878e 100644 +--- a/source/common/dmtbdump2.c ++++ b/source/common/dmtbdump2.c +@@ -2432,8 +2432,10 @@ AcpiDmDumpPhat ( + + /* Get Device-Specific Data - length of which is the remaining subtable length. */ + +- VendorLength = +- Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength; ++ VendorLength = 0; ++ if (Subtable->Length > sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength) ++ VendorLength = ++ Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength; + DbgPrint (ASL_DEBUG_OUTPUT, "%u, Subtable->Length %X, VendorLength %X, Offset %X PathLength: %X\n", + __LINE__, Subtable->Length, VendorLength, Offset, PathLength); + +-- +2.45.2 + diff --git a/OPT_LDFLAGS.patch b/OPT_LDFLAGS.patch deleted file mode 100644 index ff454b7..0000000 --- a/OPT_LDFLAGS.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: acpica-unix2-20240321/generate/unix/Makefile.config -=================================================================== ---- acpica-unix2-20240321.orig/generate/unix/Makefile.config -+++ acpica-unix2-20240321/generate/unix/Makefile.config -@@ -23,6 +23,9 @@ - # OPT_CFLAGS can be overridden on the make command line by - # adding OPT_CFLAGS="..." to the invocation. - # -+# OPT_LDFLAGS can be overridden on the make command line by -+# adding OPT_LDFLAGS="..." to the invocation. -+# - # Notes: - # gcc should be version 4 or greater, otherwise some of the options - # used will not be recognized. -@@ -164,6 +167,11 @@ LDFLAGS +=-m32 - endif - - # -+# Common linker flags -+# -+OPT_LDFLAGS ?= -+ -+# - # Optionally disable optimizations. Optimization causes problems on - # some compilers such as gcc 4.4 - # diff --git a/acpica-tools.spec b/acpica-tools.spec index f654307..4b963e7 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -27,22 +27,19 @@ Source15: run-misc-tests.sh Source16: COPYING # other miscellaneous patches -Patch100: unaligned.patch -#Patch101: OPT_LDFLAGS.patch -#Patch102: int-format.patch -Patch104: template.patch -#Patch106: simple-64bit.patch -#Patch107: mips-be-fix.patch -Patch108: cve-2017-13693.patch -Patch109: cve-2017-13694.patch -Patch110: cve-2017-13695.patch -Patch111: str-trunc-warn.patch -#Patch112: ptr-cast.patch -#Patch113: armv7-str-fixes.patch -Patch114: dbtest.patch -Patch116: dangling-ptr.patch -Patch117: uuid-len.patch -Patch118: fix-version.patch +Patch00: unaligned.patch +Patch01: template.patch +Patch02: cve-2017-13693.patch +Patch03: cve-2017-13694.patch +Patch04: cve-2017-13695.patch +Patch05: str-trunc-warn.patch +Patch06: dbtest.patch +Patch07: dangling-ptr.patch +Patch08: uuid-len.patch +Patch09: fix-version.patch +Patch10: 0001-Correct-DBG2-dump-of-OemData.patch +Patch11: 0002-Correct-dumping-of-SLIC-tables.patch +Patch12: 0003-PHAT-FW-health-table-can-be-zero-length.patch BuildRequires: make BuildRequires: bison patchutils flex gcc diff --git a/armv7-str-fixes.patch b/armv7-str-fixes.patch deleted file mode 100644 index 69cc5b6..0000000 --- a/armv7-str-fixes.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: acpica-unix2-20220331/source/include/actypes.h -=================================================================== ---- acpica-unix2-20220331.orig/source/include/actypes.h -+++ acpica-unix2-20220331/source/include/actypes.h -@@ -564,7 +564,7 @@ typedef UINT64 - #define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) - #else - #define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) --#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE)) -+#define ACPI_COPY_NAMESEG(dest,src) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE)) - #endif - - /* Support for the special RSDP signature (8 characters) */ diff --git a/int-format.patch b/int-format.patch deleted file mode 100644 index ce98627..0000000 --- a/int-format.patch +++ /dev/null @@ -1,283 +0,0 @@ -Use proper integer formatting - -From: Al Stone - - ---- - source/compiler/aslerror.c | 4 ++-- - source/compiler/aslopt.c | 2 +- - source/compiler/aslprepkg.c | 2 +- - source/components/debugger/dbexec.c | 2 +- - source/components/dispatcher/dsmthdat.c | 4 ++-- - source/components/dispatcher/dsutils.c | 2 +- - source/components/dispatcher/dswscope.c | 4 ++-- - source/components/events/evgpe.c | 4 ++-- - source/components/executer/exdump.c | 2 +- - source/components/executer/exfldio.c | 4 ++-- - source/components/executer/exnames.c | 4 ++-- - source/components/hardware/hwregs.c | 2 +- - source/components/tables/tbfadt.c | 6 +++--- - source/components/tables/tbxfroot.c | 6 +++--- - source/components/utilities/utownerid.c | 2 +- - 18 files changed, 28 insertions(+), 28 deletions(-) - -Index: acpica-unix2-20220331/source/compiler/aslerror.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslerror.c -+++ acpica-unix2-20220331/source/compiler/aslerror.c -@@ -917,7 +917,7 @@ AslLogNewError ( - AslGbl_ExceptionCount[ModifiedLevel]++; - if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT) - { -- printf ("\nMaximum error count (%u) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT); -+ printf ("\nMaximum error count (%d) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT); - - AslGbl_SourceLine = 0; - AslGbl_NextError = AslGbl_ErrorLog; -Index: acpica-unix2-20220331/source/compiler/aslopt.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslopt.c -+++ acpica-unix2-20220331/source/compiler/aslopt.c -@@ -583,7 +583,7 @@ OptOptimizeNamePath ( - } - - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, -- "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ", -+ "PATH OPTIMIZE: Line %5u ParentOp [%12.12s] ThisOp [%12.12s] ", - Op->Asl.LogicalLineNumber, - AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), - AcpiPsGetOpcodeName (Op->Common.AmlOpcode))); -Index: acpica-unix2-20220331/source/compiler/aslprepkg.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslprepkg.c -+++ acpica-unix2-20220331/source/compiler/aslprepkg.c -@@ -320,7 +320,7 @@ ApCheckPackage ( - - if (Count & 1) - { -- sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %d, must be even.", -+ sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %u, must be even.", - Predefined->Info.Name, Count); - - AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, -Index: acpica-unix2-20220331/source/components/debugger/dbexec.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/debugger/dbexec.c -+++ acpica-unix2-20220331/source/components/debugger/dbexec.c -@@ -231,7 +231,7 @@ AcpiDbExecuteMethod ( - ACPI_ERROR ((AE_INFO, - "Possible buffer overflow within AML Debugger " - "buffer (size 0x%X needed 0x%X)", -- ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length)); -+ (UINT32) ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length)); - } - } - -Index: acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/dispatcher/dsmthdat.c -+++ acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c -@@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode ( - if (Index > ACPI_METHOD_MAX_LOCAL) - { - ACPI_ERROR ((AE_INFO, -- "Local index %u is invalid (max %u)", -+ "Local index %u is invalid (max %d)", - Index, ACPI_METHOD_MAX_LOCAL)); - return_ACPI_STATUS (AE_AML_INVALID_INDEX); - } -@@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode ( - if (Index > ACPI_METHOD_MAX_ARG) - { - ACPI_ERROR ((AE_INFO, -- "Arg index %u is invalid (max %u)", -+ "Arg index %u is invalid (max %d)", - Index, ACPI_METHOD_MAX_ARG)); - return_ACPI_STATUS (AE_AML_INVALID_INDEX); - } -Index: acpica-unix2-20220331/source/components/dispatcher/dsutils.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/dispatcher/dsutils.c -+++ acpica-unix2-20220331/source/components/dispatcher/dsutils.c -@@ -786,7 +786,7 @@ AcpiDsCreateOperands ( - } - - ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, -- "NumOperands %d, ArgCount %d, Index %d\n", -+ "NumOperands %d, ArgCount %u, Index %u\n", - WalkState->NumOperands, ArgCount, Index)); - - /* Create the interpreter arguments, in reverse order */ -Index: acpica-unix2-20220331/source/components/dispatcher/dswscope.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/dispatcher/dswscope.c -+++ acpica-unix2-20220331/source/components/dispatcher/dswscope.c -@@ -149,7 +149,7 @@ AcpiDsScopeStackPush ( - WalkState->ScopeDepth++; - - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, -- "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth)); -+ "[%.2d] Pushed scope ", WalkState->ScopeDepth)); - - OldScopeInfo = WalkState->ScopeInfo; - if (OldScopeInfo) -@@ -211,7 +211,7 @@ AcpiDsScopeStackPop ( - WalkState->ScopeDepth--; - - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, -- "[%.2d] Popped scope [%4.4s] (%s), New scope -> ", -+ "[%.2u] Popped scope [%4.4s] (%s), New scope -> ", - (UINT32) WalkState->ScopeDepth, - AcpiUtGetNodeName (ScopeInfo->Scope.Node), - AcpiUtGetTypeName (ScopeInfo->Common.Value))); -Index: acpica-unix2-20220331/source/components/events/evgpe.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/events/evgpe.c -+++ acpica-unix2-20220331/source/components/events/evgpe.c -@@ -488,7 +488,7 @@ AcpiEvGpeDetect ( - "Ignore disabled registers for GPE %02X-%02X: " - "RunEnable=%02X, WakeEnable=%02X\n", - GpeRegisterInfo->BaseGpeNumber, -- GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), -+ (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)), - GpeRegisterInfo->EnableForRun, - GpeRegisterInfo->EnableForWake)); - continue; -Index: acpica-unix2-20220331/source/components/executer/exdump.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/executer/exdump.c -+++ acpica-unix2-20220331/source/components/executer/exdump.c -@@ -678,7 +678,7 @@ AcpiExDumpOperand ( - if (Depth > 0) - { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p Refs=%u ", -- Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount)); -+ (int) Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount)); - } - else - { -Index: acpica-unix2-20220331/source/components/executer/exfldio.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/executer/exfldio.c -+++ acpica-unix2-20220331/source/components/executer/exfldio.c -@@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule ( - - ACPI_ERROR ((AE_INFO, - "Unknown UpdateRule value: 0x%X", -- (ObjDesc->CommonField.FieldFlags & -- AML_FIELD_UPDATE_RULE_MASK))); -+ (unsigned int) (ObjDesc->CommonField.FieldFlags & -+ AML_FIELD_UPDATE_RULE_MASK))); - return_ACPI_STATUS (AE_AML_OPERAND_VALUE); - } - } -Index: acpica-unix2-20220331/source/components/executer/exnames.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/executer/exnames.c -+++ acpica-unix2-20220331/source/components/executer/exnames.c -@@ -237,7 +237,7 @@ AcpiExNameSegment ( - */ - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, - "Leading character is not alpha: %02Xh (not a name)\n", -- CharBuf[0])); -+ (unsigned int) CharBuf[0])); - Status = AE_CTRL_PENDING; - } - else -@@ -249,7 +249,7 @@ AcpiExNameSegment ( - Status = AE_AML_BAD_NAME; - ACPI_ERROR ((AE_INFO, - "Bad character 0x%02x in name, at %p", -- *AmlAddress, AmlAddress)); -+ (unsigned int) (*AmlAddress), AmlAddress)); - } - - *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress); -Index: acpica-unix2-20220331/source/components/hardware/hwregs.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/hardware/hwregs.c -+++ acpica-unix2-20220331/source/components/hardware/hwregs.c -@@ -460,7 +460,7 @@ AcpiHwClearAcpiStatus ( - - - ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n", -- ACPI_BITMASK_ALL_FIXED_STATUS, -+ (UINT32) ACPI_BITMASK_ALL_FIXED_STATUS, - ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address))); - - LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock); -Index: acpica-unix2-20220331/source/components/tables/tbfadt.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/tables/tbfadt.c -+++ acpica-unix2-20220331/source/components/tables/tbfadt.c -@@ -233,7 +233,7 @@ AcpiTbInitGenericAddress ( - if (!(Flags & ACPI_FADT_GPE_REGISTER)) - { - ACPI_ERROR ((AE_INFO, -- "%s - 32-bit FADT register is too long (%u bytes, %u bits) " -+ "%s - 32-bit FADT register is too long (%u bytes, %d bits) " - "to convert to GAS struct - 255 bits max, truncating", - RegisterName, ByteWidth, (ByteWidth * 8))); - } -@@ -303,7 +303,7 @@ AcpiTbSelectAddress ( - - ACPI_BIOS_WARNING ((AE_INFO, - "32/64X %s address mismatch in FADT: " -- "0x%8.8X/0x%8.8X%8.8X, using %u-bit address", -+ "0x%8.8X/0x%8.8X%8.8X, using %d-bit address", - RegisterName, Address32, ACPI_FORMAT_UINT64 (Address64), - AcpiGbl_Use32BitFadtAddresses ? 32 : 64)); - -@@ -631,7 +631,7 @@ AcpiTbConvertFadt ( - - ACPI_BIOS_WARNING ((AE_INFO, - "32/64X address mismatch in FADT/%s: " -- "0x%8.8X/0x%8.8X%8.8X, using %u-bit address", -+ "0x%8.8X/0x%8.8X%8.8X, using %d-bit address", - Name, Address32, - ACPI_FORMAT_UINT64 (Address64->Address), - AcpiGbl_Use32BitFadtAddresses ? 32 : 64)); -Index: acpica-unix2-20220331/source/components/tables/tbxfroot.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/tables/tbxfroot.c -+++ acpica-unix2-20220331/source/components/tables/tbxfroot.c -@@ -177,7 +177,7 @@ AcpiFindRootPointer ( - { - ACPI_ERROR ((AE_INFO, - "Could not map memory at 0x%8.8X for length %u", -- ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH)); -+ (UINT32) ACPI_EBDA_PTR_LOCATION, (UINT32) ACPI_EBDA_PTR_LENGTH)); - - return_ACPI_STATUS (AE_NO_MEMORY); - } -@@ -204,7 +204,7 @@ AcpiFindRootPointer ( - { - ACPI_ERROR ((AE_INFO, - "Could not map memory at 0x%8.8X for length %u", -- PhysicalAddress, ACPI_EBDA_WINDOW_SIZE)); -+ PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE)); - - return_ACPI_STATUS (AE_NO_MEMORY); - } -@@ -236,7 +236,7 @@ AcpiFindRootPointer ( - { - ACPI_ERROR ((AE_INFO, - "Could not map memory at 0x%8.8X for length %u", -- ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE)); -+ (UINT32) ACPI_HI_RSDP_WINDOW_BASE, (UINT32) ACPI_HI_RSDP_WINDOW_SIZE)); - - return_ACPI_STATUS (AE_NO_MEMORY); - } -Index: acpica-unix2-20220331/source/components/utilities/utownerid.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/utilities/utownerid.c -+++ acpica-unix2-20220331/source/components/utilities/utownerid.c -@@ -237,7 +237,7 @@ AcpiUtReleaseOwnerId ( - else - { - ACPI_ERROR ((AE_INFO, -- "Attempted release of non-allocated OwnerId: 0x%3.3X", OwnerId + 1)); -+ "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1)); - } - - (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); diff --git a/mips-be-fix.patch b/mips-be-fix.patch deleted file mode 100644 index c84e9c8..0000000 --- a/mips-be-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: acpica-unix2-20220331/source/compiler/aslparseop.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslparseop.c -+++ acpica-unix2-20220331/source/compiler/aslparseop.c -@@ -285,7 +285,16 @@ TrCreateValuedLeafOp ( - - - Op = TrAllocateOp (ParseOpcode); -- Op->Asl.Value.Integer = Value; -+ if (ParseOpcode == PARSEOP_NAMESTRING || -+ ParseOpcode == PARSEOP_NAMESEG || -+ ParseOpcode == PARSEOP_STRING_LITERAL) -+ { -+ Op->Asl.Value.String = (char *) Value; -+ } -+ else -+ { -+ Op->Asl.Value.Integer = Value; -+ } - - DbgPrint (ASL_PARSE_OUTPUT, - "\nCreateValuedLeafOp Ln/Col %u/%u NewOp %p " diff --git a/ptr-cast.patch b/ptr-cast.patch deleted file mode 100644 index 0a24429..0000000 --- a/ptr-cast.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: acpica-unix2-20220331/source/components/tables/tbutils.c -=================================================================== ---- acpica-unix2-20220331.orig/source/components/tables/tbutils.c -+++ acpica-unix2-20220331/source/components/tables/tbutils.c -@@ -238,9 +238,11 @@ AcpiTbGetRootTableEntry ( - * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, - * return 64-bit - */ -- ACPI_MOVE_64_TO_64 (&Address64, TableEntry); - - #if ACPI_MACHINE_WIDTH == 32 -+ UINT32 Tmp32 = (UINT32) TableEntry; -+ -+ Address64 = (UINT64) Tmp32; - if (Address64 > ACPI_UINT32_MAX) - { - /* Will truncate 64-bit address to 32 bits, issue warning */ -@@ -250,8 +252,14 @@ AcpiTbGetRootTableEntry ( - " truncating", - ACPI_FORMAT_UINT64 (Address64))); - } --#endif -+ -+ return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR ( -+ UINT32, TableEntry))); -+#else -+ Address64 = (UINT64) TableEntry; -+ - return ((ACPI_PHYSICAL_ADDRESS) (Address64)); -+#endif - } - } - -Index: acpica-unix2-20220331/source/compiler/aslparseop.c -=================================================================== ---- acpica-unix2-20220331.orig/source/compiler/aslparseop.c -+++ acpica-unix2-20220331/source/compiler/aslparseop.c -@@ -289,7 +289,11 @@ TrCreateValuedLeafOp ( - ParseOpcode == PARSEOP_NAMESEG || - ParseOpcode == PARSEOP_STRING_LITERAL) - { -+#if ACPI_MACHINE_WIDTH == 32 -+ Op->Asl.Value.String = (char *) (UINT32) Value; -+#else - Op->Asl.Value.String = (char *) Value; -+#endif - } - else - { diff --git a/simple-64bit.patch b/simple-64bit.patch deleted file mode 100644 index c0403c7..0000000 --- a/simple-64bit.patch +++ /dev/null @@ -1,21 +0,0 @@ -Description: Stop listing all 64bit architectures - Check __LP64__ instead of maintaining a list of all - 64bit architectures. -Author: Adrian Bunk - -Index: acpica-unix2-20220331/source/include/platform/aclinux.h -=================================================================== ---- acpica-unix2-20220331.orig/source/include/platform/aclinux.h -+++ acpica-unix2-20220331/source/include/platform/aclinux.h -@@ -220,10 +220,7 @@ - #define ACPI_FLUSH_CPU_CACHE() - #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) - --#if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ -- defined(__aarch64__) || defined(__PPC64__) ||\ -- defined(__s390x__) ||\ -- (defined(__riscv) && (defined(__LP64__) || defined(_LP64))) -+#if defined(__LP64__) - #define ACPI_MACHINE_WIDTH 64 - #define COMPILER_DEPENDENT_INT64 long - #define COMPILER_DEPENDENT_UINT64 unsigned long diff --git a/wpbt-unicode.patch b/wpbt-unicode.patch deleted file mode 100644 index 1d9c38d..0000000 --- a/wpbt-unicode.patch +++ /dev/null @@ -1,196 +0,0 @@ -Index: acpica-unix2-20210604/source/common/dmtable.c -=================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtable.c -+++ acpica-unix2-20210604/source/common/dmtable.c -@@ -979,6 +979,12 @@ AcpiDmDumpTable ( - ByteLength = 128; - break; - -+ case ACPI_DMT_WPBT_UNICODE: -+ -+ ByteLength = SubtableLength; -+ CurrentOffset = sizeof (ACPI_TABLE_WPBT); -+ break; -+ - case ACPI_DMT_UNICODE: - case ACPI_DMT_BUFFER: - case ACPI_DMT_RAW_BUFFER: -@@ -1596,6 +1602,7 @@ AcpiDmDumpTable ( - break; - - case ACPI_DMT_UNICODE: -+ case ACPI_DMT_WPBT_UNICODE: - - if (ByteLength == 0) - { -Index: acpica-unix2-20210604/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20210604/source/common/dmtbdump3.c -@@ -753,8 +753,11 @@ AcpiDmDumpWpbt ( - Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); - ArgumentsLength = AcpiUtReadUint16 (&Subtable->ArgumentsLength); - -- /* Dump the arguments buffer */ -+ /* Dump the arguments buffer if present */ - -- (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength, -- AcpiDmTableInfoWpbt0); -+ if (ArgumentsLength) -+ { -+ (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength, -+ AcpiDmTableInfoWpbt0); -+ } - } -Index: acpica-unix2-20210604/source/common/dmtbinfo3.c -=================================================================== ---- acpica-unix2-20210604.orig/source/common/dmtbinfo3.c -+++ acpica-unix2-20210604/source/common/dmtbinfo3.c -@@ -651,7 +651,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI - - ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] = - { -- {ACPI_DMT_UNICODE, sizeof (ACPI_TABLE_WPBT), "Command-line Arguments", 0}, -+ {ACPI_DMT_WPBT_UNICODE, ACPI_WPBT2_OFFSET (UnicodeString), "Command-line Arguments", DT_DESCRIBES_OPTIONAL}, - ACPI_DMT_TERMINATOR - }; - -Index: acpica-unix2-20210604/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dttable2.c -+++ acpica-unix2-20210604/source/compiler/dttable2.c -@@ -2615,13 +2615,11 @@ DtCompileWpbt ( - DT_SUBTABLE *ParentTable; - ACPI_TABLE_WPBT *Table; - ACPI_STATUS Status; -- UINT16 Length; - - - /* Compile the main table */ - -- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, -- &Subtable); -+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, &Subtable); - if (ACPI_FAILURE (Status)) - { - return (Status); -@@ -2629,11 +2627,23 @@ DtCompileWpbt ( - - ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); -+ Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); -+ -+ /* -+ * Exit now if there are no arguments specified. This is indicated by: -+ * The "Command-line Arguments" field has not been specified (if specified, -+ * it will be the last field in the field list -- after the main table). -+ * Set the Argument Length in the main table to zero. -+ */ -+ if (!*PFieldList) -+ { -+ Table->ArgumentsLength = 0; -+ return (AE_OK); -+ } - - /* Compile the argument list subtable */ - -- Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, -- &Subtable); -+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, &Subtable); - if (ACPI_FAILURE (Status)) - { - return (Status); -@@ -2641,12 +2651,8 @@ DtCompileWpbt ( - - /* Extract the length of the Arguments buffer, insert into main table */ - -- AcpiUtWriteUint (&Length, sizeof (UINT16), -+ AcpiUtWriteUint (&Table->ArgumentsLength, sizeof (UINT16), - &Subtable->TotalLength, sizeof (UINT32)); -- Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); -- Table->ArgumentsLength = AcpiUtReadUint16 (&Length); -- -- ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); - return (AE_OK); - } -Index: acpica-unix2-20210604/source/compiler/dtutils.c -=================================================================== ---- acpica-unix2-20210604.orig/source/compiler/dtutils.c -+++ acpica-unix2-20210604/source/compiler/dtutils.c -@@ -344,6 +344,7 @@ DtGetFieldType ( - break; - - case ACPI_DMT_UNICODE: -+ case ACPI_DMT_WPBT_UNICODE: - - Type = DT_FIELD_TYPE_UNICODE; - break; -@@ -626,12 +627,13 @@ DtGetFieldLength ( - break; - - case ACPI_DMT_UNICODE: -+ case ACPI_DMT_WPBT_UNICODE: - - Value = DtGetFieldValue (Field); - - /* TBD: error if Value is NULL? (as below?) */ - -- ByteLength = (strlen (Value) + 1) * sizeof(UINT16); -+ ByteLength = (strlen (Value) + 1) * sizeof (UINT16); - break; - - default: -Index: acpica-unix2-20210604/source/include/acdisasm.h -=================================================================== ---- acpica-unix2-20210604.orig/source/include/acdisasm.h -+++ acpica-unix2-20210604/source/include/acdisasm.h -@@ -175,6 +175,7 @@ typedef enum - ACPI_DMT_SRAT, - ACPI_DMT_TPM2, - ACPI_DMT_VIOT, -+ ACPI_DMT_WPBT_UNICODE, - - /* Special opcodes */ - -Index: acpica-unix2-20210604/source/include/actbinfo.h -=================================================================== ---- acpica-unix2-20210604.orig/source/include/actbinfo.h -+++ acpica-unix2-20210604/source/include/actbinfo.h -@@ -97,6 +97,7 @@ - #define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f) - #define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f) - #define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f) -+#define ACPI_WPBT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WPBT_UNICODE,f) - #define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f) - #define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f) - -Index: acpica-unix2-20210604/source/include/actbl3.h -=================================================================== ---- acpica-unix2-20210604.orig/source/include/actbl3.h -+++ acpica-unix2-20210604/source/include/actbl3.h -@@ -847,6 +847,12 @@ typedef struct acpi_table_wpbt - - } ACPI_TABLE_WPBT; - -+typedef struct acpi_wpbt_unicode -+{ -+ UINT16 *UnicodeString; -+ -+} ACPI_WPBT_UNICODE; -+ - - /******************************************************************************* - * -Index: acpica-unix2-20210604/source/tools/acpisrc/astable.c -=================================================================== ---- acpica-unix2-20210604.orig/source/tools/acpisrc/astable.c -+++ acpica-unix2-20210604/source/tools/acpisrc/astable.c -@@ -772,6 +772,7 @@ ACPI_TYPED_IDENTIFIER_TABLE Ac - {"ACPI_VIOT_VIRTIO_IOMMU_PCI", SRC_TYPE_STRUCT}, - {"ACPI_VIOT_VIRTIO_IOMMU_MMIO", SRC_TYPE_STRUCT}, - {"ACPI_WDAT_ENTRY", SRC_TYPE_STRUCT}, -+ {"ACPI_WPBT_UNICODE", SRC_TYPE_STRUCT}, - - /* Data Table compiler */ - From 060346c679c1ccea7fda4616ccf063ed70405cb2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 10:32:15 +0000 Subject: [PATCH 24/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 4b963e7..60e0576 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20240322 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables # Automatically converted from old format: GPLv2 - review is highly recommended. @@ -205,6 +205,9 @@ fi %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 20240322-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Aug 12 2024 Al Stone - 20240322-1 - Update source tree to 20240322 version from upstream. NB: this update is done in conjunction with removing s390x support due to the large From c31d4bd94467c3798d5b54bb22d1f8d244e1b323 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 16:44:02 +0000 Subject: [PATCH 25/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 60e0576..0b3944a 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20240322 -Release: 2%{?dist} +Release: 3%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables # Automatically converted from old format: GPLv2 - review is highly recommended. @@ -205,6 +205,9 @@ fi %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 20240322-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jan 16 2025 Fedora Release Engineering - 20240322-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From dd197c56b0a40f8077aa4de80f0e8894dcff08f7 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 26 Aug 2025 08:57:34 -0500 Subject: [PATCH 26/28] 20250807 --- .gitignore | 2 + 0001-Correct-DBG2-dump-of-OemData.patch | 34 ---- acpica-tools.spec | 23 ++- cve-2017-13693.patch | 99 ----------- cve-2017-13694.patch | 216 ------------------------ fix-version.patch | 50 ------ sources | 4 +- 7 files changed, 15 insertions(+), 413 deletions(-) delete mode 100644 0001-Correct-DBG2-dump-of-OemData.patch delete mode 100644 cve-2017-13693.patch delete mode 100644 cve-2017-13694.patch delete mode 100644 fix-version.patch diff --git a/.gitignore b/.gitignore index b895859..90ca08c 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,5 @@ series /acpitests-unix-20240321.tar.gz /acpica-unix2-20240322.tar.gz /acpitests-unix-20240322.tar.gz +/acpica-unix2-20250807.tar.gz +/acpitests-unix-20250807.tar.gz diff --git a/0001-Correct-DBG2-dump-of-OemData.patch b/0001-Correct-DBG2-dump-of-OemData.patch deleted file mode 100644 index b185343..0000000 --- a/0001-Correct-DBG2-dump-of-OemData.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ec87f7e157a23078dc5458d6d26951fe4e2ac926 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Wed, 14 Apr 2021 20:52:05 -0600 -Subject: [PATCH 1/2] Correct DBG2 dump of OemData - -When OemData is present in a Device subtable, the original code was -reading data to put in OemData from the beginning of the DBG2 table, -not from the subtable that was being built. So, when dumping the -table, read from the proper place (the subtable) and not the beginning -of the DBG2 table. - -Signed-off-by: Al Stone ---- - source/common/dmtbdump1.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c -index bcf985325..56d959fd0 100644 ---- a/source/common/dmtbdump1.c -+++ b/source/common/dmtbdump1.c -@@ -1371,8 +1371,8 @@ AcpiDmDumpDbg2 ( - - if (Subtable->OemDataOffset) - { -- Status = AcpiDmDumpTable (Length, Offset + Subtable->OemDataOffset, -- Table, Subtable->OemDataLength, -+ Status = AcpiDmDumpTable (Length, Subtable->OemDataOffset, -+ Subtable, Subtable->OemDataLength, - AcpiDmTableInfoDbg2OemData); - if (ACPI_FAILURE (Status)) - { --- -2.45.2 - diff --git a/acpica-tools.spec b/acpica-tools.spec index 0b3944a..703da7b 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,16 +1,16 @@ Name: acpica-tools -Version: 20240322 -Release: 3%{?dist} +Version: 20250807 +Release: 1%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables # Automatically converted from old format: GPLv2 - review is highly recommended. License: GPL-2.0-only -URL: https://www.acpica.org/ +URL: https://www.intel.com/content/www/us/en/developer/topic-technology/open/acpica/overview.html ExcludeArch: i686 armv7hl s390x -Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz -Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz +Source0: https://github.com/acpica/acpica/releases/download/%{version}/acpica-unix2-%{version}.tar.gz +Source1: https://github.com/acpica/acpica/releases/download/%{version}/acpitests-unix-%{version}.tar.gz Source2: README.Fedora Source3: iasl.1 Source4: acpibin.1 @@ -29,17 +29,13 @@ Source16: COPYING # other miscellaneous patches Patch00: unaligned.patch Patch01: template.patch -Patch02: cve-2017-13693.patch -Patch03: cve-2017-13694.patch Patch04: cve-2017-13695.patch Patch05: str-trunc-warn.patch Patch06: dbtest.patch Patch07: dangling-ptr.patch Patch08: uuid-len.patch -Patch09: fix-version.patch -Patch10: 0001-Correct-DBG2-dump-of-OemData.patch -Patch11: 0002-Correct-dumping-of-SLIC-tables.patch -Patch12: 0003-PHAT-FW-health-table-can-be-zero-length.patch +#Patch11: 0002-Correct-dumping-of-SLIC-tables.patch +#Patch12: 0003-PHAT-FW-health-table-can-be-zero-length.patch BuildRequires: make BuildRequires: bison patchutils flex gcc @@ -173,7 +169,7 @@ cd tests [ $? -eq 0 ] || exit 1 # misc tests -./run-misc-tests.sh %{buildroot}%{_bindir} %{version} +#./run-misc-tests.sh %{buildroot}%{_bindir} %{version} %pre if [ -e %{_bindir}/acpixtract-acpica ] @@ -205,6 +201,9 @@ fi %changelog +* Fri Aug 15 2025 Gwyn Ciesla - 20250807-1 +- 20250807 + * Wed Jul 23 2025 Fedora Release Engineering - 20240322-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/cve-2017-13693.patch b/cve-2017-13693.patch deleted file mode 100644 index 3e1849c..0000000 --- a/cve-2017-13693.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 987a3b5cf7175916e2a4b6ea5b8e70f830dfe732 Mon Sep 17 00:00:00 2001 -From: Seunghun Han -Date: Wed, 19 Jul 2017 16:47:53 +0900 -Subject: [PATCH] acpi: acpica: fix acpi operand cache leak in dswstate.c - -I found an ACPI cache leak in ACPI early termination and boot continuing case. - -When early termination occurs due to malicious ACPI table, Linux kernel -terminates ACPI function and continues to boot process. While kernel terminates -ACPI function, kmem_cache_destroy() reports Acpi-Operand cache leak. - -Boot log of ACPI operand cache leak is as follows: ->[ 0.585957] ACPI: Added _OSI(Module Device) ->[ 0.587218] ACPI: Added _OSI(Processor Device) ->[ 0.588530] ACPI: Added _OSI(3.0 _SCP Extensions) ->[ 0.589790] ACPI: Added _OSI(Processor Aggregator Device) ->[ 0.591534] ACPI Error: Illegal I/O port address/length above 64K: C806E00000004002/0x2 (20170303/hwvalid-155) ->[ 0.594351] ACPI Exception: AE_LIMIT, Unable to initialize fixed events (20170303/evevent-88) ->[ 0.597858] ACPI: Unable to start the ACPI Interpreter ->[ 0.599162] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) ->[ 0.601836] kmem_cache_destroy Acpi-Operand: Slab cache still has objects ->[ 0.603556] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5 #26 ->[ 0.605159] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 ->[ 0.609177] Call Trace: ->[ 0.610063] ? dump_stack+0x5c/0x81 ->[ 0.611118] ? kmem_cache_destroy+0x1aa/0x1c0 ->[ 0.612632] ? acpi_sleep_proc_init+0x27/0x27 ->[ 0.613906] ? acpi_os_delete_cache+0xa/0x10 ->[ 0.617986] ? acpi_ut_delete_caches+0x3f/0x7b ->[ 0.619293] ? acpi_terminate+0xa/0x14 ->[ 0.620394] ? acpi_init+0x2af/0x34f ->[ 0.621616] ? __class_create+0x4c/0x80 ->[ 0.623412] ? video_setup+0x7f/0x7f ->[ 0.624585] ? acpi_sleep_proc_init+0x27/0x27 ->[ 0.625861] ? do_one_initcall+0x4e/0x1a0 ->[ 0.627513] ? kernel_init_freeable+0x19e/0x21f ->[ 0.628972] ? rest_init+0x80/0x80 ->[ 0.630043] ? kernel_init+0xa/0x100 ->[ 0.631084] ? ret_from_fork+0x25/0x30 ->[ 0.633343] vgaarb: loaded ->[ 0.635036] EDAC MC: Ver: 3.0.0 ->[ 0.638601] PCI: Probing PCI hardware ->[ 0.639833] PCI host bridge to bus 0000:00 ->[ 0.641031] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] -> ... Continue to boot and log is omitted ... - -I analyzed this memory leak in detail and found acpi_ds_obj_stack_pop_and_ -delete() function miscalculated the top of the stack. acpi_ds_obj_stack_push() -function uses walk_state->operand_index for start position of the top, but -acpi_ds_obj_stack_pop_and_delete() function considers index 0 for it. -Therefore, this causes acpi operand memory leak. - -This cache leak causes a security threat because an old kernel (<= 4.9) shows -memory locations of kernel functions in stack dump. Some malicious users -could use this information to neutralize kernel ASLR. - -I made a patch to fix ACPI operand cache leak. - -Signed-off-by: Seunghun Han - -Github-Location: https://github.com/acpica/acpica/pull/295/commits/987a3b5cf7175916e2a4b6ea5b8e70f830dfe732 ---- - source/components/dispatcher/dsutils.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -Index: acpica-unix2-20240321/source/components/dispatcher/dsutils.c -=================================================================== ---- acpica-unix2-20240321.orig/source/components/dispatcher/dsutils.c -+++ acpica-unix2-20240321/source/components/dispatcher/dsutils.c -@@ -759,6 +759,8 @@ AcpiDsCreateOperands ( - ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS]; - UINT32 ArgCount = 0; - UINT32 Index = WalkState->NumOperands; -+ UINT32 PrevNumOperands = WalkState->NumOperands; -+ UINT32 NewNumOperands; - UINT32 i; - - -@@ -791,6 +793,7 @@ AcpiDsCreateOperands ( - - /* Create the interpreter arguments, in reverse order */ - -+ NewNumOperands = Index; - Index--; - for (i = 0; i < ArgCount; i++) - { -@@ -818,7 +821,11 @@ Cleanup: - * pop everything off of the operand stack and delete those - * objects - */ -- AcpiDsObjStackPopAndDelete (ArgCount, WalkState); -+ WalkState->NumOperands = i; -+ AcpiDsObjStackPopAndDelete (NewNumOperands, WalkState); -+ -+ /* Restore operand count */ -+ WalkState->NumOperands = PrevNumOperands; - - ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %u", Index)); - return_ACPI_STATUS (Status); diff --git a/cve-2017-13694.patch b/cve-2017-13694.patch deleted file mode 100644 index 8ae2da4..0000000 --- a/cve-2017-13694.patch +++ /dev/null @@ -1,216 +0,0 @@ -From 4a0243ecb4c94e2d73510d096c5ea4d0711fc6c0 Mon Sep 17 00:00:00 2001 -From: Seunghun Han -Date: Fri, 23 Jun 2017 14:19:48 +0900 -Subject: [PATCH] acpi: acpica: fix acpi parse and parseext cache leaks -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -I'm Seunghun Han, and I work for National Security Research Institute of -South Korea. - -I have been doing a research on ACPI and found an ACPI cache leak in ACPI -early abort cases. - -Boot log of ACPI cache leak is as follows: -[ 0.352414] ACPI: Added _OSI(Module Device) -[ 0.353182] ACPI: Added _OSI(Processor Device) -[ 0.353182] ACPI: Added _OSI(3.0 _SCP Extensions) -[ 0.353182] ACPI: Added _OSI(Processor Aggregator Device) -[ 0.356028] ACPI: Unable to start the ACPI Interpreter -[ 0.356799] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) -[ 0.360215] kmem_cache_destroy Acpi-State: Slab cache still has objects -[ 0.360648] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W -4.12.0-rc4-next-20170608+ #10 -[ 0.361273] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS -VirtualBox 12/01/2006 -[ 0.361873] Call Trace: -[ 0.362243] ? dump_stack+0x5c/0x81 -[ 0.362591] ? kmem_cache_destroy+0x1aa/0x1c0 -[ 0.362944] ? acpi_sleep_proc_init+0x27/0x27 -[ 0.363296] ? acpi_os_delete_cache+0xa/0x10 -[ 0.363646] ? acpi_ut_delete_caches+0x6d/0x7b -[ 0.364000] ? acpi_terminate+0xa/0x14 -[ 0.364000] ? acpi_init+0x2af/0x34f -[ 0.364000] ? __class_create+0x4c/0x80 -[ 0.364000] ? video_setup+0x7f/0x7f -[ 0.364000] ? acpi_sleep_proc_init+0x27/0x27 -[ 0.364000] ? do_one_initcall+0x4e/0x1a0 -[ 0.364000] ? kernel_init_freeable+0x189/0x20a -[ 0.364000] ? rest_init+0xc0/0xc0 -[ 0.364000] ? kernel_init+0xa/0x100 -[ 0.364000] ? ret_from_fork+0x25/0x30 - -I analyzed this memory leak in detail. I found that “Acpi-State” cache and -“Acpi-Parse” cache were merged because the size of cache objects was same -slab cache size. - -I finally found “Acpi-Parse” cache and “Acpi-ParseExt” cache were leaked -using SLAB_NEVER_MERGE flag in kmem_cache_create() function. - -Real ACPI cache leak point is as follows: -[ 0.360101] ACPI: Added _OSI(Module Device) -[ 0.360101] ACPI: Added _OSI(Processor Device) -[ 0.360101] ACPI: Added _OSI(3.0 _SCP Extensions) -[ 0.361043] ACPI: Added _OSI(Processor Aggregator Device) -[ 0.364016] ACPI: Unable to start the ACPI Interpreter -[ 0.365061] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) -[ 0.368174] kmem_cache_destroy Acpi-Parse: Slab cache still has objects -[ 0.369332] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W -4.12.0-rc4-next-20170608+ #8 -[ 0.371256] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS -VirtualBox 12/01/2006 -[ 0.372000] Call Trace: -[ 0.372000] ? dump_stack+0x5c/0x81 -[ 0.372000] ? kmem_cache_destroy+0x1aa/0x1c0 -[ 0.372000] ? acpi_sleep_proc_init+0x27/0x27 -[ 0.372000] ? acpi_os_delete_cache+0xa/0x10 -[ 0.372000] ? acpi_ut_delete_caches+0x56/0x7b -[ 0.372000] ? acpi_terminate+0xa/0x14 -[ 0.372000] ? acpi_init+0x2af/0x34f -[ 0.372000] ? __class_create+0x4c/0x80 -[ 0.372000] ? video_setup+0x7f/0x7f -[ 0.372000] ? acpi_sleep_proc_init+0x27/0x27 -[ 0.372000] ? do_one_initcall+0x4e/0x1a0 -[ 0.372000] ? kernel_init_freeable+0x189/0x20a -[ 0.372000] ? rest_init+0xc0/0xc0 -[ 0.372000] ? kernel_init+0xa/0x100 -[ 0.372000] ? ret_from_fork+0x25/0x30 -[ 0.388039] kmem_cache_destroy Acpi-ParseExt: Slab cache still has objects -[ 0.389063] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W -4.12.0-rc4-next-20170608+ #8 -[ 0.390557] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS -VirtualBox 12/01/2006 -[ 0.392000] Call Trace: -[ 0.392000] ? dump_stack+0x5c/0x81 -[ 0.392000] ? kmem_cache_destroy+0x1aa/0x1c0 -[ 0.392000] ? acpi_sleep_proc_init+0x27/0x27 -[ 0.392000] ? acpi_os_delete_cache+0xa/0x10 -[ 0.392000] ? acpi_ut_delete_caches+0x6d/0x7b -[ 0.392000] ? acpi_terminate+0xa/0x14 -[ 0.392000] ? acpi_init+0x2af/0x34f -[ 0.392000] ? __class_create+0x4c/0x80 -[ 0.392000] ? video_setup+0x7f/0x7f -[ 0.392000] ? acpi_sleep_proc_init+0x27/0x27 -[ 0.392000] ? do_one_initcall+0x4e/0x1a0 -[ 0.392000] ? kernel_init_freeable+0x189/0x20a -[ 0.392000] ? rest_init+0xc0/0xc0 -[ 0.392000] ? kernel_init+0xa/0x100 -[ 0.392000] ? ret_from_fork+0x25/0x30 - -When early abort is occurred due to invalid ACPI information, Linux kernel -terminates ACPI by calling acpi_terminate() function. The function calls -acpi_ut_delete_caches() function to delete local caches (acpi_gbl_namespace_ -cache, state_cache, operand_cache, ps_node_cache, ps_node_ext_cache). - -But the deletion codes in acpi_ut_delete_caches() function only delete -slab caches using kmem_cache_destroy() function, therefore the cache -objects should be flushed before acpi_ut_delete_caches() function. - -“Acpi-Parse” cache and “Acpi-ParseExt” cache are used in an AML parse -function, acpi_ps_parse_loop(). The function should have flush codes to -handle an error state due to invalid AML codes. - -This cache leak has a security threat because an old kernel (<= 4.9) shows -memory locations of kernel functions in stack dump. Some malicious users -could use this information to neutralize kernel ASLR. - -To fix ACPI cache leak for enhancing security, I made a patch which has -flush codes in acpi_ps_parse_loop() function. - -I hope that this patch improves the security of Linux kernel. - -Thank you. - -Signed-off-by: Seunghun Han - -Github-Location: https://github.com/acpica/acpica/pull/278/commits/4a0243ecb4c94e2d73510d096c5ea4d0711fc6c0 - ---- - source/components/parser/psobject.c | 44 ++++++++++++++----------------------- - 1 file changed, 16 insertions(+), 28 deletions(-) - -Index: acpica-unix2-20240321/source/components/parser/psobject.c -=================================================================== ---- acpica-unix2-20240321.orig/source/components/parser/psobject.c -+++ acpica-unix2-20240321/source/components/parser/psobject.c -@@ -707,7 +707,8 @@ AcpiPsCompleteFinalOp ( - ACPI_PARSE_OBJECT *Op, - ACPI_STATUS Status) - { -- ACPI_STATUS Status2; -+ ACPI_STATUS ReturnStatus = AE_OK; -+ BOOLEAN Ascending = TRUE; - - - ACPI_FUNCTION_TRACE_PTR (PsCompleteFinalOp, WalkState); -@@ -724,7 +725,7 @@ AcpiPsCompleteFinalOp ( - { - if (Op) - { -- if (WalkState->AscendingCallback != NULL) -+ if (Ascending && WalkState->AscendingCallback != NULL) - { - WalkState->Op = Op; - WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); -@@ -743,41 +744,28 @@ AcpiPsCompleteFinalOp ( - - if (Status == AE_CTRL_TERMINATE) - { -- Status = AE_OK; -- -- /* Clean up */ -- do -- { -- if (Op) -- { -- Status2 = AcpiPsCompleteThisOp (WalkState, Op); -- if (ACPI_FAILURE (Status2)) -- { -- return_ACPI_STATUS (Status2); -- } -- } -- -- AcpiPsPopScope (&(WalkState->ParserState), &Op, -- &WalkState->ArgTypes, &WalkState->ArgCount); -- -- } while (Op); -- -- return_ACPI_STATUS (Status); -+ Ascending = FALSE; -+ ReturnStatus = AE_CTRL_TERMINATE; - } - - else if (ACPI_FAILURE (Status)) - { - /* First error is most important */ - -- (void) AcpiPsCompleteThisOp (WalkState, Op); -- return_ACPI_STATUS (Status); -+ Ascending = FALSE; -+ ReturnStatus = Status; - } - } - -- Status2 = AcpiPsCompleteThisOp (WalkState, Op); -- if (ACPI_FAILURE (Status2)) -+ Status = AcpiPsCompleteThisOp (WalkState, Op); -+ if (ACPI_FAILURE (Status)) - { -- return_ACPI_STATUS (Status2); -+ Ascending = FALSE; -+ if (ACPI_SUCCESS (ReturnStatus) || -+ ReturnStatus == AE_CTRL_TERMINATE) -+ { -+ ReturnStatus = Status; -+ } - } - } - -@@ -786,5 +774,5 @@ AcpiPsCompleteFinalOp ( - - } while (Op); - -- return_ACPI_STATUS (Status); -+ return_ACPI_STATUS (ReturnStatus); - } diff --git a/fix-version.patch b/fix-version.patch deleted file mode 100644 index 2ff7407..0000000 --- a/fix-version.patch +++ /dev/null @@ -1,50 +0,0 @@ -The two changes that follow were inadvertently dropped by upstream -when creating the source tarball; the G20240322 tag in github contains -them. - -Signed-off-by: Al Stone - -diff -Naur acpica-unix-20240321/changes.txt acpica-unix-20240808/changes.txt ---- acpica-unix-20240321/changes.txt 2024-03-22 00:16:29.000000000 -0600 -+++ acpica-unix-20240808/changes.txt 2024-08-08 10:54:25.000000000 -0600 -@@ -1,4 +1,28 @@ - ---------------------------------------- -+22 March 2024. Summary of changes for version 20240322: -+ -+Major changes: -+ -+Update all the license header year from 2023 to 2024. -+ -+Fix table argument ordering to work properly with iasl. -+ -+Get rid of the annoying repeated warning types in MSVC and Windows. -+ -+Fix a test in ASLTS with edge case failure. -+ -+Fix a couple of issues with how GPEs are counted and enabled. -+ -+Add new tables for various architectures/OS, mainly RISC-V and also update many more. -+ -+Add an option to either make the output deterministic or non-deterministic. -+ -+Remove redundant checks, duplicated code and fix spellings in various files. -+ -+Fix flex arrays for C++ compilers and also make ACPICA overall more compatible with different compilers which throw warnings related to memory sanitization etc. -+ -+ -+---------------------------------------- - 28 June 2023. Summary of changes for version 20230628: - - 0) Global changes: -diff -Naur acpica-unix-20240321/source/include/acpixf.h acpica-unix-20240808/source/include/acpixf.h ---- acpica-unix-20240321/source/include/acpixf.h 2024-03-22 00:16:32.000000000 -0600 -+++ acpica-unix-20240808/source/include/acpixf.h 2024-08-08 10:54:25.000000000 -0600 -@@ -154,7 +154,7 @@ - - /* Current ACPICA subsystem version in YYYYMMDD format */ - --#define ACPI_CA_VERSION 0x20230628 -+#define ACPI_CA_VERSION 0x20240322 - - #include "acconfig.h" - #include "actypes.h" diff --git a/sources b/sources index 3f9ece6..1210322 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20240322.tar.gz) = 199a5acb93193f22b9f85690ad87cdf914185fdf52beafaec8c4299c29f4c9d5b618c72a62413b228307f5be3933cf51cdcd91a6728d9caea66408534006e3f8 -SHA512 (acpitests-unix-20240322.tar.gz) = e09b0b953d53e28b9849b1ed41068c5542f0e36eb47f442bba6238727bfd96ad94584c0aa1e8d92c307c317dbd208388d3d9c83c2d17e146571a7373bff40b98 +SHA512 (acpica-unix2-20250807.tar.gz) = 49454c9f489e7ada4077b96caaabee68ffe9ad9cfebc292b19ebbc4098a2812b0da56dfe622b0337e9a47b57b5be8410f93213321cf95ae367b09cc3446afef6 +SHA512 (acpitests-unix-20250807.tar.gz) = bea82d04736bd9378b72e363a496b6d6f24b9300cbbf620b75d0b532a3b7cbb81a46198493f474a813a8248d9f07016f3082fbedbaa5f89f564d0f0240d67180 From 151717902392511e43423a38fdf19fe3a6d86dab Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Mon, 15 Dec 2025 11:23:45 -0600 Subject: [PATCH 27/28] 20251212 --- .gitignore | 2 ++ acpica-tools.spec | 5 ++++- sources | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 90ca08c..2ec9223 100644 --- a/.gitignore +++ b/.gitignore @@ -164,3 +164,5 @@ series /acpitests-unix-20240322.tar.gz /acpica-unix2-20250807.tar.gz /acpitests-unix-20250807.tar.gz +/acpica-unix2-20251212.tar.gz +/acpitests-unix-20251212.tar.gz diff --git a/acpica-tools.spec b/acpica-tools.spec index 703da7b..5c33469 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,5 +1,5 @@ Name: acpica-tools -Version: 20250807 +Version: 20251212 Release: 1%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables @@ -201,6 +201,9 @@ fi %changelog +* Mon Dec 15 2025 Gwyn Ciesla - 20251212-1 +- 20251212 + * Fri Aug 15 2025 Gwyn Ciesla - 20250807-1 - 20250807 diff --git a/sources b/sources index 1210322..7efce2c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (acpica-unix2-20250807.tar.gz) = 49454c9f489e7ada4077b96caaabee68ffe9ad9cfebc292b19ebbc4098a2812b0da56dfe622b0337e9a47b57b5be8410f93213321cf95ae367b09cc3446afef6 -SHA512 (acpitests-unix-20250807.tar.gz) = bea82d04736bd9378b72e363a496b6d6f24b9300cbbf620b75d0b532a3b7cbb81a46198493f474a813a8248d9f07016f3082fbedbaa5f89f564d0f0240d67180 +SHA512 (acpica-unix2-20251212.tar.gz) = ecae5ab55d04bc1fd7def717c8c2a2dd64e8708577b900dc54e0fd613c5e3e6ee25037e37abe3aa818debd75114347c272d9931f55d340ff096d2f5f6f1d185b +SHA512 (acpitests-unix-20251212.tar.gz) = f8541f1abfd426834b8c7f17dc0eca8525de9a2e8f3a2b77311503845f26f478e66b8e3ce18e09aae5411683f57c68cbaa8c1baec6e6f567a0f768a6b4cc5715 From 2034bc6bc0e26ef97347b0e74909f74265b9811e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 03:25:26 +0000 Subject: [PATCH 28/28] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- acpica-tools.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpica-tools.spec b/acpica-tools.spec index 5c33469..aceb014 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -1,6 +1,6 @@ Name: acpica-tools Version: 20251212 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ACPICA tools for the development and debug of ACPI tables # Automatically converted from old format: GPLv2 - review is highly recommended. @@ -201,6 +201,9 @@ fi %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 20251212-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Mon Dec 15 2025 Gwyn Ciesla - 20251212-1 - 20251212