|
|
305057 |
diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
|
|
|
305057 |
index dc8b7d5..09c2910 100644
|
|
|
305057 |
--- a/source/compiler/aslcodegen.c
|
|
|
305057 |
+++ b/source/compiler/aslcodegen.c
|
|
|
305057 |
@@ -249,16 +249,12 @@ CgWriteAmlOpcode (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *Op)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
UINT8 PkgLenFirstByte;
|
|
|
32dd66 |
- UINT32 i;
|
|
|
32dd66 |
- union {
|
|
|
32dd66 |
- UINT16 Opcode;
|
|
|
32dd66 |
- UINT8 OpcodeBytes[2];
|
|
|
32dd66 |
- } Aml;
|
|
|
32dd66 |
- union {
|
|
|
32dd66 |
- UINT32 Len;
|
|
|
32dd66 |
- UINT8 LenBytes[4];
|
|
|
32dd66 |
- } PkgLen;
|
|
|
32dd66 |
-
|
|
|
32dd66 |
+ UINT8 Byte;
|
|
|
32dd66 |
+ UINT16 Word;
|
|
|
32dd66 |
+ UINT32 DWord;
|
|
|
32dd66 |
+ UINT64 QWord;
|
|
|
32dd66 |
+ UINT16 AmlOpcode;
|
|
|
32dd66 |
+ UINT32 PkgLen;
|
|
|
32dd66 |
|
|
|
32dd66 |
/* We expect some DEFAULT_ARGs, just ignore them */
|
|
|
32dd66 |
|
|
|
305057 |
@@ -281,51 +277,52 @@ CgWriteAmlOpcode (
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Special opcodes for within a field definition */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Aml.Opcode = AML_FIELD_OFFSET_OP;
|
|
|
32dd66 |
+ AmlOpcode = AML_FIELD_OFFSET_OP;
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_INT_ACCESSFIELD_OP:
|
|
|
32dd66 |
|
|
|
32dd66 |
- Aml.Opcode = AML_FIELD_ACCESS_OP;
|
|
|
32dd66 |
+ AmlOpcode = AML_FIELD_ACCESS_OP;
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_INT_CONNECTION_OP:
|
|
|
32dd66 |
|
|
|
32dd66 |
- Aml.Opcode = AML_FIELD_CONNECTION_OP;
|
|
|
32dd66 |
+ AmlOpcode = AML_FIELD_CONNECTION_OP;
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
default:
|
|
|
32dd66 |
|
|
|
32dd66 |
- Aml.Opcode = Op->Asl.AmlOpcode;
|
|
|
32dd66 |
+ AmlOpcode = Op->Asl.AmlOpcode;
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
|
|
|
32dd66 |
- switch (Aml.Opcode)
|
|
|
32dd66 |
+ switch (AmlOpcode)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case AML_PACKAGE_LENGTH:
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Value is the length to be encoded (Used in field definitions) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- PkgLen.Len = (UINT32) Op->Asl.Value.Integer;
|
|
|
32dd66 |
+ PkgLen = (UINT32) Op->Asl.Value.Integer;
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
default:
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Check for two-byte opcode */
|
|
|
32dd66 |
|
|
|
32dd66 |
- if (Aml.Opcode > 0x00FF)
|
|
|
32dd66 |
+ if (AmlOpcode > 0x00FF)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
/* Write the high byte first */
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1);
|
|
|
32dd66 |
+ Byte = ACPI_HIBYTE(AmlOpcode);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1);
|
|
|
32dd66 |
+ Byte = ACPI_LOBYTE(AmlOpcode);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Subtreelength doesn't include length of package length bytes */
|
|
|
32dd66 |
|
|
|
32dd66 |
- PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
|
|
|
32dd66 |
+ PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
305057 |
@@ -336,8 +333,8 @@ CgWriteAmlOpcode (
|
|
|
32dd66 |
if (Op->Asl.AmlPkgLenBytes == 1)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
/* Simplest case -- no bytes to follow, just write the count */
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1);
|
|
|
32dd66 |
+ Byte = ACPI_LOBYTE(PkgLen);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
else if (Op->Asl.AmlPkgLenBytes != 0)
|
|
|
32dd66 |
{
|
|
|
305057 |
@@ -347,7 +344,7 @@ CgWriteAmlOpcode (
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
PkgLenFirstByte = (UINT8)
|
|
|
32dd66 |
(((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
|
|
|
32dd66 |
- (PkgLen.LenBytes[0] & 0x0F));
|
|
|
32dd66 |
+ (PkgLen & 0x0F));
|
|
|
32dd66 |
|
|
|
32dd66 |
CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
|
|
|
32dd66 |
|
|
|
305057 |
@@ -355,37 +352,44 @@ CgWriteAmlOpcode (
|
|
|
32dd66 |
* Shift the length over by the 4 bits we just stuffed
|
|
|
32dd66 |
* in the first byte
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
- PkgLen.Len >>= 4;
|
|
|
32dd66 |
+ PkgLen >>= 4;
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Now we can write the remaining bytes - either 1, 2, or 3 bytes */
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
|
|
|
32dd66 |
+ Byte = ACPI_LOBYTE(PkgLen);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
+ if (Op->Asl.AmlPkgLenBytes >= 3)
|
|
|
32dd66 |
+ {
|
|
|
32dd66 |
+ Byte = ACPI_HIBYTE(PkgLen);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
+ }
|
|
|
32dd66 |
+ if (Op->Asl.AmlPkgLenBytes >= 4)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
|
|
|
32dd66 |
+ Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen));
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
}
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
- switch (Aml.Opcode)
|
|
|
32dd66 |
+ switch (AmlOpcode)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case AML_BYTE_OP:
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1);
|
|
|
32dd66 |
+ Byte = (UINT8) Op->Asl.Value.Integer;
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_WORD_OP:
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Word, 2);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_DWORD_OP:
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &DWord, 4);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_QWORD_OP:
|
|
|
32dd66 |
-
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &QWord, 8);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_STRING_OP:
|
|
|
305057 |
@@ -419,6 +423,7 @@ CgWriteTableHeader (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *Op)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *Child;
|
|
|
32dd66 |
+ UINT32 DWord;
|
|
|
32dd66 |
|
|
|
32dd66 |
|
|
|
32dd66 |
/* AML filename */
|
|
|
305057 |
@@ -455,7 +460,7 @@ CgWriteTableHeader (
|
|
|
32dd66 |
/* OEM Revision */
|
|
|
32dd66 |
|
|
|
32dd66 |
Child = Child->Asl.Next;
|
|
|
32dd66 |
- TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Compiler ID */
|
|
|
32dd66 |
|
|
|
305057 |
@@ -463,11 +468,12 @@ CgWriteTableHeader (
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Compiler version */
|
|
|
32dd66 |
|
|
|
305057 |
- TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
|
|
|
305057 |
+ DWord = ACPI_CA_VERSION;
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Table length. Checksum zero for now, will rewrite later */
|
|
|
32dd66 |
|
|
|
32dd66 |
- TableHeader.Length = Gbl_TableLength;
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&TableHeader.Length, &Gbl_TableLength);
|
|
|
32dd66 |
TableHeader.Checksum = 0;
|
|
|
32dd66 |
|
|
|
32dd66 |
CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
|
|
|
305057 |
@@ -531,7 +537,10 @@ CgWriteNode (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *Op)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
-
|
|
|
32dd66 |
+ UINT8 Byte;
|
|
|
32dd66 |
+ UINT16 Word;
|
|
|
32dd66 |
+ UINT32 DWord;
|
|
|
32dd66 |
+ UINT64 QWord;
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Always check for DEFAULT_ARG and other "Noop" nodes */
|
|
|
32dd66 |
/* TBD: this may not be the best place for this check */
|
|
|
305057 |
@@ -549,13 +558,24 @@ CgWriteNode (
|
|
|
32dd66 |
switch (Op->Asl.AmlOpcode)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case AML_RAW_DATA_BYTE:
|
|
|
32dd66 |
+ Byte = (UINT8) Op->Asl.Value.Integer;
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Byte, 1);
|
|
|
32dd66 |
+ return;
|
|
|
32dd66 |
+
|
|
|
32dd66 |
case AML_RAW_DATA_WORD:
|
|
|
32dd66 |
- case AML_RAW_DATA_DWORD:
|
|
|
32dd66 |
- case AML_RAW_DATA_QWORD:
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &Word, 2);
|
|
|
32dd66 |
+ return;
|
|
|
32dd66 |
|
|
|
32dd66 |
- CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength);
|
|
|
32dd66 |
+ case AML_RAW_DATA_DWORD:
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &DWord, 4);
|
|
|
32dd66 |
return;
|
|
|
32dd66 |
|
|
|
32dd66 |
+ case AML_RAW_DATA_QWORD:
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
|
|
|
32dd66 |
+ CgLocalWriteAmlData (Op, &QWord, 8);
|
|
|
32dd66 |
+ return;
|
|
|
32dd66 |
|
|
|
32dd66 |
case AML_RAW_DATA_BUFFER:
|
|
|
32dd66 |
|
|
|
305057 |
diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c
|
|
|
305057 |
index fa3d1fc..916145a 100644
|
|
|
305057 |
--- a/source/compiler/aslopcodes.c
|
|
|
305057 |
+++ b/source/compiler/aslopcodes.c
|
|
|
305057 |
@@ -531,6 +531,7 @@ OpcDoUnicode (
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
UINT8 *AsciiString;
|
|
|
32dd66 |
UINT16 *UnicodeString;
|
|
|
32dd66 |
+ UINT16 UChar;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *BufferLengthOp;
|
|
|
32dd66 |
|
|
|
32dd66 |
|
|
|
305057 |
@@ -557,7 +558,8 @@ OpcDoUnicode (
|
|
|
32dd66 |
|
|
|
32dd66 |
for (i = 0; i < Count; i++)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- UnicodeString[i] = (UINT16) AsciiString[i];
|
|
|
32dd66 |
+ UChar = (UINT16) AsciiString[i];
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
/*
|
|
|
305057 |
diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c
|
|
|
305057 |
index 92c8730..68a1b76 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype1.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype1.c
|
|
|
482972 |
@@ -142,6 +142,11 @@ RsDoMemory24Descriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *MaxOp = NULL;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *LengthOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 Minimum = 0;
|
|
|
32dd66 |
+ UINT16 Maximum = 0;
|
|
|
32dd66 |
+ UINT16 AddressLength = 0;
|
|
|
32dd66 |
+ UINT16 Alignment = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -152,7 +157,8 @@ RsDoMemory24Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
Descriptor = Rnode->Buffer;
|
|
|
32dd66 |
Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
|
|
|
32dd66 |
- Descriptor->Memory24.ResourceLength = 9;
|
|
|
32dd66 |
+ ResourceLength = 9;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -169,7 +175,7 @@ RsDoMemory24Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -177,7 +183,7 @@ RsDoMemory24Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -185,14 +191,14 @@ RsDoMemory24Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 3: /* Alignment */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 4: /* Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -215,12 +221,17 @@ RsDoMemory24Descriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
|
|
|
32dd66 |
- Descriptor->Memory24.Minimum,
|
|
|
32dd66 |
- Descriptor->Memory24.Maximum,
|
|
|
32dd66 |
- Descriptor->Memory24.AddressLength,
|
|
|
32dd66 |
- Descriptor->Memory24.Alignment,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Alignment,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -248,6 +259,11 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *LengthOp = NULL;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *AlignOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT32 Minimum = 0;
|
|
|
32dd66 |
+ UINT32 Maximum = 0;
|
|
|
32dd66 |
+ UINT32 AddressLength = 0;
|
|
|
32dd66 |
+ UINT32 Alignment = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -258,7 +274,8 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
Descriptor = Rnode->Buffer;
|
|
|
32dd66 |
Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
|
|
|
32dd66 |
- Descriptor->Memory32.ResourceLength = 17;
|
|
|
32dd66 |
+ ResourceLength = 17;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -275,7 +292,7 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -283,7 +300,7 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -291,7 +308,7 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 3: /* Alignment */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
|
|
|
32dd66 |
AlignOp = InitializerOp;
|
|
|
482972 |
@@ -299,7 +316,7 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 4: /* Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -322,12 +339,17 @@ RsDoMemory32Descriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Align values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
|
|
|
32dd66 |
- Descriptor->Memory32.Minimum,
|
|
|
32dd66 |
- Descriptor->Memory32.Maximum,
|
|
|
32dd66 |
- Descriptor->Memory32.AddressLength,
|
|
|
32dd66 |
- Descriptor->Memory32.Alignment,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Alignment,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -351,6 +373,7 @@ RsDoMemory32FixedDescriptor (
|
|
|
32dd66 |
AML_RESOURCE *Descriptor;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 ResourceLength;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -361,7 +384,8 @@ RsDoMemory32FixedDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
Descriptor = Rnode->Buffer;
|
|
|
32dd66 |
Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
|
|
|
32dd66 |
- Descriptor->FixedMemory32.ResourceLength = 9;
|
|
|
32dd66 |
+ ResourceLength = 9;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -378,14 +402,16 @@ RsDoMemory32FixedDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address,
|
|
|
32dd66 |
+ &InitializerOp->Asl.Value.Integer);
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength,
|
|
|
32dd66 |
+ &InitializerOp->Asl.Value.Integer);
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
|
|
|
32dd66 |
break;
|
|
|
305057 |
diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c
|
|
|
305057 |
index 7acdbbc..d24fe5a 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype1i.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype1i.c
|
|
|
482972 |
@@ -197,6 +197,8 @@ RsDoFixedDmaDescriptor (
|
|
|
32dd66 |
AML_RESOURCE *Descriptor;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 RequestLines = 0;
|
|
|
32dd66 |
+ UINT16 Channels = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -217,14 +219,14 @@ RsDoFixedDmaDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* DMA Request Lines [WORD] (_DMA) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* DMA Channel [WORD] (_TYP) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Channels = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -249,6 +251,9 @@ RsDoFixedDmaDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.RequestLines, &RequestLines);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.Channels, &Channels);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -273,6 +278,7 @@ RsDoFixedIoDescriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *AddressOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 Address = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -293,8 +299,7 @@ RsDoFixedIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* Base Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->FixedIo.Address =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Address = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
|
|
|
32dd66 |
AddressOp = InitializerOp;
|
|
|
482972 |
@@ -324,11 +329,13 @@ RsDoFixedIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Error checks */
|
|
|
32dd66 |
|
|
|
32dd66 |
- if (Descriptor->FixedIo.Address > 0x03FF)
|
|
|
32dd66 |
+ if (Address > 0x03FF)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -356,6 +363,8 @@ RsDoIoDescriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *LengthOp = NULL;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *AlignOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 Minimum = 0;
|
|
|
32dd66 |
+ UINT16 Maximum = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -383,8 +392,7 @@ RsDoIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Io.Minimum =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -392,8 +400,7 @@ RsDoIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Io.Maximum =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -434,12 +441,15 @@ RsDoIoDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Align values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
|
|
|
32dd66 |
- Descriptor->Io.Minimum,
|
|
|
32dd66 |
- Descriptor->Io.Maximum,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
Descriptor->Io.AddressLength,
|
|
|
32dd66 |
Descriptor->Io.Alignment,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -559,9 +569,9 @@ RsDoIrqDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
- /* Now we can set the channel mask */
|
|
|
32dd66 |
+ /* Now we can set the interrupt mask */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Irq.IrqMask = IrqMask;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -660,6 +670,6 @@ RsDoIrqNoFlagsDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Now we can set the interrupt mask */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Irq.IrqMask = IrqMask;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
305057 |
diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c
|
|
|
305057 |
index 45bbe23..3894f09 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype2.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype2.c
|
|
|
482972 |
@@ -75,6 +75,7 @@ RsDoGeneralRegisterDescriptor (
|
|
|
32dd66 |
AML_RESOURCE *Descriptor;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 ResourceLength;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -85,7 +86,9 @@ RsDoGeneralRegisterDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
Descriptor = Rnode->Buffer;
|
|
|
32dd66 |
Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
|
|
|
32dd66 |
- Descriptor->GenericReg.ResourceLength = 12;
|
|
|
32dd66 |
+ ResourceLength = 12;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength,
|
|
|
32dd66 |
+ &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 3: /* Register Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address,
|
|
|
32dd66 |
+ &InitializerOp->Asl.Value.Integer);
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -171,6 +175,7 @@ RsDoInterruptDescriptor (
|
|
|
32dd66 |
AML_RESOURCE *Rover = NULL;
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *InitializerOp;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
482972 |
@@ -219,7 +224,7 @@ RsDoInterruptDescriptor (
|
|
|
32dd66 |
* Initial descriptor length -- may be enlarged if there are
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
- Descriptor->ExtendedIrq.ResourceLength = 2; /* Flags and table length byte */
|
|
|
32dd66 |
+ ResourceLength = 2; /* Flags and table length byte */
|
|
|
32dd66 |
Descriptor->ExtendedIrq.InterruptCount = 0;
|
|
|
32dd66 |
|
|
|
32dd66 |
Rover = ACPI_CAST_PTR (AML_RESOURCE,
|
|
|
482972 |
@@ -327,10 +332,11 @@ RsDoInterruptDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Save the integer and move pointer to the next one */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_32(&Rover->DwordItem,
|
|
|
32dd66 |
+ &InitializerOp->Asl.Value.Integer);
|
|
|
32dd66 |
Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4);
|
|
|
32dd66 |
Descriptor->ExtendedIrq.InterruptCount++;
|
|
|
32dd66 |
- Descriptor->ExtendedIrq.ResourceLength += 4;
|
|
|
32dd66 |
+ ResourceLength += 4;
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Case 7: First interrupt number in list */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -366,7 +372,7 @@ RsDoInterruptDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
Rover->ByteItem = ResSourceIndex;
|
|
|
32dd66 |
Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
|
|
|
32dd66 |
- Descriptor->ExtendedIrq.ResourceLength += 1;
|
|
|
32dd66 |
+ ResourceLength += 1;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Add optional ResSource string if present */
|
|
|
482972 |
@@ -378,13 +384,14 @@ RsDoInterruptDescriptor (
|
|
|
32dd66 |
Rover = ACPI_ADD_PTR (
|
|
|
32dd66 |
AML_RESOURCE, &(Rover->ByteItem), StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtendedIrq.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->ExtendedIrq.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
|
|
|
32dd66 |
ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
|
|
|
32dd66 |
+ OptionIndex + StringLength;
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength,
|
|
|
32dd66 |
+ &ResourceLength);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
482972 |
@@ -432,7 +439,7 @@ RsDoVendorLargeDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
Descriptor = Rnode->Buffer;
|
|
|
32dd66 |
Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
|
|
|
32dd66 |
- Descriptor->VendorLarge.ResourceLength = (UINT16) i;
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Point to end-of-descriptor for vendor data */
|
|
|
32dd66 |
|
|
|
305057 |
diff --git a/source/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c
|
|
|
305057 |
index c814f8c..75984b5 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype2d.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype2d.c
|
|
|
482972 |
@@ -79,7 +79,13 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *GranOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT32 Minimum = 0;
|
|
|
32dd66 |
+ UINT32 Maximum = 0;
|
|
|
32dd66 |
+ UINT32 AddressLength = 0;
|
|
|
32dd66 |
+ UINT32 Granularity = 0;
|
|
|
32dd66 |
+ UINT32 TranslationOffset = 0;
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
482972 |
@@ -102,8 +108,7 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -147,8 +152,7 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 5: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Granularity =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -156,8 +160,7 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Min */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Minimum =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -165,8 +168,7 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Address Max */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Maximum =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -174,16 +176,14 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.TranslationOffset =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.AddressLength =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -197,7 +197,7 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -211,8 +211,7 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
/* Found a valid ResourceSource */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address32.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -272,13 +271,20 @@ RsDoDwordIoDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Minimum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Maximum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.AddressLength,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address32.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -310,7 +316,13 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT32 Minimum = 0;
|
|
|
32dd66 |
+ UINT32 Maximum = 0;
|
|
|
32dd66 |
+ UINT32 AddressLength = 0;
|
|
|
32dd66 |
+ UINT32 Granularity = 0;
|
|
|
32dd66 |
+ UINT32 TranslationOffset = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -332,11 +344,9 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
-
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
32dd66 |
for (i = 0; InitializerOp; i++)
|
|
|
482972 |
@@ -385,8 +395,7 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Granularity =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -394,8 +403,7 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Minimum =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -403,8 +411,7 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Maximum =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -412,16 +419,14 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.TranslationOffset =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.AddressLength =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -433,7 +438,7 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -445,8 +450,8 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address32.ResourceLength + StringLength);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -507,13 +512,20 @@ RsDoDwordMemoryDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Minimum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Maximum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.AddressLength,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address32.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -545,7 +557,13 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT32 Minimum = 0;
|
|
|
32dd66 |
+ UINT32 Maximum = 0;
|
|
|
32dd66 |
+ UINT32 AddressLength = 0;
|
|
|
32dd66 |
+ UINT32 Granularity = 0;
|
|
|
32dd66 |
+ UINT32 TranslationOffset = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -566,8 +584,7 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -616,8 +633,7 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Granularity =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -625,8 +641,7 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Minimum =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -634,8 +649,7 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.Maximum =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -643,16 +657,14 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.TranslationOffset =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address32.AddressLength =
|
|
|
32dd66 |
- (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -664,7 +676,7 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -676,8 +688,7 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address32.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address32.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -724,13 +735,20 @@ RsDoDwordSpaceDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Minimum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Maximum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.AddressLength,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address32.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address32.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
305057 |
diff --git a/source/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c
|
|
|
305057 |
index 07b7255..76ead49 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype2e.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype2e.c
|
|
|
482972 |
@@ -78,6 +78,13 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *GranOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
+ UINT64 Minimum = 0;
|
|
|
32dd66 |
+ UINT64 Maximum = 0;
|
|
|
32dd66 |
+ UINT64 AddressLength = 0;
|
|
|
32dd66 |
+ UINT64 Granularity = 0;
|
|
|
32dd66 |
+ UINT64 TranslationOffset = 0;
|
|
|
32dd66 |
+ UINT64 TypeSpecific = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -94,9 +101,10 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
|
|
|
32dd66 |
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
|
|
|
32dd66 |
+ &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -139,7 +147,7 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 5: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -147,7 +155,7 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Min */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -155,7 +163,7 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Address Max */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -163,14 +171,14 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -178,7 +186,7 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Type-Specific Attributes */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -214,13 +222,20 @@ RsDoExtendedIoDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Minimum,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Maximum,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.AddressLength,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->ExtAddress64.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
|
|
|
32dd66 |
+
|
|
|
482972 |
Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
|
|
|
482972 |
StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -251,6 +266,13 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *GranOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
+ UINT64 Minimum = 0;
|
|
|
32dd66 |
+ UINT64 Maximum = 0;
|
|
|
32dd66 |
+ UINT64 AddressLength = 0;
|
|
|
32dd66 |
+ UINT64 Granularity = 0;
|
|
|
32dd66 |
+ UINT64 TranslationOffset = 0;
|
|
|
32dd66 |
+ UINT64 TypeSpecific = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -267,9 +289,10 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
|
|
|
32dd66 |
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
|
|
|
32dd66 |
+ &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -319,7 +342,7 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -327,7 +350,7 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -335,7 +358,7 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -343,14 +366,14 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -358,7 +381,7 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 11: /* Type-Specific Attributes */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -395,13 +418,20 @@ RsDoExtendedMemoryDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Minimum,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Maximum,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.AddressLength,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->ExtAddress64.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
|
|
|
32dd66 |
+
|
|
|
482972 |
Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
|
|
|
482972 |
StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -432,6 +462,13 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
ACPI_PARSE_OBJECT *GranOp = NULL;
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
+ UINT64 Minimum = 0;
|
|
|
32dd66 |
+ UINT64 Maximum = 0;
|
|
|
32dd66 |
+ UINT64 AddressLength = 0;
|
|
|
32dd66 |
+ UINT64 Granularity = 0;
|
|
|
32dd66 |
+ UINT64 TranslationOffset = 0;
|
|
|
32dd66 |
+ UINT64 TypeSpecific = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -447,9 +484,10 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
|
|
|
32dd66 |
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
|
|
|
32dd66 |
+ &ResourceLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -497,7 +535,7 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -505,7 +543,7 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -513,7 +551,7 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -521,14 +559,14 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -536,7 +574,7 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 11: /* Type-Specific Attributes */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TypeSpecific = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -558,13 +596,20 @@ RsDoExtendedSpaceDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Minimum,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Maximum,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.AddressLength,
|
|
|
32dd66 |
- Descriptor->ExtAddress64.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->ExtAddress64.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
|
|
|
32dd66 |
+
|
|
|
482972 |
Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
|
|
|
482972 |
StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
305057 |
diff --git a/source/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c
|
|
|
305057 |
index 6db3815..27b6c8f 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype2q.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype2q.c
|
|
|
482972 |
@@ -80,7 +80,13 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT64 Minimum = 0;
|
|
|
32dd66 |
+ UINT64 Maximum = 0;
|
|
|
32dd66 |
+ UINT64 AddressLength = 0;
|
|
|
32dd66 |
+ UINT64 Granularity = 0;
|
|
|
32dd66 |
+ UINT64 TranslationOffset = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -102,8 +108,7 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -147,7 +152,7 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 5: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -155,7 +160,7 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Min */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -163,7 +168,7 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Address Max */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -171,14 +176,14 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -190,7 +195,7 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -202,8 +207,7 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address64.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -263,13 +267,20 @@ RsDoQwordIoDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- Descriptor->Address64.Minimum,
|
|
|
32dd66 |
- Descriptor->Address64.Maximum,
|
|
|
32dd66 |
- Descriptor->Address64.AddressLength,
|
|
|
32dd66 |
- Descriptor->Address64.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address64.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -301,7 +312,13 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT64 Minimum = 0;
|
|
|
32dd66 |
+ UINT64 Maximum = 0;
|
|
|
32dd66 |
+ UINT64 AddressLength = 0;
|
|
|
32dd66 |
+ UINT64 Granularity = 0;
|
|
|
32dd66 |
+ UINT64 TranslationOffset = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -323,8 +340,7 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -375,7 +391,7 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -383,7 +399,7 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -391,7 +407,7 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -399,14 +415,14 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -418,7 +434,7 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -430,8 +446,7 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address64.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -492,13 +507,20 @@ RsDoQwordMemoryDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- Descriptor->Address64.Minimum,
|
|
|
32dd66 |
- Descriptor->Address64.Maximum,
|
|
|
32dd66 |
- Descriptor->Address64.AddressLength,
|
|
|
32dd66 |
- Descriptor->Address64.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address64.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -530,9 +552,15 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
ASL_RESOURCE_NODE *Rnode;
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
+ UINT64 Minimum = 0;
|
|
|
32dd66 |
+ UINT64 Maximum = 0;
|
|
|
32dd66 |
+ UINT64 AddressLength = 0;
|
|
|
32dd66 |
+ UINT64 Granularity = 0;
|
|
|
32dd66 |
+ UINT64 TranslationOffset = 0;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
32dd66 |
|
|
|
32dd66 |
|
|
|
482972 |
@@ -551,8 +579,7 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -601,7 +628,7 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -609,7 +636,7 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -617,7 +644,7 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -625,14 +652,14 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -644,7 +671,7 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -656,8 +683,7 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address64.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address64.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -703,13 +729,20 @@ RsDoQwordSpaceDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- Descriptor->Address64.Minimum,
|
|
|
32dd66 |
- Descriptor->Address64.Maximum,
|
|
|
32dd66 |
- Descriptor->Address64.AddressLength,
|
|
|
32dd66 |
- Descriptor->Address64.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address64.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
305057 |
diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c
|
|
|
305057 |
index 9fe03b7..83fdab9 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype2s.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype2s.c
|
|
|
482972 |
@@ -290,6 +290,9 @@ RsDoGpioIntDescriptor (
|
|
|
32dd66 |
UINT16 VendorLength;
|
|
|
32dd66 |
UINT16 InterruptLength;
|
|
|
32dd66 |
UINT16 DescriptorSize;
|
|
|
32dd66 |
+ UINT16 IntFlags = 0;
|
|
|
32dd66 |
+ UINT16 DebounceTimeout = 0;
|
|
|
32dd66 |
+ UINT16 Flags = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
482972 |
UINT32 PinCount = 0;
|
|
|
32dd66 |
UINT32 i;
|
|
|
482972 |
@@ -349,21 +352,21 @@ RsDoGpioIntDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Interrupt Polarity - Active high/low [Flags] (_POL) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 1, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 1, 0);
|
|
|
32dd66 |
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_POLARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 1, 2);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Share Type - Default: exclusive (0) [Flags] (_SHR) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
|
|
|
32dd66 |
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -377,7 +380,7 @@ RsDoGpioIntDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 4: /* Debounce Timeout [WORD] (_DBT) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -403,7 +406,7 @@ RsDoGpioIntDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Resource Usage (consumer/producer) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Resource Tag (Descriptor Name) */
|
|
|
482972 |
@@ -468,6 +471,10 @@ RsDoGpioIntDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
|
|
|
32dd66 |
+
|
|
|
482972 |
MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
482972 |
@@ -500,6 +507,10 @@ RsDoGpioIoDescriptor (
|
|
|
32dd66 |
UINT16 VendorLength;
|
|
|
32dd66 |
UINT16 InterruptLength;
|
|
|
32dd66 |
UINT16 DescriptorSize;
|
|
|
32dd66 |
+ UINT16 IntFlags = 0;
|
|
|
32dd66 |
+ UINT16 DebounceTimeout = 0;
|
|
|
32dd66 |
+ UINT16 DriveStrength = 0;
|
|
|
32dd66 |
+ UINT16 Flags = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
482972 |
UINT32 PinCount = 0;
|
|
|
32dd66 |
UINT32 i;
|
|
|
482972 |
@@ -560,7 +571,7 @@ RsDoGpioIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* Share Type [Flags] (_SHR) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0);
|
|
|
32dd66 |
RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -574,21 +585,21 @@ RsDoGpioIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Debounce Timeout [WORD] (_DBT) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 3: /* Drive Strength [WORD] (_DRS) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Gpio.DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_DRIVESTRENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DriveStrength));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 4: /* I/O Restriction [Flag] (_IOR) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -614,7 +625,7 @@ RsDoGpioIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Resource Usage (consumer/producer) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&Flags, InitializerOp, 0, 1);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Resource Tag (Descriptor Name) */
|
|
|
482972 |
@@ -678,6 +689,11 @@ RsDoGpioIoDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
|
|
|
32dd66 |
+
|
|
|
482972 |
MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
482972 |
@@ -707,6 +723,9 @@ RsDoI2cSerialBusDescriptor (
|
|
|
32dd66 |
UINT16 ResSourceLength;
|
|
|
32dd66 |
UINT16 VendorLength;
|
|
|
32dd66 |
UINT16 DescriptorSize;
|
|
|
32dd66 |
+ UINT16 SlaveAddress = 0;
|
|
|
32dd66 |
+ UINT32 ConnectionSpeed = 0;
|
|
|
32dd66 |
+ UINT16 TypeSpecificFlags = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -756,7 +775,7 @@ RsDoI2cSerialBusDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* Slave Address [WORD] (_ADR) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -770,14 +789,14 @@ RsDoI2cSerialBusDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Connection Speed [DWORD] (_SPE) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 3: /* Addressing Mode [Flag] (_MOD) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -825,6 +844,10 @@ RsDoI2cSerialBusDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.SlaveAddress, &SlaveAddress);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->I2cSerialBus.ConnectionSpeed, &ConnectionSpeed);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
|
|
|
482972 |
+
|
|
|
482972 |
MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
482972 |
@@ -854,6 +877,9 @@ RsDoSpiSerialBusDescriptor (
|
|
|
32dd66 |
UINT16 ResSourceLength;
|
|
|
32dd66 |
UINT16 VendorLength;
|
|
|
32dd66 |
UINT16 DescriptorSize;
|
|
|
32dd66 |
+ UINT16 DeviceSelection = 0;
|
|
|
32dd66 |
+ UINT32 ConnectionSpeed = 0;
|
|
|
32dd66 |
+ UINT16 TypeSpecificFlags = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -903,21 +929,21 @@ RsDoSpiSerialBusDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* Device Selection [WORD] (_ADR) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Device Polarity [Flag] (_DPL) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 1, 0);
|
|
|
32dd66 |
RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Wire Mode [Flag] (_MOD) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -938,7 +964,7 @@ RsDoSpiSerialBusDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 5: /* Connection Speed [DWORD] (_SPE) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -1000,6 +1026,10 @@ RsDoSpiSerialBusDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.DeviceSelection, &DeviceSelection);
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->SpiSerialBus.ConnectionSpeed, &ConnectionSpeed);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
|
|
|
32dd66 |
+
|
|
|
482972 |
MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
482972 |
@@ -1029,6 +1059,10 @@ RsDoUartSerialBusDescriptor (
|
|
|
32dd66 |
UINT16 ResSourceLength;
|
|
|
32dd66 |
UINT16 VendorLength;
|
|
|
32dd66 |
UINT16 DescriptorSize;
|
|
|
32dd66 |
+ UINT32 DefaultBaudRate = 0;
|
|
|
32dd66 |
+ UINT16 TypeSpecificFlags = 0;
|
|
|
32dd66 |
+ UINT16 RxFifoSize = 0;
|
|
|
32dd66 |
+ UINT16 TxFifoSize = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
|
|
|
482972 |
@@ -1078,21 +1112,21 @@ RsDoUartSerialBusDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 1: /* Bits Per Byte [Flags] (_LEN) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 4, 3);
|
|
|
32dd66 |
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 2: /* Stop Bits [Flags] (_STB) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 2, 1);
|
|
|
32dd66 |
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -1106,7 +1140,7 @@ RsDoUartSerialBusDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 4: /* Endianness [Flag] (_END) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 7, 0);
|
|
|
32dd66 |
RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7);
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -1120,21 +1154,21 @@ RsDoUartSerialBusDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Flow Control [Flags] (_FLC) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
+ RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0);
|
|
|
32dd66 |
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2);
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Rx Buffer Size [WORD] (_RXL) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Tx Buffer Size [WORD] (_TXL) */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize));
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -1192,6 +1226,11 @@ RsDoUartSerialBusDescriptor (
|
|
|
32dd66 |
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
|
|
|
32dd66 |
}
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_32_TO_32(&Descriptor->UartSerialBus.DefaultBaudRate, &DefaultBaudRate);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TypeSpecificFlags, &TypeSpecificFlags);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.RxFifoSize, &RxFifoSize);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TxFifoSize, &TxFifoSize);
|
|
|
32dd66 |
+
|
|
|
482972 |
MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
|
|
|
32dd66 |
return (Rnode);
|
|
|
32dd66 |
}
|
|
|
305057 |
diff --git a/source/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c
|
|
|
305057 |
index 3b4cc10..851a590 100644
|
|
|
305057 |
--- a/source/compiler/aslrestype2w.c
|
|
|
305057 |
+++ b/source/compiler/aslrestype2w.c
|
|
|
482972 |
@@ -81,6 +81,12 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
+ UINT16 Minimum = 0;
|
|
|
32dd66 |
+ UINT16 Maximum = 0;
|
|
|
32dd66 |
+ UINT16 AddressLength = 0;
|
|
|
32dd66 |
+ UINT16 Granularity = 0;
|
|
|
32dd66 |
+ UINT16 TranslationOffset = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -102,8 +108,7 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -147,7 +152,7 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 5: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -155,7 +160,7 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Min */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -163,7 +168,7 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Address Max */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -171,14 +176,14 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -190,7 +195,7 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -202,8 +207,7 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address16.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -263,13 +267,20 @@ RsDoWordIoDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Minimum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Maximum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.AddressLength,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address16.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -302,6 +313,12 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
32dd66 |
+ UINT16 Minimum = 0;
|
|
|
32dd66 |
+ UINT16 Maximum = 0;
|
|
|
32dd66 |
+ UINT16 AddressLength = 0;
|
|
|
32dd66 |
+ UINT16 Granularity = 0;
|
|
|
32dd66 |
+ UINT16 TranslationOffset = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -323,8 +340,7 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -361,8 +377,7 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 4: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Granularity =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -370,8 +385,7 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 5: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Minimum =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -379,8 +393,7 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Maximum =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -388,16 +401,14 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.TranslationOffset =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.AddressLength =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -409,7 +420,7 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -421,8 +432,7 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address16.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -468,13 +478,20 @@ RsDoWordBusNumberDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Minimum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Maximum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.AddressLength,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address16.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
482972 |
@@ -507,6 +524,12 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
UINT8 *OptionalFields;
|
|
|
32dd66 |
UINT16 StringLength = 0;
|
|
|
32dd66 |
UINT32 OptionIndex = 0;
|
|
|
32dd66 |
+ UINT16 Minimum = 0;
|
|
|
32dd66 |
+ UINT16 Maximum = 0;
|
|
|
32dd66 |
+ UINT16 AddressLength = 0;
|
|
|
32dd66 |
+ UINT16 Granularity = 0;
|
|
|
32dd66 |
+ UINT16 TranslationOffset = 0;
|
|
|
32dd66 |
+ UINT16 ResourceLength = 0;
|
|
|
482972 |
UINT32 CurrentByteOffset;
|
|
|
32dd66 |
UINT32 i;
|
|
|
32dd66 |
BOOLEAN ResSourceIndex = FALSE;
|
|
|
482972 |
@@ -527,8 +550,7 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
* optional fields present
|
|
|
32dd66 |
*/
|
|
|
32dd66 |
OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
|
|
|
32dd66 |
sizeof (AML_RESOURCE_LARGE_HEADER));
|
|
|
32dd66 |
|
|
|
32dd66 |
/* Process all child initialization nodes */
|
|
|
482972 |
@@ -577,8 +599,7 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 6: /* Address Granularity */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Granularity =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
|
|
|
32dd66 |
GranOp = InitializerOp;
|
|
|
482972 |
@@ -586,8 +607,7 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 7: /* Min Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Minimum =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
|
|
|
32dd66 |
MinOp = InitializerOp;
|
|
|
482972 |
@@ -595,8 +615,7 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 8: /* Max Address */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.Maximum =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
|
|
|
32dd66 |
MaxOp = InitializerOp;
|
|
|
482972 |
@@ -604,16 +623,14 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
|
|
|
32dd66 |
case 9: /* Translation Offset */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.TranslationOffset =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
|
|
|
32dd66 |
break;
|
|
|
32dd66 |
|
|
|
32dd66 |
case 10: /* Address Length */
|
|
|
32dd66 |
|
|
|
32dd66 |
- Descriptor->Address16.AddressLength =
|
|
|
32dd66 |
- (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
+ AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
|
|
|
32dd66 |
CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
|
|
|
32dd66 |
LengthOp = InitializerOp;
|
|
|
482972 |
@@ -625,7 +642,7 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
|
|
|
32dd66 |
OptionIndex++;
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength++;
|
|
|
32dd66 |
+ ResourceLength++;
|
|
|
32dd66 |
ResSourceIndex = TRUE;
|
|
|
32dd66 |
}
|
|
|
32dd66 |
break;
|
|
|
482972 |
@@ -637,8 +654,7 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
{
|
|
|
32dd66 |
if (StringLength)
|
|
|
32dd66 |
{
|
|
|
32dd66 |
- Descriptor->Address16.ResourceLength = (UINT16)
|
|
|
32dd66 |
- (Descriptor->Address16.ResourceLength + StringLength);
|
|
|
32dd66 |
+ ResourceLength = (UINT16) (ResourceLength + StringLength);
|
|
|
32dd66 |
|
|
|
32dd66 |
strcpy ((char *)
|
|
|
32dd66 |
&OptionalFields[OptionIndex],
|
|
|
482972 |
@@ -684,13 +700,20 @@ RsDoWordSpaceDescriptor (
|
|
|
32dd66 |
/* Validate the Min/Max/Len/Gran values */
|
|
|
32dd66 |
|
|
|
32dd66 |
RsLargeAddressCheck (
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Minimum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Maximum,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.AddressLength,
|
|
|
32dd66 |
- (UINT64) Descriptor->Address16.Granularity,
|
|
|
32dd66 |
+ Minimum,
|
|
|
32dd66 |
+ Maximum,
|
|
|
32dd66 |
+ AddressLength,
|
|
|
32dd66 |
+ Granularity,
|
|
|
32dd66 |
Descriptor->Address16.Flags,
|
|
|
482972 |
MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp);
|
|
|
32dd66 |
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
|
|
|
32dd66 |
+ ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
|
|
|
32dd66 |
+
|
|
|
32dd66 |
Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
|
|
|
482972 |
OptionIndex + StringLength;
|
|
|
32dd66 |
return (Rnode);
|
|
|
305057 |
diff --git a/source/include/acmacros.h b/source/include/acmacros.h
|
|
|
305057 |
index 35d53f6..83ef6fd 100644
|
|
|
305057 |
--- a/source/include/acmacros.h
|
|
|
305057 |
+++ b/source/include/acmacros.h
|
|
|
305057 |
@@ -100,7 +100,8 @@
|
|
|
32dd66 |
|
|
|
32dd66 |
/* 32-bit source, 16/32/64 destination */
|
|
|
32dd66 |
|
|
|
32dd66 |
-#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
|
|
|
32dd66 |
+#define ACPI_MOVE_32_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
|
|
|
32dd66 |
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
|
|
|
32dd66 |
|
|
|
32dd66 |
#define ACPI_MOVE_32_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
|
|
|
32dd66 |
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
|
|
|
305057 |
@@ -115,9 +116,13 @@
|
|
|
32dd66 |
|
|
|
32dd66 |
/* 64-bit source, 16/32/64 destination */
|
|
|
32dd66 |
|
|
|
32dd66 |
-#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
|
|
|
32dd66 |
+#define ACPI_MOVE_64_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
|
|
|
32dd66 |
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
|
|
|
32dd66 |
|
|
|
32dd66 |
-#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
|
|
|
32dd66 |
+#define ACPI_MOVE_64_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
|
|
|
32dd66 |
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
|
|
|
32dd66 |
+ (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
|
|
|
32dd66 |
+ (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];}
|
|
|
32dd66 |
|
|
|
32dd66 |
#define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
|
|
|
32dd66 |
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
|
|
|
305057 |
@@ -144,7 +149,9 @@
|
|
|
32dd66 |
|
|
|
32dd66 |
/* 32-bit source, 16/32/64 destination */
|
|
|
32dd66 |
|
|
|
32dd66 |
-#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
|
|
|
32dd66 |
+#define ACPI_MOVE_32_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
|
|
|
32dd66 |
+ (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
|
|
|
32dd66 |
+
|
|
|
32dd66 |
#define ACPI_MOVE_32_TO_32(d, s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
|
|
|
32dd66 |
#define ACPI_MOVE_32_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
|
|
|
32dd66 |
|
|
|
305057 |
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
|
|
|
305057 |
index 3a91691..aa89499 100644
|
|
|
305057 |
--- a/source/include/platform/aclinux.h
|
|
|
305057 |
+++ b/source/include/platform/aclinux.h
|
|
|
482972 |
@@ -167,6 +167,7 @@
|
|
|
32dd66 |
#include <stdlib.h>
|
|
|
32dd66 |
#include <ctype.h>
|
|
|
32dd66 |
#include <unistd.h>
|
|
|
32dd66 |
+#include <endian.h>
|
|
|
32dd66 |
|
|
|
482972 |
/* Define/disable kernel-specific declarators */
|
|
|
32dd66 |
|
|
|
482972 |
@@ -179,8 +180,7 @@
|
|
|
32dd66 |
#define ACPI_FLUSH_CPU_CACHE()
|
|
|
482972 |
#define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread))
|
|
|
32dd66 |
|
|
|
482972 |
-#if defined(__ia64__) || defined(__x86_64__) ||\
|
|
|
482972 |
- defined(__aarch64__) || defined(__PPC64__)
|
|
|
32dd66 |
+#if __SIZEOF_LONG__ == 8
|
|
|
32dd66 |
#define ACPI_MACHINE_WIDTH 64
|
|
|
32dd66 |
#define COMPILER_DEPENDENT_INT64 long
|
|
|
32dd66 |
#define COMPILER_DEPENDENT_UINT64 unsigned long
|
|
|
482972 |
@@ -191,6 +191,10 @@
|
|
|
32dd66 |
#define ACPI_USE_NATIVE_DIVIDE
|
|
|
32dd66 |
#endif
|
|
|
32dd66 |
|
|
|
32dd66 |
+#if __BYTE_ORDER == __BIG_ENDIAN
|
|
|
32dd66 |
+#define ACPI_BIG_ENDIAN
|
|
|
32dd66 |
+#endif
|
|
|
32dd66 |
+
|
|
|
32dd66 |
#ifndef __cdecl
|
|
|
32dd66 |
#define __cdecl
|
|
|
32dd66 |
#endif
|