dmresrcl2.c revision 1.5 1 /*******************************************************************************
2 *
3 * Module Name: dmresrcl2.c - "Large" Resource Descriptor disassembly (#2)
4 *
5 ******************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2016, 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 #define _COMPONENT ACPI_CA_DEBUGGER
54 ACPI_MODULE_NAME ("dbresrcl2")
55
56 /* Local prototypes */
57
58 static void
59 AcpiDmI2cSerialBusDescriptor (
60 ACPI_OP_WALK_INFO *Info,
61 AML_RESOURCE *Resource,
62 UINT32 Length,
63 UINT32 Level);
64
65 static void
66 AcpiDmSpiSerialBusDescriptor (
67 ACPI_OP_WALK_INFO *Info,
68 AML_RESOURCE *Resource,
69 UINT32 Length,
70 UINT32 Level);
71
72 static void
73 AcpiDmUartSerialBusDescriptor (
74 ACPI_OP_WALK_INFO *Info,
75 AML_RESOURCE *Resource,
76 UINT32 Length,
77 UINT32 Level);
78
79 static void
80 AcpiDmGpioCommon (
81 ACPI_OP_WALK_INFO *Info,
82 AML_RESOURCE *Resource,
83 UINT32 Level);
84
85 static void
86 AcpiDmDumpRawDataBuffer (
87 UINT8 *Buffer,
88 UINT32 Length,
89 UINT32 Level);
90
91
92 /* Dispatch table for the serial bus descriptors */
93
94 static ACPI_RESOURCE_HANDLER SerialBusResourceDispatch [] =
95 {
96 NULL,
97 AcpiDmI2cSerialBusDescriptor,
98 AcpiDmSpiSerialBusDescriptor,
99 AcpiDmUartSerialBusDescriptor
100 };
101
102
103 /*******************************************************************************
104 *
105 * FUNCTION: AcpiDmDumpRawDataBuffer
106 *
107 * PARAMETERS: Buffer - Pointer to the data bytes
108 * Length - Length of the descriptor in bytes
109 * Level - Current source code indentation level
110 *
111 * RETURN: None
112 *
113 * DESCRIPTION: Dump a data buffer as a RawDataBuffer() object. Used for
114 * vendor data bytes.
115 *
116 ******************************************************************************/
117
118 static void
119 AcpiDmDumpRawDataBuffer (
120 UINT8 *Buffer,
121 UINT32 Length,
122 UINT32 Level)
123 {
124 UINT32 Index;
125 UINT32 i;
126 UINT32 j;
127
128
129 if (!Length)
130 {
131 return;
132 }
133
134 AcpiOsPrintf ("RawDataBuffer (0x%.2X) // Vendor Data", Length);
135
136 AcpiOsPrintf ("\n");
137 AcpiDmIndent (Level + 1);
138 AcpiOsPrintf ("{\n");
139 AcpiDmIndent (Level + 2);
140
141 for (i = 0; i < Length;)
142 {
143 for (j = 0; j < 8; j++)
144 {
145 Index = i + j;
146 if (Index >= Length)
147 {
148 goto Finish;
149 }
150
151 AcpiOsPrintf ("0x%2.2X", Buffer[Index]);
152 if ((Index + 1) >= Length)
153 {
154 goto Finish;
155 }
156
157 AcpiOsPrintf (", ");
158 }
159
160 AcpiOsPrintf ("\n");
161 AcpiDmIndent (Level + 2);
162
163 i += 8;
164 }
165
166 Finish:
167 AcpiOsPrintf ("\n");
168 AcpiDmIndent (Level + 1);
169 AcpiOsPrintf ("}");
170 }
171
172
173 /*******************************************************************************
174 *
175 * FUNCTION: AcpiDmGpioCommon
176 *
177 * PARAMETERS: Info - Extra resource info
178 * Resource - Pointer to the resource descriptor
179 * Level - Current source code indentation level
180 *
181 * RETURN: None
182 *
183 * DESCRIPTION: Decode common parts of a GPIO Interrupt descriptor
184 *
185 ******************************************************************************/
186
187 static void
188 AcpiDmGpioCommon (
189 ACPI_OP_WALK_INFO *Info,
190 AML_RESOURCE *Resource,
191 UINT32 Level)
192 {
193 UINT16 *PinList;
194 UINT8 *VendorData;
195 char *DeviceName = NULL;
196 UINT32 PinCount;
197 UINT32 i;
198
199
200 /* ResourceSource, ResourceSourceIndex, ResourceType */
201
202 AcpiDmIndent (Level + 1);
203 if (Resource->Gpio.ResSourceOffset)
204 {
205 DeviceName = ACPI_ADD_PTR (char,
206 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],
251 ((i + 1) < PinCount) ? "," : "");
252 }
253
254 AcpiDmIndent (Level + 1);
255 AcpiOsPrintf ("}\n");
256
257 MpSaveGpioInfo (Info->MappingOp, Resource,
258 PinCount, PinList, DeviceName);
259 }
260
261
262 /*******************************************************************************
263 *
264 * FUNCTION: AcpiDmGpioIntDescriptor
265 *
266 * PARAMETERS: Info - Extra resource info
267 * Resource - Pointer to the resource descriptor
268 * Length - Length of the descriptor in bytes
269 * Level - Current source code indentation level
270 *
271 * RETURN: None
272 *
273 * DESCRIPTION: Decode a GPIO Interrupt descriptor
274 *
275 ******************************************************************************/
276
277 static void
278 AcpiDmGpioIntDescriptor (
279 ACPI_OP_WALK_INFO *Info,
280 AML_RESOURCE *Resource,
281 UINT32 Length,
282 UINT32 Level)
283 {
284
285 /* Dump the GpioInt-specific portion of the descriptor */
286
287 /* EdgeLevel, ActiveLevel, Shared */
288
289 AcpiDmIndent (Level);
290 AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
291 AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.IntFlags)],
292 AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 1)],
293 AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
294
295 /* PinConfig, DebounceTimeout */
296
297 if (Resource->Gpio.PinConfig <= 3)
298 {
299 AcpiOsPrintf ("%s, ",
300 AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
301 }
302 else
303 {
304 AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
305 }
306 AcpiOsPrintf ("0x%4.4X,\n", Resource->Gpio.DebounceTimeout);
307
308 /* Dump the GpioInt/GpioIo common portion of the descriptor */
309
310 AcpiDmGpioCommon (Info, Resource, Level);
311 }
312
313
314 /*******************************************************************************
315 *
316 * FUNCTION: AcpiDmGpioIoDescriptor
317 *
318 * PARAMETERS: Info - Extra resource info
319 * Resource - Pointer to the resource descriptor
320 * Length - Length of the descriptor in bytes
321 * Level - Current source code indentation level
322 *
323 * RETURN: None
324 *
325 * DESCRIPTION: Decode a GPIO I/O descriptor
326 *
327 ******************************************************************************/
328
329 static void
330 AcpiDmGpioIoDescriptor (
331 ACPI_OP_WALK_INFO *Info,
332 AML_RESOURCE *Resource,
333 UINT32 Length,
334 UINT32 Level)
335 {
336
337 /* Dump the GpioIo-specific portion of the descriptor */
338
339 /* Shared, PinConfig */
340
341 AcpiDmIndent (Level);
342 AcpiOsPrintf ("GpioIo (%s, ",
343 AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
344
345 if (Resource->Gpio.PinConfig <= 3)
346 {
347 AcpiOsPrintf ("%s, ",
348 AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
349 }
350 else
351 {
352 AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
353 }
354
355 /* DebounceTimeout, DriveStrength, IoRestriction */
356
357 AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DebounceTimeout);
358 AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DriveStrength);
359 AcpiOsPrintf ("%s,\n",
360 AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Resource->Gpio.IntFlags)]);
361
362 /* Dump the GpioInt/GpioIo common portion of the descriptor */
363
364 AcpiDmGpioCommon (Info, Resource, Level);
365 }
366
367
368 /*******************************************************************************
369 *
370 * FUNCTION: AcpiDmGpioDescriptor
371 *
372 * PARAMETERS: Info - Extra resource info
373 * Resource - Pointer to the resource descriptor
374 * Length - Length of the descriptor in bytes
375 * Level - Current source code indentation level
376 *
377 * RETURN: None
378 *
379 * DESCRIPTION: Decode a GpioInt/GpioIo GPIO Interrupt/IO descriptor
380 *
381 ******************************************************************************/
382
383 void
384 AcpiDmGpioDescriptor (
385 ACPI_OP_WALK_INFO *Info,
386 AML_RESOURCE *Resource,
387 UINT32 Length,
388 UINT32 Level)
389 {
390 UINT8 ConnectionType;
391
392
393 ConnectionType = Resource->Gpio.ConnectionType;
394
395 switch (ConnectionType)
396 {
397 case AML_RESOURCE_GPIO_TYPE_INT:
398
399 AcpiDmGpioIntDescriptor (Info, Resource, Length, Level);
400 break;
401
402 case AML_RESOURCE_GPIO_TYPE_IO:
403
404 AcpiDmGpioIoDescriptor (Info, Resource, Length, Level);
405 break;
406
407 default:
408
409 AcpiOsPrintf ("Unknown GPIO type\n");
410 break;
411 }
412 }
413
414
415 /*******************************************************************************
416 *
417 * FUNCTION: AcpiDmDumpSerialBusVendorData
418 *
419 * PARAMETERS: Resource - Pointer to the resource descriptor
420 *
421 * RETURN: None
422 *
423 * DESCRIPTION: Dump optional serial bus vendor data
424 *
425 ******************************************************************************/
426
427 static void
428 AcpiDmDumpSerialBusVendorData (
429 AML_RESOURCE *Resource,
430 UINT32 Level)
431 {
432 UINT8 *VendorData;
433 UINT32 VendorLength;
434
435
436 /* Get the (optional) vendor data and length */
437
438 switch (Resource->CommonSerialBus.Type)
439 {
440 case AML_RESOURCE_I2C_SERIALBUSTYPE:
441
442 VendorLength = Resource->CommonSerialBus.TypeDataLength -
443 AML_RESOURCE_I2C_MIN_DATA_LEN;
444
445 VendorData = ACPI_ADD_PTR (UINT8, Resource,
446 sizeof (AML_RESOURCE_I2C_SERIALBUS));
447 break;
448
449 case AML_RESOURCE_SPI_SERIALBUSTYPE:
450
451 VendorLength = Resource->CommonSerialBus.TypeDataLength -
452 AML_RESOURCE_SPI_MIN_DATA_LEN;
453
454 VendorData = ACPI_ADD_PTR (UINT8, Resource,
455 sizeof (AML_RESOURCE_SPI_SERIALBUS));
456 break;
457
458 case AML_RESOURCE_UART_SERIALBUSTYPE:
459
460 VendorLength = Resource->CommonSerialBus.TypeDataLength -
461 AML_RESOURCE_UART_MIN_DATA_LEN;
462
463 VendorData = ACPI_ADD_PTR (UINT8, Resource,
464 sizeof (AML_RESOURCE_UART_SERIALBUS));
465 break;
466
467 default:
468
469 return;
470 }
471
472 /* Dump the vendor bytes as a RawDataBuffer object */
473
474 AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level);
475 }
476
477
478 /*******************************************************************************
479 *
480 * FUNCTION: AcpiDmI2cSerialBusDescriptor
481 *
482 * PARAMETERS: Info - Extra resource info
483 * Resource - Pointer to the resource descriptor
484 * Length - Length of the descriptor in bytes
485 * Level - Current source code indentation level
486 *
487 * RETURN: None
488 *
489 * DESCRIPTION: Decode a I2C serial bus descriptor
490 *
491 ******************************************************************************/
492
493 static void
494 AcpiDmI2cSerialBusDescriptor (
495 ACPI_OP_WALK_INFO *Info,
496 AML_RESOURCE *Resource,
497 UINT32 Length,
498 UINT32 Level)
499 {
500 UINT32 ResourceSourceOffset;
501 char *DeviceName;
502
503
504 /* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
505
506 AcpiDmIndent (Level);
507 AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
508 Resource->I2cSerialBus.SlaveAddress,
509 AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
510 Resource->I2cSerialBus.ConnectionSpeed);
511
512 AcpiDmIndent (Level + 1);
513 AcpiOsPrintf ("%s, ",
514 AcpiGbl_AmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.TypeSpecificFlags)]);
515
516 /* ResourceSource is a required field */
517
518 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
519 Resource->CommonSerialBus.TypeDataLength;
520
521 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
522 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
523
524 /* ResourceSourceIndex, ResourceUsage */
525
526 AcpiOsPrintf (",\n");
527 AcpiDmIndent (Level + 1);
528 AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
529
530 AcpiOsPrintf ("%s, ",
531 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 1)]);
532
533 /* Insert a descriptor name */
534
535 AcpiDmDescriptorName ();
536
537 /* Share */
538
539 AcpiOsPrintf (", %s,\n",
540 AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 2)]);
541
542 /* Dump the vendor data */
543
544 AcpiDmIndent (Level + 1);
545 AcpiDmDumpSerialBusVendorData (Resource, Level);
546 AcpiOsPrintf (")\n");
547
548 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
549 }
550
551
552 /*******************************************************************************
553 *
554 * FUNCTION: AcpiDmSpiSerialBusDescriptor
555 *
556 * PARAMETERS: Info - Extra resource info
557 * Resource - Pointer to the resource descriptor
558 * Length - Length of the descriptor in bytes
559 * Level - Current source code indentation level
560 *
561 * RETURN: None
562 *
563 * DESCRIPTION: Decode a SPI serial bus descriptor
564 *
565 ******************************************************************************/
566
567 static void
568 AcpiDmSpiSerialBusDescriptor (
569 ACPI_OP_WALK_INFO *Info,
570 AML_RESOURCE *Resource,
571 UINT32 Length,
572 UINT32 Level)
573 {
574 UINT32 ResourceSourceOffset;
575 char *DeviceName;
576
577
578 /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
579
580 AcpiDmIndent (Level);
581 AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
582 Resource->SpiSerialBus.DeviceSelection,
583 AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
584 AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
585 Resource->SpiSerialBus.DataBitLength);
586
587 /* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */
588
589 AcpiDmIndent (Level + 1);
590 AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
591 AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.Flags)],
592 Resource->SpiSerialBus.ConnectionSpeed,
593 AcpiGbl_CpoDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPolarity)]);
594
595 AcpiDmIndent (Level + 1);
596 AcpiOsPrintf ("%s, ",
597 AcpiGbl_CphDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPhase)]);
598
599 /* ResourceSource is a required field */
600
601 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
602 Resource->CommonSerialBus.TypeDataLength;
603
604 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
605 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
606
607 /* ResourceSourceIndex, ResourceUsage */
608
609 AcpiOsPrintf (",\n");
610 AcpiDmIndent (Level + 1);
611 AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
612
613 AcpiOsPrintf ("%s, ",
614 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 1)]);
615
616 /* Insert a descriptor name */
617
618 AcpiDmDescriptorName ();
619
620 /* Share */
621
622 AcpiOsPrintf (", %s,\n",
623 AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 2)]);
624
625 /* Dump the vendor data */
626
627 AcpiDmIndent (Level + 1);
628 AcpiDmDumpSerialBusVendorData (Resource, Level);
629 AcpiOsPrintf (")\n");
630
631 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
632 }
633
634
635 /*******************************************************************************
636 *
637 * FUNCTION: AcpiDmUartSerialBusDescriptor
638 *
639 * PARAMETERS: Info - Extra resource info
640 * Resource - Pointer to the resource descriptor
641 * Length - Length of the descriptor in bytes
642 * Level - Current source code indentation level
643 *
644 * RETURN: None
645 *
646 * DESCRIPTION: Decode a UART serial bus descriptor
647 *
648 ******************************************************************************/
649
650 static void
651 AcpiDmUartSerialBusDescriptor (
652 ACPI_OP_WALK_INFO *Info,
653 AML_RESOURCE *Resource,
654 UINT32 Length,
655 UINT32 Level)
656 {
657 UINT32 ResourceSourceOffset;
658 char *DeviceName;
659
660
661 /* ConnectionSpeed, BitsPerByte, StopBits */
662
663 AcpiDmIndent (Level);
664 AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n",
665 Resource->UartSerialBus.DefaultBaudRate,
666 AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
667 AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
668
669 /* LinesInUse, IsBigEndian, Parity, FlowControl */
670
671 AcpiDmIndent (Level + 1);
672 AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n",
673 Resource->UartSerialBus.LinesEnabled,
674 AcpiGbl_EdDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 7)],
675 AcpiGbl_PtDecode [ACPI_GET_3BIT_FLAG (Resource->UartSerialBus.Parity)],
676 AcpiGbl_FcDecode [ACPI_GET_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags)]);
677
678 /* ReceiveBufferSize, TransmitBufferSize */
679
680 AcpiDmIndent (Level + 1);
681 AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ",
682 Resource->UartSerialBus.RxFifoSize,
683 Resource->UartSerialBus.TxFifoSize);
684
685 /* ResourceSource is a required field */
686
687 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
688 Resource->CommonSerialBus.TypeDataLength;
689
690 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
691 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
692
693 /* ResourceSourceIndex, ResourceUsage */
694
695 AcpiOsPrintf (",\n");
696 AcpiDmIndent (Level + 1);
697 AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
698
699 AcpiOsPrintf ("%s, ",
700 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 1)]);
701
702 /* Insert a descriptor name */
703
704 AcpiDmDescriptorName ();
705
706 /* Share */
707
708 AcpiOsPrintf (", %s,\n",
709 AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 2)]);
710
711 /* Dump the vendor data */
712
713 AcpiDmIndent (Level + 1);
714 AcpiDmDumpSerialBusVendorData (Resource, Level);
715 AcpiOsPrintf (")\n");
716
717 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
718 }
719
720
721 /*******************************************************************************
722 *
723 * FUNCTION: AcpiDmSerialBusDescriptor
724 *
725 * PARAMETERS: Info - Extra resource info
726 * Resource - Pointer to the resource descriptor
727 * Length - Length of the descriptor in bytes
728 * Level - Current source code indentation level
729 *
730 * RETURN: None
731 *
732 * DESCRIPTION: Decode a I2C/SPI/UART serial bus descriptor
733 *
734 ******************************************************************************/
735
736 void
737 AcpiDmSerialBusDescriptor (
738 ACPI_OP_WALK_INFO *Info,
739 AML_RESOURCE *Resource,
740 UINT32 Length,
741 UINT32 Level)
742 {
743
744 SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
745 Info, Resource, Length, Level);
746 }
747