dmresrcl2.c revision 1.2 1 /*******************************************************************************
2 *
3 * Module Name: dmresrcl2.c - "Large" Resource Descriptor disassembly (#2)
4 *
5 ******************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #include "acpi.h"
45 #include "accommon.h"
46 #include "acdisasm.h"
47
48 #ifdef _KERNEL
49 #define MpSaveGpioInfo(a, b, c, d, e)
50 #define MpSaveSerialInfo(a, b, c)
51 #endif
52
53 #ifdef ACPI_DISASSEMBLER
54
55 #define _COMPONENT ACPI_CA_DEBUGGER
56 ACPI_MODULE_NAME ("dbresrcl2")
57
58 /* Local prototypes */
59
60 static void
61 AcpiDmI2cSerialBusDescriptor (
62 ACPI_OP_WALK_INFO *Info,
63 AML_RESOURCE *Resource,
64 UINT32 Length,
65 UINT32 Level);
66
67 static void
68 AcpiDmSpiSerialBusDescriptor (
69 ACPI_OP_WALK_INFO *Info,
70 AML_RESOURCE *Resource,
71 UINT32 Length,
72 UINT32 Level);
73
74 static void
75 AcpiDmUartSerialBusDescriptor (
76 ACPI_OP_WALK_INFO *Info,
77 AML_RESOURCE *Resource,
78 UINT32 Length,
79 UINT32 Level);
80
81 static void
82 AcpiDmGpioCommon (
83 ACPI_OP_WALK_INFO *Info,
84 AML_RESOURCE *Resource,
85 UINT32 Level);
86
87 static void
88 AcpiDmDumpRawDataBuffer (
89 UINT8 *Buffer,
90 UINT32 Length,
91 UINT32 Level);
92
93
94 /* Dispatch table for the serial bus descriptors */
95
96 static ACPI_RESOURCE_HANDLER SerialBusResourceDispatch [] =
97 {
98 NULL,
99 AcpiDmI2cSerialBusDescriptor,
100 AcpiDmSpiSerialBusDescriptor,
101 AcpiDmUartSerialBusDescriptor
102 };
103
104
105 /*******************************************************************************
106 *
107 * FUNCTION: AcpiDmDumpRawDataBuffer
108 *
109 * PARAMETERS: Buffer - Pointer to the data bytes
110 * Length - Length of the descriptor in bytes
111 * Level - Current source code indentation level
112 *
113 * RETURN: None
114 *
115 * DESCRIPTION: Dump a data buffer as a RawDataBuffer() object. Used for
116 * vendor data bytes.
117 *
118 ******************************************************************************/
119
120 static void
121 AcpiDmDumpRawDataBuffer (
122 UINT8 *Buffer,
123 UINT32 Length,
124 UINT32 Level)
125 {
126 UINT32 Index;
127 UINT32 i;
128 UINT32 j;
129
130
131 if (!Length)
132 {
133 return;
134 }
135
136 AcpiOsPrintf ("RawDataBuffer (0x%.2X) // Vendor Data", Length);
137
138 AcpiOsPrintf ("\n");
139 AcpiDmIndent (Level + 1);
140 AcpiOsPrintf ("{\n");
141 AcpiDmIndent (Level + 2);
142
143 for (i = 0; i < Length;)
144 {
145 for (j = 0; j < 8; j++)
146 {
147 Index = i + j;
148 if (Index >= Length)
149 {
150 goto Finish;
151 }
152
153 AcpiOsPrintf ("0x%2.2X", Buffer[Index]);
154 if ((Index + 1) >= Length)
155 {
156 goto Finish;
157 }
158
159 AcpiOsPrintf (", ");
160 }
161 AcpiOsPrintf ("\n");
162 AcpiDmIndent (Level + 2);
163
164 i += 8;
165 }
166
167 Finish:
168 AcpiOsPrintf ("\n");
169 AcpiDmIndent (Level + 1);
170 AcpiOsPrintf ("}");
171 }
172
173
174 /*******************************************************************************
175 *
176 * FUNCTION: AcpiDmGpioCommon
177 *
178 * PARAMETERS: Info - Extra resource info
179 * Resource - Pointer to the resource descriptor
180 * Level - Current source code indentation level
181 *
182 * RETURN: None
183 *
184 * DESCRIPTION: Decode common parts of a GPIO Interrupt descriptor
185 *
186 ******************************************************************************/
187
188 static void
189 AcpiDmGpioCommon (
190 ACPI_OP_WALK_INFO *Info,
191 AML_RESOURCE *Resource,
192 UINT32 Level)
193 {
194 UINT16 *PinList;
195 UINT8 *VendorData;
196 char *DeviceName = NULL;
197 UINT32 PinCount;
198 UINT32 i;
199
200
201 /* ResourceSource, ResourceSourceIndex, ResourceType */
202
203 AcpiDmIndent (Level + 1);
204 if (Resource->Gpio.ResSourceOffset)
205 {
206 DeviceName = ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
207 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
208 }
209
210 AcpiOsPrintf (", ");
211 AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.ResSourceIndex);
212 AcpiOsPrintf ("%s, ",
213 AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.Flags)]);
214
215 /* Insert a descriptor name */
216
217 AcpiDmDescriptorName ();
218 AcpiOsPrintf (",");
219
220 /* Dump the vendor data */
221
222 if (Resource->Gpio.VendorOffset)
223 {
224 AcpiOsPrintf ("\n");
225 AcpiDmIndent (Level + 1);
226 VendorData = ACPI_ADD_PTR (UINT8, Resource,
227 Resource->Gpio.VendorOffset);
228
229 AcpiDmDumpRawDataBuffer (VendorData,
230 Resource->Gpio.VendorLength, Level);
231 }
232
233 AcpiOsPrintf (")\n");
234
235 /* Dump the interrupt list */
236
237 AcpiDmIndent (Level + 1);
238 AcpiOsPrintf ("{ // Pin list\n");
239
240 PinCount = ((UINT32) (Resource->Gpio.ResSourceOffset -
241 Resource->Gpio.PinTableOffset)) /
242 sizeof (UINT16);
243
244 PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
245 Resource->Gpio.PinTableOffset);
246
247 for (i = 0; i < PinCount; i++)
248 {
249 AcpiDmIndent (Level + 2);
250 AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], ((i + 1) < PinCount) ? "," : "");
251 }
252
253 AcpiDmIndent (Level + 1);
254 AcpiOsPrintf ("}\n");
255
256 MpSaveGpioInfo (Info->MappingOp, Resource, PinCount, PinList, DeviceName);
257 }
258
259
260 /*******************************************************************************
261 *
262 * FUNCTION: AcpiDmGpioIntDescriptor
263 *
264 * PARAMETERS: Info - Extra resource info
265 * Resource - Pointer to the resource descriptor
266 * Length - Length of the descriptor in bytes
267 * Level - Current source code indentation level
268 *
269 * RETURN: None
270 *
271 * DESCRIPTION: Decode a GPIO Interrupt descriptor
272 *
273 ******************************************************************************/
274
275 static void
276 AcpiDmGpioIntDescriptor (
277 ACPI_OP_WALK_INFO *Info,
278 AML_RESOURCE *Resource,
279 UINT32 Length,
280 UINT32 Level)
281 {
282
283 /* Dump the GpioInt-specific portion of the descriptor */
284
285 /* EdgeLevel, ActiveLevel, Shared */
286
287 AcpiDmIndent (Level);
288 AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
289 AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.IntFlags)],
290 AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 1)],
291 AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
292
293 /* PinConfig, DebounceTimeout */
294
295 if (Resource->Gpio.PinConfig <= 3)
296 {
297 AcpiOsPrintf ("%s, ",
298 AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
299 }
300 else
301 {
302 AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
303 }
304 AcpiOsPrintf ("0x%4.4X,\n", Resource->Gpio.DebounceTimeout);
305
306 /* Dump the GpioInt/GpioIo common portion of the descriptor */
307
308 AcpiDmGpioCommon (Info, Resource, Level);
309 }
310
311
312 /*******************************************************************************
313 *
314 * FUNCTION: AcpiDmGpioIoDescriptor
315 *
316 * PARAMETERS: Info - Extra resource info
317 * Resource - Pointer to the resource descriptor
318 * Length - Length of the descriptor in bytes
319 * Level - Current source code indentation level
320 *
321 * RETURN: None
322 *
323 * DESCRIPTION: Decode a GPIO I/O descriptor
324 *
325 ******************************************************************************/
326
327 static void
328 AcpiDmGpioIoDescriptor (
329 ACPI_OP_WALK_INFO *Info,
330 AML_RESOURCE *Resource,
331 UINT32 Length,
332 UINT32 Level)
333 {
334
335 /* Dump the GpioIo-specific portion of the descriptor */
336
337 /* Shared, PinConfig */
338
339 AcpiDmIndent (Level);
340 AcpiOsPrintf ("GpioIo (%s, ",
341 AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
342
343 if (Resource->Gpio.PinConfig <= 3)
344 {
345 AcpiOsPrintf ("%s, ",
346 AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
347 }
348 else
349 {
350 AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
351 }
352
353 /* DebounceTimeout, DriveStrength, IoRestriction */
354
355 AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DebounceTimeout);
356 AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DriveStrength);
357 AcpiOsPrintf ("%s,\n",
358 AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Resource->Gpio.IntFlags)]);
359
360 /* Dump the GpioInt/GpioIo common portion of the descriptor */
361
362 AcpiDmGpioCommon (Info, Resource, Level);
363 }
364
365
366 /*******************************************************************************
367 *
368 * FUNCTION: AcpiDmGpioDescriptor
369 *
370 * PARAMETERS: Info - Extra resource info
371 * Resource - Pointer to the resource descriptor
372 * Length - Length of the descriptor in bytes
373 * Level - Current source code indentation level
374 *
375 * RETURN: None
376 *
377 * DESCRIPTION: Decode a GpioInt/GpioIo GPIO Interrupt/IO descriptor
378 *
379 ******************************************************************************/
380
381 void
382 AcpiDmGpioDescriptor (
383 ACPI_OP_WALK_INFO *Info,
384 AML_RESOURCE *Resource,
385 UINT32 Length,
386 UINT32 Level)
387 {
388 UINT8 ConnectionType;
389
390
391 ConnectionType = Resource->Gpio.ConnectionType;
392
393 switch (ConnectionType)
394 {
395 case AML_RESOURCE_GPIO_TYPE_INT:
396
397 AcpiDmGpioIntDescriptor (Info, Resource, Length, Level);
398 break;
399
400 case AML_RESOURCE_GPIO_TYPE_IO:
401
402 AcpiDmGpioIoDescriptor (Info, Resource, Length, Level);
403 break;
404
405 default:
406
407 AcpiOsPrintf ("Unknown GPIO type\n");
408 break;
409 }
410 }
411
412
413 /*******************************************************************************
414 *
415 * FUNCTION: AcpiDmDumpSerialBusVendorData
416 *
417 * PARAMETERS: Resource - Pointer to the resource descriptor
418 *
419 * RETURN: None
420 *
421 * DESCRIPTION: Dump optional serial bus vendor data
422 *
423 ******************************************************************************/
424
425 static void
426 AcpiDmDumpSerialBusVendorData (
427 AML_RESOURCE *Resource,
428 UINT32 Level)
429 {
430 UINT8 *VendorData;
431 UINT32 VendorLength;
432
433
434 /* Get the (optional) vendor data and length */
435
436 switch (Resource->CommonSerialBus.Type)
437 {
438 case AML_RESOURCE_I2C_SERIALBUSTYPE:
439
440 VendorLength = Resource->CommonSerialBus.TypeDataLength -
441 AML_RESOURCE_I2C_MIN_DATA_LEN;
442
443 VendorData = ACPI_ADD_PTR (UINT8, Resource,
444 sizeof (AML_RESOURCE_I2C_SERIALBUS));
445 break;
446
447 case AML_RESOURCE_SPI_SERIALBUSTYPE:
448
449 VendorLength = Resource->CommonSerialBus.TypeDataLength -
450 AML_RESOURCE_SPI_MIN_DATA_LEN;
451
452 VendorData = ACPI_ADD_PTR (UINT8, Resource,
453 sizeof (AML_RESOURCE_SPI_SERIALBUS));
454 break;
455
456 case AML_RESOURCE_UART_SERIALBUSTYPE:
457
458 VendorLength = Resource->CommonSerialBus.TypeDataLength -
459 AML_RESOURCE_UART_MIN_DATA_LEN;
460
461 VendorData = ACPI_ADD_PTR (UINT8, Resource,
462 sizeof (AML_RESOURCE_UART_SERIALBUS));
463 break;
464
465 default:
466
467 return;
468 }
469
470 /* Dump the vendor bytes as a RawDataBuffer object */
471
472 AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level);
473 }
474
475
476 /*******************************************************************************
477 *
478 * FUNCTION: AcpiDmI2cSerialBusDescriptor
479 *
480 * PARAMETERS: Info - Extra resource info
481 * Resource - Pointer to the resource descriptor
482 * Length - Length of the descriptor in bytes
483 * Level - Current source code indentation level
484 *
485 * RETURN: None
486 *
487 * DESCRIPTION: Decode a I2C serial bus descriptor
488 *
489 ******************************************************************************/
490
491 static void
492 AcpiDmI2cSerialBusDescriptor (
493 ACPI_OP_WALK_INFO *Info,
494 AML_RESOURCE *Resource,
495 UINT32 Length,
496 UINT32 Level)
497 {
498 UINT32 ResourceSourceOffset;
499 char *DeviceName;
500
501
502 /* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
503
504 AcpiDmIndent (Level);
505 AcpiOsPrintf ("I2cSerialBus (0x%4.4X, %s, 0x%8.8X,\n",
506 Resource->I2cSerialBus.SlaveAddress,
507 AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
508 Resource->I2cSerialBus.ConnectionSpeed);
509
510 AcpiDmIndent (Level + 1);
511 AcpiOsPrintf ("%s, ",
512 AcpiGbl_AmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.TypeSpecificFlags)]);
513
514 /* ResourceSource is a required field */
515
516 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
517 Resource->CommonSerialBus.TypeDataLength;
518
519 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
520 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
521
522 /* ResourceSourceIndex, ResourceUsage */
523
524 AcpiOsPrintf (",\n");
525 AcpiDmIndent (Level + 1);
526 AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
527
528 AcpiOsPrintf ("%s, ",
529 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 1)]);
530
531 /* Insert a descriptor name */
532
533 AcpiDmDescriptorName ();
534 AcpiOsPrintf (",\n");
535
536 /* Dump the vendor data */
537
538 AcpiDmIndent (Level + 1);
539 AcpiDmDumpSerialBusVendorData (Resource, Level);
540 AcpiOsPrintf (")\n");
541
542 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
543 }
544
545
546 /*******************************************************************************
547 *
548 * FUNCTION: AcpiDmSpiSerialBusDescriptor
549 *
550 * PARAMETERS: Info - Extra resource info
551 * Resource - Pointer to the resource descriptor
552 * Length - Length of the descriptor in bytes
553 * Level - Current source code indentation level
554 *
555 * RETURN: None
556 *
557 * DESCRIPTION: Decode a SPI serial bus descriptor
558 *
559 ******************************************************************************/
560
561 static void
562 AcpiDmSpiSerialBusDescriptor (
563 ACPI_OP_WALK_INFO *Info,
564 AML_RESOURCE *Resource,
565 UINT32 Length,
566 UINT32 Level)
567 {
568 UINT32 ResourceSourceOffset;
569 char *DeviceName;
570
571
572 /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
573
574 AcpiDmIndent (Level);
575 AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n",
576 Resource->SpiSerialBus.DeviceSelection,
577 AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
578 AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
579 Resource->SpiSerialBus.DataBitLength);
580
581 /* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */
582
583 AcpiDmIndent (Level + 1);
584 AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
585 AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.Flags)],
586 Resource->SpiSerialBus.ConnectionSpeed,
587 AcpiGbl_CpoDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPolarity)]);
588
589 AcpiDmIndent (Level + 1);
590 AcpiOsPrintf ("%s, ",
591 AcpiGbl_CphDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPhase)]);
592
593 /* ResourceSource is a required field */
594
595 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
596 Resource->CommonSerialBus.TypeDataLength;
597
598 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
599 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
600
601 /* ResourceSourceIndex, ResourceUsage */
602
603 AcpiOsPrintf (",\n");
604 AcpiDmIndent (Level + 1);
605 AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
606
607 AcpiOsPrintf ("%s, ",
608 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 1)]);
609
610 /* Insert a descriptor name */
611
612 AcpiDmDescriptorName ();
613 AcpiOsPrintf (",\n");
614
615 /* Dump the vendor data */
616
617 AcpiDmIndent (Level + 1);
618 AcpiDmDumpSerialBusVendorData (Resource, Level);
619 AcpiOsPrintf (")\n");
620
621 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
622 }
623
624
625 /*******************************************************************************
626 *
627 * FUNCTION: AcpiDmUartSerialBusDescriptor
628 *
629 * PARAMETERS: Info - Extra resource info
630 * Resource - Pointer to the resource descriptor
631 * Length - Length of the descriptor in bytes
632 * Level - Current source code indentation level
633 *
634 * RETURN: None
635 *
636 * DESCRIPTION: Decode a UART serial bus descriptor
637 *
638 ******************************************************************************/
639
640 static void
641 AcpiDmUartSerialBusDescriptor (
642 ACPI_OP_WALK_INFO *Info,
643 AML_RESOURCE *Resource,
644 UINT32 Length,
645 UINT32 Level)
646 {
647 UINT32 ResourceSourceOffset;
648 char *DeviceName;
649
650
651 /* ConnectionSpeed, BitsPerByte, StopBits */
652
653 AcpiDmIndent (Level);
654 AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n",
655 Resource->UartSerialBus.DefaultBaudRate,
656 AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
657 AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
658
659 /* LinesInUse, IsBigEndian, Parity, FlowControl */
660
661 AcpiDmIndent (Level + 1);
662 AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n",
663 Resource->UartSerialBus.LinesEnabled,
664 AcpiGbl_EdDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 7)],
665 AcpiGbl_PtDecode [ACPI_GET_3BIT_FLAG (Resource->UartSerialBus.Parity)],
666 AcpiGbl_FcDecode [ACPI_GET_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags)]);
667
668 /* ReceiveBufferSize, TransmitBufferSize */
669
670 AcpiDmIndent (Level + 1);
671 AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ",
672 Resource->UartSerialBus.RxFifoSize,
673 Resource->UartSerialBus.TxFifoSize);
674
675 /* ResourceSource is a required field */
676
677 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
678 Resource->CommonSerialBus.TypeDataLength;
679
680 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
681 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
682
683 /* ResourceSourceIndex, ResourceUsage */
684
685 AcpiOsPrintf (",\n");
686 AcpiDmIndent (Level + 1);
687 AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
688
689 AcpiOsPrintf ("%s, ",
690 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 1)]);
691
692 /* Insert a descriptor name */
693
694 AcpiDmDescriptorName ();
695 AcpiOsPrintf (",\n");
696
697 /* Dump the vendor data */
698
699 AcpiDmIndent (Level + 1);
700 AcpiDmDumpSerialBusVendorData (Resource, Level);
701 AcpiOsPrintf (")\n");
702
703 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
704 }
705
706
707 /*******************************************************************************
708 *
709 * FUNCTION: AcpiDmSerialBusDescriptor
710 *
711 * PARAMETERS: Info - Extra resource info
712 * Resource - Pointer to the resource descriptor
713 * Length - Length of the descriptor in bytes
714 * Level - Current source code indentation level
715 *
716 * RETURN: None
717 *
718 * DESCRIPTION: Decode a I2C/SPI/UART serial bus descriptor
719 *
720 ******************************************************************************/
721
722 void
723 AcpiDmSerialBusDescriptor (
724 ACPI_OP_WALK_INFO *Info,
725 AML_RESOURCE *Resource,
726 UINT32 Length,
727 UINT32 Level)
728 {
729
730 SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
731 Info, Resource, Length, Level);
732 }
733
734 #endif
735