]>
Commit | Line | Data |
---|---|---|
f3dfbd7c ER |
1 | diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslcodegen.c |
2 | --- acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian 2014-04-24 11:48:59.000000000 -0400 | |
3 | +++ acpica-unix2-20140424/source/compiler/aslcodegen.c 2014-06-06 20:43:34.711825238 -0400 | |
4 | @@ -246,16 +246,12 @@ CgWriteAmlOpcode ( | |
5 | ACPI_PARSE_OBJECT *Op) | |
6 | { | |
7 | UINT8 PkgLenFirstByte; | |
8 | - UINT32 i; | |
9 | - union { | |
10 | - UINT16 Opcode; | |
11 | - UINT8 OpcodeBytes[2]; | |
12 | - } Aml; | |
13 | - union { | |
14 | - UINT32 Len; | |
15 | - UINT8 LenBytes[4]; | |
16 | - } PkgLen; | |
17 | - | |
18 | + UINT8 Byte; | |
19 | + UINT16 Word; | |
20 | + UINT32 DWord; | |
21 | + UINT64 QWord; | |
22 | + UINT16 AmlOpcode; | |
23 | + UINT32 PkgLen; | |
24 | ||
25 | /* We expect some DEFAULT_ARGs, just ignore them */ | |
26 | ||
27 | @@ -278,51 +265,52 @@ CgWriteAmlOpcode ( | |
28 | ||
29 | /* Special opcodes for within a field definition */ | |
30 | ||
31 | - Aml.Opcode = AML_FIELD_OFFSET_OP; | |
32 | + AmlOpcode = AML_FIELD_OFFSET_OP; | |
33 | break; | |
34 | ||
35 | case AML_INT_ACCESSFIELD_OP: | |
36 | ||
37 | - Aml.Opcode = AML_FIELD_ACCESS_OP; | |
38 | + AmlOpcode = AML_FIELD_ACCESS_OP; | |
39 | break; | |
40 | ||
41 | case AML_INT_CONNECTION_OP: | |
42 | ||
43 | - Aml.Opcode = AML_FIELD_CONNECTION_OP; | |
44 | + AmlOpcode = AML_FIELD_CONNECTION_OP; | |
45 | break; | |
46 | ||
47 | default: | |
48 | ||
49 | - Aml.Opcode = Op->Asl.AmlOpcode; | |
50 | + AmlOpcode = Op->Asl.AmlOpcode; | |
51 | break; | |
52 | } | |
53 | ||
54 | ||
55 | - switch (Aml.Opcode) | |
56 | + switch (AmlOpcode) | |
57 | { | |
58 | case AML_PACKAGE_LENGTH: | |
59 | ||
60 | /* Value is the length to be encoded (Used in field definitions) */ | |
61 | ||
62 | - PkgLen.Len = (UINT32) Op->Asl.Value.Integer; | |
63 | + PkgLen = (UINT32) Op->Asl.Value.Integer; | |
64 | break; | |
65 | ||
66 | default: | |
67 | ||
68 | /* Check for two-byte opcode */ | |
69 | ||
70 | - if (Aml.Opcode > 0x00FF) | |
71 | + if (AmlOpcode > 0x00FF) | |
72 | { | |
73 | /* Write the high byte first */ | |
74 | - | |
75 | - CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1); | |
76 | + Byte = ACPI_HIBYTE(AmlOpcode); | |
77 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
78 | } | |
79 | ||
80 | - CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1); | |
81 | + Byte = ACPI_LOBYTE(AmlOpcode); | |
82 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
83 | ||
84 | /* Subtreelength doesn't include length of package length bytes */ | |
85 | ||
86 | - PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes; | |
87 | + PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes; | |
88 | break; | |
89 | } | |
90 | ||
91 | @@ -333,8 +322,8 @@ CgWriteAmlOpcode ( | |
92 | if (Op->Asl.AmlPkgLenBytes == 1) | |
93 | { | |
94 | /* Simplest case -- no bytes to follow, just write the count */ | |
95 | - | |
96 | - CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1); | |
97 | + Byte = ACPI_LOBYTE(PkgLen); | |
98 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
99 | } | |
100 | else if (Op->Asl.AmlPkgLenBytes != 0) | |
101 | { | |
102 | @@ -344,7 +333,7 @@ CgWriteAmlOpcode ( | |
103 | */ | |
104 | PkgLenFirstByte = (UINT8) | |
105 | (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) | | |
106 | - (PkgLen.LenBytes[0] & 0x0F)); | |
107 | + (PkgLen & 0x0F)); | |
108 | ||
109 | CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1); | |
110 | ||
111 | @@ -352,37 +341,44 @@ CgWriteAmlOpcode ( | |
112 | * Shift the length over by the 4 bits we just stuffed | |
113 | * in the first byte | |
114 | */ | |
115 | - PkgLen.Len >>= 4; | |
116 | + PkgLen >>= 4; | |
117 | ||
118 | /* Now we can write the remaining bytes - either 1, 2, or 3 bytes */ | |
119 | - | |
120 | - for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++) | |
121 | + Byte = ACPI_LOBYTE(PkgLen); | |
122 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
123 | + if (Op->Asl.AmlPkgLenBytes >= 3) | |
124 | + { | |
125 | + Byte = ACPI_HIBYTE(PkgLen); | |
126 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
127 | + } | |
128 | + if (Op->Asl.AmlPkgLenBytes >= 4) | |
129 | { | |
130 | - CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1); | |
131 | + Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen)); | |
132 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
133 | } | |
134 | } | |
135 | } | |
136 | ||
137 | - switch (Aml.Opcode) | |
138 | + switch (AmlOpcode) | |
139 | { | |
140 | case AML_BYTE_OP: | |
141 | - | |
142 | - CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1); | |
143 | + Byte = (UINT8) Op->Asl.Value.Integer; | |
144 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
145 | break; | |
146 | ||
147 | case AML_WORD_OP: | |
148 | - | |
149 | - CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2); | |
150 | + ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer); | |
151 | + CgLocalWriteAmlData (Op, &Word, 2); | |
152 | break; | |
153 | ||
154 | case AML_DWORD_OP: | |
155 | - | |
156 | - CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4); | |
157 | + ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer); | |
158 | + CgLocalWriteAmlData (Op, &DWord, 4); | |
159 | break; | |
160 | ||
161 | case AML_QWORD_OP: | |
162 | - | |
163 | - CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8); | |
164 | + ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer); | |
165 | + CgLocalWriteAmlData (Op, &QWord, 8); | |
166 | break; | |
167 | ||
168 | case AML_STRING_OP: | |
169 | @@ -416,6 +412,7 @@ CgWriteTableHeader ( | |
170 | ACPI_PARSE_OBJECT *Op) | |
171 | { | |
172 | ACPI_PARSE_OBJECT *Child; | |
173 | + UINT32 DWord; | |
174 | ||
175 | ||
176 | /* AML filename */ | |
177 | @@ -452,7 +449,7 @@ CgWriteTableHeader ( | |
178 | /* OEM Revision */ | |
179 | ||
180 | Child = Child->Asl.Next; | |
181 | - TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer; | |
182 | + ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer); | |
183 | ||
184 | /* Compiler ID */ | |
185 | ||
186 | @@ -460,11 +457,12 @@ CgWriteTableHeader ( | |
187 | ||
188 | /* Compiler version */ | |
189 | ||
190 | - TableHeader.AslCompilerRevision = ASL_REVISION; | |
191 | + DWord = ASL_REVISION; | |
192 | + ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord); | |
193 | ||
194 | /* Table length. Checksum zero for now, will rewrite later */ | |
195 | ||
196 | - TableHeader.Length = Gbl_TableLength; | |
197 | + ACPI_MOVE_32_TO_32(&TableHeader.Length, &Gbl_TableLength); | |
198 | TableHeader.Checksum = 0; | |
199 | ||
200 | CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER)); | |
201 | @@ -528,7 +526,10 @@ CgWriteNode ( | |
202 | ACPI_PARSE_OBJECT *Op) | |
203 | { | |
204 | ASL_RESOURCE_NODE *Rnode; | |
205 | - | |
206 | + UINT8 Byte; | |
207 | + UINT16 Word; | |
208 | + UINT32 DWord; | |
209 | + UINT64 QWord; | |
210 | ||
211 | /* Always check for DEFAULT_ARG and other "Noop" nodes */ | |
212 | /* TBD: this may not be the best place for this check */ | |
213 | @@ -546,13 +547,24 @@ CgWriteNode ( | |
214 | switch (Op->Asl.AmlOpcode) | |
215 | { | |
216 | case AML_RAW_DATA_BYTE: | |
217 | + Byte = (UINT8) Op->Asl.Value.Integer; | |
218 | + CgLocalWriteAmlData (Op, &Byte, 1); | |
219 | + return; | |
220 | + | |
221 | case AML_RAW_DATA_WORD: | |
222 | - case AML_RAW_DATA_DWORD: | |
223 | - case AML_RAW_DATA_QWORD: | |
224 | + ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer); | |
225 | + CgLocalWriteAmlData (Op, &Word, 2); | |
226 | + return; | |
227 | ||
228 | - CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength); | |
229 | + case AML_RAW_DATA_DWORD: | |
230 | + ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer); | |
231 | + CgLocalWriteAmlData (Op, &DWord, 4); | |
232 | return; | |
233 | ||
234 | + case AML_RAW_DATA_QWORD: | |
235 | + ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer); | |
236 | + CgLocalWriteAmlData (Op, &QWord, 8); | |
237 | + return; | |
238 | ||
239 | case AML_RAW_DATA_BUFFER: | |
240 | ||
241 | diff -up acpica-unix2-20140424/source/compiler/aslopcodes.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslopcodes.c | |
242 | --- acpica-unix2-20140424/source/compiler/aslopcodes.c.debian-big_endian 2014-04-24 11:48:59.000000000 -0400 | |
243 | +++ acpica-unix2-20140424/source/compiler/aslopcodes.c 2014-06-06 20:43:34.711825238 -0400 | |
244 | @@ -531,6 +479,7 @@ OpcDoUnicode ( | |
245 | UINT32 i; | |
246 | UINT8 *AsciiString; | |
247 | UINT16 *UnicodeString; | |
248 | + UINT16 UChar; | |
249 | ACPI_PARSE_OBJECT *BufferLengthOp; | |
250 | ||
251 | ||
252 | @@ -557,7 +505,8 @@ OpcDoUnicode ( | |
253 | ||
254 | for (i = 0; i < Count; i++) | |
255 | { | |
256 | - UnicodeString[i] = (UINT16) AsciiString[i]; | |
257 | + UChar = (UINT16) AsciiString[i]; | |
258 | + ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar); | |
259 | } | |
260 | ||
261 | /* | |
262 | diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype1.c | |
263 | --- acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
264 | +++ acpica-unix2-20140424/source/compiler/aslrestype1.c 2014-06-06 20:43:34.711825238 -0400 | |
265 | @@ -143,6 +148,11 @@ RsDoMemory24Descriptor ( | |
266 | ACPI_PARSE_OBJECT *LengthOp = NULL; | |
267 | ASL_RESOURCE_NODE *Rnode; | |
268 | UINT32 CurrentByteOffset; | |
269 | + UINT16 Minimum = 0; | |
270 | + UINT16 Maximum = 0; | |
271 | + UINT16 AddressLength = 0; | |
272 | + UINT16 Alignment = 0; | |
273 | + UINT16 ResourceLength; | |
274 | UINT32 i; | |
275 | ||
276 | ||
277 | @@ -152,7 +153,8 @@ RsDoMemory24Descriptor ( | |
278 | ||
279 | Descriptor = Rnode->Buffer; | |
280 | Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24; | |
281 | - Descriptor->Memory24.ResourceLength = 9; | |
282 | + ResourceLength = 9; | |
283 | + ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength); | |
284 | ||
285 | /* Process all child initialization nodes */ | |
286 | ||
287 | @@ -169,7 +169,7 @@ RsDoMemory24Descriptor ( | |
288 | ||
289 | case 1: /* Min Address */ | |
290 | ||
291 | - Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
292 | + Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
293 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
294 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum)); | |
295 | MinOp = InitializerOp; | |
296 | @@ -177,7 +177,7 @@ RsDoMemory24Descriptor ( | |
297 | ||
298 | case 2: /* Max Address */ | |
299 | ||
300 | - Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
301 | + Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
302 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
303 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum)); | |
304 | MaxOp = InitializerOp; | |
305 | @@ -185,14 +185,14 @@ RsDoMemory24Descriptor ( | |
306 | ||
307 | case 3: /* Alignment */ | |
308 | ||
309 | - Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer; | |
310 | + Alignment = (UINT16) InitializerOp->Asl.Value.Integer; | |
311 | RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT, | |
312 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment)); | |
313 | break; | |
314 | ||
315 | case 4: /* Length */ | |
316 | ||
317 | - Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; | |
318 | + AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; | |
319 | RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
320 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength)); | |
321 | LengthOp = InitializerOp; | |
322 | @@ -215,12 +220,17 @@ RsDoMemory24Descriptor ( | |
323 | /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */ | |
324 | ||
325 | RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24, | |
326 | - Descriptor->Memory24.Minimum, | |
327 | - Descriptor->Memory24.Maximum, | |
328 | - Descriptor->Memory24.AddressLength, | |
329 | - Descriptor->Memory24.Alignment, | |
330 | + Minimum, | |
331 | + Maximum, | |
332 | + AddressLength, | |
333 | + Alignment, | |
334 | MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp); | |
335 | ||
336 | + ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum); | |
337 | + ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum); | |
338 | + ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength); | |
339 | + ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment); | |
340 | + | |
341 | return (Rnode); | |
342 | } | |
343 | ||
344 | @@ -249,6 +254,11 @@ RsDoMemory32Descriptor ( | |
345 | ACPI_PARSE_OBJECT *AlignOp = NULL; | |
346 | ASL_RESOURCE_NODE *Rnode; | |
347 | UINT32 CurrentByteOffset; | |
348 | + UINT32 Minimum = 0; | |
349 | + UINT32 Maximum = 0; | |
350 | + UINT32 AddressLength = 0; | |
351 | + UINT32 Alignment = 0; | |
352 | + UINT16 ResourceLength; | |
353 | UINT32 i; | |
354 | ||
355 | ||
356 | @@ -258,7 +259,8 @@ RsDoMemory32Descriptor ( | |
357 | ||
358 | Descriptor = Rnode->Buffer; | |
359 | Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32; | |
360 | - Descriptor->Memory32.ResourceLength = 17; | |
361 | + ResourceLength = 17; | |
362 | + ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength); | |
363 | ||
364 | /* Process all child initialization nodes */ | |
365 | ||
366 | @@ -275,7 +275,7 @@ RsDoMemory32Descriptor ( | |
367 | ||
368 | case 1: /* Min Address */ | |
369 | ||
370 | - Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer; | |
371 | + Minimum = (UINT32) InitializerOp->Asl.Value.Integer; | |
372 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
373 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum)); | |
374 | MinOp = InitializerOp; | |
375 | @@ -283,7 +283,7 @@ RsDoMemory32Descriptor ( | |
376 | ||
377 | case 2: /* Max Address */ | |
378 | ||
379 | - Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer; | |
380 | + Maximum = (UINT32) InitializerOp->Asl.Value.Integer; | |
381 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
382 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum)); | |
383 | MaxOp = InitializerOp; | |
384 | @@ -291,7 +291,7 @@ RsDoMemory32Descriptor ( | |
385 | ||
386 | case 3: /* Alignment */ | |
387 | ||
388 | - Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer; | |
389 | + Alignment = (UINT32) InitializerOp->Asl.Value.Integer; | |
390 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT, | |
391 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment)); | |
392 | AlignOp = InitializerOp; | |
393 | @@ -299,7 +299,7 @@ RsDoMemory32Descriptor ( | |
394 | ||
395 | case 4: /* Length */ | |
396 | ||
397 | - Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; | |
398 | + AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; | |
399 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
400 | CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength)); | |
401 | LengthOp = InitializerOp; | |
402 | @@ -322,12 +327,17 @@ RsDoMemory32Descriptor ( | |
403 | /* Validate the Min/Max/Len/Align values */ | |
404 | ||
405 | RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32, | |
406 | - Descriptor->Memory32.Minimum, | |
407 | - Descriptor->Memory32.Maximum, | |
408 | - Descriptor->Memory32.AddressLength, | |
409 | - Descriptor->Memory32.Alignment, | |
410 | + Minimum, | |
411 | + Maximum, | |
412 | + AddressLength, | |
413 | + Alignment, | |
414 | MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp); | |
415 | ||
416 | + ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum); | |
417 | + ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum); | |
418 | + ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength); | |
419 | + ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment); | |
420 | + | |
421 | return (Rnode); | |
422 | } | |
423 | ||
424 | @@ -352,6 +353,7 @@ RsDoMemory32FixedDescriptor ( | |
425 | ACPI_PARSE_OBJECT *InitializerOp; | |
426 | ASL_RESOURCE_NODE *Rnode; | |
427 | UINT32 CurrentByteOffset; | |
428 | + UINT16 ResourceLength; | |
429 | UINT32 i; | |
430 | ||
431 | ||
432 | @@ -361,7 +362,8 @@ RsDoMemory32FixedDescriptor ( | |
433 | ||
434 | Descriptor = Rnode->Buffer; | |
435 | Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32; | |
436 | - Descriptor->FixedMemory32.ResourceLength = 9; | |
437 | + ResourceLength = 9; | |
438 | + ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength); | |
439 | ||
440 | /* Process all child initialization nodes */ | |
441 | ||
442 | @@ -378,14 +380,16 @@ RsDoMemory32FixedDescriptor ( | |
443 | ||
444 | case 1: /* Address */ | |
445 | ||
446 | - Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer; | |
447 | + ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address, | |
448 | + &InitializerOp->Asl.Value.Integer); | |
449 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS, | |
450 | CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address)); | |
451 | break; | |
452 | ||
453 | case 2: /* Length */ | |
454 | ||
455 | - Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; | |
456 | + ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength, | |
457 | + &InitializerOp->Asl.Value.Integer); | |
458 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
459 | CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); | |
460 | break; | |
461 | diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype1i.c | |
462 | --- acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
463 | +++ acpica-unix2-20140424/source/compiler/aslrestype1i.c 2014-06-06 20:43:34.711825238 -0400 | |
464 | @@ -198,6 +200,8 @@ RsDoFixedDmaDescriptor ( | |
465 | ACPI_PARSE_OBJECT *InitializerOp; | |
466 | ASL_RESOURCE_NODE *Rnode; | |
467 | UINT32 CurrentByteOffset; | |
468 | + UINT16 RequestLines = 0; | |
469 | + UINT16 Channels = 0; | |
470 | UINT32 i; | |
471 | ||
472 | ||
473 | @@ -217,14 +217,14 @@ RsDoFixedDmaDescriptor ( | |
474 | { | |
475 | case 0: /* DMA Request Lines [WORD] (_DMA) */ | |
476 | ||
477 | - Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer; | |
478 | + RequestLines = (UINT16) InitializerOp->Asl.Value.Integer; | |
479 | RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA, | |
480 | CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines)); | |
481 | break; | |
482 | ||
483 | case 1: /* DMA Channel [WORD] (_TYP) */ | |
484 | ||
485 | - Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer; | |
486 | + Channels = (UINT16) InitializerOp->Asl.Value.Integer; | |
487 | RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE, | |
488 | CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels)); | |
489 | break; | |
490 | @@ -249,6 +252,9 @@ RsDoFixedDmaDescriptor ( | |
491 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
492 | } | |
493 | ||
494 | + ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.RequestLines, &RequestLines); | |
495 | + ACPI_MOVE_16_TO_16(&Descriptor->FixedDma.Channels, &Channels); | |
496 | + | |
497 | return (Rnode); | |
498 | } | |
499 | ||
500 | @@ -274,6 +275,7 @@ RsDoFixedIoDescriptor ( | |
501 | ACPI_PARSE_OBJECT *AddressOp = NULL; | |
502 | ASL_RESOURCE_NODE *Rnode; | |
503 | UINT32 CurrentByteOffset; | |
504 | + UINT16 Address = 0; | |
505 | UINT32 i; | |
506 | ||
507 | ||
508 | @@ -293,8 +292,7 @@ RsDoFixedIoDescriptor ( | |
509 | { | |
510 | case 0: /* Base Address */ | |
511 | ||
512 | - Descriptor->FixedIo.Address = | |
513 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
514 | + Address = (UINT16) InitializerOp->Asl.Value.Integer; | |
515 | RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS, | |
516 | CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address)); | |
517 | AddressOp = InitializerOp; | |
518 | @@ -324,11 +326,13 @@ RsDoFixedIoDescriptor ( | |
519 | ||
520 | /* Error checks */ | |
521 | ||
522 | - if (Descriptor->FixedIo.Address > 0x03FF) | |
523 | + if (Address > 0x03FF) | |
524 | { | |
525 | AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL); | |
526 | } | |
527 | ||
528 | + ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address); | |
529 | + | |
530 | return (Rnode); | |
531 | } | |
532 | ||
533 | @@ -357,6 +359,8 @@ RsDoIoDescriptor ( | |
534 | ACPI_PARSE_OBJECT *AlignOp = NULL; | |
535 | ASL_RESOURCE_NODE *Rnode; | |
536 | UINT32 CurrentByteOffset; | |
537 | + UINT16 Minimum = 0; | |
538 | + UINT16 Maximum = 0; | |
539 | UINT32 i; | |
540 | ||
541 | ||
542 | @@ -383,8 +382,7 @@ RsDoIoDescriptor ( | |
543 | ||
544 | case 1: /* Min Address */ | |
545 | ||
546 | - Descriptor->Io.Minimum = | |
547 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
548 | + Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
549 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
550 | CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum)); | |
551 | MinOp = InitializerOp; | |
552 | @@ -392,8 +391,7 @@ RsDoIoDescriptor ( | |
553 | ||
554 | case 2: /* Max Address */ | |
555 | ||
556 | - Descriptor->Io.Maximum = | |
557 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
558 | + Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
559 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
560 | CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum)); | |
561 | MaxOp = InitializerOp; | |
562 | @@ -434,12 +437,15 @@ RsDoIoDescriptor ( | |
563 | /* Validate the Min/Max/Len/Align values */ | |
564 | ||
565 | RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO, | |
566 | - Descriptor->Io.Minimum, | |
567 | - Descriptor->Io.Maximum, | |
568 | + Minimum, | |
569 | + Maximum, | |
570 | Descriptor->Io.AddressLength, | |
571 | Descriptor->Io.Alignment, | |
572 | MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp); | |
573 | ||
574 | + ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum); | |
575 | + ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum); | |
576 | + | |
577 | return (Rnode); | |
578 | } | |
579 | ||
580 | @@ -559,9 +559,9 @@ RsDoIrqDescriptor ( | |
581 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
582 | } | |
583 | ||
584 | - /* Now we can set the channel mask */ | |
585 | + /* Now we can set the interrupt mask */ | |
586 | ||
587 | - Descriptor->Irq.IrqMask = IrqMask; | |
588 | + ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask); | |
589 | return (Rnode); | |
590 | } | |
591 | ||
592 | @@ -660,6 +660,6 @@ RsDoIrqNoFlagsDescriptor ( | |
593 | ||
594 | /* Now we can set the interrupt mask */ | |
595 | ||
596 | - Descriptor->Irq.IrqMask = IrqMask; | |
597 | + ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask); | |
598 | return (Rnode); | |
599 | } | |
600 | diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2.c | |
601 | --- acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
602 | +++ acpica-unix2-20140424/source/compiler/aslrestype2.c 2014-06-06 20:43:34.711825238 -0400 | |
603 | @@ -76,6 +77,7 @@ RsDoGeneralRegisterDescriptor ( | |
604 | ACPI_PARSE_OBJECT *InitializerOp; | |
605 | ASL_RESOURCE_NODE *Rnode; | |
606 | UINT32 CurrentByteOffset; | |
607 | + UINT16 ResourceLength; | |
608 | UINT32 i; | |
609 | ||
610 | ||
611 | @@ -85,7 +87,9 @@ RsDoGeneralRegisterDescriptor ( | |
612 | ||
613 | Descriptor = Rnode->Buffer; | |
614 | Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER; | |
615 | - Descriptor->GenericReg.ResourceLength = 12; | |
616 | + ResourceLength = 12; | |
617 | + ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength, | |
618 | + &ResourceLength); | |
619 | ||
620 | /* Process all child initialization nodes */ | |
621 | ||
622 | @@ -116,7 +117,8 @@ RsDoGeneralRegisterDescriptor ( | |
623 | ||
624 | case 3: /* Register Address */ | |
625 | ||
626 | - Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer; | |
627 | + ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address, | |
628 | + &InitializerOp->Asl.Value.Integer); | |
629 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS, | |
630 | CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address)); | |
631 | break; | |
632 | @@ -171,6 +172,7 @@ RsDoInterruptDescriptor ( | |
633 | AML_RESOURCE *Rover = NULL; | |
634 | ACPI_PARSE_OBJECT *InitializerOp; | |
635 | ASL_RESOURCE_NODE *Rnode; | |
636 | + UINT16 ResourceLength = 0; | |
637 | UINT16 StringLength = 0; | |
638 | UINT32 OptionIndex = 0; | |
639 | UINT32 CurrentByteOffset; | |
640 | @@ -219,7 +219,7 @@ RsDoInterruptDescriptor ( | |
641 | * Initial descriptor length -- may be enlarged if there are | |
642 | * optional fields present | |
643 | */ | |
644 | - Descriptor->ExtendedIrq.ResourceLength = 2; /* Flags and table length byte */ | |
645 | + ResourceLength = 2; /* Flags and table length byte */ | |
646 | Descriptor->ExtendedIrq.InterruptCount = 0; | |
647 | ||
648 | Rover = ACPI_CAST_PTR (AML_RESOURCE, | |
649 | @@ -327,10 +328,11 @@ RsDoInterruptDescriptor ( | |
650 | ||
651 | /* Save the integer and move pointer to the next one */ | |
652 | ||
653 | - Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer; | |
654 | + ACPI_MOVE_64_TO_32(&Rover->DwordItem, | |
655 | + &InitializerOp->Asl.Value.Integer); | |
656 | Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4); | |
657 | Descriptor->ExtendedIrq.InterruptCount++; | |
658 | - Descriptor->ExtendedIrq.ResourceLength += 4; | |
659 | + ResourceLength += 4; | |
660 | ||
661 | /* Case 7: First interrupt number in list */ | |
662 | ||
663 | @@ -366,7 +366,7 @@ RsDoInterruptDescriptor ( | |
664 | { | |
665 | Rover->ByteItem = ResSourceIndex; | |
666 | Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1); | |
667 | - Descriptor->ExtendedIrq.ResourceLength += 1; | |
668 | + ResourceLength += 1; | |
669 | } | |
670 | ||
671 | /* Add optional ResSource string if present */ | |
672 | @@ -378,13 +379,14 @@ RsDoInterruptDescriptor ( | |
673 | Rover = ACPI_ADD_PTR ( | |
674 | AML_RESOURCE, &(Rover->ByteItem), StringLength); | |
675 | ||
676 | - Descriptor->ExtendedIrq.ResourceLength = (UINT16) | |
677 | - (Descriptor->ExtendedIrq.ResourceLength + StringLength); | |
678 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
679 | } | |
680 | ||
681 | Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) - | |
682 | ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType)) | |
683 | + OptionIndex + StringLength; | |
684 | + ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength, | |
685 | + &ResourceLength); | |
686 | return (Rnode); | |
687 | } | |
688 | ||
689 | @@ -432,7 +432,7 @@ RsDoVendorLargeDescriptor ( | |
690 | ||
691 | Descriptor = Rnode->Buffer; | |
692 | Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE; | |
693 | - Descriptor->VendorLarge.ResourceLength = (UINT16) i; | |
694 | + ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i); | |
695 | ||
696 | /* Point to end-of-descriptor for vendor data */ | |
697 | ||
698 | diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2d.c | |
699 | --- acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
700 | +++ acpica-unix2-20140424/source/compiler/aslrestype2d.c 2014-06-06 20:43:34.721825238 -0400 | |
701 | @@ -79,7 +85,13 @@ RsDoDwordIoDescriptor ( | |
702 | ACPI_PARSE_OBJECT *GranOp = NULL; | |
703 | ASL_RESOURCE_NODE *Rnode; | |
704 | UINT16 StringLength = 0; | |
705 | + UINT16 ResourceLength = 0; | |
706 | UINT32 OptionIndex = 0; | |
707 | + UINT32 Minimum = 0; | |
708 | + UINT32 Maximum = 0; | |
709 | + UINT32 AddressLength = 0; | |
710 | + UINT32 Granularity = 0; | |
711 | + UINT32 TranslationOffset = 0; | |
712 | UINT8 *OptionalFields; | |
713 | UINT32 CurrentByteOffset; | |
714 | UINT32 i; | |
715 | @@ -102,8 +101,7 @@ RsDoDwordIoDescriptor ( | |
716 | * optional fields present | |
717 | */ | |
718 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32); | |
719 | - Descriptor->Address32.ResourceLength = (UINT16) | |
720 | - (sizeof (AML_RESOURCE_ADDRESS32) - | |
721 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) - | |
722 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
723 | ||
724 | /* Process all child initialization nodes */ | |
725 | @@ -147,8 +146,7 @@ RsDoDwordIoDescriptor ( | |
726 | ||
727 | case 5: /* Address Granularity */ | |
728 | ||
729 | - Descriptor->Address32.Granularity = | |
730 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
731 | + Granularity = (UINT32) InitializerOp->Asl.Value.Integer; | |
732 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
733 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); | |
734 | GranOp = InitializerOp; | |
735 | @@ -156,8 +155,7 @@ RsDoDwordIoDescriptor ( | |
736 | ||
737 | case 6: /* Address Min */ | |
738 | ||
739 | - Descriptor->Address32.Minimum = | |
740 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
741 | + Minimum = (UINT32) InitializerOp->Asl.Value.Integer; | |
742 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
743 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); | |
744 | MinOp = InitializerOp; | |
745 | @@ -165,8 +164,7 @@ RsDoDwordIoDescriptor ( | |
746 | ||
747 | case 7: /* Address Max */ | |
748 | ||
749 | - Descriptor->Address32.Maximum = | |
750 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
751 | + Maximum = (UINT32) InitializerOp->Asl.Value.Integer; | |
752 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
753 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); | |
754 | MaxOp = InitializerOp; | |
755 | @@ -174,16 +172,14 @@ RsDoDwordIoDescriptor ( | |
756 | ||
757 | case 8: /* Translation Offset */ | |
758 | ||
759 | - Descriptor->Address32.TranslationOffset = | |
760 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
761 | + TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer; | |
762 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
763 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset)); | |
764 | break; | |
765 | ||
766 | case 9: /* Address Length */ | |
767 | ||
768 | - Descriptor->Address32.AddressLength = | |
769 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
770 | + AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; | |
771 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
772 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); | |
773 | LengthOp = InitializerOp; | |
774 | @@ -197,7 +197,7 @@ RsDoDwordIoDescriptor ( | |
775 | ||
776 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
777 | OptionIndex++; | |
778 | - Descriptor->Address32.ResourceLength++; | |
779 | + ResourceLength++; | |
780 | ResSourceIndex = TRUE; | |
781 | } | |
782 | break; | |
783 | @@ -211,8 +210,7 @@ RsDoDwordIoDescriptor ( | |
784 | { | |
785 | /* Found a valid ResourceSource */ | |
786 | ||
787 | - Descriptor->Address32.ResourceLength = (UINT16) | |
788 | - (Descriptor->Address32.ResourceLength + StringLength); | |
789 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
790 | ||
791 | strcpy ((char *) | |
792 | &OptionalFields[OptionIndex], | |
793 | @@ -272,13 +279,20 @@ RsDoDwordIoDescriptor ( | |
794 | /* Validate the Min/Max/Len/Gran values */ | |
795 | ||
796 | RsLargeAddressCheck ( | |
797 | - (UINT64) Descriptor->Address32.Minimum, | |
798 | - (UINT64) Descriptor->Address32.Maximum, | |
799 | - (UINT64) Descriptor->Address32.AddressLength, | |
800 | - (UINT64) Descriptor->Address32.Granularity, | |
801 | + Minimum, | |
802 | + Maximum, | |
803 | + AddressLength, | |
804 | + Granularity, | |
805 | Descriptor->Address32.Flags, | |
806 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
807 | ||
808 | + ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength); | |
809 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum); | |
810 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum); | |
811 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength); | |
812 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity); | |
813 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset); | |
814 | + | |
815 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + | |
816 | OptionIndex + StringLength; | |
817 | return (Rnode); | |
818 | @@ -310,7 +316,13 @@ RsDoDwordMemoryDescriptor ( | |
819 | ASL_RESOURCE_NODE *Rnode; | |
820 | UINT8 *OptionalFields; | |
821 | UINT16 StringLength = 0; | |
822 | + UINT16 ResourceLength = 0; | |
823 | UINT32 OptionIndex = 0; | |
824 | + UINT32 Minimum = 0; | |
825 | + UINT32 Maximum = 0; | |
826 | + UINT32 AddressLength = 0; | |
827 | + UINT32 Granularity = 0; | |
828 | + UINT32 TranslationOffset = 0; | |
829 | UINT32 CurrentByteOffset; | |
830 | UINT32 i; | |
831 | BOOLEAN ResSourceIndex = FALSE; | |
832 | @@ -332,11 +330,9 @@ RsDoDwordMemoryDescriptor ( | |
833 | * optional fields present | |
834 | */ | |
835 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32); | |
836 | - Descriptor->Address32.ResourceLength = (UINT16) | |
837 | - (sizeof (AML_RESOURCE_ADDRESS32) - | |
838 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) - | |
839 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
840 | ||
841 | - | |
842 | /* Process all child initialization nodes */ | |
843 | ||
844 | for (i = 0; InitializerOp; i++) | |
845 | @@ -385,8 +384,7 @@ RsDoDwordMemoryDescriptor ( | |
846 | ||
847 | case 6: /* Address Granularity */ | |
848 | ||
849 | - Descriptor->Address32.Granularity = | |
850 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
851 | + Granularity = (UINT32) InitializerOp->Asl.Value.Integer; | |
852 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
853 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); | |
854 | GranOp = InitializerOp; | |
855 | @@ -394,8 +3926,7 @@ RsDoDwordMemoryDescriptor ( | |
856 | ||
857 | case 7: /* Min Address */ | |
858 | ||
859 | - Descriptor->Address32.Minimum = | |
860 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
861 | + Minimum = (UINT32) InitializerOp->Asl.Value.Integer; | |
862 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
863 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); | |
864 | MinOp = InitializerOp; | |
865 | @@ -403,8 +402,7 @@ RsDoDwordMemoryDescriptor ( | |
866 | ||
867 | case 8: /* Max Address */ | |
868 | ||
869 | - Descriptor->Address32.Maximum = | |
870 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
871 | + Maximum = (UINT32) InitializerOp->Asl.Value.Integer; | |
872 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
873 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); | |
874 | MaxOp = InitializerOp; | |
875 | @@ -412,16 +410,14 @@ RsDoDwordMemoryDescriptor ( | |
876 | ||
877 | case 9: /* Translation Offset */ | |
878 | ||
879 | - Descriptor->Address32.TranslationOffset = | |
880 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
881 | + TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer; | |
882 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
883 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset)); | |
884 | break; | |
885 | ||
886 | case 10: /* Address Length */ | |
887 | ||
888 | - Descriptor->Address32.AddressLength = | |
889 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
890 | + AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; | |
891 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
892 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); | |
893 | LengthOp = InitializerOp; | |
894 | @@ -433,7 +433,7 @@ RsDoDwordMemoryDescriptor ( | |
895 | { | |
896 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
897 | OptionIndex++; | |
898 | - Descriptor->Address32.ResourceLength++; | |
899 | + ResourceLength++; | |
900 | ResSourceIndex = TRUE; | |
901 | } | |
902 | break; | |
903 | @@ -445,8 +445,8 @@ RsDoDwordMemoryDescriptor ( | |
904 | { | |
905 | if (StringLength) | |
906 | { | |
907 | - Descriptor->Address32.ResourceLength = (UINT16) | |
908 | - (Descriptor->Address32.ResourceLength + StringLength); | |
909 | + | |
910 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
911 | ||
912 | strcpy ((char *) | |
913 | &OptionalFields[OptionIndex], | |
914 | @@ -507,13 +514,20 @@ RsDoDwordMemoryDescriptor ( | |
915 | /* Validate the Min/Max/Len/Gran values */ | |
916 | ||
917 | RsLargeAddressCheck ( | |
918 | - (UINT64) Descriptor->Address32.Minimum, | |
919 | - (UINT64) Descriptor->Address32.Maximum, | |
920 | - (UINT64) Descriptor->Address32.AddressLength, | |
921 | - (UINT64) Descriptor->Address32.Granularity, | |
922 | + Minimum, | |
923 | + Maximum, | |
924 | + AddressLength, | |
925 | + Granularity, | |
926 | Descriptor->Address32.Flags, | |
927 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
928 | ||
929 | + ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength); | |
930 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum); | |
931 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum); | |
932 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength); | |
933 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity); | |
934 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset); | |
935 | + | |
936 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + | |
937 | OptionIndex + StringLength; | |
938 | return (Rnode); | |
939 | @@ -545,7 +551,13 @@ RsDoDwordSpaceDescriptor ( | |
940 | ASL_RESOURCE_NODE *Rnode; | |
941 | UINT8 *OptionalFields; | |
942 | UINT16 StringLength = 0; | |
943 | + UINT16 ResourceLength = 0; | |
944 | UINT32 OptionIndex = 0; | |
945 | + UINT32 Minimum = 0; | |
946 | + UINT32 Maximum = 0; | |
947 | + UINT32 AddressLength = 0; | |
948 | + UINT32 Granularity = 0; | |
949 | + UINT32 TranslationOffset = 0; | |
950 | UINT32 CurrentByteOffset; | |
951 | UINT32 i; | |
952 | BOOLEAN ResSourceIndex = FALSE; | |
953 | @@ -566,8 +565,7 @@ RsDoDwordSpaceDescriptor ( | |
954 | * optional fields present | |
955 | */ | |
956 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32); | |
957 | - Descriptor->Address32.ResourceLength = (UINT16) | |
958 | - (sizeof (AML_RESOURCE_ADDRESS32) - | |
959 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) - | |
960 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
961 | ||
962 | /* Process all child initialization nodes */ | |
963 | @@ -616,8 +615,7 @@ RsDoDwordSpaceDescriptor ( | |
964 | ||
965 | case 6: /* Address Granularity */ | |
966 | ||
967 | - Descriptor->Address32.Granularity = | |
968 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
969 | + Granularity = (UINT32) InitializerOp->Asl.Value.Integer; | |
970 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
971 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity)); | |
972 | GranOp = InitializerOp; | |
973 | @@ -625,8 +624,7 @@ RsDoDwordSpaceDescriptor ( | |
974 | ||
975 | case 7: /* Min Address */ | |
976 | ||
977 | - Descriptor->Address32.Minimum = | |
978 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
979 | + Minimum = (UINT32) InitializerOp->Asl.Value.Integer; | |
980 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
981 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum)); | |
982 | MinOp = InitializerOp; | |
983 | @@ -634,8 +633,7 @@ RsDoDwordSpaceDescriptor ( | |
984 | ||
985 | case 8: /* Max Address */ | |
986 | ||
987 | - Descriptor->Address32.Maximum = | |
988 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
989 | + Maximum = (UINT32) InitializerOp->Asl.Value.Integer; | |
990 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
991 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum)); | |
992 | MaxOp = InitializerOp; | |
993 | @@ -643,16 +641,14 @@ RsDoDwordSpaceDescriptor ( | |
994 | ||
995 | case 9: /* Translation Offset */ | |
996 | ||
997 | - Descriptor->Address32.TranslationOffset = | |
998 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
999 | + TranslationOffset = (UINT32) InitializerOp->Asl.Value.Integer; | |
1000 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1001 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset)); | |
1002 | break; | |
1003 | ||
1004 | case 10: /* Address Length */ | |
1005 | ||
1006 | - Descriptor->Address32.AddressLength = | |
1007 | - (UINT32) InitializerOp->Asl.Value.Integer; | |
1008 | + AddressLength = (UINT32) InitializerOp->Asl.Value.Integer; | |
1009 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1010 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength)); | |
1011 | LengthOp = InitializerOp; | |
1012 | @@ -664,7 +664,7 @@ RsDoDwordSpaceDescriptor ( | |
1013 | { | |
1014 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
1015 | OptionIndex++; | |
1016 | - Descriptor->Address32.ResourceLength++; | |
1017 | + ResourceLength++; | |
1018 | ResSourceIndex = TRUE; | |
1019 | } | |
1020 | break; | |
1021 | @@ -676,8 +675,7 @@ RsDoDwordSpaceDescriptor ( | |
1022 | { | |
1023 | if (StringLength) | |
1024 | { | |
1025 | - Descriptor->Address32.ResourceLength = (UINT16) | |
1026 | - (Descriptor->Address32.ResourceLength + StringLength); | |
1027 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
1028 | ||
1029 | strcpy ((char *) | |
1030 | &OptionalFields[OptionIndex], | |
1031 | @@ -724,13 +731,20 @@ RsDoDwordSpaceDescriptor ( | |
1032 | /* Validate the Min/Max/Len/Gran values */ | |
1033 | ||
1034 | RsLargeAddressCheck ( | |
1035 | - (UINT64) Descriptor->Address32.Minimum, | |
1036 | - (UINT64) Descriptor->Address32.Maximum, | |
1037 | - (UINT64) Descriptor->Address32.AddressLength, | |
1038 | - (UINT64) Descriptor->Address32.Granularity, | |
1039 | + Minimum, | |
1040 | + Maximum, | |
1041 | + AddressLength, | |
1042 | + Granularity, | |
1043 | Descriptor->Address32.Flags, | |
1044 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
1045 | ||
1046 | + ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength); | |
1047 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum); | |
1048 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum); | |
1049 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength); | |
1050 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity); | |
1051 | + ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset); | |
1052 | + | |
1053 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + | |
1054 | OptionIndex + StringLength; | |
1055 | return (Rnode); | |
1056 | diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2e.c | |
1057 | --- acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
1058 | +++ acpica-unix2-20140424/source/compiler/aslrestype2e.c 2014-06-06 20:43:34.721825238 -0400 | |
1059 | @@ -78,6 +85,13 @@ RsDoExtendedIoDescriptor ( | |
1060 | ACPI_PARSE_OBJECT *GranOp = NULL; | |
1061 | ASL_RESOURCE_NODE *Rnode; | |
1062 | UINT16 StringLength = 0; | |
1063 | + UINT16 ResourceLength = 0; | |
1064 | + UINT64 Minimum = 0; | |
1065 | + UINT64 Maximum = 0; | |
1066 | + UINT64 AddressLength = 0; | |
1067 | + UINT64 Granularity = 0; | |
1068 | + UINT64 TranslationOffset = 0; | |
1069 | + UINT64 TypeSpecific = 0; | |
1070 | UINT32 CurrentByteOffset; | |
1071 | UINT32 i; | |
1072 | ||
1073 | @@ -94,9 +95,10 @@ RsDoExtendedIoDescriptor ( | |
1074 | Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE; | |
1075 | Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION; | |
1076 | ||
1077 | - Descriptor->ExtAddress64.ResourceLength = (UINT16) | |
1078 | - (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - | |
1079 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - | |
1080 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
1081 | + ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength, | |
1082 | + &ResourceLength); | |
1083 | ||
1084 | /* Process all child initialization nodes */ | |
1085 | ||
1086 | @@ -139,7 +139,7 @@ RsDoExtendedIoDescriptor ( | |
1087 | ||
1088 | case 5: /* Address Granularity */ | |
1089 | ||
1090 | - Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; | |
1091 | + Granularity = InitializerOp->Asl.Value.Integer; | |
1092 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
1093 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); | |
1094 | GranOp = InitializerOp; | |
1095 | @@ -147,7 +147,7 @@ RsDoExtendedIoDescriptor ( | |
1096 | ||
1097 | case 6: /* Address Min */ | |
1098 | ||
1099 | - Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; | |
1100 | + Minimum = InitializerOp->Asl.Value.Integer; | |
1101 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
1102 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); | |
1103 | MinOp = InitializerOp; | |
1104 | @@ -155,7 +155,7 @@ RsDoExtendedIoDescriptor ( | |
1105 | ||
1106 | case 7: /* Address Max */ | |
1107 | ||
1108 | - Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; | |
1109 | + Maximum = InitializerOp->Asl.Value.Integer; | |
1110 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
1111 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); | |
1112 | MaxOp = InitializerOp; | |
1113 | @@ -163,14 +163,14 @@ RsDoExtendedIoDescriptor ( | |
1114 | ||
1115 | case 8: /* Translation Offset */ | |
1116 | ||
1117 | - Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1118 | + TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1119 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1120 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); | |
1121 | break; | |
1122 | ||
1123 | case 9: /* Address Length */ | |
1124 | ||
1125 | - Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; | |
1126 | + AddressLength = InitializerOp->Asl.Value.Integer; | |
1127 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1128 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); | |
1129 | LengthOp = InitializerOp; | |
1130 | @@ -178,7 +178,7 @@ RsDoExtendedIoDescriptor ( | |
1131 | ||
1132 | case 10: /* Type-Specific Attributes */ | |
1133 | ||
1134 | - Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; | |
1135 | + TypeSpecific = InitializerOp->Asl.Value.Integer; | |
1136 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, | |
1137 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); | |
1138 | break; | |
1139 | @@ -214,13 +221,20 @@ RsDoExtendedIoDescriptor ( | |
1140 | /* Validate the Min/Max/Len/Gran values */ | |
1141 | ||
1142 | RsLargeAddressCheck ( | |
1143 | - Descriptor->ExtAddress64.Minimum, | |
1144 | - Descriptor->ExtAddress64.Maximum, | |
1145 | - Descriptor->ExtAddress64.AddressLength, | |
1146 | - Descriptor->ExtAddress64.Granularity, | |
1147 | + Minimum, | |
1148 | + Maximum, | |
1149 | + AddressLength, | |
1150 | + Granularity, | |
1151 | Descriptor->ExtAddress64.Flags, | |
1152 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
1153 | ||
1154 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum); | |
1155 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum); | |
1156 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength); | |
1157 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity); | |
1158 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset); | |
1159 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific); | |
1160 | + | |
1161 | Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + | |
1162 | StringLength; | |
1163 | return (Rnode); | |
1164 | } | |
1165 | @@ -254,6 +270,13 @@ RsDoExtendedMemoryDescriptor ( | |
1166 | ACPI_PARSE_OBJECT *GranOp = NULL; | |
1167 | ASL_RESOURCE_NODE *Rnode; | |
1168 | UINT16 StringLength = 0; | |
1169 | + UINT16 ResourceLength = 0; | |
1170 | + UINT64 Minimum = 0; | |
1171 | + UINT64 Maximum = 0; | |
1172 | + UINT64 AddressLength = 0; | |
1173 | + UINT64 Granularity = 0; | |
1174 | + UINT64 TranslationOffset = 0; | |
1175 | + UINT64 TypeSpecific = 0; | |
1176 | UINT32 CurrentByteOffset; | |
1177 | UINT32 i; | |
1178 | ||
1179 | @@ -268,9 +291,10 @@ RsDoExtendedMemoryDescriptor ( | |
1180 | Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE; | |
1181 | Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION; | |
1182 | ||
1183 | - Descriptor->ExtAddress64.ResourceLength = (UINT16) | |
1184 | - (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - | |
1185 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - | |
1186 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
1187 | + ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength, | |
1188 | + &ResourceLength); | |
1189 | ||
1190 | /* Process all child initialization nodes */ | |
1191 | ||
1192 | @@ -320,7 +344,7 @@ RsDoExtendedMemoryDescriptor ( | |
1193 | ||
1194 | case 6: /* Address Granularity */ | |
1195 | ||
1196 | - Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; | |
1197 | + Granularity = InitializerOp->Asl.Value.Integer; | |
1198 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
1199 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); | |
1200 | GranOp = InitializerOp; | |
1201 | @@ -328,7 +352,7 @@ RsDoExtendedMemoryDescriptor ( | |
1202 | ||
1203 | case 7: /* Min Address */ | |
1204 | ||
1205 | - Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; | |
1206 | + Minimum = InitializerOp->Asl.Value.Integer; | |
1207 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
1208 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); | |
1209 | MinOp = InitializerOp; | |
1210 | @@ -336,7 +360,7 @@ RsDoExtendedMemoryDescriptor ( | |
1211 | ||
1212 | case 8: /* Max Address */ | |
1213 | ||
1214 | - Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; | |
1215 | + Maximum = InitializerOp->Asl.Value.Integer; | |
1216 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
1217 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); | |
1218 | MaxOp = InitializerOp; | |
1219 | @@ -344,14 +368,14 @@ RsDoExtendedMemoryDescriptor ( | |
1220 | ||
1221 | case 9: /* Translation Offset */ | |
1222 | ||
1223 | - Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1224 | + TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1225 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1226 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); | |
1227 | break; | |
1228 | ||
1229 | case 10: /* Address Length */ | |
1230 | ||
1231 | - Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; | |
1232 | + AddressLength = InitializerOp->Asl.Value.Integer; | |
1233 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1234 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); | |
1235 | LengthOp = InitializerOp; | |
1236 | @@ -359,7 +383,7 @@ RsDoExtendedMemoryDescriptor ( | |
1237 | ||
1238 | case 11: /* Type-Specific Attributes */ | |
1239 | ||
1240 | - Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; | |
1241 | + TypeSpecific = InitializerOp->Asl.Value.Integer; | |
1242 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, | |
1243 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); | |
1244 | break; | |
1245 | @@ -396,13 +420,20 @@ RsDoExtendedMemoryDescriptor ( | |
1246 | /* Validate the Min/Max/Len/Gran values */ | |
1247 | ||
1248 | RsLargeAddressCheck ( | |
1249 | - Descriptor->ExtAddress64.Minimum, | |
1250 | - Descriptor->ExtAddress64.Maximum, | |
1251 | - Descriptor->ExtAddress64.AddressLength, | |
1252 | - Descriptor->ExtAddress64.Granularity, | |
1253 | + Minimum, | |
1254 | + Maximum, | |
1255 | + AddressLength, | |
1256 | + Granularity, | |
1257 | Descriptor->ExtAddress64.Flags, | |
1258 | MinOp, MaxOp, LengthOp, GranOp, Op); | |
1259 | ||
1260 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum); | |
1261 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum); | |
1262 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength); | |
1263 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity); | |
1264 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset); | |
1265 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific); | |
1266 | + | |
1267 | Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; | |
1268 | return (Rnode); | |
1269 | } | |
1270 | @@ -435,6 +466,13 @@ RsDoExtendedSpaceDescriptor ( | |
1271 | ACPI_PARSE_OBJECT *GranOp = NULL; | |
1272 | ASL_RESOURCE_NODE *Rnode; | |
1273 | UINT16 StringLength = 0; | |
1274 | + UINT16 ResourceLength = 0; | |
1275 | + UINT64 Minimum = 0; | |
1276 | + UINT64 Maximum = 0; | |
1277 | + UINT64 AddressLength = 0; | |
1278 | + UINT64 Granularity = 0; | |
1279 | + UINT64 TranslationOffset = 0; | |
1280 | + UINT64 TypeSpecific = 0; | |
1281 | UINT32 i; | |
1282 | ||
1283 | ||
1284 | @@ -448,9 +486,10 @@ RsDoExtendedSpaceDescriptor ( | |
1285 | Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64; | |
1286 | Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION; | |
1287 | ||
1288 | - Descriptor->ExtAddress64.ResourceLength = (UINT16) | |
1289 | - (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - | |
1290 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - | |
1291 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
1292 | + ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength, | |
1293 | + &ResourceLength); | |
1294 | ||
1295 | /* Process all child initialization nodes */ | |
1296 | ||
1297 | @@ -498,7 +537,7 @@ RsDoExtendedSpaceDescriptor ( | |
1298 | ||
1299 | case 6: /* Address Granularity */ | |
1300 | ||
1301 | - Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; | |
1302 | + Granularity = InitializerOp->Asl.Value.Integer; | |
1303 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
1304 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); | |
1305 | GranOp = InitializerOp; | |
1306 | @@ -506,7 +545,7 @@ RsDoExtendedSpaceDescriptor ( | |
1307 | ||
1308 | case 7: /* Min Address */ | |
1309 | ||
1310 | - Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; | |
1311 | + Minimum = InitializerOp->Asl.Value.Integer; | |
1312 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
1313 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); | |
1314 | MinOp = InitializerOp; | |
1315 | @@ -514,7 +553,7 @@ RsDoExtendedSpaceDescriptor ( | |
1316 | ||
1317 | case 8: /* Max Address */ | |
1318 | ||
1319 | - Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; | |
1320 | + Maximum = InitializerOp->Asl.Value.Integer; | |
1321 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
1322 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); | |
1323 | MaxOp = InitializerOp; | |
1324 | @@ -522,14 +561,14 @@ RsDoExtendedSpaceDescriptor ( | |
1325 | ||
1326 | case 9: /* Translation Offset */ | |
1327 | ||
1328 | - Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1329 | + TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1330 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1331 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); | |
1332 | break; | |
1333 | ||
1334 | case 10: /* Address Length */ | |
1335 | ||
1336 | - Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; | |
1337 | + AddressLength = InitializerOp->Asl.Value.Integer; | |
1338 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1339 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); | |
1340 | LengthOp = InitializerOp; | |
1341 | @@ -537,7 +576,7 @@ RsDoExtendedSpaceDescriptor ( | |
1342 | ||
1343 | case 11: /* Type-Specific Attributes */ | |
1344 | ||
1345 | - Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; | |
1346 | + TypeSpecific = InitializerOp->Asl.Value.Integer; | |
1347 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, | |
1348 | CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); | |
1349 | break; | |
1350 | @@ -559,13 +598,20 @@ RsDoExtendedSpaceDescriptor ( | |
1351 | /* Validate the Min/Max/Len/Gran values */ | |
1352 | ||
1353 | RsLargeAddressCheck ( | |
1354 | - Descriptor->ExtAddress64.Minimum, | |
1355 | - Descriptor->ExtAddress64.Maximum, | |
1356 | - Descriptor->ExtAddress64.AddressLength, | |
1357 | - Descriptor->ExtAddress64.Granularity, | |
1358 | + Minimum, | |
1359 | + Maximum, | |
1360 | + AddressLength, | |
1361 | + Granularity, | |
1362 | Descriptor->ExtAddress64.Flags, | |
1363 | MinOp, MaxOp, LengthOp, GranOp, Op); | |
1364 | ||
1365 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum); | |
1366 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum); | |
1367 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength); | |
1368 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity); | |
1369 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset); | |
1370 | + ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific); | |
1371 | + | |
1372 | Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; | |
1373 | return (Rnode); | |
1374 | } | |
1375 | diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2q.c | |
1376 | --- acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
1377 | +++ acpica-unix2-20140424/source/compiler/aslrestype2q.c 2014-06-06 20:43:34.721825238 -0400 | |
1378 | @@ -80,7 +86,13 @@ RsDoQwordIoDescriptor ( | |
1379 | ASL_RESOURCE_NODE *Rnode; | |
1380 | UINT8 *OptionalFields; | |
1381 | UINT16 StringLength = 0; | |
1382 | + UINT16 ResourceLength = 0; | |
1383 | UINT32 OptionIndex = 0; | |
1384 | + UINT64 Minimum = 0; | |
1385 | + UINT64 Maximum = 0; | |
1386 | + UINT64 AddressLength = 0; | |
1387 | + UINT64 Granularity = 0; | |
1388 | + UINT64 TranslationOffset = 0; | |
1389 | UINT32 CurrentByteOffset; | |
1390 | UINT32 i; | |
1391 | BOOLEAN ResSourceIndex = FALSE; | |
1392 | @@ -102,8 +101,7 @@ RsDoQwordIoDescriptor ( | |
1393 | * optional fields present | |
1394 | */ | |
1395 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64); | |
1396 | - Descriptor->Address64.ResourceLength = (UINT16) | |
1397 | - (sizeof (AML_RESOURCE_ADDRESS64) - | |
1398 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) - | |
1399 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
1400 | ||
1401 | /* Process all child initialization nodes */ | |
1402 | @@ -147,7 +147,7 @@ RsDoQwordIoDescriptor ( | |
1403 | ||
1404 | case 5: /* Address Granularity */ | |
1405 | ||
1406 | - Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer; | |
1407 | + Granularity = InitializerOp->Asl.Value.Integer; | |
1408 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
1409 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); | |
1410 | GranOp = InitializerOp; | |
1411 | @@ -155,7 +155,7 @@ RsDoQwordIoDescriptor ( | |
1412 | ||
1413 | case 6: /* Address Min */ | |
1414 | ||
1415 | - Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer; | |
1416 | + Minimum = InitializerOp->Asl.Value.Integer; | |
1417 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
1418 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); | |
1419 | MinOp = InitializerOp; | |
1420 | @@ -163,7 +163,7 @@ RsDoQwordIoDescriptor ( | |
1421 | ||
1422 | case 7: /* Address Max */ | |
1423 | ||
1424 | - Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer; | |
1425 | + Maximum = InitializerOp->Asl.Value.Integer; | |
1426 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
1427 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); | |
1428 | MaxOp = InitializerOp; | |
1429 | @@ -171,14 +171,14 @@ RsDoQwordIoDescriptor ( | |
1430 | ||
1431 | case 8: /* Translation Offset */ | |
1432 | ||
1433 | - Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1434 | + TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1435 | RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1436 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset)); | |
1437 | break; | |
1438 | ||
1439 | case 9: /* Address Length */ | |
1440 | ||
1441 | - Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer; | |
1442 | + AddressLength = InitializerOp->Asl.Value.Integer; | |
1443 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1444 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); | |
1445 | LengthOp = InitializerOp; | |
1446 | @@ -190,7 +190,7 @@ RsDoQwordIoDescriptor ( | |
1447 | { | |
1448 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
1449 | OptionIndex++; | |
1450 | - Descriptor->Address64.ResourceLength++; | |
1451 | + ResourceLength++; | |
1452 | ResSourceIndex = TRUE; | |
1453 | } | |
1454 | break; | |
1455 | @@ -202,8 +201,7 @@ RsDoQwordIoDescriptor ( | |
1456 | { | |
1457 | if (StringLength) | |
1458 | { | |
1459 | - Descriptor->Address64.ResourceLength = (UINT16) | |
1460 | - (Descriptor->Address64.ResourceLength + StringLength); | |
1461 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
1462 | ||
1463 | strcpy ((char *) | |
1464 | &OptionalFields[OptionIndex], | |
1465 | @@ -263,13 +270,20 @@ RsDoQwordIoDescriptor ( | |
1466 | /* Validate the Min/Max/Len/Gran values */ | |
1467 | ||
1468 | RsLargeAddressCheck ( | |
1469 | - Descriptor->Address64.Minimum, | |
1470 | - Descriptor->Address64.Maximum, | |
1471 | - Descriptor->Address64.AddressLength, | |
1472 | - Descriptor->Address64.Granularity, | |
1473 | + Minimum, | |
1474 | + Maximum, | |
1475 | + AddressLength, | |
1476 | + Granularity, | |
1477 | Descriptor->Address64.Flags, | |
1478 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
1479 | ||
1480 | + ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength); | |
1481 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum); | |
1482 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum); | |
1483 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength); | |
1484 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity); | |
1485 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset); | |
1486 | + | |
1487 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + | |
1488 | OptionIndex + StringLength; | |
1489 | return (Rnode); | |
1490 | @@ -301,7 +307,13 @@ RsDoQwordMemoryDescriptor ( | |
1491 | ASL_RESOURCE_NODE *Rnode; | |
1492 | UINT8 *OptionalFields; | |
1493 | UINT16 StringLength = 0; | |
1494 | + UINT16 ResourceLength = 0; | |
1495 | UINT32 OptionIndex = 0; | |
1496 | + UINT64 Minimum = 0; | |
1497 | + UINT64 Maximum = 0; | |
1498 | + UINT64 AddressLength = 0; | |
1499 | + UINT64 Granularity = 0; | |
1500 | + UINT64 TranslationOffset = 0; | |
1501 | UINT32 CurrentByteOffset; | |
1502 | UINT32 i; | |
1503 | BOOLEAN ResSourceIndex = FALSE; | |
1504 | @@ -323,8 +322,7 @@ RsDoQwordMemoryDescriptor ( | |
1505 | * optional fields present | |
1506 | */ | |
1507 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64); | |
1508 | - Descriptor->Address64.ResourceLength = (UINT16) | |
1509 | - (sizeof (AML_RESOURCE_ADDRESS64) - | |
1510 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) - | |
1511 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
1512 | ||
1513 | /* Process all child initialization nodes */ | |
1514 | @@ -375,7 +375,7 @@ RsDoQwordMemoryDescriptor ( | |
1515 | ||
1516 | case 6: /* Address Granularity */ | |
1517 | ||
1518 | - Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer; | |
1519 | + Granularity = InitializerOp->Asl.Value.Integer; | |
1520 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
1521 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); | |
1522 | GranOp = InitializerOp; | |
1523 | @@ -383,7 +383,7 @@ RsDoQwordMemoryDescriptor ( | |
1524 | ||
1525 | case 7: /* Min Address */ | |
1526 | ||
1527 | - Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer; | |
1528 | + Minimum = InitializerOp->Asl.Value.Integer; | |
1529 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
1530 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); | |
1531 | MinOp = InitializerOp; | |
1532 | @@ -391,7 +391,7 @@ RsDoQwordMemoryDescriptor ( | |
1533 | ||
1534 | case 8: /* Max Address */ | |
1535 | ||
1536 | - Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer; | |
1537 | + Maximum = InitializerOp->Asl.Value.Integer; | |
1538 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
1539 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); | |
1540 | MaxOp = InitializerOp; | |
1541 | @@ -399,14 +399,14 @@ RsDoQwordMemoryDescriptor ( | |
1542 | ||
1543 | case 9: /* Translation Offset */ | |
1544 | ||
1545 | - Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1546 | + TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1547 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1548 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset)); | |
1549 | break; | |
1550 | ||
1551 | case 10: /* Address Length */ | |
1552 | ||
1553 | - Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer; | |
1554 | + AddressLength = InitializerOp->Asl.Value.Integer; | |
1555 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1556 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); | |
1557 | LengthOp = InitializerOp; | |
1558 | @@ -418,7 +418,7 @@ RsDoQwordMemoryDescriptor ( | |
1559 | { | |
1560 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
1561 | OptionIndex++; | |
1562 | - Descriptor->Address64.ResourceLength++; | |
1563 | + ResourceLength++; | |
1564 | ResSourceIndex = TRUE; | |
1565 | } | |
1566 | break; | |
1567 | @@ -430,8 +429,7 @@ RsDoQwordMemoryDescriptor ( | |
1568 | { | |
1569 | if (StringLength) | |
1570 | { | |
1571 | - Descriptor->Address64.ResourceLength = (UINT16) | |
1572 | - (Descriptor->Address64.ResourceLength + StringLength); | |
1573 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
1574 | ||
1575 | strcpy ((char *) | |
1576 | &OptionalFields[OptionIndex], | |
1577 | @@ -492,13 +499,20 @@ RsDoQwordMemoryDescriptor ( | |
1578 | /* Validate the Min/Max/Len/Gran values */ | |
1579 | ||
1580 | RsLargeAddressCheck ( | |
1581 | - Descriptor->Address64.Minimum, | |
1582 | - Descriptor->Address64.Maximum, | |
1583 | - Descriptor->Address64.AddressLength, | |
1584 | - Descriptor->Address64.Granularity, | |
1585 | + Minimum, | |
1586 | + Maximum, | |
1587 | + AddressLength, | |
1588 | + Granularity, | |
1589 | Descriptor->Address64.Flags, | |
1590 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
1591 | ||
1592 | + ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength); | |
1593 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum); | |
1594 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum); | |
1595 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength); | |
1596 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity); | |
1597 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset); | |
1598 | + | |
1599 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + | |
1600 | OptionIndex + StringLength; | |
1601 | return (Rnode); | |
1602 | @@ -530,9 +536,15 @@ RsDoQwordSpaceDescriptor ( | |
1603 | ASL_RESOURCE_NODE *Rnode; | |
1604 | UINT8 *OptionalFields; | |
1605 | UINT16 StringLength = 0; | |
1606 | + UINT16 ResourceLength = 0; | |
1607 | UINT32 OptionIndex = 0; | |
1608 | UINT32 CurrentByteOffset; | |
1609 | UINT32 i; | |
1610 | + UINT64 Minimum = 0; | |
1611 | + UINT64 Maximum = 0; | |
1612 | + UINT64 AddressLength = 0; | |
1613 | + UINT64 Granularity = 0; | |
1614 | + UINT64 TranslationOffset = 0; | |
1615 | BOOLEAN ResSourceIndex = FALSE; | |
1616 | ||
1617 | ||
1618 | @@ -551,8 +550,7 @@ RsDoQwordSpaceDescriptor ( | |
1619 | * optional fields present | |
1620 | */ | |
1621 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64); | |
1622 | - Descriptor->Address64.ResourceLength = (UINT16) | |
1623 | - (sizeof (AML_RESOURCE_ADDRESS64) - | |
1624 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) - | |
1625 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
1626 | ||
1627 | /* Process all child initialization nodes */ | |
1628 | @@ -601,7 +601,7 @@ RsDoQwordSpaceDescriptor ( | |
1629 | ||
1630 | case 6: /* Address Granularity */ | |
1631 | ||
1632 | - Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer; | |
1633 | + Granularity = InitializerOp->Asl.Value.Integer; | |
1634 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
1635 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity)); | |
1636 | GranOp = InitializerOp; | |
1637 | @@ -609,7 +609,7 @@ RsDoQwordSpaceDescriptor ( | |
1638 | ||
1639 | case 7: /* Min Address */ | |
1640 | ||
1641 | - Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer; | |
1642 | + Minimum = InitializerOp->Asl.Value.Integer; | |
1643 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
1644 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum)); | |
1645 | MinOp = InitializerOp; | |
1646 | @@ -617,7 +617,7 @@ RsDoQwordSpaceDescriptor ( | |
1647 | ||
1648 | case 8: /* Max Address */ | |
1649 | ||
1650 | - Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer; | |
1651 | + Maximum = InitializerOp->Asl.Value.Integer; | |
1652 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
1653 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum)); | |
1654 | MaxOp = InitializerOp; | |
1655 | @@ -625,14 +625,14 @@ RsDoQwordSpaceDescriptor ( | |
1656 | ||
1657 | case 9: /* Translation Offset */ | |
1658 | ||
1659 | - Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1660 | + TranslationOffset = InitializerOp->Asl.Value.Integer; | |
1661 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
1662 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset)); | |
1663 | break; | |
1664 | ||
1665 | case 10: /* Address Length */ | |
1666 | ||
1667 | - Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer; | |
1668 | + AddressLength = InitializerOp->Asl.Value.Integer; | |
1669 | RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1670 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength)); | |
1671 | LengthOp = InitializerOp; | |
1672 | @@ -644,7 +644,7 @@ RsDoQwordSpaceDescriptor ( | |
1673 | { | |
1674 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
1675 | OptionIndex++; | |
1676 | - Descriptor->Address64.ResourceLength++; | |
1677 | + ResourceLength++; | |
1678 | ResSourceIndex = TRUE; | |
1679 | } | |
1680 | break; | |
1681 | @@ -656,8 +655,7 @@ RsDoQwordSpaceDescriptor ( | |
1682 | { | |
1683 | if (StringLength) | |
1684 | { | |
1685 | - Descriptor->Address64.ResourceLength = (UINT16) | |
1686 | - (Descriptor->Address64.ResourceLength + StringLength); | |
1687 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
1688 | ||
1689 | strcpy ((char *) | |
1690 | &OptionalFields[OptionIndex], | |
1691 | @@ -703,13 +710,20 @@ RsDoQwordSpaceDescriptor ( | |
1692 | /* Validate the Min/Max/Len/Gran values */ | |
1693 | ||
1694 | RsLargeAddressCheck ( | |
1695 | - Descriptor->Address64.Minimum, | |
1696 | - Descriptor->Address64.Maximum, | |
1697 | - Descriptor->Address64.AddressLength, | |
1698 | - Descriptor->Address64.Granularity, | |
1699 | + Minimum, | |
1700 | + Maximum, | |
1701 | + AddressLength, | |
1702 | + Granularity, | |
1703 | Descriptor->Address64.Flags, | |
1704 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
1705 | ||
1706 | + ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength); | |
1707 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum); | |
1708 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum); | |
1709 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength); | |
1710 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity); | |
1711 | + ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset); | |
1712 | + | |
1713 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + | |
1714 | OptionIndex + StringLength; | |
1715 | return (Rnode); | |
1716 | diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2s.c | |
1717 | --- acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
1718 | +++ acpica-unix2-20140424/source/compiler/aslrestype2s.c 2014-06-06 20:43:34.721825238 -0400 | |
1719 | @@ -290,6 +293,9 @@ RsDoGpioIntDescriptor ( | |
1720 | UINT16 VendorLength; | |
1721 | UINT16 InterruptLength; | |
1722 | UINT16 DescriptorSize; | |
1723 | + UINT16 IntFlags = 0; | |
1724 | + UINT16 DebounceTimeout = 0; | |
1725 | + UINT16 Flags = 0; | |
1726 | UINT32 CurrentByteOffset; | |
1727 | UINT32 PinCount = 0; | |
1728 | UINT32 i; | |
1729 | @@ -349,21 +349,21 @@ RsDoGpioIntDescriptor ( | |
1730 | { | |
1731 | case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */ | |
1732 | ||
1733 | - RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0); | |
1734 | + RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0); | |
1735 | RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE, | |
1736 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0); | |
1737 | break; | |
1738 | ||
1739 | case 1: /* Interrupt Polarity - Active high/low [Flags] (_POL) */ | |
1740 | ||
1741 | - RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 1, 0); | |
1742 | + RsSetFlagBits16 (&IntFlags, InitializerOp, 1, 0); | |
1743 | RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_POLARITY, | |
1744 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 1, 2); | |
1745 | break; | |
1746 | ||
1747 | case 2: /* Share Type - Default: exclusive (0) [Flags] (_SHR) */ | |
1748 | ||
1749 | - RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0); | |
1750 | + RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0); | |
1751 | RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE, | |
1752 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2); | |
1753 | break; | |
1754 | @@ -377,7 +377,7 @@ RsDoGpioIntDescriptor ( | |
1755 | ||
1756 | case 4: /* Debounce Timeout [WORD] (_DBT) */ | |
1757 | ||
1758 | - Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer; | |
1759 | + DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer; | |
1760 | RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME, | |
1761 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout)); | |
1762 | break; | |
1763 | @@ -403,7 +403,7 @@ RsDoGpioIntDescriptor ( | |
1764 | ||
1765 | case 7: /* Resource Usage (consumer/producer) */ | |
1766 | ||
1767 | - RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1); | |
1768 | + RsSetFlagBits16 (&Flags, InitializerOp, 0, 1); | |
1769 | break; | |
1770 | ||
1771 | case 8: /* Resource Tag (Descriptor Name) */ | |
1772 | @@ -468,6 +472,10 @@ RsDoGpioIntDescriptor ( | |
1773 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
1774 | } | |
1775 | ||
1776 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags); | |
1777 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout); | |
1778 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags); | |
1779 | + | |
1780 | MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource); | |
1781 | return (Rnode); | |
1782 | } | |
1783 | @@ -500,6 +504,10 @@ RsDoGpioIoDescriptor ( | |
1784 | UINT16 VendorLength; | |
1785 | UINT16 InterruptLength; | |
1786 | UINT16 DescriptorSize; | |
1787 | + UINT16 IntFlags = 0; | |
1788 | + UINT16 DebounceTimeout = 0; | |
1789 | + UINT16 DriveStrength = 0; | |
1790 | + UINT16 Flags = 0; | |
1791 | UINT32 CurrentByteOffset; | |
1792 | UINT32 PinCount = 0; | |
1793 | UINT32 i; | |
1794 | @@ -560,7 +560,7 @@ RsDoGpioIoDescriptor ( | |
1795 | { | |
1796 | case 0: /* Share Type [Flags] (_SHR) */ | |
1797 | ||
1798 | - RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 3, 0); | |
1799 | + RsSetFlagBits16 (&IntFlags, InitializerOp, 3, 0); | |
1800 | RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE, | |
1801 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3); | |
1802 | break; | |
1803 | @@ -574,21 +574,21 @@ RsDoGpioIoDescriptor ( | |
1804 | ||
1805 | case 2: /* Debounce Timeout [WORD] (_DBT) */ | |
1806 | ||
1807 | - Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer; | |
1808 | + DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer; | |
1809 | RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME, | |
1810 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout)); | |
1811 | break; | |
1812 | ||
1813 | case 3: /* Drive Strength [WORD] (_DRS) */ | |
1814 | ||
1815 | - Descriptor->Gpio.DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer; | |
1816 | + DriveStrength = (UINT16) InitializerOp->Asl.Value.Integer; | |
1817 | RsCreateWordField (InitializerOp, ACPI_RESTAG_DRIVESTRENGTH, | |
1818 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DriveStrength)); | |
1819 | break; | |
1820 | ||
1821 | case 4: /* I/O Restriction [Flag] (_IOR) */ | |
1822 | ||
1823 | - RsSetFlagBits16 (&Descriptor->Gpio.IntFlags, InitializerOp, 0, 0); | |
1824 | + RsSetFlagBits16 (&IntFlags, InitializerOp, 0, 0); | |
1825 | RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION, | |
1826 | CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2); | |
1827 | break; | |
1828 | @@ -614,7 +614,7 @@ RsDoGpioIoDescriptor ( | |
1829 | ||
1830 | case 7: /* Resource Usage (consumer/producer) */ | |
1831 | ||
1832 | - RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1); | |
1833 | + RsSetFlagBits16 (&Flags, InitializerOp, 0, 1); | |
1834 | break; | |
1835 | ||
1836 | case 8: /* Resource Tag (Descriptor Name) */ | |
1837 | @@ -678,6 +683,11 @@ RsDoGpioIoDescriptor ( | |
1838 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
1839 | } | |
1840 | ||
1841 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.IntFlags, &IntFlags); | |
1842 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout); | |
1843 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength); | |
1844 | + ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags); | |
1845 | + | |
1846 | MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource); | |
1847 | return (Rnode); | |
1848 | } | |
1849 | @@ -707,6 +710,9 @@ RsDoI2cSerialBusDescriptor ( | |
1850 | UINT16 ResSourceLength; | |
1851 | UINT16 VendorLength; | |
1852 | UINT16 DescriptorSize; | |
1853 | + UINT16 SlaveAddress = 0; | |
1854 | + UINT32 ConnectionSpeed = 0; | |
1855 | + UINT16 TypeSpecificFlags = 0; | |
1856 | UINT32 CurrentByteOffset; | |
1857 | UINT32 i; | |
1858 | ||
1859 | @@ -756,7 +756,7 @@ RsDoI2cSerialBusDescriptor ( | |
1860 | { | |
1861 | case 0: /* Slave Address [WORD] (_ADR) */ | |
1862 | ||
1863 | - Descriptor->I2cSerialBus.SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer; | |
1864 | + SlaveAddress = (UINT16) InitializerOp->Asl.Value.Integer; | |
1865 | RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS, | |
1866 | CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress)); | |
1867 | break; | |
1868 | @@ -770,14 +770,14 @@ RsDoI2cSerialBusDescriptor ( | |
1869 | ||
1870 | case 2: /* Connection Speed [DWORD] (_SPE) */ | |
1871 | ||
1872 | - Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer; | |
1873 | + ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer; | |
1874 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, | |
1875 | CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed)); | |
1876 | break; | |
1877 | ||
1878 | case 3: /* Addressing Mode [Flag] (_MOD) */ | |
1879 | ||
1880 | - RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0); | |
1881 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0); | |
1882 | RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE, | |
1883 | CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0); | |
1884 | break; | |
1885 | @@ -825,6 +828,9 @@ RsDoI2cSerialBusDescriptor ( | |
1886 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
1887 | } | |
1888 | ||
1889 | + ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.SlaveAddress, &SlaveAddress); | |
1890 | + ACPI_MOVE_32_TO_32(&Descriptor->I2cSerialBus.ConnectionSpeed, &ConnectionSpeed); | |
1891 | + ACPI_MOVE_16_TO_16(&Descriptor->I2cSerialBus.TypeSpecificFlags, &TypeSpecificFlags); | |
1892 | MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource); | |
1893 | return (Rnode); | |
1894 | } | |
1895 | @@ -854,6 +857,9 @@ RsDoSpiSerialBusDescriptor ( | |
1896 | UINT16 ResSourceLength; | |
1897 | UINT16 VendorLength; | |
1898 | UINT16 DescriptorSize; | |
1899 | + UINT16 DeviceSelection = 0; | |
1900 | + UINT32 ConnectionSpeed = 0; | |
1901 | + UINT16 TypeSpecificFlags = 0; | |
1902 | UINT32 CurrentByteOffset; | |
1903 | UINT32 i; | |
1904 | ||
1905 | @@ -903,21 +903,21 @@ RsDoSpiSerialBusDescriptor ( | |
1906 | { | |
1907 | case 0: /* Device Selection [WORD] (_ADR) */ | |
1908 | ||
1909 | - Descriptor->SpiSerialBus.DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer; | |
1910 | + DeviceSelection = (UINT16) InitializerOp->Asl.Value.Integer; | |
1911 | RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS, | |
1912 | CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.DeviceSelection)); | |
1913 | break; | |
1914 | ||
1915 | case 1: /* Device Polarity [Flag] (_DPL) */ | |
1916 | ||
1917 | - RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 1, 0); | |
1918 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 1, 0); | |
1919 | RsCreateBitField (InitializerOp, ACPI_RESTAG_DEVICEPOLARITY, | |
1920 | CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 1); | |
1921 | break; | |
1922 | ||
1923 | case 2: /* Wire Mode [Flag] (_MOD) */ | |
1924 | ||
1925 | - RsSetFlagBits16 (&Descriptor->SpiSerialBus.TypeSpecificFlags, InitializerOp, 0, 0); | |
1926 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0); | |
1927 | RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE, | |
1928 | CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0); | |
1929 | break; | |
1930 | @@ -938,7 +938,7 @@ RsDoSpiSerialBusDescriptor ( | |
1931 | ||
1932 | case 5: /* Connection Speed [DWORD] (_SPE) */ | |
1933 | ||
1934 | - Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer; | |
1935 | + ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer; | |
1936 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, | |
1937 | CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed)); | |
1938 | break; | |
1939 | @@ -1000,6 +1004,10 @@ RsDoSpiSerialBusDescriptor ( | |
1940 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
1941 | } | |
1942 | ||
1943 | + ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.DeviceSelection, &DeviceSelection); | |
1944 | + ACPI_MOVE_32_TO_32(&Descriptor->SpiSerialBus.ConnectionSpeed, &ConnectionSpeed); | |
1945 | + ACPI_MOVE_16_TO_16(&Descriptor->SpiSerialBus.TypeSpecificFlags, &TypeSpecificFlags); | |
1946 | + | |
1947 | MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource); | |
1948 | return (Rnode); | |
1949 | } | |
1950 | @@ -1029,6 +1033,10 @@ RsDoUartSerialBusDescriptor ( | |
1951 | UINT16 ResSourceLength; | |
1952 | UINT16 VendorLength; | |
1953 | UINT16 DescriptorSize; | |
1954 | + UINT32 DefaultBaudRate = 0; | |
1955 | + UINT16 TypeSpecificFlags = 0; | |
1956 | + UINT16 RxFifoSize = 0; | |
1957 | + UINT16 TxFifoSize = 0; | |
1958 | UINT32 CurrentByteOffset; | |
1959 | UINT32 i; | |
1960 | ||
1961 | @@ -1078,21 +1078,21 @@ RsDoUartSerialBusDescriptor ( | |
1962 | { | |
1963 | case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */ | |
1964 | ||
1965 | - Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer; | |
1966 | + DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer; | |
1967 | RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED, | |
1968 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.DefaultBaudRate)); | |
1969 | break; | |
1970 | ||
1971 | case 1: /* Bits Per Byte [Flags] (_LEN) */ | |
1972 | ||
1973 | - RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 4, 3); | |
1974 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 4, 3); | |
1975 | RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LENGTH, | |
1976 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 4, 3); | |
1977 | break; | |
1978 | ||
1979 | case 2: /* Stop Bits [Flags] (_STB) */ | |
1980 | ||
1981 | - RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 2, 1); | |
1982 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 2, 1); | |
1983 | RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS, | |
1984 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2); | |
1985 | break; | |
1986 | @@ -1106,7 +1106,7 @@ RsDoUartSerialBusDescriptor ( | |
1987 | ||
1988 | case 4: /* Endianness [Flag] (_END) */ | |
1989 | ||
1990 | - RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 7, 0); | |
1991 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 7, 0); | |
1992 | RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS, | |
1993 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7); | |
1994 | break; | |
1995 | @@ -1120,21 +1120,21 @@ RsDoUartSerialBusDescriptor ( | |
1996 | ||
1997 | case 6: /* Flow Control [Flags] (_FLC) */ | |
1998 | ||
1999 | - RsSetFlagBits16 (&Descriptor->UartSerialBus.TypeSpecificFlags, InitializerOp, 0, 0); | |
2000 | + RsSetFlagBits16 (&TypeSpecificFlags, InitializerOp, 0, 0); | |
2001 | RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_FLOWCONTROL, | |
2002 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 0, 2); | |
2003 | break; | |
2004 | ||
2005 | case 7: /* Rx Buffer Size [WORD] (_RXL) */ | |
2006 | ||
2007 | - Descriptor->UartSerialBus.RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer; | |
2008 | + RxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer; | |
2009 | RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_RX, | |
2010 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.RxFifoSize)); | |
2011 | break; | |
2012 | ||
2013 | case 8: /* Tx Buffer Size [WORD] (_TXL) */ | |
2014 | ||
2015 | - Descriptor->UartSerialBus.TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer; | |
2016 | + TxFifoSize = (UINT16) InitializerOp->Asl.Value.Integer; | |
2017 | RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX, | |
2018 | CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize)); | |
2019 | break; | |
2020 | @@ -1192,6 +1197,11 @@ RsDoUartSerialBusDescriptor ( | |
2021 | InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); | |
2022 | } | |
2023 | ||
2024 | + ACPI_MOVE_32_TO_32(&Descriptor->UartSerialBus.DefaultBaudRate, &DefaultBaudRate); | |
2025 | + ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TypeSpecificFlags, &TypeSpecificFlags); | |
2026 | + ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.RxFifoSize, &RxFifoSize); | |
2027 | + ACPI_MOVE_16_TO_16(&Descriptor->UartSerialBus.TxFifoSize, &TxFifoSize); | |
2028 | + | |
2029 | MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource); | |
2030 | return (Rnode); | |
2031 | } | |
2032 | diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2w.c | |
2033 | --- acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian 2014-04-24 11:49:00.000000000 -0400 | |
2034 | +++ acpica-unix2-20140424/source/compiler/aslrestype2w.c 2014-06-06 20:43:34.721825238 -0400 | |
2035 | @@ -81,6 +87,12 @@ RsDoWordIoDescriptor ( | |
2036 | UINT8 *OptionalFields; | |
2037 | UINT16 StringLength = 0; | |
2038 | UINT32 OptionIndex = 0; | |
2039 | + UINT16 ResourceLength = 0; | |
2040 | + UINT16 Minimum = 0; | |
2041 | + UINT16 Maximum = 0; | |
2042 | + UINT16 AddressLength = 0; | |
2043 | + UINT16 Granularity = 0; | |
2044 | + UINT16 TranslationOffset = 0; | |
2045 | UINT32 CurrentByteOffset; | |
2046 | UINT32 i; | |
2047 | BOOLEAN ResSourceIndex = FALSE; | |
2048 | @@ -102,8 +101,7 @@ RsDoWordIoDescriptor ( | |
2049 | * optional fields present | |
2050 | */ | |
2051 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16); | |
2052 | - Descriptor->Address16.ResourceLength = (UINT16) | |
2053 | - (sizeof (AML_RESOURCE_ADDRESS16) - | |
2054 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) - | |
2055 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
2056 | ||
2057 | /* Process all child initialization nodes */ | |
2058 | @@ -147,7 +147,7 @@ RsDoWordIoDescriptor ( | |
2059 | ||
2060 | case 5: /* Address Granularity */ | |
2061 | ||
2062 | - Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer; | |
2063 | + Granularity = (UINT16) InitializerOp->Asl.Value.Integer; | |
2064 | RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
2065 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); | |
2066 | GranOp = InitializerOp; | |
2067 | @@ -155,7 +155,7 @@ RsDoWordIoDescriptor ( | |
2068 | ||
2069 | case 6: /* Address Min */ | |
2070 | ||
2071 | - Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2072 | + Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2073 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
2074 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); | |
2075 | MinOp = InitializerOp; | |
2076 | @@ -163,7 +163,7 @@ RsDoWordIoDescriptor ( | |
2077 | ||
2078 | case 7: /* Address Max */ | |
2079 | ||
2080 | - Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2081 | + Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2082 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
2083 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); | |
2084 | MaxOp = InitializerOp; | |
2085 | @@ -171,14 +171,14 @@ RsDoWordIoDescriptor ( | |
2086 | ||
2087 | case 8: /* Translation Offset */ | |
2088 | ||
2089 | - Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer; | |
2090 | + TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer; | |
2091 | RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
2092 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset)); | |
2093 | break; | |
2094 | ||
2095 | case 9: /* Address Length */ | |
2096 | ||
2097 | - Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; | |
2098 | + AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; | |
2099 | RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
2100 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); | |
2101 | LengthOp = InitializerOp; | |
2102 | @@ -190,7 +190,7 @@ RsDoWordIoDescriptor ( | |
2103 | { | |
2104 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
2105 | OptionIndex++; | |
2106 | - Descriptor->Address16.ResourceLength++; | |
2107 | + ResourceLength++; | |
2108 | ResSourceIndex = TRUE; | |
2109 | } | |
2110 | break; | |
2111 | @@ -202,8 +201,7 @@ RsDoWordIoDescriptor ( | |
2112 | { | |
2113 | if (StringLength) | |
2114 | { | |
2115 | - Descriptor->Address16.ResourceLength = (UINT16) | |
2116 | - (Descriptor->Address16.ResourceLength + StringLength); | |
2117 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
2118 | ||
2119 | strcpy ((char *) | |
2120 | &OptionalFields[OptionIndex], | |
2121 | @@ -263,13 +270,20 @@ RsDoWordIoDescriptor ( | |
2122 | /* Validate the Min/Max/Len/Gran values */ | |
2123 | ||
2124 | RsLargeAddressCheck ( | |
2125 | - (UINT64) Descriptor->Address16.Minimum, | |
2126 | - (UINT64) Descriptor->Address16.Maximum, | |
2127 | - (UINT64) Descriptor->Address16.AddressLength, | |
2128 | - (UINT64) Descriptor->Address16.Granularity, | |
2129 | + Minimum, | |
2130 | + Maximum, | |
2131 | + AddressLength, | |
2132 | + Granularity, | |
2133 | Descriptor->Address16.Flags, | |
2134 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
2135 | ||
2136 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength); | |
2137 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum); | |
2138 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum); | |
2139 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength); | |
2140 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity); | |
2141 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset); | |
2142 | + | |
2143 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + | |
2144 | OptionIndex + StringLength; | |
2145 | return (Rnode); | |
2146 | @@ -302,6 +308,12 @@ RsDoWordBusNumberDescriptor ( | |
2147 | UINT8 *OptionalFields; | |
2148 | UINT16 StringLength = 0; | |
2149 | UINT32 OptionIndex = 0; | |
2150 | + UINT16 ResourceLength = 0; | |
2151 | + UINT16 Minimum = 0; | |
2152 | + UINT16 Maximum = 0; | |
2153 | + UINT16 AddressLength = 0; | |
2154 | + UINT16 Granularity = 0; | |
2155 | + UINT16 TranslationOffset = 0; | |
2156 | UINT32 CurrentByteOffset; | |
2157 | UINT32 i; | |
2158 | BOOLEAN ResSourceIndex = FALSE; | |
2159 | @@ -323,8 +322,7 @@ RsDoWordBusNumberDescriptor ( | |
2160 | * optional fields present | |
2161 | */ | |
2162 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16); | |
2163 | - Descriptor->Address16.ResourceLength = (UINT16) | |
2164 | - (sizeof (AML_RESOURCE_ADDRESS16) - | |
2165 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) - | |
2166 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
2167 | ||
2168 | /* Process all child initialization nodes */ | |
2169 | @@ -361,8 +360,7 @@ RsDoWordBusNumberDescriptor ( | |
2170 | ||
2171 | case 4: /* Address Granularity */ | |
2172 | ||
2173 | - Descriptor->Address16.Granularity = | |
2174 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2175 | + Granularity = (UINT16) InitializerOp->Asl.Value.Integer; | |
2176 | RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
2177 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); | |
2178 | GranOp = InitializerOp; | |
2179 | @@ -370,8 +369,7 @@ RsDoWordBusNumberDescriptor ( | |
2180 | ||
2181 | case 5: /* Min Address */ | |
2182 | ||
2183 | - Descriptor->Address16.Minimum = | |
2184 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2185 | + Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2186 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
2187 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); | |
2188 | MinOp = InitializerOp; | |
2189 | @@ -379,8 +378,7 @@ RsDoWordBusNumberDescriptor ( | |
2190 | ||
2191 | case 6: /* Max Address */ | |
2192 | ||
2193 | - Descriptor->Address16.Maximum = | |
2194 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2195 | + Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2196 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
2197 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); | |
2198 | MaxOp = InitializerOp; | |
2199 | @@ -388,16 +386,14 @@ RsDoWordBusNumberDescriptor ( | |
2200 | ||
2201 | case 7: /* Translation Offset */ | |
2202 | ||
2203 | - Descriptor->Address16.TranslationOffset = | |
2204 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2205 | + TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer; | |
2206 | RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
2207 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset)); | |
2208 | break; | |
2209 | ||
2210 | case 8: /* Address Length */ | |
2211 | ||
2212 | - Descriptor->Address16.AddressLength = | |
2213 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2214 | + AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; | |
2215 | RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
2216 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); | |
2217 | LengthOp = InitializerOp; | |
2218 | @@ -409,7 +409,7 @@ RsDoWordBusNumberDescriptor ( | |
2219 | { | |
2220 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
2221 | OptionIndex++; | |
2222 | - Descriptor->Address16.ResourceLength++; | |
2223 | + ResourceLength++; | |
2224 | ResSourceIndex = TRUE; | |
2225 | } | |
2226 | break; | |
2227 | @@ -421,8 +420,7 @@ RsDoWordBusNumberDescriptor ( | |
2228 | { | |
2229 | if (StringLength) | |
2230 | { | |
2231 | - Descriptor->Address16.ResourceLength = (UINT16) | |
2232 | - (Descriptor->Address16.ResourceLength + StringLength); | |
2233 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
2234 | ||
2235 | strcpy ((char *) | |
2236 | &OptionalFields[OptionIndex], | |
2237 | @@ -468,13 +475,20 @@ RsDoWordBusNumberDescriptor ( | |
2238 | /* Validate the Min/Max/Len/Gran values */ | |
2239 | ||
2240 | RsLargeAddressCheck ( | |
2241 | - (UINT64) Descriptor->Address16.Minimum, | |
2242 | - (UINT64) Descriptor->Address16.Maximum, | |
2243 | - (UINT64) Descriptor->Address16.AddressLength, | |
2244 | - (UINT64) Descriptor->Address16.Granularity, | |
2245 | + Minimum, | |
2246 | + Maximum, | |
2247 | + AddressLength, | |
2248 | + Granularity, | |
2249 | Descriptor->Address16.Flags, | |
2250 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
2251 | ||
2252 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength); | |
2253 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum); | |
2254 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum); | |
2255 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength); | |
2256 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity); | |
2257 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset); | |
2258 | + | |
2259 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + | |
2260 | OptionIndex + StringLength; | |
2261 | return (Rnode); | |
2262 | @@ -507,6 +513,12 @@ RsDoWordSpaceDescriptor ( | |
2263 | UINT8 *OptionalFields; | |
2264 | UINT16 StringLength = 0; | |
2265 | UINT32 OptionIndex = 0; | |
2266 | + UINT16 Minimum = 0; | |
2267 | + UINT16 Maximum = 0; | |
2268 | + UINT16 AddressLength = 0; | |
2269 | + UINT16 Granularity = 0; | |
2270 | + UINT16 TranslationOffset = 0; | |
2271 | + UINT16 ResourceLength = 0; | |
2272 | UINT32 CurrentByteOffset; | |
2273 | UINT32 i; | |
2274 | BOOLEAN ResSourceIndex = FALSE; | |
2275 | @@ -527,8 +526,7 @@ RsDoWordSpaceDescriptor ( | |
2276 | * optional fields present | |
2277 | */ | |
2278 | OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16); | |
2279 | - Descriptor->Address16.ResourceLength = (UINT16) | |
2280 | - (sizeof (AML_RESOURCE_ADDRESS16) - | |
2281 | + ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) - | |
2282 | sizeof (AML_RESOURCE_LARGE_HEADER)); | |
2283 | ||
2284 | /* Process all child initialization nodes */ | |
2285 | @@ -577,8 +576,7 @@ RsDoWordSpaceDescriptor ( | |
2286 | ||
2287 | case 6: /* Address Granularity */ | |
2288 | ||
2289 | - Descriptor->Address16.Granularity = | |
2290 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2291 | + Granularity = (UINT16) InitializerOp->Asl.Value.Integer; | |
2292 | RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY, | |
2293 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity)); | |
2294 | GranOp = InitializerOp; | |
2295 | @@ -586,8 +585,7 @@ RsDoWordSpaceDescriptor ( | |
2296 | ||
2297 | case 7: /* Min Address */ | |
2298 | ||
2299 | - Descriptor->Address16.Minimum = | |
2300 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2301 | + Minimum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2302 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR, | |
2303 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum)); | |
2304 | MinOp = InitializerOp; | |
2305 | @@ -595,8 +594,7 @@ RsDoWordSpaceDescriptor ( | |
2306 | ||
2307 | case 8: /* Max Address */ | |
2308 | ||
2309 | - Descriptor->Address16.Maximum = | |
2310 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2311 | + Maximum = (UINT16) InitializerOp->Asl.Value.Integer; | |
2312 | RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR, | |
2313 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum)); | |
2314 | MaxOp = InitializerOp; | |
2315 | @@ -604,16 +602,14 @@ RsDoWordSpaceDescriptor ( | |
2316 | ||
2317 | case 9: /* Translation Offset */ | |
2318 | ||
2319 | - Descriptor->Address16.TranslationOffset = | |
2320 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2321 | + TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer; | |
2322 | RsCreateWordField (InitializerOp, ACPI_RESTAG_TRANSLATION, | |
2323 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset)); | |
2324 | break; | |
2325 | ||
2326 | case 10: /* Address Length */ | |
2327 | ||
2328 | - Descriptor->Address16.AddressLength = | |
2329 | - (UINT16) InitializerOp->Asl.Value.Integer; | |
2330 | + AddressLength = (UINT16) InitializerOp->Asl.Value.Integer; | |
2331 | RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH, | |
2332 | CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength)); | |
2333 | LengthOp = InitializerOp; | |
2334 | @@ -625,7 +625,7 @@ RsDoWordSpaceDescriptor ( | |
2335 | { | |
2336 | OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer; | |
2337 | OptionIndex++; | |
2338 | - Descriptor->Address16.ResourceLength++; | |
2339 | + ResourceLength++; | |
2340 | ResSourceIndex = TRUE; | |
2341 | } | |
2342 | break; | |
2343 | @@ -637,8 +636,7 @@ RsDoWordSpaceDescriptor ( | |
2344 | { | |
2345 | if (StringLength) | |
2346 | { | |
2347 | - Descriptor->Address16.ResourceLength = (UINT16) | |
2348 | - (Descriptor->Address16.ResourceLength + StringLength); | |
2349 | + ResourceLength = (UINT16) (ResourceLength + StringLength); | |
2350 | ||
2351 | strcpy ((char *) | |
2352 | &OptionalFields[OptionIndex], | |
2353 | @@ -684,13 +691,20 @@ RsDoWordSpaceDescriptor ( | |
2354 | /* Validate the Min/Max/Len/Gran values */ | |
2355 | ||
2356 | RsLargeAddressCheck ( | |
2357 | - (UINT64) Descriptor->Address16.Minimum, | |
2358 | - (UINT64) Descriptor->Address16.Maximum, | |
2359 | - (UINT64) Descriptor->Address16.AddressLength, | |
2360 | - (UINT64) Descriptor->Address16.Granularity, | |
2361 | + Minimum, | |
2362 | + Maximum, | |
2363 | + AddressLength, | |
2364 | + Granularity, | |
2365 | Descriptor->Address16.Flags, | |
2366 | MinOp, MaxOp, LengthOp, GranOp, Info->DescriptorTypeOp); | |
2367 | ||
2368 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength); | |
2369 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum); | |
2370 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum); | |
2371 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength); | |
2372 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity); | |
2373 | + ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset); | |
2374 | + | |
2375 | Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + | |
2376 | OptionIndex + StringLength; | |
2377 | return (Rnode); | |
2378 | diff -up acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian acpica-unix2-20140424/source/include/acmacros.h | |
2379 | --- acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian 2014-04-24 11:49:05.000000000 -0400 | |
2380 | +++ acpica-unix2-20140424/source/include/acmacros.h 2014-06-06 20:43:34.721825238 -0400 | |
2381 | @@ -111,7 +111,8 @@ | |
2382 | ||
2383 | /* 32-bit source, 16/32/64 destination */ | |
2384 | ||
2385 | -#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */ | |
2386 | +#define ACPI_MOVE_32_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\ | |
2387 | + (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];} | |
2388 | ||
2389 | #define ACPI_MOVE_32_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\ | |
2390 | (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\ | |
2391 | @@ -126,9 +127,13 @@ | |
2392 | ||
2393 | /* 64-bit source, 16/32/64 destination */ | |
2394 | ||
2395 | -#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */ | |
2396 | +#define ACPI_MOVE_64_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\ | |
2397 | + (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];} | |
2398 | ||
2399 | -#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */ | |
2400 | +#define ACPI_MOVE_64_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\ | |
2401 | + (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\ | |
2402 | + (( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\ | |
2403 | + (( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];} | |
2404 | ||
2405 | #define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\ | |
2406 | (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\ | |
2407 | @@ -155,7 +160,9 @@ | |
2408 | ||
2409 | /* 32-bit source, 16/32/64 destination */ | |
2410 | ||
2411 | -#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */ | |
2412 | +#define ACPI_MOVE_32_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\ | |
2413 | + (( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];} | |
2414 | + | |
2415 | #define ACPI_MOVE_32_TO_32(d, s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s) | |
2416 | #define ACPI_MOVE_32_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s) | |
2417 | ||
2418 | diff -up acpica-unix2-20140424/source/include/platform/aclinux.h.debian-big_endian acpica-unix2-20140424/source/include/platform/aclinux.h | |
2419 | --- acpica-unix2-20140424/source/include/platform/aclinux.h.debian-big_endian 2014-04-24 11:49:06.000000000 -0400 | |
2420 | +++ acpica-unix2-20140424/source/include/platform/aclinux.h 2014-06-06 20:44:28.781825238 -0400 | |
2421 | @@ -167,6 +167,7 @@ | |
2422 | #include <stdlib.h> | |
2423 | #include <ctype.h> | |
2424 | #include <unistd.h> | |
2425 | +#include <endian.h> | |
2426 | ||
2427 | /* Define/disable kernel-specific declarators */ | |
2428 | ||
2429 | @@ -179,8 +180,7 @@ | |
2430 | #define ACPI_FLUSH_CPU_CACHE() | |
2431 | #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) | |
2432 | ||
2433 | -#if defined(__ia64__) || defined(__x86_64__) ||\ | |
2434 | - defined(__aarch64__) || defined(__PPC64__) | |
2435 | +#if __SIZEOF_LONG__ == 8 | |
2436 | #define ACPI_MACHINE_WIDTH 64 | |
2437 | #define COMPILER_DEPENDENT_INT64 long | |
2438 | #define COMPILER_DEPENDENT_UINT64 unsigned long | |
2439 | @@ -191,6 +191,10 @@ | |
2440 | #define ACPI_USE_NATIVE_DIVIDE | |
2441 | #endif | |
2442 | ||
2443 | +#if __BYTE_ORDER == __BIG_ENDIAN | |
2444 | +#define ACPI_BIG_ENDIAN | |
2445 | +#endif | |
2446 | + | |
2447 | #ifndef __cdecl | |
2448 | #define __cdecl | |
2449 | #endif |