diff --git a/0039-Add-partial-big-endian-support-for-WPBT-tables.patch b/0039-Add-partial-big-endian-support-for-WPBT-tables.patch index e5192e5..071d600 100644 --- a/0039-Add-partial-big-endian-support-for-WPBT-tables.patch +++ b/0039-Add-partial-big-endian-support-for-WPBT-tables.patch @@ -1,7 +1,7 @@ From 9d7f9c8f4ecbee2e621d471a8c4944cebe62947d Mon Sep 17 00:00:00 2001 From: Al Stone Date: Wed, 30 Sep 2020 18:59:57 -0600 -Subject: [PATCH 39/40] Add partial big-endian support for WPBT tables +Subject: [PATCH 1/5] Add partial big-endian support for WPBT tables There's some weirdness here that at present does not warrant further investigation; this is just a really low priority table. @@ -12,11 +12,11 @@ Signed-off-by: Al Stone source/compiler/dttable2.c | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) -Index: acpica-unix2-20200925/source/common/dmtbdump3.c -=================================================================== ---- acpica-unix2-20200925.orig/source/common/dmtbdump3.c -+++ acpica-unix2-20200925/source/common/dmtbdump3.c -@@ -628,13 +628,13 @@ AcpiDmDumpWpbt ( +diff --git a/source/common/dmtbdump3.c b/source/common/dmtbdump3.c +index d2f2bf7b7..da9b81c92 100644 +--- a/source/common/dmtbdump3.c ++++ b/source/common/dmtbdump3.c +@@ -736,13 +736,13 @@ AcpiDmDumpWpbt ( { ACPI_STATUS Status; ACPI_TABLE_WPBT *Subtable; @@ -32,7 +32,7 @@ Index: acpica-unix2-20200925/source/common/dmtbdump3.c if (ACPI_FAILURE (Status)) { return; -@@ -643,10 +643,10 @@ AcpiDmDumpWpbt ( +@@ -751,10 +751,10 @@ AcpiDmDumpWpbt ( /* Extract the arguments buffer length from the main table */ Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); @@ -45,11 +45,11 @@ Index: acpica-unix2-20200925/source/common/dmtbdump3.c + (void) AcpiDmDumpTable (TableLength, 0, Table, ArgumentsLength, AcpiDmTableInfoWpbt0); } -Index: acpica-unix2-20200925/source/compiler/dttable2.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/dttable2.c -+++ acpica-unix2-20200925/source/compiler/dttable2.c -@@ -2190,7 +2190,8 @@ DtCompileWpbt ( +diff --git a/source/compiler/dttable2.c b/source/compiler/dttable2.c +index 584c09ee8..48729b48f 100644 +--- a/source/compiler/dttable2.c ++++ b/source/compiler/dttable2.c +@@ -2298,7 +2298,8 @@ DtCompileWpbt ( /* Extract the length of the Arguments buffer, insert into main table */ @@ -59,3 +59,6 @@ Index: acpica-unix2-20200925/source/compiler/dttable2.c Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer); Table->ArgumentsLength = Length; +-- +2.26.2 + diff --git a/0040-Support-DSDT-SSDT-in-a-big-endian-world.patch b/0040-Support-DSDT-SSDT-in-a-big-endian-world.patch index b5087dc..43b4114 100644 --- a/0040-Support-DSDT-SSDT-in-a-big-endian-world.patch +++ b/0040-Support-DSDT-SSDT-in-a-big-endian-world.patch @@ -1,7 +1,7 @@ -From 355bbdd2ecf184e56108a2446244761895f93a62 Mon Sep 17 00:00:00 2001 +From a11c0a997dca2b40d1bcff68368d9d5d5297b781 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Thu, 15 Oct 2020 11:35:23 -0600 -Subject: [PATCH 40/40] Support DSDT/SSDT in a big-endian world +Subject: [PATCH 2/5] 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 @@ -15,33 +15,35 @@ Signed-off-by: Al Stone source/common/dmrestag.c | 2 +- source/common/dmtables.c | 17 +- source/common/dmtbdump.c | 3 +- - source/compiler/aslcodegen.c | 61 +++++-- + source/compiler/aslcodegen.c | 61 ++++-- + source/compiler/aslopcodes.c | 3 +- source/compiler/aslrestype1.c | 44 +++-- source/compiler/aslrestype1i.c | 33 ++-- - source/compiler/aslrestype2.c | 20 ++- - source/compiler/aslrestype2d.c | 99 ++++++----- - source/compiler/aslrestype2e.c | 90 ++++++---- - source/compiler/aslrestype2q.c | 81 ++++++--- - source/compiler/aslrestype2s.c | 181 ++++++++++++++++++--- - source/compiler/aslrestype2w.c | 94 ++++++----- - source/components/disassembler/dmbuffer.c | 2 +- + 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/components/disassembler/dmbuffer.c | 10 +- source/components/disassembler/dmopcode.c | 8 +- source/components/disassembler/dmresrc.c | 2 +- source/components/disassembler/dmresrcl.c | 43 +++-- - source/components/disassembler/dmresrcl2.c | 64 +++++--- + source/components/disassembler/dmresrcl2.c | 128 +++++++----- source/components/disassembler/dmresrcs.c | 18 +- + source/components/disassembler/dmwalk.c | 2 +- source/components/dispatcher/dsfield.c | 16 +- source/components/namespace/nsaccess.c | 2 +- source/components/namespace/nsnames.c | 2 +- source/components/namespace/nsparse.c | 6 +- source/components/namespace/nsutils.c | 7 +- - 23 files changed, 613 insertions(+), 282 deletions(-) + 25 files changed, 682 insertions(+), 323 deletions(-) -Index: acpica-unix2-20200925/source/common/dmrestag.c -=================================================================== ---- acpica-unix2-20200925.orig/source/common/dmrestag.c -+++ acpica-unix2-20200925/source/common/dmrestag.c -@@ -1038,7 +1038,7 @@ AcpiDmAddResourcesToNamespace ( +diff --git a/source/common/dmrestag.c b/source/common/dmrestag.c +index fe6e74146..eed863037 100644 +--- a/source/common/dmrestag.c ++++ b/source/common/dmrestag.c +@@ -1146,7 +1146,7 @@ AcpiDmAddResourcesToNamespace ( * NextOp contains the Aml pointer and the Aml length */ AcpiUtWalkAmlResources (NULL, (UINT8 *) NextOp->Named.Data, @@ -50,11 +52,11 @@ Index: acpica-unix2-20200925/source/common/dmrestag.c AcpiDmAddResourceToNamespace, (void **) BufferNode); } -Index: acpica-unix2-20200925/source/common/dmtables.c -=================================================================== ---- acpica-unix2-20200925.orig/source/common/dmtables.c -+++ acpica-unix2-20200925/source/common/dmtables.c -@@ -142,6 +142,10 @@ AdCreateTableHeader ( +diff --git a/source/common/dmtables.c b/source/common/dmtables.c +index ee18d26c9..2a5551ece 100644 +--- a/source/common/dmtables.c ++++ b/source/common/dmtables.c +@@ -250,6 +250,10 @@ AdCreateTableHeader ( ACPI_TABLE_HEADER *Table) { UINT8 Checksum; @@ -65,7 +67,7 @@ Index: acpica-unix2-20200925/source/common/dmtables.c /* Reset globals for External statements */ -@@ -156,7 +160,7 @@ AdCreateTableHeader ( +@@ -264,7 +268,7 @@ AdCreateTableHeader ( AcpiOsPrintf (" * Original Table Header:\n"); AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature); @@ -74,7 +76,7 @@ Index: acpica-unix2-20200925/source/common/dmtables.c /* Print and validate the revision */ -@@ -188,7 +192,7 @@ AdCreateTableHeader ( +@@ -296,7 +300,7 @@ AdCreateTableHeader ( AcpiOsPrintf ("\n * Checksum 0x%2.2X", Table->Checksum); @@ -83,7 +85,7 @@ Index: acpica-unix2-20200925/source/common/dmtables.c if (Checksum) { AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X", -@@ -198,9 +202,9 @@ AdCreateTableHeader ( +@@ -306,9 +310,9 @@ AdCreateTableHeader ( AcpiOsPrintf ("\n"); AcpiOsPrintf (" * OEM ID \"%.6s\"\n", Table->OemId); AcpiOsPrintf (" * OEM Table ID \"%.8s\"\n", Table->OemTableId); @@ -95,7 +97,7 @@ Index: acpica-unix2-20200925/source/common/dmtables.c AcpiOsPrintf (" */\n"); /* -@@ -221,7 +225,7 @@ AdCreateTableHeader ( +@@ -329,7 +333,7 @@ AdCreateTableHeader ( AcpiOsPrintf ( "DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n", Table->Signature, Table->Revision, @@ -104,7 +106,7 @@ Index: acpica-unix2-20200925/source/common/dmtables.c } -@@ -396,7 +400,8 @@ AdParseTable ( +@@ -504,7 +508,8 @@ AdParseTable ( fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature); @@ -114,11 +116,11 @@ Index: acpica-unix2-20200925/source/common/dmtables.c AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); AcpiUtSetIntegerWidth (Table->Revision); -Index: acpica-unix2-20200925/source/common/dmtbdump.c -=================================================================== ---- acpica-unix2-20200925.orig/source/common/dmtbdump.c -+++ acpica-unix2-20200925/source/common/dmtbdump.c -@@ -333,8 +333,7 @@ AcpiDmDumpXsdt ( +diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c +index 92d86930b..5ad20ff62 100644 +--- a/source/common/dmtbdump.c ++++ b/source/common/dmtbdump.c +@@ -441,8 +441,7 @@ AcpiDmDumpXsdt ( for (i = 0; i < Entries; i++) { AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); @@ -128,11 +130,11 @@ Index: acpica-unix2-20200925/source/common/dmtbdump.c Offset += sizeof (UINT64); } } -Index: acpica-unix2-20200925/source/compiler/aslcodegen.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslcodegen.c -+++ acpica-unix2-20200925/source/compiler/aslcodegen.c -@@ -238,6 +238,10 @@ CgWriteAmlOpcode ( +diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c +index ba0384e84..14be9dcc2 100644 +--- a/source/compiler/aslcodegen.c ++++ b/source/compiler/aslcodegen.c +@@ -346,6 +346,10 @@ CgWriteAmlOpcode ( { UINT8 PkgLenFirstByte; UINT32 i; @@ -143,7 +145,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c union { UINT16 Opcode; UINT8 OpcodeBytes[2]; -@@ -305,25 +309,26 @@ CgWriteAmlOpcode ( +@@ -413,25 +417,26 @@ CgWriteAmlOpcode ( /* Value is the length to be encoded (Used in field definitions) */ @@ -174,7 +176,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c break; } -@@ -335,7 +340,8 @@ CgWriteAmlOpcode ( +@@ -443,7 +448,8 @@ CgWriteAmlOpcode ( { /* Simplest case -- no bytes to follow, just write the count */ @@ -184,7 +186,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c } else if (Op->Asl.AmlPkgLenBytes != 0) { -@@ -343,9 +349,10 @@ CgWriteAmlOpcode ( +@@ -451,9 +457,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 */ @@ -196,7 +198,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1); -@@ -359,6 +366,9 @@ CgWriteAmlOpcode ( +@@ -467,6 +474,9 @@ CgWriteAmlOpcode ( * Now we can write the remaining bytes - * either 1, 2, or 3 bytes */ @@ -206,7 +208,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++) { CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1); -@@ -370,22 +380,30 @@ CgWriteAmlOpcode ( +@@ -478,22 +488,30 @@ CgWriteAmlOpcode ( { case AML_BYTE_OP: @@ -241,7 +243,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c break; case AML_STRING_OP: -@@ -423,6 +441,7 @@ CgWriteTableHeader ( +@@ -531,6 +549,7 @@ CgWriteTableHeader ( ACPI_PARSE_OBJECT *Child; UINT32 CommentLength; ACPI_COMMENT_NODE *Current; @@ -249,7 +251,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c memset (&AslGbl_TableHeader, 0, sizeof (ACPI_TABLE_HEADER)); -@@ -478,7 +497,9 @@ CgWriteTableHeader ( +@@ -586,7 +605,9 @@ CgWriteTableHeader ( /* OEM Revision */ Child = Child->Asl.Next; @@ -260,7 +262,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c /* Compiler ID */ -@@ -486,7 +507,8 @@ CgWriteTableHeader ( +@@ -594,7 +615,8 @@ CgWriteTableHeader ( /* Compiler version */ @@ -270,7 +272,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c /* Table length. Checksum zero for now, will rewrite later */ -@@ -541,6 +563,15 @@ CgWriteTableHeader ( +@@ -649,6 +671,15 @@ CgWriteTableHeader ( AslGbl_TableHeader.Checksum = 0; Op->Asl.FinalAmlOffset = ftell (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle); @@ -286,7 +288,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c /* Write entire header and clear the table header global */ CgLocalWriteAmlData (Op, &AslGbl_TableHeader, sizeof (ACPI_TABLE_HEADER)); -@@ -625,6 +656,7 @@ CgWriteNode ( +@@ -733,6 +764,7 @@ CgWriteNode ( ACPI_PARSE_OBJECT *Op) { ASL_RESOURCE_NODE *Rnode; @@ -294,7 +296,7 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c /* Write all comments here. */ -@@ -653,7 +685,10 @@ CgWriteNode ( +@@ -761,7 +793,10 @@ CgWriteNode ( case AML_RAW_DATA_DWORD: case AML_RAW_DATA_QWORD: @@ -306,11 +308,25 @@ Index: acpica-unix2-20200925/source/compiler/aslcodegen.c return; -Index: acpica-unix2-20200925/source/compiler/aslrestype1.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype1.c -+++ acpica-unix2-20200925/source/compiler/aslrestype1.c -@@ -143,6 +143,7 @@ RsDoMemory24Descriptor ( +diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c +index b2a023650..afc9004af 100644 +--- a/source/compiler/aslopcodes.c ++++ b/source/compiler/aslopcodes.c +@@ -619,7 +619,8 @@ OpcDoUnicode ( + + for (i = 0; i < Count; i++) + { +- UnicodeString[i] = (UINT16) AsciiString[i]; ++ AcpiUtWriteUint(&UnicodeString[i], sizeof(UINT16), ++ &AsciiString[i], sizeof(UINT8)); + } + + /* +diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c +index 4dff4607d..e7639c0bb 100644 +--- a/source/compiler/aslrestype1.c ++++ b/source/compiler/aslrestype1.c +@@ -251,6 +251,7 @@ RsDoMemory24Descriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -318,7 +334,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -151,7 +152,8 @@ RsDoMemory24Descriptor ( +@@ -259,7 +260,8 @@ RsDoMemory24Descriptor ( Descriptor = Rnode->Buffer; Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24; @@ -328,7 +344,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c /* Process all child initialization nodes */ -@@ -168,7 +170,8 @@ RsDoMemory24Descriptor ( +@@ -276,7 +278,8 @@ RsDoMemory24Descriptor ( case 1: /* Min Address */ @@ -338,7 +354,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum)); MinOp = InitializerOp; -@@ -176,7 +179,8 @@ RsDoMemory24Descriptor ( +@@ -284,7 +287,8 @@ RsDoMemory24Descriptor ( case 2: /* Max Address */ @@ -348,7 +364,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum)); MaxOp = InitializerOp; -@@ -184,14 +188,16 @@ RsDoMemory24Descriptor ( +@@ -292,14 +296,16 @@ RsDoMemory24Descriptor ( case 3: /* Alignment */ @@ -367,7 +383,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength)); LengthOp = InitializerOp; -@@ -249,6 +255,8 @@ RsDoMemory32Descriptor ( +@@ -357,6 +363,8 @@ RsDoMemory32Descriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -376,7 +392,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -257,7 +265,8 @@ RsDoMemory32Descriptor ( +@@ -365,7 +373,8 @@ RsDoMemory32Descriptor ( Descriptor = Rnode->Buffer; Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32; @@ -386,7 +402,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c /* Process all child initialization nodes */ -@@ -274,7 +283,8 @@ RsDoMemory32Descriptor ( +@@ -382,7 +391,8 @@ RsDoMemory32Descriptor ( case 1: /* Min Address */ @@ -396,7 +412,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum)); MinOp = InitializerOp; -@@ -282,7 +292,8 @@ RsDoMemory32Descriptor ( +@@ -390,7 +400,8 @@ RsDoMemory32Descriptor ( case 2: /* Max Address */ @@ -406,7 +422,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum)); MaxOp = InitializerOp; -@@ -290,7 +301,8 @@ RsDoMemory32Descriptor ( +@@ -398,7 +409,8 @@ RsDoMemory32Descriptor ( case 3: /* Alignment */ @@ -416,7 +432,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment)); AlignOp = InitializerOp; -@@ -298,7 +310,8 @@ RsDoMemory32Descriptor ( +@@ -406,7 +418,8 @@ RsDoMemory32Descriptor ( case 4: /* Length */ @@ -426,7 +442,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength)); LengthOp = InitializerOp; -@@ -352,6 +365,8 @@ RsDoMemory32FixedDescriptor ( +@@ -460,6 +473,8 @@ RsDoMemory32FixedDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -435,7 +451,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -360,7 +375,8 @@ RsDoMemory32FixedDescriptor ( +@@ -468,7 +483,8 @@ RsDoMemory32FixedDescriptor ( Descriptor = Rnode->Buffer; Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32; @@ -445,7 +461,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c /* Process all child initialization nodes */ -@@ -377,14 +393,16 @@ RsDoMemory32FixedDescriptor ( +@@ -485,14 +501,16 @@ RsDoMemory32FixedDescriptor ( case 1: /* Address */ @@ -464,11 +480,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); break; -Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype1i.c -+++ acpica-unix2-20200925/source/compiler/aslrestype1i.c -@@ -199,6 +199,7 @@ RsDoFixedDmaDescriptor ( +diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c +index 9e9bc2096..532553c4b 100644 +--- a/source/compiler/aslrestype1i.c ++++ b/source/compiler/aslrestype1i.c +@@ -307,6 +307,7 @@ RsDoFixedDmaDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -476,7 +492,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -217,14 +218,16 @@ RsDoFixedDmaDescriptor ( +@@ -325,14 +326,16 @@ RsDoFixedDmaDescriptor ( { case 0: /* DMA Request Lines [WORD] (_DMA) */ @@ -495,7 +511,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels)); break; -@@ -275,6 +278,7 @@ RsDoFixedIoDescriptor ( +@@ -383,6 +386,7 @@ RsDoFixedIoDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -503,7 +519,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -293,8 +297,8 @@ RsDoFixedIoDescriptor ( +@@ -401,8 +405,8 @@ RsDoFixedIoDescriptor ( { case 0: /* Base Address */ @@ -514,7 +530,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address)); AddressOp = InitializerOp; -@@ -358,6 +362,7 @@ RsDoIoDescriptor ( +@@ -466,6 +470,7 @@ RsDoIoDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -522,7 +538,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -383,8 +388,8 @@ RsDoIoDescriptor ( +@@ -491,8 +496,8 @@ RsDoIoDescriptor ( case 1: /* Min Address */ @@ -533,7 +549,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum)); MinOp = InitializerOp; -@@ -392,8 +397,8 @@ RsDoIoDescriptor ( +@@ -500,8 +505,8 @@ RsDoIoDescriptor ( case 2: /* Max Address */ @@ -544,7 +560,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum)); MaxOp = InitializerOp; -@@ -434,10 +439,10 @@ RsDoIoDescriptor ( +@@ -542,10 +547,10 @@ RsDoIoDescriptor ( /* Validate the Min/Max/Len/Align values */ RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO, @@ -559,7 +575,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp); return (Rnode); -@@ -561,7 +566,7 @@ RsDoIrqDescriptor ( +@@ -669,7 +674,7 @@ RsDoIrqDescriptor ( /* Now we can set the channel mask */ @@ -568,7 +584,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c return (Rnode); } -@@ -660,6 +665,6 @@ RsDoIrqNoFlagsDescriptor ( +@@ -768,6 +773,6 @@ RsDoIrqNoFlagsDescriptor ( /* Now we can set the interrupt mask */ @@ -576,11 +592,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1i.c + Descriptor->Irq.IrqMask = AcpiUtReadUint16(&IrqMask); return (Rnode); } -Index: acpica-unix2-20200925/source/compiler/aslrestype2.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype2.c -+++ acpica-unix2-20200925/source/compiler/aslrestype2.c -@@ -77,6 +77,8 @@ RsDoGeneralRegisterDescriptor ( +diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c +index 93236853a..13d0476e7 100644 +--- a/source/compiler/aslrestype2.c ++++ b/source/compiler/aslrestype2.c +@@ -185,6 +185,8 @@ RsDoGeneralRegisterDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT32 CurrentByteOffset; UINT32 i; @@ -589,7 +605,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -85,7 +87,8 @@ RsDoGeneralRegisterDescriptor ( +@@ -193,7 +195,8 @@ RsDoGeneralRegisterDescriptor ( Descriptor = Rnode->Buffer; Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER; @@ -599,7 +615,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c /* Process all child initialization nodes */ -@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor ( +@@ -224,7 +227,8 @@ RsDoGeneralRegisterDescriptor ( case 3: /* Register Address */ @@ -609,7 +625,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS, CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address)); break; -@@ -184,6 +188,8 @@ RsDoInterruptDescriptor ( +@@ -292,6 +296,8 @@ RsDoInterruptDescriptor ( BOOLEAN HasResSourceIndex = FALSE; UINT8 ResSourceIndex = 0; UINT8 *ResSourceString = NULL; @@ -618,7 +634,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -225,7 +231,7 @@ RsDoInterruptDescriptor ( +@@ -333,7 +339,7 @@ RsDoInterruptDescriptor ( * Initial descriptor length -- may be enlarged if there are * optional fields present */ @@ -627,7 +643,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c Descriptor->ExtendedIrq.InterruptCount = 0; Rover = ACPI_CAST_PTR (AML_RESOURCE, -@@ -333,7 +339,8 @@ RsDoInterruptDescriptor ( +@@ -441,7 +447,8 @@ RsDoInterruptDescriptor ( /* Save the integer and move pointer to the next one */ @@ -637,7 +653,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4); Descriptor->ExtendedIrq.InterruptCount++; Descriptor->ExtendedIrq.ResourceLength += 4; -@@ -384,6 +391,8 @@ RsDoInterruptDescriptor ( +@@ -492,6 +499,8 @@ RsDoInterruptDescriptor ( Descriptor->ExtendedIrq.ResourceLength = (UINT16) (Descriptor->ExtendedIrq.ResourceLength + StringLength); } @@ -646,7 +662,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) - -@@ -436,7 +445,8 @@ RsDoVendorLargeDescriptor ( +@@ -544,7 +553,8 @@ RsDoVendorLargeDescriptor ( Descriptor = Rnode->Buffer; Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE; @@ -656,11 +672,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2.c /* Point to end-of-descriptor for vendor data */ -Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype2d.c -+++ acpica-unix2-20200925/source/compiler/aslrestype2d.c -@@ -84,6 +84,8 @@ RsDoDwordIoDescriptor ( +diff --git a/source/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c +index 394530ae3..fd9dc91de 100644 +--- a/source/compiler/aslrestype2d.c ++++ b/source/compiler/aslrestype2d.c +@@ -192,6 +192,8 @@ RsDoDwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -669,7 +685,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -147,8 +149,8 @@ RsDoDwordIoDescriptor ( +@@ -255,8 +257,8 @@ RsDoDwordIoDescriptor ( case 5: /* Address Granularity */ @@ -680,7 +696,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); GranOp = InitializerOp; -@@ -156,8 +158,8 @@ RsDoDwordIoDescriptor ( +@@ -264,8 +266,8 @@ RsDoDwordIoDescriptor ( case 6: /* Address Min */ @@ -691,7 +707,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); MinOp = InitializerOp; -@@ -165,8 +167,8 @@ RsDoDwordIoDescriptor ( +@@ -273,8 +275,8 @@ RsDoDwordIoDescriptor ( case 7: /* Address Max */ @@ -702,7 +718,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); MaxOp = InitializerOp; -@@ -174,16 +176,16 @@ RsDoDwordIoDescriptor ( +@@ -282,16 +284,16 @@ RsDoDwordIoDescriptor ( case 8: /* Translation Offset */ @@ -723,7 +739,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); LengthOp = InitializerOp; -@@ -271,11 +273,14 @@ RsDoDwordIoDescriptor ( +@@ -379,11 +381,14 @@ RsDoDwordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -742,7 +758,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -@@ -314,6 +319,8 @@ RsDoDwordMemoryDescriptor ( +@@ -422,6 +427,8 @@ RsDoDwordMemoryDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -751,7 +767,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -385,8 +392,8 @@ RsDoDwordMemoryDescriptor ( +@@ -493,8 +500,8 @@ RsDoDwordMemoryDescriptor ( case 6: /* Address Granularity */ @@ -762,7 +778,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); GranOp = InitializerOp; -@@ -394,8 +401,8 @@ RsDoDwordMemoryDescriptor ( +@@ -502,8 +509,8 @@ RsDoDwordMemoryDescriptor ( case 7: /* Min Address */ @@ -773,7 +789,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); MinOp = InitializerOp; -@@ -403,8 +410,8 @@ RsDoDwordMemoryDescriptor ( +@@ -511,8 +518,8 @@ RsDoDwordMemoryDescriptor ( case 8: /* Max Address */ @@ -784,7 +800,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); MaxOp = InitializerOp; -@@ -412,16 +419,16 @@ RsDoDwordMemoryDescriptor ( +@@ -520,16 +527,16 @@ RsDoDwordMemoryDescriptor ( case 9: /* Translation Offset */ @@ -805,7 +821,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); LengthOp = InitializerOp; -@@ -506,11 +513,14 @@ RsDoDwordMemoryDescriptor ( +@@ -614,11 +621,14 @@ RsDoDwordMemoryDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -824,7 +840,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -@@ -549,6 +559,8 @@ RsDoDwordSpaceDescriptor ( +@@ -657,6 +667,8 @@ RsDoDwordSpaceDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -833,7 +849,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -616,8 +628,8 @@ RsDoDwordSpaceDescriptor ( +@@ -724,8 +736,8 @@ RsDoDwordSpaceDescriptor ( case 6: /* Address Granularity */ @@ -844,7 +860,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); GranOp = InitializerOp; -@@ -625,8 +637,8 @@ RsDoDwordSpaceDescriptor ( +@@ -733,8 +745,8 @@ RsDoDwordSpaceDescriptor ( case 7: /* Min Address */ @@ -855,7 +871,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); MinOp = InitializerOp; -@@ -634,8 +646,8 @@ RsDoDwordSpaceDescriptor ( +@@ -742,8 +754,8 @@ RsDoDwordSpaceDescriptor ( case 8: /* Max Address */ @@ -866,7 +882,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); MaxOp = InitializerOp; -@@ -643,16 +655,16 @@ RsDoDwordSpaceDescriptor ( +@@ -751,16 +763,16 @@ RsDoDwordSpaceDescriptor ( case 9: /* Translation Offset */ @@ -887,7 +903,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); LengthOp = InitializerOp; -@@ -723,11 +735,14 @@ RsDoDwordSpaceDescriptor ( +@@ -831,11 +843,14 @@ RsDoDwordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -906,11 +922,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2d.c Descriptor->Address32.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype2e.c -+++ acpica-unix2-20200925/source/compiler/aslrestype2e.c -@@ -80,6 +80,7 @@ RsDoExtendedIoDescriptor ( +diff --git a/source/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c +index b188994d3..ad61efc77 100644 +--- a/source/compiler/aslrestype2e.c ++++ b/source/compiler/aslrestype2e.c +@@ -188,6 +188,7 @@ RsDoExtendedIoDescriptor ( UINT16 StringLength = 0; UINT32 CurrentByteOffset; UINT32 i; @@ -918,7 +934,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -139,7 +140,8 @@ RsDoExtendedIoDescriptor ( +@@ -247,7 +248,8 @@ RsDoExtendedIoDescriptor ( case 5: /* Address Granularity */ @@ -928,7 +944,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); GranOp = InitializerOp; -@@ -147,7 +149,8 @@ RsDoExtendedIoDescriptor ( +@@ -255,7 +257,8 @@ RsDoExtendedIoDescriptor ( case 6: /* Address Min */ @@ -938,7 +954,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); MinOp = InitializerOp; -@@ -155,7 +158,8 @@ RsDoExtendedIoDescriptor ( +@@ -263,7 +266,8 @@ RsDoExtendedIoDescriptor ( case 7: /* Address Max */ @@ -948,7 +964,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); MaxOp = InitializerOp; -@@ -163,14 +167,16 @@ RsDoExtendedIoDescriptor ( +@@ -271,14 +275,16 @@ RsDoExtendedIoDescriptor ( case 8: /* Translation Offset */ @@ -967,7 +983,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); LengthOp = InitializerOp; -@@ -178,7 +184,8 @@ RsDoExtendedIoDescriptor ( +@@ -286,7 +292,8 @@ RsDoExtendedIoDescriptor ( case 10: /* Type-Specific Attributes */ @@ -977,7 +993,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); break; -@@ -213,11 +220,14 @@ RsDoExtendedIoDescriptor ( +@@ -321,11 +328,14 @@ RsDoExtendedIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -996,7 +1012,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c Descriptor->ExtAddress64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -@@ -253,6 +263,7 @@ RsDoExtendedMemoryDescriptor ( +@@ -361,6 +371,7 @@ RsDoExtendedMemoryDescriptor ( UINT16 StringLength = 0; UINT32 CurrentByteOffset; UINT32 i; @@ -1004,7 +1020,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -319,7 +330,8 @@ RsDoExtendedMemoryDescriptor ( +@@ -427,7 +438,8 @@ RsDoExtendedMemoryDescriptor ( case 6: /* Address Granularity */ @@ -1014,7 +1030,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); GranOp = InitializerOp; -@@ -327,7 +339,8 @@ RsDoExtendedMemoryDescriptor ( +@@ -435,7 +447,8 @@ RsDoExtendedMemoryDescriptor ( case 7: /* Min Address */ @@ -1024,7 +1040,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); MinOp = InitializerOp; -@@ -335,7 +348,8 @@ RsDoExtendedMemoryDescriptor ( +@@ -443,7 +456,8 @@ RsDoExtendedMemoryDescriptor ( case 8: /* Max Address */ @@ -1034,7 +1050,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); MaxOp = InitializerOp; -@@ -343,14 +357,16 @@ RsDoExtendedMemoryDescriptor ( +@@ -451,14 +465,16 @@ RsDoExtendedMemoryDescriptor ( case 9: /* Translation Offset */ @@ -1053,7 +1069,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); LengthOp = InitializerOp; -@@ -358,7 +374,8 @@ RsDoExtendedMemoryDescriptor ( +@@ -466,7 +482,8 @@ RsDoExtendedMemoryDescriptor ( case 11: /* Type-Specific Attributes */ @@ -1063,7 +1079,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); break; -@@ -394,11 +411,14 @@ RsDoExtendedMemoryDescriptor ( +@@ -502,11 +519,14 @@ RsDoExtendedMemoryDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -1082,7 +1098,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c Descriptor->ExtAddress64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -@@ -434,6 +454,7 @@ RsDoExtendedSpaceDescriptor ( +@@ -542,6 +562,7 @@ RsDoExtendedSpaceDescriptor ( UINT16 StringLength = 0; UINT32 CurrentByteOffset; UINT32 i; @@ -1090,7 +1106,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -497,7 +518,8 @@ RsDoExtendedSpaceDescriptor ( +@@ -605,7 +626,8 @@ RsDoExtendedSpaceDescriptor ( case 6: /* Address Granularity */ @@ -1100,7 +1116,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); GranOp = InitializerOp; -@@ -505,7 +527,8 @@ RsDoExtendedSpaceDescriptor ( +@@ -613,7 +635,8 @@ RsDoExtendedSpaceDescriptor ( case 7: /* Min Address */ @@ -1110,7 +1126,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); MinOp = InitializerOp; -@@ -513,7 +536,8 @@ RsDoExtendedSpaceDescriptor ( +@@ -621,7 +644,8 @@ RsDoExtendedSpaceDescriptor ( case 8: /* Max Address */ @@ -1120,7 +1136,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); MaxOp = InitializerOp; -@@ -521,14 +545,16 @@ RsDoExtendedSpaceDescriptor ( +@@ -629,14 +653,16 @@ RsDoExtendedSpaceDescriptor ( case 9: /* Translation Offset */ @@ -1139,7 +1155,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); LengthOp = InitializerOp; -@@ -536,7 +562,8 @@ RsDoExtendedSpaceDescriptor ( +@@ -644,7 +670,8 @@ RsDoExtendedSpaceDescriptor ( case 11: /* Type-Specific Attributes */ @@ -1149,7 +1165,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); break; -@@ -557,11 +584,14 @@ RsDoExtendedSpaceDescriptor ( +@@ -665,11 +692,14 @@ RsDoExtendedSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -1168,11 +1184,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2e.c Descriptor->ExtAddress64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype2q.c -+++ acpica-unix2-20200925/source/compiler/aslrestype2q.c -@@ -84,6 +84,7 @@ RsDoQwordIoDescriptor ( +diff --git a/source/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c +index 02db0ab34..7706b07ac 100644 +--- a/source/compiler/aslrestype2q.c ++++ b/source/compiler/aslrestype2q.c +@@ -192,6 +192,7 @@ RsDoQwordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -1180,7 +1196,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -147,7 +148,8 @@ RsDoQwordIoDescriptor ( +@@ -255,7 +256,8 @@ RsDoQwordIoDescriptor ( case 5: /* Address Granularity */ @@ -1190,7 +1206,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); GranOp = InitializerOp; -@@ -155,7 +157,8 @@ RsDoQwordIoDescriptor ( +@@ -263,7 +265,8 @@ RsDoQwordIoDescriptor ( case 6: /* Address Min */ @@ -1200,7 +1216,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); MinOp = InitializerOp; -@@ -163,7 +166,8 @@ RsDoQwordIoDescriptor ( +@@ -271,7 +274,8 @@ RsDoQwordIoDescriptor ( case 7: /* Address Max */ @@ -1210,7 +1226,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); MaxOp = InitializerOp; -@@ -171,14 +175,16 @@ RsDoQwordIoDescriptor ( +@@ -279,14 +283,16 @@ RsDoQwordIoDescriptor ( case 8: /* Translation Offset */ @@ -1229,7 +1245,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); LengthOp = InitializerOp; -@@ -262,11 +268,14 @@ RsDoQwordIoDescriptor ( +@@ -370,11 +376,14 @@ RsDoQwordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -1248,7 +1264,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c Descriptor->Address64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -@@ -305,6 +314,7 @@ RsDoQwordMemoryDescriptor ( +@@ -413,6 +422,7 @@ RsDoQwordMemoryDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -1256,7 +1272,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -375,7 +385,8 @@ RsDoQwordMemoryDescriptor ( +@@ -483,7 +493,8 @@ RsDoQwordMemoryDescriptor ( case 6: /* Address Granularity */ @@ -1266,7 +1282,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); GranOp = InitializerOp; -@@ -383,7 +394,8 @@ RsDoQwordMemoryDescriptor ( +@@ -491,7 +502,8 @@ RsDoQwordMemoryDescriptor ( case 7: /* Min Address */ @@ -1276,7 +1292,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); MinOp = InitializerOp; -@@ -391,7 +403,8 @@ RsDoQwordMemoryDescriptor ( +@@ -499,7 +511,8 @@ RsDoQwordMemoryDescriptor ( case 8: /* Max Address */ @@ -1286,7 +1302,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); MaxOp = InitializerOp; -@@ -399,14 +412,16 @@ RsDoQwordMemoryDescriptor ( +@@ -507,14 +520,16 @@ RsDoQwordMemoryDescriptor ( case 9: /* Translation Offset */ @@ -1305,7 +1321,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); LengthOp = InitializerOp; -@@ -491,11 +506,14 @@ RsDoQwordMemoryDescriptor ( +@@ -599,11 +614,14 @@ RsDoQwordMemoryDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -1324,7 +1340,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c Descriptor->Address64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -@@ -534,6 +552,7 @@ RsDoQwordSpaceDescriptor ( +@@ -642,6 +660,7 @@ RsDoQwordSpaceDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -1332,7 +1348,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -601,7 +620,8 @@ RsDoQwordSpaceDescriptor ( +@@ -709,7 +728,8 @@ RsDoQwordSpaceDescriptor ( case 6: /* Address Granularity */ @@ -1342,7 +1358,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); GranOp = InitializerOp; -@@ -609,7 +629,8 @@ RsDoQwordSpaceDescriptor ( +@@ -717,7 +737,8 @@ RsDoQwordSpaceDescriptor ( case 7: /* Min Address */ @@ -1352,7 +1368,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); MinOp = InitializerOp; -@@ -617,7 +638,8 @@ RsDoQwordSpaceDescriptor ( +@@ -725,7 +746,8 @@ RsDoQwordSpaceDescriptor ( case 8: /* Max Address */ @@ -1362,7 +1378,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); MaxOp = InitializerOp; -@@ -625,14 +647,16 @@ RsDoQwordSpaceDescriptor ( +@@ -733,14 +755,16 @@ RsDoQwordSpaceDescriptor ( case 9: /* Translation Offset */ @@ -1381,7 +1397,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); LengthOp = InitializerOp; -@@ -702,11 +726,14 @@ RsDoQwordSpaceDescriptor ( +@@ -810,11 +834,14 @@ RsDoQwordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ @@ -1400,11 +1416,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2q.c Descriptor->Address64.Flags, MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); -Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype2s.c -+++ acpica-unix2-20200925/source/compiler/aslrestype2s.c -@@ -343,6 +343,7 @@ RsDoGpioIntDescriptor ( +diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c +index c075c89c9..7aa23a35b 100644 +--- a/source/compiler/aslrestype2s.c ++++ b/source/compiler/aslrestype2s.c +@@ -451,6 +451,7 @@ RsDoGpioIntDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; UINT32 i; @@ -1412,7 +1428,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -485,7 +486,8 @@ RsDoGpioIntDescriptor ( +@@ -593,7 +594,8 @@ RsDoGpioIntDescriptor ( * (implies resource source must immediately follow the pin list.) * Name: _PIN */ @@ -1422,7 +1438,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InterruptList++; PinCount++; -@@ -518,6 +520,27 @@ RsDoGpioIntDescriptor ( +@@ -626,6 +628,27 @@ RsDoGpioIntDescriptor ( MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource); @@ -1450,7 +1466,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c return (Rnode); } -@@ -552,6 +575,7 @@ RsDoGpioIoDescriptor ( +@@ -660,6 +683,7 @@ RsDoGpioIoDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; UINT32 i; @@ -1458,7 +1474,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -691,7 +715,8 @@ RsDoGpioIoDescriptor ( +@@ -799,7 +823,8 @@ RsDoGpioIoDescriptor ( * (implies resource source must immediately follow the pin list.) * Name: _PIN */ @@ -1468,7 +1484,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InterruptList++; PinCount++; -@@ -724,6 +749,27 @@ RsDoGpioIoDescriptor ( +@@ -832,6 +857,27 @@ RsDoGpioIoDescriptor ( MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource); @@ -1496,7 +1512,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c return (Rnode); } -@@ -754,6 +800,8 @@ RsDoI2cSerialBusDescriptor ( +@@ -862,6 +908,8 @@ RsDoI2cSerialBusDescriptor ( UINT16 DescriptorSize; UINT32 CurrentByteOffset; UINT32 i; @@ -1505,7 +1521,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -781,7 +829,8 @@ RsDoI2cSerialBusDescriptor ( +@@ -889,7 +937,8 @@ RsDoI2cSerialBusDescriptor ( Descriptor->I2cSerialBus.RevisionId = AML_RESOURCE_I2C_REVISION; Descriptor->I2cSerialBus.TypeRevisionId = AML_RESOURCE_I2C_TYPE_REVISION; Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE; @@ -1515,7 +1531,14 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_I2C_SERIALBUS_V2) { -@@ -801,7 +850,8 @@ RsDoI2cSerialBusDescriptor ( +@@ -903,13 +952,15 @@ RsDoI2cSerialBusDescriptor ( + + /* Process all child initialization nodes */ + ++ Descriptor->I2cSerialBus.TypeSpecificFlags = 0; + for (i = 0; InitializerOp; i++) + { + switch (i) { case 0: /* Slave Address [WORD] (_ADR) */ @@ -1525,7 +1548,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS, CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress)); break; -@@ -815,7 +865,8 @@ RsDoI2cSerialBusDescriptor ( +@@ -923,16 +974,19 @@ RsDoI2cSerialBusDescriptor ( case 2: /* Connection Speed [DWORD] (_SPE) */ @@ -1535,7 +1558,28 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed)); break; -@@ -913,6 +964,8 @@ RsDoSpiSerialBusDescriptor ( + + 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] */ +@@ -990,6 +1044,8 @@ RsDoI2cSerialBusDescriptor ( + InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); + } + ++ Tmp16 = Descriptor->I2cSerialBus.ResourceLength; ++ Descriptor->I2cSerialBus.ResourceLength = AcpiUtReadUint16(&Tmp16); + MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource); + return (Rnode); + } +@@ -1021,6 +1077,8 @@ RsDoSpiSerialBusDescriptor ( UINT16 DescriptorSize; UINT32 CurrentByteOffset; UINT32 i; @@ -1544,7 +1588,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -935,12 +988,13 @@ RsDoSpiSerialBusDescriptor ( +@@ -1043,12 +1101,13 @@ RsDoSpiSerialBusDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1560,7 +1604,14 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_SPI_SERIALBUS_V2) { -@@ -961,7 +1015,8 @@ RsDoSpiSerialBusDescriptor ( +@@ -1063,29 +1122,35 @@ RsDoSpiSerialBusDescriptor ( + + /* Process all child initialization nodes */ + ++ Descriptor->SpiSerialBus.TypeSpecificFlags = 0; + for (i = 0; InitializerOp; i++) + { + switch (i) { case 0: /* Device Selection [WORD] (_ADR) */ @@ -1570,7 +1621,29 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS, CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection)); break; -@@ -996,7 +1051,8 @@ RsDoSpiSerialBusDescriptor ( + + 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) */ +@@ -1104,7 +1169,8 @@ RsDoSpiSerialBusDescriptor ( case 5: /* Connection Speed [DWORD] (_SPE) */ @@ -1580,7 +1653,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed)); break; -@@ -1101,6 +1157,8 @@ RsDoUartSerialBusDescriptor ( +@@ -1209,6 +1275,8 @@ RsDoUartSerialBusDescriptor ( UINT16 DescriptorSize; UINT32 CurrentByteOffset; UINT32 i; @@ -1589,7 +1662,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -1123,12 +1181,13 @@ RsDoUartSerialBusDescriptor ( +@@ -1231,12 +1299,13 @@ RsDoUartSerialBusDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1605,7 +1678,14 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_UART_SERIALBUS_V2) { -@@ -1148,7 +1207,8 @@ RsDoUartSerialBusDescriptor ( +@@ -1250,29 +1319,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) */ @@ -1615,7 +1695,52 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate)); break; -@@ -1197,14 +1257,16 @@ RsDoUartSerialBusDescriptor ( + + 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) */ +@@ -1284,9 +1359,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) */ +@@ -1298,21 +1375,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) */ @@ -1634,7 +1759,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX, CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize)); break; -@@ -1308,6 +1370,7 @@ RsDoPinFunctionDescriptor ( +@@ -1416,6 +1497,7 @@ RsDoPinFunctionDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; UINT32 i; @@ -1642,7 +1767,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; CurrentByteOffset = Info->CurrentByteOffset; -@@ -1331,7 +1394,7 @@ RsDoPinFunctionDescriptor ( +@@ -1439,7 +1521,7 @@ RsDoPinFunctionDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1651,7 +1776,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c Descriptor->PinFunction.DescriptorType = ACPI_RESOURCE_NAME_PIN_FUNCTION; Descriptor->PinFunction.RevisionId = AML_RESOURCE_PIN_FUNCTION_REVISION; -@@ -1371,7 +1434,8 @@ RsDoPinFunctionDescriptor ( +@@ -1479,7 +1561,8 @@ RsDoPinFunctionDescriptor ( case 2: /* Function Number [WORD] (_FUN) */ @@ -1661,7 +1786,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_FUNCTION, CurrentByteOffset + ASL_RESDESC_OFFSET (PinFunction.FunctionNumber)); break; -@@ -1419,6 +1483,12 @@ RsDoPinFunctionDescriptor ( +@@ -1527,6 +1610,12 @@ RsDoPinFunctionDescriptor ( { Descriptor->PinFunction.VendorLength = VendorLength; } @@ -1674,7 +1799,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c break; default: -@@ -1430,7 +1500,8 @@ RsDoPinFunctionDescriptor ( +@@ -1538,7 +1627,8 @@ RsDoPinFunctionDescriptor ( * (implies resource source must immediately follow the pin list.) * Name: _PIN */ @@ -1684,7 +1809,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c PinList++; PinCount++; -@@ -1461,6 +1532,13 @@ RsDoPinFunctionDescriptor ( +@@ -1569,6 +1659,13 @@ RsDoPinFunctionDescriptor ( InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); } @@ -1698,7 +1823,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c return (Rnode); } -@@ -1494,6 +1572,8 @@ RsDoPinConfigDescriptor ( +@@ -1602,6 +1699,8 @@ RsDoPinConfigDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; UINT32 i; @@ -1707,7 +1832,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; CurrentByteOffset = Info->CurrentByteOffset; -@@ -1517,7 +1597,7 @@ RsDoPinConfigDescriptor ( +@@ -1625,7 +1724,7 @@ RsDoPinConfigDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1716,7 +1841,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c Descriptor->PinConfig.DescriptorType = ACPI_RESOURCE_NAME_PIN_CONFIG; Descriptor->PinConfig.RevisionId = AML_RESOURCE_PIN_CONFIG_REVISION; -@@ -1571,7 +1651,8 @@ RsDoPinConfigDescriptor ( +@@ -1679,7 +1778,8 @@ RsDoPinConfigDescriptor ( case 2: /* Pin Config Value [DWORD] (_VAL) */ @@ -1726,7 +1851,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_PINCONFIG_VALUE, CurrentByteOffset + ASL_RESDESC_OFFSET (PinConfig.PinConfigValue)); break; -@@ -1630,7 +1711,8 @@ RsDoPinConfigDescriptor ( +@@ -1738,7 +1838,8 @@ RsDoPinConfigDescriptor ( * (implies resource source must immediately follow the pin list.) * Name: _PIN */ @@ -1736,7 +1861,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c PinList++; PinCount++; -@@ -1661,6 +1743,16 @@ RsDoPinConfigDescriptor ( +@@ -1769,6 +1870,16 @@ RsDoPinConfigDescriptor ( InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); } @@ -1753,7 +1878,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c return (Rnode); } -@@ -1694,6 +1786,7 @@ RsDoPinGroupDescriptor ( +@@ -1802,6 +1913,7 @@ RsDoPinGroupDescriptor ( UINT32 CurrentByteOffset; UINT32 PinCount = 0; UINT32 i; @@ -1761,7 +1886,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; CurrentByteOffset = Info->CurrentByteOffset; -@@ -1717,7 +1810,7 @@ RsDoPinGroupDescriptor ( +@@ -1825,7 +1937,7 @@ RsDoPinGroupDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1770,7 +1895,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c Descriptor->PinGroup.DescriptorType = ACPI_RESOURCE_NAME_PIN_GROUP; Descriptor->PinGroup.RevisionId = AML_RESOURCE_PIN_GROUP_REVISION; -@@ -1784,7 +1877,8 @@ RsDoPinGroupDescriptor ( +@@ -1892,7 +2004,8 @@ RsDoPinGroupDescriptor ( * (implies resource source must immediately follow the pin list.) * Name: _PIN */ @@ -1780,7 +1905,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c PinList++; PinCount++; -@@ -1815,6 +1909,16 @@ RsDoPinGroupDescriptor ( +@@ -1923,6 +2036,16 @@ RsDoPinGroupDescriptor ( InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); } @@ -1797,7 +1922,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c return (Rnode); } -@@ -1847,6 +1951,7 @@ RsDoPinGroupFunctionDescriptor ( +@@ -1955,6 +2078,7 @@ RsDoPinGroupFunctionDescriptor ( UINT16 DescriptorSize; UINT32 CurrentByteOffset; UINT32 i; @@ -1805,7 +1930,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; CurrentByteOffset = Info->CurrentByteOffset; -@@ -1870,7 +1975,7 @@ RsDoPinGroupFunctionDescriptor ( +@@ -1978,7 +2102,7 @@ RsDoPinGroupFunctionDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1814,7 +1939,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c Descriptor->PinGroupFunction.DescriptorType = ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION; Descriptor->PinGroupFunction.RevisionId = AML_RESOURCE_PIN_GROUP_FUNCTION_REVISION; -@@ -1902,7 +2007,8 @@ RsDoPinGroupFunctionDescriptor ( +@@ -2010,7 +2134,8 @@ RsDoPinGroupFunctionDescriptor ( case 1: /* Function Number [WORD] */ @@ -1824,7 +1949,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_FUNCTION, CurrentByteOffset + ASL_RESDESC_OFFSET (PinGroupFunction.FunctionNumber)); break; -@@ -1961,6 +2067,16 @@ RsDoPinGroupFunctionDescriptor ( +@@ -2069,6 +2194,16 @@ RsDoPinGroupFunctionDescriptor ( InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); } @@ -1841,7 +1966,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c return (Rnode); } -@@ -1993,6 +2109,8 @@ RsDoPinGroupConfigDescriptor ( +@@ -2101,6 +2236,8 @@ RsDoPinGroupConfigDescriptor ( UINT16 DescriptorSize; UINT32 CurrentByteOffset; UINT32 i; @@ -1850,7 +1975,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; CurrentByteOffset = Info->CurrentByteOffset; -@@ -2016,7 +2134,7 @@ RsDoPinGroupConfigDescriptor ( +@@ -2124,7 +2261,7 @@ RsDoPinGroupConfigDescriptor ( sizeof (AML_RESOURCE_LARGE_HEADER)); Descriptor = Rnode->Buffer; @@ -1859,7 +1984,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c Descriptor->PinGroupConfig.DescriptorType = ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG; Descriptor->PinGroupConfig.RevisionId = AML_RESOURCE_PIN_GROUP_CONFIG_REVISION; -@@ -2069,7 +2187,8 @@ RsDoPinGroupConfigDescriptor ( +@@ -2177,7 +2314,8 @@ RsDoPinGroupConfigDescriptor ( case 2: /* Pin Config Value [DWORD] (_VAL) */ @@ -1869,7 +1994,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_PINCONFIG_VALUE, CurrentByteOffset + ASL_RESDESC_OFFSET (PinGroupConfig.PinConfigValue)); break; -@@ -2130,5 +2249,15 @@ RsDoPinGroupConfigDescriptor ( +@@ -2238,5 +2376,15 @@ RsDoPinGroupConfigDescriptor ( InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); } @@ -1885,11 +2010,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2s.c + return (Rnode); } -Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c -=================================================================== ---- acpica-unix2-20200925.orig/source/compiler/aslrestype2w.c -+++ acpica-unix2-20200925/source/compiler/aslrestype2w.c -@@ -84,6 +84,7 @@ RsDoWordIoDescriptor ( +diff --git a/source/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c +index b2113f4c9..6077f5f1a 100644 +--- a/source/compiler/aslrestype2w.c ++++ b/source/compiler/aslrestype2w.c +@@ -192,6 +192,7 @@ RsDoWordIoDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -1897,7 +2022,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -147,7 +148,8 @@ RsDoWordIoDescriptor ( +@@ -255,7 +256,8 @@ RsDoWordIoDescriptor ( case 5: /* Address Granularity */ @@ -1907,7 +2032,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); GranOp = InitializerOp; -@@ -155,7 +157,8 @@ RsDoWordIoDescriptor ( +@@ -263,7 +265,8 @@ RsDoWordIoDescriptor ( case 6: /* Address Min */ @@ -1917,7 +2042,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); MinOp = InitializerOp; -@@ -163,7 +166,8 @@ RsDoWordIoDescriptor ( +@@ -271,7 +274,8 @@ RsDoWordIoDescriptor ( case 7: /* Address Max */ @@ -1927,7 +2052,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); MaxOp = InitializerOp; -@@ -171,14 +175,16 @@ RsDoWordIoDescriptor ( +@@ -279,14 +283,16 @@ RsDoWordIoDescriptor ( case 8: /* Translation Offset */ @@ -1946,7 +2071,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); LengthOp = InitializerOp; -@@ -263,13 +269,17 @@ RsDoWordIoDescriptor ( +@@ -371,13 +377,17 @@ RsDoWordIoDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( @@ -1968,7 +2093,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -@@ -305,6 +315,7 @@ RsDoWordBusNumberDescriptor ( +@@ -413,6 +423,7 @@ RsDoWordBusNumberDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -1976,7 +2101,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -361,8 +372,8 @@ RsDoWordBusNumberDescriptor ( +@@ -469,8 +480,8 @@ RsDoWordBusNumberDescriptor ( case 4: /* Address Granularity */ @@ -1987,7 +2112,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); GranOp = InitializerOp; -@@ -370,8 +381,8 @@ RsDoWordBusNumberDescriptor ( +@@ -478,8 +489,8 @@ RsDoWordBusNumberDescriptor ( case 5: /* Min Address */ @@ -1998,7 +2123,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); MinOp = InitializerOp; -@@ -379,8 +390,8 @@ RsDoWordBusNumberDescriptor ( +@@ -487,8 +498,8 @@ RsDoWordBusNumberDescriptor ( case 6: /* Max Address */ @@ -2009,7 +2134,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); MaxOp = InitializerOp; -@@ -388,16 +399,16 @@ RsDoWordBusNumberDescriptor ( +@@ -496,16 +507,16 @@ RsDoWordBusNumberDescriptor ( case 7: /* Translation Offset */ @@ -2030,7 +2155,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); LengthOp = InitializerOp; -@@ -468,13 +479,17 @@ RsDoWordBusNumberDescriptor ( +@@ -576,13 +587,17 @@ RsDoWordBusNumberDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( @@ -2052,7 +2177,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -@@ -510,6 +525,7 @@ RsDoWordSpaceDescriptor ( +@@ -618,6 +633,7 @@ RsDoWordSpaceDescriptor ( UINT32 CurrentByteOffset; UINT32 i; BOOLEAN ResSourceIndex = FALSE; @@ -2060,7 +2185,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c InitializerOp = Info->DescriptorTypeOp->Asl.Child; -@@ -577,8 +593,8 @@ RsDoWordSpaceDescriptor ( +@@ -685,8 +701,8 @@ RsDoWordSpaceDescriptor ( case 6: /* Address Granularity */ @@ -2071,7 +2196,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); GranOp = InitializerOp; -@@ -586,8 +602,8 @@ RsDoWordSpaceDescriptor ( +@@ -694,8 +710,8 @@ RsDoWordSpaceDescriptor ( case 7: /* Min Address */ @@ -2082,7 +2207,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); MinOp = InitializerOp; -@@ -595,8 +611,8 @@ RsDoWordSpaceDescriptor ( +@@ -703,8 +719,8 @@ RsDoWordSpaceDescriptor ( case 8: /* Max Address */ @@ -2093,7 +2218,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); MaxOp = InitializerOp; -@@ -604,16 +620,16 @@ RsDoWordSpaceDescriptor ( +@@ -712,16 +728,16 @@ RsDoWordSpaceDescriptor ( case 9: /* Translation Offset */ @@ -2114,7 +2239,7 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); LengthOp = InitializerOp; -@@ -684,13 +700,17 @@ RsDoWordSpaceDescriptor ( +@@ -792,13 +808,17 @@ RsDoWordSpaceDescriptor ( /* Validate the Min/Max/Len/Gran values */ RsLargeAddressCheck ( @@ -2136,11 +2261,11 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix2-20200925/source/components/disassembler/dmbuffer.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/disassembler/dmbuffer.c -+++ acpica-unix2-20200925/source/components/disassembler/dmbuffer.c -@@ -204,7 +204,7 @@ AcpiDmByteList ( +diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c +index 810f727fa..6960e9913 100644 +--- a/source/components/disassembler/dmbuffer.c ++++ b/source/components/disassembler/dmbuffer.c +@@ -312,7 +312,7 @@ AcpiDmByteList ( ByteData = Op->Named.Data; @@ -2149,11 +2274,46 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmbuffer.c /* * The byte list belongs to a buffer, and can be produced by either -Index: acpica-unix2-20200925/source/components/disassembler/dmopcode.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/disassembler/dmopcode.c -+++ acpica-unix2-20200925/source/components/disassembler/dmopcode.c -@@ -882,23 +882,23 @@ AcpiDmDisassembleOneOp ( +@@ -416,7 +416,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 */ + +@@ -544,7 +544,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); + + /* +@@ -986,14 +986,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 */ + +diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c +index 1372a0f25..bb7abab2c 100644 +--- a/source/components/disassembler/dmopcode.c ++++ b/source/components/disassembler/dmopcode.c +@@ -990,23 +990,23 @@ AcpiDmDisassembleOneOp ( case AML_INT_NAMEDFIELD_OP: @@ -2181,11 +2341,11 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmopcode.c Info->BitOffset += Offset; if (Info->BitOffset % 8 == 0) -Index: acpica-unix2-20200925/source/components/disassembler/dmresrc.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/disassembler/dmresrc.c -+++ acpica-unix2-20200925/source/components/disassembler/dmresrc.c -@@ -417,7 +417,7 @@ AcpiDmIsResourceTemplate ( +diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c +index a3403322b..af75a7833 100644 +--- a/source/components/disassembler/dmresrc.c ++++ b/source/components/disassembler/dmresrc.c +@@ -525,7 +525,7 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } @@ -2194,11 +2354,11 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrc.c /* Get the length of the raw initialization byte list */ -Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/disassembler/dmresrcl.c -+++ acpica-unix2-20200925/source/components/disassembler/dmresrcl.c -@@ -141,6 +141,8 @@ AcpiDmMemoryFields ( +diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c +index e9d391df3..eed859928 100644 +--- a/source/components/disassembler/dmresrcl.c ++++ b/source/components/disassembler/dmresrcl.c +@@ -249,6 +249,8 @@ AcpiDmMemoryFields ( UINT32 Level) { UINT32 i; @@ -2207,7 +2367,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c for (i = 0; i < 4; i++) -@@ -151,14 +153,16 @@ AcpiDmMemoryFields ( +@@ -259,14 +261,16 @@ AcpiDmMemoryFields ( { case 16: @@ -2228,7 +2388,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c break; default: -@@ -190,6 +194,9 @@ AcpiDmAddressFields ( +@@ -298,6 +302,9 @@ AcpiDmAddressFields ( UINT32 Level) { UINT32 i; @@ -2238,7 +2398,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c AcpiOsPrintf ("\n"); -@@ -202,20 +209,23 @@ AcpiDmAddressFields ( +@@ -310,20 +317,23 @@ AcpiDmAddressFields ( { case 16: @@ -2268,7 +2428,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c break; default: -@@ -749,7 +759,7 @@ AcpiDmExtendedDescriptor ( +@@ -857,7 +867,7 @@ AcpiDmExtendedDescriptor ( /* Extra field for this descriptor only */ AcpiDmIndent (Level + 1); @@ -2277,7 +2437,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c "Type-Specific Attributes"); /* Insert a descriptor name */ -@@ -876,11 +886,11 @@ AcpiDmFixedMemory32Descriptor ( +@@ -984,11 +994,11 @@ AcpiDmFixedMemory32Descriptor ( AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->FixedMemory32.Flags)]); AcpiDmIndent (Level + 1); @@ -2291,7 +2451,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c "Address Length"); /* Insert a descriptor name */ -@@ -926,7 +936,8 @@ AcpiDmGenericRegisterDescriptor ( +@@ -1034,7 +1044,8 @@ AcpiDmGenericRegisterDescriptor ( AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset"); AcpiDmIndent (Level + 1); @@ -2301,7 +2461,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c /* Optional field for ACPI 3.0 */ -@@ -989,7 +1000,7 @@ AcpiDmInterruptDescriptor ( +@@ -1097,7 +1108,7 @@ AcpiDmInterruptDescriptor ( AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_EXTENDED_IRQ) + ((UINT32) Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32), @@ -2310,7 +2470,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c /* Insert a descriptor name */ -@@ -1004,7 +1015,7 @@ AcpiDmInterruptDescriptor ( +@@ -1112,7 +1123,7 @@ AcpiDmInterruptDescriptor ( { AcpiDmIndent (Level + 1); AcpiOsPrintf ("0x%8.8X,\n", @@ -2319,17 +2479,18 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl.c } AcpiDmIndent (Level); -Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/disassembler/dmresrcl2.c -+++ acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c -@@ -191,15 +191,19 @@ AcpiDmGpioCommon ( +diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c +index a2a85dfdc..11c3af1af 100644 +--- a/source/components/disassembler/dmresrcl2.c ++++ b/source/components/disassembler/dmresrcl2.c +@@ -299,22 +299,27 @@ AcpiDmGpioCommon ( char *DeviceName = NULL; UINT32 PinCount; UINT32 i; + UINT16 ResSourceOffset; + UINT16 VendorOffset; + UINT16 VendorLength; ++ UINT16 Tmp16; /* ResourceSource, ResourceSourceIndex, ResourceType */ @@ -2345,7 +2506,16 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); } -@@ -215,15 +219,15 @@ AcpiDmGpioCommon ( + 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 */ + +@@ -323,15 +328,15 @@ AcpiDmGpioCommon ( /* Dump the vendor data */ @@ -2366,17 +2536,16 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c } AcpiOsPrintf (")\n"); -@@ -233,17 +237,21 @@ AcpiDmGpioCommon ( +@@ -341,17 +346,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); -+ - PinCount = ((UINT32) (Resource->Gpio.ResSourceOffset - - Resource->Gpio.PinTableOffset)) / - sizeof (UINT16); PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, - Resource->Gpio.PinTableOffset); @@ -2390,7 +2559,29 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c ((i + 1) < PinCount) ? "," : ""); } -@@ -299,7 +307,8 @@ AcpiDmGpioIntDescriptor ( +@@ -385,16 +390,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 */ + +@@ -407,7 +414,8 @@ AcpiDmGpioIntDescriptor ( { AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig); } @@ -2400,18 +2591,40 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c /* Dump the GpioInt/GpioIo common portion of the descriptor */ -@@ -350,8 +359,8 @@ AcpiDmGpioIoDescriptor ( +@@ -437,14 +445,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) + { +@@ -458,10 +468,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)); - AcpiOsPrintf ("%s,\n", - AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Resource->Gpio.IntFlags)]); ++ Tmp16 = AcpiUtReadUint16(&Resource->Gpio.IntFlags); ++ AcpiOsPrintf ("%s,\n", AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Tmp16)]); + + /* Dump the GpioInt/GpioIo common portion of the descriptor */ -@@ -434,6 +443,9 @@ AcpiDmPinFunctionDescriptor ( +@@ -542,6 +552,9 @@ AcpiDmPinFunctionDescriptor ( char *DeviceName = NULL; UINT32 PinCount; UINT32 i; @@ -2421,7 +2634,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c AcpiDmIndent (Level); AcpiOsPrintf ("PinFunction (%s, ", -@@ -451,12 +463,14 @@ AcpiDmPinFunctionDescriptor ( +@@ -559,12 +572,14 @@ AcpiDmPinFunctionDescriptor ( /* FunctionNumber */ @@ -2439,7 +2652,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); } -@@ -476,15 +490,15 @@ AcpiDmPinFunctionDescriptor ( +@@ -584,15 +599,15 @@ AcpiDmPinFunctionDescriptor ( /* Dump the vendor data */ @@ -2460,7 +2673,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c } AcpiOsPrintf (")\n"); -@@ -495,17 +509,17 @@ AcpiDmPinFunctionDescriptor ( +@@ -603,17 +618,17 @@ AcpiDmPinFunctionDescriptor ( AcpiOsPrintf ("{ // Pin list\n"); @@ -2483,11 +2696,139 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcl2.c ((i + 1) < PinCount) ? "," : ""); } -Index: acpica-unix2-20200925/source/components/disassembler/dmresrcs.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/disassembler/dmresrcs.c -+++ acpica-unix2-20200925/source/components/disassembler/dmresrcs.c -@@ -93,7 +93,7 @@ AcpiDmIrqDescriptor ( +@@ -649,7 +664,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, +@@ -658,7 +674,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, +@@ -667,7 +684,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, +@@ -715,9 +733,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, ", +@@ -726,7 +744,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); +@@ -783,15 +801,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 */ +@@ -799,7 +819,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); +@@ -809,7 +829,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); +@@ -866,15 +886,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 */ + +@@ -889,13 +911,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); +diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c +index 5f5c7edaf..21d397637 100644 +--- a/source/components/disassembler/dmresrcs.c ++++ b/source/components/disassembler/dmresrcs.c +@@ -201,7 +201,7 @@ AcpiDmIrqDescriptor ( AcpiOsPrintf (")\n"); AcpiDmIndent (Level + 1); @@ -2496,7 +2837,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcs.c } -@@ -161,8 +161,8 @@ AcpiDmFixedDmaDescriptor ( +@@ -269,8 +269,8 @@ AcpiDmFixedDmaDescriptor ( AcpiDmIndent (Level); AcpiOsPrintf ("FixedDMA (0x%4.4X, 0x%4.4X, ", @@ -2507,7 +2848,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcs.c if (Resource->FixedDma.Width <= 5) { -@@ -210,10 +210,12 @@ AcpiDmIoDescriptor ( +@@ -318,10 +318,12 @@ AcpiDmIoDescriptor ( AcpiGbl_IoDecode [ACPI_GET_1BIT_FLAG (Resource->Io.Flags)]); AcpiDmIndent (Level + 1); @@ -2522,7 +2863,7 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcs.c AcpiDmIndent (Level + 1); AcpiDmDumpInteger8 (Resource->Io.Alignment, "Alignment"); -@@ -256,10 +258,12 @@ AcpiDmFixedIoDescriptor ( +@@ -364,10 +366,12 @@ AcpiDmFixedIoDescriptor ( AcpiOsPrintf ("FixedIO (\n"); AcpiDmIndent (Level + 1); @@ -2537,11 +2878,24 @@ Index: acpica-unix2-20200925/source/components/disassembler/dmresrcs.c /* Insert a descriptor name */ -Index: acpica-unix2-20200925/source/components/dispatcher/dsfield.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/dispatcher/dsfield.c -+++ acpica-unix2-20200925/source/components/dispatcher/dsfield.c -@@ -336,6 +336,8 @@ AcpiDsGetFieldNames ( +diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c +index 76ef0aacb..069c11fbb 100644 +--- a/source/components/disassembler/dmwalk.c ++++ b/source/components/disassembler/dmwalk.c +@@ -1263,7 +1263,7 @@ AcpiDmAscendingOp ( + { + ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST; + ASL_CV_CLOSE_PAREN (Op, Level); +- AcpiOsPrintf ("{"); ++ AcpiOsPrintf (" {"); + } + } + +diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c +index f41990780..937c1e9f5 100644 +--- a/source/components/dispatcher/dsfield.c ++++ b/source/components/dispatcher/dsfield.c +@@ -444,6 +444,8 @@ AcpiDsGetFieldNames ( char *NamePath; #endif @@ -2550,7 +2904,7 @@ Index: acpica-unix2-20200925/source/components/dispatcher/dsfield.c ACPI_FUNCTION_TRACE_PTR (DsGetFieldNames, Info); -@@ -442,14 +444,17 @@ AcpiDsGetFieldNames ( +@@ -550,14 +552,17 @@ AcpiDsGetFieldNames ( /* Lookup the name, it should already exist */ @@ -2570,7 +2924,7 @@ Index: acpica-unix2-20200925/source/components/dispatcher/dsfield.c return_ACPI_STATUS (Status); } else -@@ -703,8 +708,13 @@ AcpiDsInitFieldObjects ( +@@ -811,8 +816,13 @@ AcpiDsInitFieldObjects ( */ if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP) { @@ -2585,11 +2939,11 @@ Index: acpica-unix2-20200925/source/components/dispatcher/dsfield.c Flags, WalkState, &Node); if (ACPI_FAILURE (Status)) { -Index: acpica-unix2-20200925/source/components/namespace/nsaccess.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/namespace/nsaccess.c -+++ acpica-unix2-20200925/source/components/namespace/nsaccess.c -@@ -645,7 +645,7 @@ AcpiNsLookup ( +diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c +index f9227ee4d..55e768698 100644 +--- a/source/components/namespace/nsaccess.c ++++ b/source/components/namespace/nsaccess.c +@@ -753,7 +753,7 @@ AcpiNsLookup ( /* Extract one ACPI name from the front of the pathname */ @@ -2598,11 +2952,11 @@ Index: acpica-unix2-20200925/source/components/namespace/nsaccess.c /* Try to find the single (4 character) ACPI name */ -Index: acpica-unix2-20200925/source/components/namespace/nsnames.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/namespace/nsnames.c -+++ acpica-unix2-20200925/source/components/namespace/nsnames.c -@@ -300,7 +300,7 @@ AcpiNsBuildNormalizedPath ( +diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c +index a27a87f02..16202ce32 100644 +--- a/source/components/namespace/nsnames.c ++++ b/source/components/namespace/nsnames.c +@@ -408,7 +408,7 @@ AcpiNsBuildNormalizedPath ( ACPI_PATH_PUT8(FullPath, PathSize, AML_DUAL_NAME_PREFIX, Length); } @@ -2611,11 +2965,11 @@ Index: acpica-unix2-20200925/source/components/namespace/nsnames.c DoNoTrailing = NoTrailing; for (i = 0; i < 4; i++) { -Index: acpica-unix2-20200925/source/components/namespace/nsparse.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/namespace/nsparse.c -+++ acpica-unix2-20200925/source/components/namespace/nsparse.c -@@ -203,6 +203,7 @@ AcpiNsOneCompleteParse ( +diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c +index f10db0e4d..a5cb221aa 100644 +--- a/source/components/namespace/nsparse.c ++++ b/source/components/namespace/nsparse.c +@@ -311,6 +311,7 @@ AcpiNsOneCompleteParse ( ACPI_WALK_STATE *WalkState; ACPI_TABLE_HEADER *Table; ACPI_OWNER_ID OwnerId; @@ -2623,7 +2977,7 @@ Index: acpica-unix2-20200925/source/components/namespace/nsparse.c ACPI_FUNCTION_TRACE (NsOneCompleteParse); -@@ -216,13 +217,14 @@ AcpiNsOneCompleteParse ( +@@ -324,13 +325,14 @@ AcpiNsOneCompleteParse ( /* Table must consist of at least a complete header */ @@ -2640,11 +2994,11 @@ Index: acpica-unix2-20200925/source/components/namespace/nsparse.c Status = AcpiTbGetOwnerId (TableIndex, &OwnerId); if (ACPI_FAILURE (Status)) -Index: acpica-unix2-20200925/source/components/namespace/nsutils.c -=================================================================== ---- acpica-unix2-20200925.orig/source/components/namespace/nsutils.c -+++ acpica-unix2-20200925/source/components/namespace/nsutils.c -@@ -272,7 +272,6 @@ AcpiNsBuildInternalName ( +diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c +index a74dd1299..6df0d087d 100644 +--- a/source/components/namespace/nsutils.c ++++ b/source/components/namespace/nsutils.c +@@ -380,7 +380,6 @@ AcpiNsBuildInternalName ( const char *ExternalName = Info->NextExternalChar; char *Result = NULL; UINT32 i; @@ -2652,7 +3006,7 @@ Index: acpica-unix2-20200925/source/components/namespace/nsutils.c ACPI_FUNCTION_TRACE (NsBuildInternalName); -@@ -336,7 +335,6 @@ AcpiNsBuildInternalName ( +@@ -444,7 +443,6 @@ AcpiNsBuildInternalName ( for (; NumSegments; NumSegments--) { @@ -2660,7 +3014,7 @@ Index: acpica-unix2-20200925/source/components/namespace/nsutils.c for (i = 0; i < ACPI_NAMESEG_SIZE; i++) { if (ACPI_IS_PATH_SEPARATOR (*ExternalName) || -@@ -344,17 +342,16 @@ AcpiNsBuildInternalName ( +@@ -452,17 +450,16 @@ AcpiNsBuildInternalName ( { /* Pad the segment with underscore(s) if segment is short */ @@ -2680,3 +3034,6 @@ Index: acpica-unix2-20200925/source/components/namespace/nsutils.c /* Now we must have a path separator, or the pathname is bad */ +-- +2.26.2 + diff --git a/0041-Support-MTMR-in-a-big-endian-world.patch b/0041-Support-MTMR-in-a-big-endian-world.patch index dc4ad0b..afb4976 100644 --- a/0041-Support-MTMR-in-a-big-endian-world.patch +++ b/0041-Support-MTMR-in-a-big-endian-world.patch @@ -1,7 +1,7 @@ -From 902266037614bc0b3ff31c1dfeb350c80e517d90 Mon Sep 17 00:00:00 2001 +From 62c6c5b94772b7f8f5de6136a2ba61e31d0c7b3c Mon Sep 17 00:00:00 2001 From: Al Stone Date: Fri, 16 Oct 2020 20:52:43 -0400 -Subject: [PATCH 1/4] Support MTMR in a big-endian world +Subject: [PATCH 3/5] Support MTMR in a big-endian world Signed-off-by: Al Stone --- @@ -42,5 +42,5 @@ index 285fd30d7..7450ca3f7 100644 if (ACPI_FAILURE (Status)) { -- -2.28.0 +2.26.2 diff --git a/0042-Support-VRTC-in-a-big-endian-world.patch b/0042-Support-VRTC-in-a-big-endian-world.patch index 24e50c2..6bd6d62 100644 --- a/0042-Support-VRTC-in-a-big-endian-world.patch +++ b/0042-Support-VRTC-in-a-big-endian-world.patch @@ -1,7 +1,7 @@ -From b8d25df79205c128057dba4112b34a7b714a7c43 Mon Sep 17 00:00:00 2001 +From 19eefeadf92a471f1c4fbc6dd4d035e45fa76dcd Mon Sep 17 00:00:00 2001 From: Al Stone Date: Mon, 19 Oct 2020 17:17:40 -0400 -Subject: [PATCH 2/4] Support VRTC in a big-endian world +Subject: [PATCH 4/5] Support VRTC in a big-endian world --- source/common/dmtbdump3.c | 7 ++++--- @@ -41,5 +41,5 @@ index da9b81c92..db2f54ffb 100644 if (ACPI_FAILURE (Status)) { -- -2.28.0 +2.26.2 diff --git a/0043-Support-S3PT-in-a-big-endian-world.patch b/0043-Support-S3PT-in-a-big-endian-world.patch index bf1be6f..3e41bfe 100644 --- a/0043-Support-S3PT-in-a-big-endian-world.patch +++ b/0043-Support-S3PT-in-a-big-endian-world.patch @@ -1,7 +1,7 @@ -From 1652084e864a8048b44486548d9df40eb64cd8de Mon Sep 17 00:00:00 2001 +From 5805d42c0cec5366daa12e0f4caed7a58b13fe5b Mon Sep 17 00:00:00 2001 From: Al Stone Date: Mon, 19 Oct 2020 17:30:30 -0400 -Subject: [PATCH 3/4] Support S3PT in a big-endian world +Subject: [PATCH 5/5] Support S3PT in a big-endian world --- source/common/dmtbdump2.c | 15 +++++++++------ @@ -95,5 +95,5 @@ index 48729b48f..1ac063795 100644 case ACPI_S3PT_TYPE_RESUME: -- -2.28.0 +2.26.2