2016-01-07 00:44:04 +00:00
|
|
|
Re-use a patch originally created for Debian to enable big-endian
|
|
|
|
|
|
|
|
From: Al Stone <ahs3@redhat.com>
|
|
|
|
|
|
|
|
support
|
|
|
|
---
|
|
|
|
source/compiler/aslcodegen.c | 109 ++++++++++++++++++------------
|
|
|
|
source/compiler/aslopcodes.c | 4 +
|
|
|
|
source/compiler/aslrestype1.c | 68 +++++++++++++------
|
|
|
|
source/compiler/aslrestype1i.c | 38 +++++++---
|
|
|
|
source/compiler/aslrestype2.c | 25 ++++---
|
|
|
|
source/compiler/aslrestype2d.c | 134 +++++++++++++++++++++----------------
|
|
|
|
source/compiler/aslrestype2e.c | 39 +++++++----
|
|
|
|
source/compiler/aslrestype2q.c | 117 +++++++++++++++++++++-----------
|
|
|
|
source/compiler/aslrestype2s.c | 86 +++++++++++++++++-------
|
|
|
|
source/compiler/aslrestype2w.c | 127 +++++++++++++++++++++--------------
|
|
|
|
source/include/acmacros.h | 15 +++-
|
|
|
|
source/include/platform/aclinux.h | 8 ++
|
|
|
|
12 files changed, 487 insertions(+), 283 deletions(-)
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslcodegen.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslcodegen.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslcodegen.c
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -243,16 +243,12 @@ CgWriteAmlOpcode (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *Op)
|
|
|
|
{
|
|
|
|
UINT8 PkgLenFirstByte;
|
|
|
|
- UINT32 i;
|
|
|
|
- union {
|
|
|
|
- UINT16 Opcode;
|
|
|
|
- UINT8 OpcodeBytes[2];
|
|
|
|
- } Aml;
|
|
|
|
- union {
|
|
|
|
- UINT32 Len;
|
|
|
|
- UINT8 LenBytes[4];
|
|
|
|
- } PkgLen;
|
|
|
|
-
|
|
|
|
+ UINT8 Byte;
|
|
|
|
+ UINT16 Word;
|
|
|
|
+ UINT32 DWord;
|
|
|
|
+ UINT64 QWord;
|
|
|
|
+ UINT16 AmlOpcode;
|
|
|
|
+ UINT32 PkgLen;
|
|
|
|
|
|
|
|
/* We expect some DEFAULT_ARGs, just ignore them */
|
|
|
|
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -276,51 +272,52 @@ CgWriteAmlOpcode (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* Special opcodes for within a field definition */
|
|
|
|
|
|
|
|
- Aml.Opcode = AML_FIELD_OFFSET_OP;
|
|
|
|
+ AmlOpcode = AML_FIELD_OFFSET_OP;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_INT_ACCESSFIELD_OP:
|
|
|
|
|
|
|
|
- Aml.Opcode = AML_FIELD_ACCESS_OP;
|
|
|
|
+ AmlOpcode = AML_FIELD_ACCESS_OP;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_INT_CONNECTION_OP:
|
|
|
|
|
|
|
|
- Aml.Opcode = AML_FIELD_CONNECTION_OP;
|
|
|
|
+ AmlOpcode = AML_FIELD_CONNECTION_OP;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
- Aml.Opcode = Op->Asl.AmlOpcode;
|
|
|
|
+ AmlOpcode = Op->Asl.AmlOpcode;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- switch (Aml.Opcode)
|
|
|
|
+ switch (AmlOpcode)
|
|
|
|
{
|
|
|
|
case AML_PACKAGE_LENGTH:
|
|
|
|
|
|
|
|
/* Value is the length to be encoded (Used in field definitions) */
|
|
|
|
|
|
|
|
- PkgLen.Len = (UINT32) Op->Asl.Value.Integer;
|
|
|
|
+ PkgLen = (UINT32) Op->Asl.Value.Integer;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
/* Check for two-byte opcode */
|
|
|
|
|
|
|
|
- if (Aml.Opcode > 0x00FF)
|
|
|
|
+ if (AmlOpcode > 0x00FF)
|
|
|
|
{
|
|
|
|
/* Write the high byte first */
|
|
|
|
-
|
|
|
|
- CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1);
|
|
|
|
+ Byte = ACPI_HIBYTE(AmlOpcode);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
- CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1);
|
|
|
|
+ Byte = ACPI_LOBYTE(AmlOpcode);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
|
|
|
|
/* Subtreelength doesn't include length of package length bytes */
|
|
|
|
|
|
|
|
- PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
|
|
|
|
+ PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -331,8 +328,8 @@ CgWriteAmlOpcode (
|
2013-08-28 19:31:28 +00:00
|
|
|
if (Op->Asl.AmlPkgLenBytes == 1)
|
|
|
|
{
|
|
|
|
/* Simplest case -- no bytes to follow, just write the count */
|
|
|
|
-
|
|
|
|
- CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1);
|
|
|
|
+ Byte = ACPI_LOBYTE(PkgLen);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
}
|
|
|
|
else if (Op->Asl.AmlPkgLenBytes != 0)
|
|
|
|
{
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -342,7 +339,7 @@ CgWriteAmlOpcode (
|
2013-08-28 19:31:28 +00:00
|
|
|
*/
|
|
|
|
PkgLenFirstByte = (UINT8)
|
|
|
|
(((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
|
|
|
|
- (PkgLen.LenBytes[0] & 0x0F));
|
|
|
|
+ (PkgLen & 0x0F));
|
|
|
|
|
|
|
|
CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
|
|
|
|
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -350,39 +347,47 @@ CgWriteAmlOpcode (
|
2013-08-28 19:31:28 +00:00
|
|
|
* Shift the length over by the 4 bits we just stuffed
|
|
|
|
* in the first byte
|
|
|
|
*/
|
|
|
|
- PkgLen.Len >>= 4;
|
|
|
|
+ PkgLen >>= 4;
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
/*
|
|
|
|
* Now we can write the remaining bytes -
|
|
|
|
* either 1, 2, or 3 bytes
|
|
|
|
*/
|
2013-08-28 19:31:28 +00:00
|
|
|
- for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
|
|
|
|
+ Byte = ACPI_LOBYTE(PkgLen);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
+ if (Op->Asl.AmlPkgLenBytes >= 3)
|
|
|
|
+ {
|
|
|
|
+ Byte = ACPI_HIBYTE(PkgLen);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
+ }
|
|
|
|
+ if (Op->Asl.AmlPkgLenBytes >= 4)
|
|
|
|
{
|
|
|
|
- CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
|
|
|
|
+ Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen));
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- switch (Aml.Opcode)
|
|
|
|
+ switch (AmlOpcode)
|
|
|
|
{
|
|
|
|
case AML_BYTE_OP:
|
|
|
|
-
|
|
|
|
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1);
|
|
|
|
+ Byte = (UINT8) Op->Asl.Value.Integer;
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_WORD_OP:
|
|
|
|
-
|
|
|
|
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2);
|
|
|
|
+ ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Word, 2);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_DWORD_OP:
|
|
|
|
-
|
|
|
|
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4);
|
|
|
|
+ ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
|
|
|
|
+ CgLocalWriteAmlData (Op, &DWord, 4);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_QWORD_OP:
|
|
|
|
-
|
|
|
|
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
|
|
|
|
+ CgLocalWriteAmlData (Op, &QWord, 8);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case AML_STRING_OP:
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -416,6 +421,7 @@ CgWriteTableHeader (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *Op)
|
|
|
|
{
|
|
|
|
ACPI_PARSE_OBJECT *Child;
|
|
|
|
+ UINT32 DWord;
|
|
|
|
|
|
|
|
|
|
|
|
/* AML filename */
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -452,7 +458,7 @@ CgWriteTableHeader (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* OEM Revision */
|
|
|
|
|
|
|
|
Child = Child->Asl.Next;
|
|
|
|
- TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
|
|
|
|
+ ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer);
|
|
|
|
|
|
|
|
/* Compiler ID */
|
|
|
|
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -460,12 +466,13 @@ CgWriteTableHeader (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* Compiler version */
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
- TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
|
|
|
|
+ DWord = ACPI_CA_VERSION;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord);
|
|
|
|
|
|
|
|
/* Table length. Checksum zero for now, will rewrite later */
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
- TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
|
|
|
|
- Op->Asl.AmlSubtreeLength;
|
|
|
|
+ DWord = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
|
|
|
|
+ ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
|
2013-08-28 19:31:28 +00:00
|
|
|
TableHeader.Checksum = 0;
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
Op->Asl.FinalAmlOffset = ftell (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -578,7 +585,10 @@ CgWriteNode (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *Op)
|
|
|
|
{
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
-
|
|
|
|
+ UINT8 Byte;
|
|
|
|
+ UINT16 Word;
|
|
|
|
+ UINT32 DWord;
|
|
|
|
+ UINT64 QWord;
|
|
|
|
|
|
|
|
/* Always check for DEFAULT_ARG and other "Noop" nodes */
|
|
|
|
/* TBD: this may not be the best place for this check */
|
2016-03-19 21:32:48 +00:00
|
|
|
@@ -601,13 +611,24 @@ CgWriteNode (
|
2013-08-28 19:31:28 +00:00
|
|
|
switch (Op->Asl.AmlOpcode)
|
|
|
|
{
|
|
|
|
case AML_RAW_DATA_BYTE:
|
|
|
|
+ Byte = (UINT8) Op->Asl.Value.Integer;
|
|
|
|
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
case AML_RAW_DATA_WORD:
|
|
|
|
- case AML_RAW_DATA_DWORD:
|
|
|
|
- case AML_RAW_DATA_QWORD:
|
|
|
|
+ ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
|
|
|
|
+ CgLocalWriteAmlData (Op, &Word, 2);
|
|
|
|
+ return;
|
|
|
|
|
|
|
|
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength);
|
|
|
|
+ case AML_RAW_DATA_DWORD:
|
|
|
|
+ ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
|
|
|
|
+ CgLocalWriteAmlData (Op, &DWord, 4);
|
|
|
|
return;
|
|
|
|
|
|
|
|
+ case AML_RAW_DATA_QWORD:
|
|
|
|
+ ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
|
|
|
|
+ CgLocalWriteAmlData (Op, &QWord, 8);
|
|
|
|
+ return;
|
|
|
|
|
|
|
|
case AML_RAW_DATA_BUFFER:
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslopcodes.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslopcodes.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslopcodes.c
|
|
|
|
@@ -485,6 +485,7 @@ OpcDoUnicode (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
UINT8 *AsciiString;
|
|
|
|
UINT16 *UnicodeString;
|
|
|
|
+ UINT16 UChar;
|
|
|
|
ACPI_PARSE_OBJECT *BufferLengthOp;
|
|
|
|
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -511,7 +512,8 @@ OpcDoUnicode (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
for (i = 0; i < Count; i++)
|
|
|
|
{
|
|
|
|
- UnicodeString[i] = (UINT16) AsciiString[i];
|
|
|
|
+ UChar = (UINT16) AsciiString[i];
|
|
|
|
+ ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype1.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype1.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype1.c
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -142,6 +142,11 @@ RsDoMemory24Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *LengthOp = NULL;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT16 Minimum = 0;
|
|
|
|
+ UINT16 Maximum = 0;
|
|
|
|
+ UINT16 AddressLength = 0;
|
|
|
|
+ UINT16 Alignment = 0;
|
|
|
|
+ UINT16 ResourceLength;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -151,7 +156,8 @@ RsDoMemory24Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
Descriptor = Rnode->Buffer;
|
2015-12-15 22:30:26 +00:00
|
|
|
Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
|
2013-08-28 19:31:28 +00:00
|
|
|
- Descriptor->Memory24.ResourceLength = 9;
|
|
|
|
+ ResourceLength = 9;
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength);
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -168,7 +174,7 @@ RsDoMemory24Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 1: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -176,7 +182,7 @@ RsDoMemory24Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 2: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -184,14 +190,14 @@ RsDoMemory24Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 3: /* Alignment */
|
|
|
|
|
|
|
|
- Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4: /* Length */
|
|
|
|
|
|
|
|
- Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -214,12 +220,17 @@ RsDoMemory24Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
|
|
|
|
|
|
|
|
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
|
|
|
|
- Descriptor->Memory24.Minimum,
|
|
|
|
- Descriptor->Memory24.Maximum,
|
|
|
|
- Descriptor->Memory24.AddressLength,
|
|
|
|
- Descriptor->Memory24.Alignment,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Alignment,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment);
|
|
|
|
+
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -248,6 +259,11 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *AlignOp = NULL;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT32 Minimum = 0;
|
|
|
|
+ UINT32 Maximum = 0;
|
|
|
|
+ UINT32 AddressLength = 0;
|
|
|
|
+ UINT32 Alignment = 0;
|
|
|
|
+ UINT16 ResourceLength;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -257,7 +273,8 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
Descriptor = Rnode->Buffer;
|
2015-12-15 22:30:26 +00:00
|
|
|
Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
|
2013-08-28 19:31:28 +00:00
|
|
|
- Descriptor->Memory32.ResourceLength = 17;
|
|
|
|
+ ResourceLength = 17;
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength);
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -274,7 +291,7 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 1: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -282,7 +299,7 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 2: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -290,7 +307,7 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 3: /* Alignment */
|
|
|
|
|
|
|
|
- Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
|
|
|
|
AlignOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -298,7 +315,7 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 4: /* Length */
|
|
|
|
|
|
|
|
- Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -321,12 +338,17 @@ RsDoMemory32Descriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Align values */
|
|
|
|
|
|
|
|
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
|
|
|
|
- Descriptor->Memory32.Minimum,
|
|
|
|
- Descriptor->Memory32.Maximum,
|
|
|
|
- Descriptor->Memory32.AddressLength,
|
|
|
|
- Descriptor->Memory32.Alignment,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Alignment,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment);
|
|
|
|
+
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -351,6 +373,7 @@ RsDoMemory32FixedDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT16 ResourceLength;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -360,7 +383,8 @@ RsDoMemory32FixedDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
Descriptor = Rnode->Buffer;
|
2015-12-15 22:30:26 +00:00
|
|
|
Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
|
2013-08-28 19:31:28 +00:00
|
|
|
- Descriptor->FixedMemory32.ResourceLength = 9;
|
|
|
|
+ ResourceLength = 9;
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength);
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
@@ -377,14 +401,16 @@ RsDoMemory32FixedDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 1: /* Address */
|
|
|
|
|
|
|
|
- Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address,
|
|
|
|
+ &InitializerOp->Asl.Value.Integer);
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: /* Length */
|
|
|
|
|
|
|
|
- Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength,
|
|
|
|
+ &InitializerOp->Asl.Value.Integer);
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
|
|
|
|
break;
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype1i.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype1i.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype1i.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -198,6 +198,8 @@ RsDoFixedDmaDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT16 RequestLines = 0;
|
|
|
|
+ UINT16 Channels = 0;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -217,14 +219,14 @@ RsDoFixedDmaDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* DMA Request Lines [WORD] (_DMA) */
|
|
|
|
|
|
|
|
- Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1: /* DMA Channel [WORD] (_TYP) */
|
|
|
|
|
|
|
|
- Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Channels = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -249,6 +251,9 @@ RsDoFixedDmaDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.RequestLines, &RequestLines);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.Channels, &Channels);
|
|
|
|
+
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -274,6 +279,7 @@ RsDoFixedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *AddressOp = NULL;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT16 Address = 0;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -293,8 +299,7 @@ RsDoFixedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* Base Address */
|
|
|
|
|
|
|
|
- Descriptor->FixedIo.Address =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Address = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
|
|
|
|
AddressOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -324,11 +329,13 @@ RsDoFixedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* Error checks */
|
|
|
|
|
|
|
|
- if (Descriptor->FixedIo.Address > 0x03FF)
|
|
|
|
+ if (Address > 0x03FF)
|
|
|
|
{
|
|
|
|
AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address);
|
|
|
|
+
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -357,6 +364,8 @@ RsDoIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *AlignOp = NULL;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT16 Minimum = 0;
|
|
|
|
+ UINT16 Maximum = 0;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -383,8 +392,7 @@ RsDoIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 1: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Io.Minimum =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -392,8 +400,7 @@ RsDoIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 2: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Io.Maximum =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -434,12 +441,15 @@ RsDoIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Align values */
|
|
|
|
|
|
|
|
RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
|
|
|
|
- Descriptor->Io.Minimum,
|
|
|
|
- Descriptor->Io.Maximum,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
Descriptor->Io.AddressLength,
|
|
|
|
Descriptor->Io.Alignment,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum);
|
|
|
|
+
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -559,9 +569,9 @@ RsDoIrqDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
- /* Now we can set the channel mask */
|
|
|
|
+ /* Now we can set the interrupt mask */
|
|
|
|
|
|
|
|
- Descriptor->Irq.IrqMask = IrqMask;
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -660,6 +670,6 @@ RsDoIrqNoFlagsDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* Now we can set the interrupt mask */
|
|
|
|
|
|
|
|
- Descriptor->Irq.IrqMask = IrqMask;
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
|
|
|
|
return (Rnode);
|
|
|
|
}
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype2.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype2.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype2.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -76,6 +76,7 @@ RsDoGeneralRegisterDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ UINT16 ResourceLength;
|
|
|
|
UINT32 i;
|
|
|
|
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -85,7 +86,9 @@ RsDoGeneralRegisterDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
Descriptor = Rnode->Buffer;
|
|
|
|
Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
|
|
|
|
- Descriptor->GenericReg.ResourceLength = 12;
|
|
|
|
+ ResourceLength = 12;
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength,
|
|
|
|
+ &ResourceLength);
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 3: /* Register Address */
|
|
|
|
|
|
|
|
- Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address,
|
|
|
|
+ &InitializerOp->Asl.Value.Integer);
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
|
|
|
|
break;
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -177,6 +181,7 @@ RsDoInterruptDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
AML_RESOURCE *Rover = NULL;
|
|
|
|
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -225,7 +230,7 @@ RsDoInterruptDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* Initial descriptor length -- may be enlarged if there are
|
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
- Descriptor->ExtendedIrq.ResourceLength = 2; /* Flags and table length byte */
|
|
|
|
+ ResourceLength = 2; /* Flags and table length byte */
|
|
|
|
Descriptor->ExtendedIrq.InterruptCount = 0;
|
|
|
|
|
|
|
|
Rover = ACPI_CAST_PTR (AML_RESOURCE,
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -333,10 +338,11 @@ RsDoInterruptDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* Save the integer and move pointer to the next one */
|
|
|
|
|
|
|
|
- Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ ACPI_MOVE_64_TO_32(&Rover->DwordItem,
|
|
|
|
+ &InitializerOp->Asl.Value.Integer);
|
|
|
|
Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4);
|
|
|
|
Descriptor->ExtendedIrq.InterruptCount++;
|
|
|
|
- Descriptor->ExtendedIrq.ResourceLength += 4;
|
|
|
|
+ ResourceLength += 4;
|
|
|
|
|
|
|
|
/* Case 7: First interrupt number in list */
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -372,7 +378,7 @@ RsDoInterruptDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
Rover->ByteItem = ResSourceIndex;
|
|
|
|
Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
|
|
|
|
- Descriptor->ExtendedIrq.ResourceLength += 1;
|
|
|
|
+ ResourceLength += 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add optional ResSource string if present */
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -384,14 +390,15 @@ RsDoInterruptDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
Rover = ACPI_ADD_PTR (
|
|
|
|
AML_RESOURCE, &(Rover->ByteItem), StringLength);
|
|
|
|
|
|
|
|
- Descriptor->ExtendedIrq.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->ExtendedIrq.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
}
|
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
Rnode->BufferLength =
|
|
|
|
(ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
|
|
|
|
ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
|
|
|
|
+ OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength,
|
|
|
|
+ &ResourceLength);
|
|
|
|
return (Rnode);
|
|
|
|
}
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
@@ -439,7 +446,7 @@ RsDoVendorLargeDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
Descriptor = Rnode->Buffer;
|
2015-12-15 22:30:26 +00:00
|
|
|
Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
|
2013-08-28 19:31:28 +00:00
|
|
|
- Descriptor->VendorLarge.ResourceLength = (UINT16) i;
|
|
|
|
+ ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i);
|
|
|
|
|
|
|
|
/* Point to end-of-descriptor for vendor data */
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype2d.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype2d.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype2d.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -79,7 +79,13 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *GranOp = NULL;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT32 Minimum = 0;
|
|
|
|
+ UINT32 Maximum = 0;
|
|
|
|
+ UINT32 AddressLength = 0;
|
|
|
|
+ UINT32 Granularity = 0;
|
|
|
|
+ UINT32 TranslationOffset = 0;
|
|
|
|
UINT8 *OptionalFields;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -102,8 +108,7 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
|
|
|
|
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -147,8 +152,7 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 5: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Granularity =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -156,8 +160,7 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Min */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Minimum =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -165,8 +168,7 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Address Max */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Maximum =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -174,16 +176,14 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address32.TranslationOffset =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address32.AddressLength =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2014-10-01 17:50:56 +00:00
|
|
|
@@ -197,7 +197,7 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address32.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -211,8 +211,7 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
/* Found a valid ResourceSource */
|
|
|
|
|
|
|
|
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address32.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -272,13 +271,20 @@ RsDoDwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- (UINT64) Descriptor->Address32.Minimum,
|
|
|
|
- (UINT64) Descriptor->Address32.Maximum,
|
|
|
|
- (UINT64) Descriptor->Address32.AddressLength,
|
|
|
|
- (UINT64) Descriptor->Address32.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address32.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2014-10-01 17:50:56 +00:00
|
|
|
@@ -310,7 +316,13 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT32 Minimum = 0;
|
|
|
|
+ UINT32 Maximum = 0;
|
|
|
|
+ UINT32 AddressLength = 0;
|
|
|
|
+ UINT32 Granularity = 0;
|
|
|
|
+ UINT32 TranslationOffset = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -332,11 +344,9 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
|
|
|
|
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
-
|
|
|
|
/* Process all child initialization nodes */
|
|
|
|
|
|
|
|
for (i = 0; InitializerOp; i++)
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -385,8 +395,7 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Granularity =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -394,8 +403,7 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Minimum =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -403,8 +411,7 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Maximum =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -412,16 +419,14 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 9: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address32.TranslationOffset =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 10: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address32.AddressLength =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -433,7 +438,7 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address32.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -445,8 +450,8 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address32.ResourceLength + StringLength);
|
|
|
|
+
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -507,13 +512,20 @@ RsDoDwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- (UINT64) Descriptor->Address32.Minimum,
|
|
|
|
- (UINT64) Descriptor->Address32.Maximum,
|
|
|
|
- (UINT64) Descriptor->Address32.AddressLength,
|
|
|
|
- (UINT64) Descriptor->Address32.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address32.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -545,7 +557,13 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT32 Minimum = 0;
|
|
|
|
+ UINT32 Maximum = 0;
|
|
|
|
+ UINT32 AddressLength = 0;
|
|
|
|
+ UINT32 Granularity = 0;
|
|
|
|
+ UINT32 TranslationOffset = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -566,8 +584,7 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
|
|
|
|
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -616,8 +633,7 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Granularity =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -625,8 +641,7 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Minimum =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -634,8 +649,7 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Address32.Maximum =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -643,16 +657,14 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 9: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address32.TranslationOffset =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 10: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address32.AddressLength =
|
|
|
|
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -664,7 +676,7 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address32.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -676,8 +688,7 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address32.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -724,13 +735,20 @@ RsDoDwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- (UINT64) Descriptor->Address32.Minimum,
|
|
|
|
- (UINT64) Descriptor->Address32.Maximum,
|
|
|
|
- (UINT64) Descriptor->Address32.AddressLength,
|
|
|
|
- (UINT64) Descriptor->Address32.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address32.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype2e.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype2e.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype2e.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -78,6 +78,13 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ACPI_PARSE_OBJECT *GranOp = NULL;
|
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
+ UINT64 Minimum = 0;
|
|
|
|
+ UINT64 Maximum = 0;
|
|
|
|
+ UINT64 AddressLength = 0;
|
|
|
|
+ UINT64 Granularity = 0;
|
|
|
|
+ UINT64 TranslationOffset = 0;
|
|
|
|
+ UINT64 TypeSpecific = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -94,9 +101,10 @@ RsDoExtendedIoDescriptor (
|
2015-12-15 22:30:26 +00:00
|
|
|
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
|
|
|
|
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
|
2013-08-28 19:31:28 +00:00
|
|
|
|
2015-12-15 22:30:26 +00:00
|
|
|
- Descriptor->ExtAddress64.ResourceLength = (UINT16)
|
2013-08-28 19:31:28 +00:00
|
|
|
- (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
|
|
|
|
+ &ResourceLength);
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -139,7 +147,7 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 5: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -147,7 +155,7 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Min */
|
|
|
|
|
|
|
|
- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -155,7 +163,7 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Address Max */
|
|
|
|
|
|
|
|
- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -163,14 +171,14 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -178,7 +186,7 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 10: /* Type-Specific Attributes */
|
|
|
|
|
|
|
|
- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -214,13 +222,20 @@ RsDoExtendedIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- Descriptor->ExtAddress64.Minimum,
|
|
|
|
- Descriptor->ExtAddress64.Maximum,
|
|
|
|
- Descriptor->ExtAddress64.AddressLength,
|
|
|
|
- Descriptor->ExtAddress64.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->ExtAddress64.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
|
|
|
|
+
|
2014-10-01 17:50:56 +00:00
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
|
|
|
|
StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype2q.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype2q.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype2q.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -80,7 +80,13 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT64 Minimum = 0;
|
|
|
|
+ UINT64 Maximum = 0;
|
|
|
|
+ UINT64 AddressLength = 0;
|
|
|
|
+ UINT64 Granularity = 0;
|
|
|
|
+ UINT64 TranslationOffset = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -102,8 +108,7 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
|
|
|
|
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -147,7 +152,7 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 5: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -155,7 +160,7 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Min */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -163,7 +168,7 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Address Max */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -171,14 +176,14 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -190,7 +195,7 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address64.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -202,8 +207,7 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address64.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -263,13 +267,20 @@ RsDoQwordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- Descriptor->Address64.Minimum,
|
|
|
|
- Descriptor->Address64.Maximum,
|
|
|
|
- Descriptor->Address64.AddressLength,
|
|
|
|
- Descriptor->Address64.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address64.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -301,7 +312,13 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT64 Minimum = 0;
|
|
|
|
+ UINT64 Maximum = 0;
|
|
|
|
+ UINT64 AddressLength = 0;
|
|
|
|
+ UINT64 Granularity = 0;
|
|
|
|
+ UINT64 TranslationOffset = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -323,8 +340,7 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
|
|
|
|
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -375,7 +391,7 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -383,7 +399,7 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -391,7 +407,7 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -399,14 +415,14 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 9: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 10: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -418,7 +434,7 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address64.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -430,8 +446,7 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address64.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -492,13 +507,20 @@ RsDoQwordMemoryDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- Descriptor->Address64.Minimum,
|
|
|
|
- Descriptor->Address64.Maximum,
|
|
|
|
- Descriptor->Address64.AddressLength,
|
|
|
|
- Descriptor->Address64.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address64.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -530,9 +552,15 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
ASL_RESOURCE_NODE *Rnode;
|
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
+ UINT64 Minimum = 0;
|
|
|
|
+ UINT64 Maximum = 0;
|
|
|
|
+ UINT64 AddressLength = 0;
|
|
|
|
+ UINT64 Granularity = 0;
|
|
|
|
+ UINT64 TranslationOffset = 0;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
|
|
|
|
|
|
|
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -551,8 +579,7 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
|
|
|
|
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -601,7 +628,7 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -609,7 +636,7 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -617,7 +644,7 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -625,14 +652,14 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 9: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 10: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -644,7 +671,7 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address64.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -656,8 +683,7 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address64.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -703,13 +729,20 @@ RsDoQwordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- Descriptor->Address64.Minimum,
|
|
|
|
- Descriptor->Address64.Maximum,
|
|
|
|
- Descriptor->Address64.AddressLength,
|
|
|
|
- Descriptor->Address64.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address64.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype2s.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype2s.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype2s.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -290,6 +290,9 @@ RsDoGpioIntDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT16 VendorLength;
|
|
|
|
UINT16 InterruptLength;
|
|
|
|
UINT16 DescriptorSize;
|
|
|
|
+ UINT16 IntFlags = 0;
|
|
|
|
+ UINT16 DebounceTimeout = 0;
|
|
|
|
+ UINT16 Flags = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
|
|
|
UINT32 PinCount = 0;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -346,21 +349,21 @@ RsDoGpioIntDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
|
|
|
|
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
|
|
|
|
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1: /* Interrupt Polarity - Active high/low [Flags] (_POL) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 1, 0);
|
|
|
|
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 1, 0);
|
|
|
|
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_POLARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 1, 2);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: /* Share Type - Default: exclusive (0) [Flags] (_SHR) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
|
|
|
|
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
|
|
|
|
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2);
|
|
|
|
break;
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -374,7 +377,7 @@ RsDoGpioIntDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 4: /* Debounce Timeout [WORD] (_DBT) */
|
|
|
|
|
|
|
|
- Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
|
|
|
|
break;
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -401,7 +404,7 @@ RsDoGpioIntDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Resource Usage (consumer/producer) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
|
|
|
|
+ RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8: /* Resource Tag (Descriptor Name) */
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -466,6 +469,10 @@ RsDoGpioIntDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
|
|
|
|
+
|
2015-12-15 22:30:26 +00:00
|
|
|
MpSaveGpioInfo (Info->MappingOp, Descriptor,
|
|
|
|
PinCount, PinList, ResourceSource);
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -499,6 +506,10 @@ RsDoGpioIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT16 VendorLength;
|
|
|
|
UINT16 InterruptLength;
|
|
|
|
UINT16 DescriptorSize;
|
|
|
|
+ UINT16 IntFlags = 0;
|
|
|
|
+ UINT16 DebounceTimeout = 0;
|
|
|
|
+ UINT16 DriveStrength = 0;
|
|
|
|
+ UINT16 Flags = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
|
|
|
UINT32 PinCount = 0;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -555,7 +566,7 @@ RsDoGpioIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* Share Type [Flags] (_SHR) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
|
|
|
|
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
|
|
|
|
RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3);
|
|
|
|
break;
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -569,21 +580,21 @@ RsDoGpioIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 2: /* Debounce Timeout [WORD] (_DBT) */
|
|
|
|
|
|
|
|
- Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3: /* Drive Strength [WORD] (_DRS) */
|
|
|
|
|
|
|
|
- Descriptor->Gpio.DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_DRIVESTRENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DriveStrength));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4: /* I/O Restriction [Flag] (_IOR) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
|
|
|
|
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
|
|
|
|
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2);
|
|
|
|
break;
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -609,7 +620,7 @@ RsDoGpioIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Resource Usage (consumer/producer) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
|
|
|
|
+ RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8: /* Resource Tag (Descriptor Name) */
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -673,6 +684,11 @@ RsDoGpioIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
|
|
|
|
+
|
2015-12-15 22:30:26 +00:00
|
|
|
MpSaveGpioInfo (Info->MappingOp, Descriptor,
|
|
|
|
PinCount, PinList, ResourceSource);
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2016-02-23 00:42:58 +00:00
|
|
|
@@ -703,6 +719,9 @@ RsDoI2cSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT16 ResSourceLength;
|
|
|
|
UINT16 VendorLength;
|
|
|
|
UINT16 DescriptorSize;
|
|
|
|
+ UINT16 SlaveAddress = 0;
|
|
|
|
+ UINT32 ConnectionSpeed = 0;
|
|
|
|
+ UINT16 TypeSpecificFlags = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -752,7 +771,7 @@ RsDoI2cSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* Slave Address [WORD] (_ADR) */
|
|
|
|
|
|
|
|
- Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress));
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -766,14 +785,14 @@ RsDoI2cSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 2: /* Connection Speed [DWORD] (_SPE) */
|
|
|
|
|
|
|
|
- Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3: /* Addressing Mode [Flag] (_MOD) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
|
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0);
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -833,6 +852,9 @@ RsDoI2cSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.SlaveAddress, &SlaveAddress);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->I2cSerialBus.ConnectionSpeed, &ConnectionSpeed);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
|
2014-10-01 17:50:56 +00:00
|
|
|
MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
|
|
|
}
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -862,6 +884,9 @@ RsDoSpiSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT16 ResSourceLength;
|
|
|
|
UINT16 VendorLength;
|
|
|
|
UINT16 DescriptorSize;
|
|
|
|
+ UINT16 DeviceSelection = 0;
|
|
|
|
+ UINT32 ConnectionSpeed = 0;
|
|
|
|
+ UINT16 TypeSpecificFlags = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -912,21 +937,21 @@ RsDoSpiSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* Device Selection [WORD] (_ADR) */
|
|
|
|
|
|
|
|
- Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1: /* Device Polarity [Flag] (_DPL) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 1, 0);
|
|
|
|
RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: /* Wire Mode [Flag] (_MOD) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
|
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0);
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -947,7 +972,7 @@ RsDoSpiSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 5: /* Connection Speed [DWORD] (_SPE) */
|
|
|
|
|
|
|
|
- Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed));
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -1021,6 +1046,10 @@ RsDoSpiSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.DeviceSelection, &DeviceSelection);
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->SpiSerialBus.ConnectionSpeed, &ConnectionSpeed);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
|
|
|
|
+
|
2014-10-01 17:50:56 +00:00
|
|
|
MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
|
|
|
}
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -1050,6 +1079,10 @@ RsDoUartSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT16 ResSourceLength;
|
|
|
|
UINT16 VendorLength;
|
|
|
|
UINT16 DescriptorSize;
|
|
|
|
+ UINT32 DefaultBaudRate = 0;
|
|
|
|
+ UINT16 TypeSpecificFlags = 0;
|
|
|
|
+ UINT16 RxFifoSize = 0;
|
|
|
|
+ UINT16 TxFifoSize = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -1099,21 +1132,21 @@ RsDoUartSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
|
|
|
|
|
|
|
|
- Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1: /* Bits Per Byte [Flags] (_LEN) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 4, 3);
|
|
|
|
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: /* Stop Bits [Flags] (_STB) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 2, 1);
|
|
|
|
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2);
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -1127,7 +1160,7 @@ RsDoUartSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 4: /* Endianness [Flag] (_END) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 7, 0);
|
|
|
|
RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7);
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -1141,21 +1174,21 @@ RsDoUartSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Flow Control [Flags] (_FLC) */
|
|
|
|
|
|
|
|
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
|
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
|
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 7: /* Rx Buffer Size [WORD] (_RXL) */
|
|
|
|
|
|
|
|
- Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8: /* Tx Buffer Size [WORD] (_TXL) */
|
|
|
|
|
|
|
|
- Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize));
|
|
|
|
break;
|
2016-04-26 15:50:05 +00:00
|
|
|
@@ -1225,6 +1258,11 @@ RsDoUartSerialBusDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ ACPI_MOVE_32_TO_32(&Descriptor->UartSerialBus.DefaultBaudRate, &DefaultBaudRate);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.RxFifoSize, &RxFifoSize);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TxFifoSize, &TxFifoSize);
|
|
|
|
+
|
2014-10-01 17:50:56 +00:00
|
|
|
MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
|
|
|
}
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/compiler/aslrestype2w.c
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/compiler/aslrestype2w.c
|
|
|
|
+++ acpica-unix2-20161117/source/compiler/aslrestype2w.c
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -81,6 +81,12 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
+ UINT16 Minimum = 0;
|
|
|
|
+ UINT16 Maximum = 0;
|
|
|
|
+ UINT16 AddressLength = 0;
|
|
|
|
+ UINT16 Granularity = 0;
|
|
|
|
+ UINT16 TranslationOffset = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -102,8 +108,7 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
|
|
|
|
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -147,7 +152,7 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 5: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -155,7 +160,7 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Min */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -163,7 +168,7 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Address Max */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -171,14 +176,14 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 9: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -190,7 +195,7 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address16.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -202,8 +207,7 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address16.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -263,13 +267,20 @@ RsDoWordIoDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- (UINT64) Descriptor->Address16.Minimum,
|
|
|
|
- (UINT64) Descriptor->Address16.Maximum,
|
|
|
|
- (UINT64) Descriptor->Address16.AddressLength,
|
|
|
|
- (UINT64) Descriptor->Address16.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address16.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -302,6 +313,12 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
|
|
|
+ UINT16 Minimum = 0;
|
|
|
|
+ UINT16 Maximum = 0;
|
|
|
|
+ UINT16 AddressLength = 0;
|
|
|
|
+ UINT16 Granularity = 0;
|
|
|
|
+ UINT16 TranslationOffset = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -323,8 +340,7 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
|
|
|
|
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -361,8 +377,7 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 4: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Granularity =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -370,8 +385,7 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 5: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Minimum =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -379,8 +393,7 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Maximum =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -388,16 +401,14 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address16.TranslationOffset =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address16.AddressLength =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -409,7 +420,7 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address16.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -421,8 +432,7 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address16.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -468,13 +478,20 @@ RsDoWordBusNumberDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- (UINT64) Descriptor->Address16.Minimum,
|
|
|
|
- (UINT64) Descriptor->Address16.Maximum,
|
|
|
|
- (UINT64) Descriptor->Address16.AddressLength,
|
|
|
|
- (UINT64) Descriptor->Address16.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address16.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -507,6 +524,12 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT8 *OptionalFields;
|
|
|
|
UINT16 StringLength = 0;
|
|
|
|
UINT32 OptionIndex = 0;
|
|
|
|
+ UINT16 Minimum = 0;
|
|
|
|
+ UINT16 Maximum = 0;
|
|
|
|
+ UINT16 AddressLength = 0;
|
|
|
|
+ UINT16 Granularity = 0;
|
|
|
|
+ UINT16 TranslationOffset = 0;
|
|
|
|
+ UINT16 ResourceLength = 0;
|
2014-10-01 17:50:56 +00:00
|
|
|
UINT32 CurrentByteOffset;
|
2013-08-28 19:31:28 +00:00
|
|
|
UINT32 i;
|
|
|
|
BOOLEAN ResSourceIndex = FALSE;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -527,8 +550,7 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
* optional fields present
|
|
|
|
*/
|
|
|
|
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
|
|
|
|
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
|
- (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
|
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
|
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
|
|
|
|
|
/* Process all child initialization nodes */
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -577,8 +599,7 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 6: /* Address Granularity */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Granularity =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
|
|
|
|
GranOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -586,8 +607,7 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 7: /* Min Address */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Minimum =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
|
|
|
|
MinOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -595,8 +615,7 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 8: /* Max Address */
|
|
|
|
|
|
|
|
- Descriptor->Address16.Maximum =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
|
|
|
|
MaxOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -604,16 +623,14 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
case 9: /* Translation Offset */
|
|
|
|
|
|
|
|
- Descriptor->Address16.TranslationOffset =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 10: /* Address Length */
|
|
|
|
|
|
|
|
- Descriptor->Address16.AddressLength =
|
|
|
|
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
|
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
|
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
|
|
|
|
LengthOp = InitializerOp;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -625,7 +642,7 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
|
OptionIndex++;
|
|
|
|
- Descriptor->Address16.ResourceLength++;
|
|
|
|
+ ResourceLength++;
|
|
|
|
ResSourceIndex = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -637,8 +654,7 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
{
|
|
|
|
if (StringLength)
|
|
|
|
{
|
|
|
|
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
|
- (Descriptor->Address16.ResourceLength + StringLength);
|
|
|
|
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
|
|
|
|
|
strcpy ((char *)
|
|
|
|
&OptionalFields[OptionIndex],
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -684,13 +700,20 @@ RsDoWordSpaceDescriptor (
|
2013-08-28 19:31:28 +00:00
|
|
|
/* Validate the Min/Max/Len/Gran values */
|
|
|
|
|
|
|
|
RsLargeAddressCheck (
|
|
|
|
- (UINT64) Descriptor->Address16.Minimum,
|
|
|
|
- (UINT64) Descriptor->Address16.Maximum,
|
|
|
|
- (UINT64) Descriptor->Address16.AddressLength,
|
|
|
|
- (UINT64) Descriptor->Address16.Granularity,
|
|
|
|
+ Minimum,
|
|
|
|
+ Maximum,
|
|
|
|
+ AddressLength,
|
|
|
|
+ Granularity,
|
|
|
|
Descriptor->Address16.Flags,
|
2014-10-01 17:50:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
|
|
|
|
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
|
|
|
|
+
|
|
|
|
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
|
2014-10-01 17:50:56 +00:00
|
|
|
OptionIndex + StringLength;
|
2013-08-28 19:31:28 +00:00
|
|
|
return (Rnode);
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/include/acmacros.h
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/include/acmacros.h
|
|
|
|
+++ acpica-unix2-20161117/source/include/acmacros.h
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -100,7 +100,8 @@
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* 32-bit source, 16/32/64 destination */
|
|
|
|
|
|
|
|
-#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
|
|
|
|
+#define ACPI_MOVE_32_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
|
|
|
|
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
|
|
|
|
|
|
|
|
#define ACPI_MOVE_32_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
|
|
|
|
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -115,9 +116,13 @@
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* 64-bit source, 16/32/64 destination */
|
|
|
|
|
|
|
|
-#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
|
|
|
|
+#define ACPI_MOVE_64_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
|
|
|
|
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
|
|
|
|
|
|
|
|
-#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
|
|
|
|
+#define ACPI_MOVE_64_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
|
|
|
|
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
|
|
|
|
+ (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
|
|
|
|
+ (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];}
|
|
|
|
|
|
|
|
#define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
|
|
|
|
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
|
2015-04-10 21:49:17 +00:00
|
|
|
@@ -144,7 +149,9 @@
|
2013-08-28 19:31:28 +00:00
|
|
|
|
|
|
|
/* 32-bit source, 16/32/64 destination */
|
|
|
|
|
|
|
|
-#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
|
|
|
|
+#define ACPI_MOVE_32_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
|
|
|
|
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
|
|
|
|
+
|
|
|
|
#define ACPI_MOVE_32_TO_32(d, s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
|
|
|
|
#define ACPI_MOVE_32_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
|
|
|
|
|
2017-01-10 00:09:49 +00:00
|
|
|
Index: acpica-unix2-20161117/source/include/platform/aclinux.h
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2017-01-10 00:09:49 +00:00
|
|
|
--- acpica-unix2-20161117.orig/source/include/platform/aclinux.h
|
|
|
|
+++ acpica-unix2-20161117/source/include/platform/aclinux.h
|
2016-08-03 00:33:32 +00:00
|
|
|
@@ -179,6 +179,7 @@
|
|
|
|
|
|
|
|
#ifdef ACPI_USE_STANDARD_HEADERS
|
2013-08-28 19:31:28 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
+#include <endian.h>
|
2016-08-03 00:33:32 +00:00
|
|
|
#endif
|
2013-08-28 19:31:28 +00:00
|
|
|
|
2014-04-05 21:31:31 +00:00
|
|
|
/* Define/disable kernel-specific declarators */
|