dmresrcl2.c revision 1.4 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 ("I2cSerialBus (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 AcpiOsPrintf (",\n");
537
538 /* Dump the vendor data */
539
540 AcpiDmIndent (Level + 1);
541 AcpiDmDumpSerialBusVendorData (Resource, Level);
542 AcpiOsPrintf (")\n");
543
544 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
545 }
546
547
548 /*******************************************************************************
549 *
550 * FUNCTION: AcpiDmSpiSerialBusDescriptor
551 *
552 * PARAMETERS: Info - Extra resource info
553 * Resource - Pointer to the resource descriptor
554 * Length - Length of the descriptor in bytes
555 * Level - Current source code indentation level
556 *
557 * RETURN: None
558 *
559 * DESCRIPTION: Decode a SPI serial bus descriptor
560 *
561 ******************************************************************************/
562
563 static void
564 AcpiDmSpiSerialBusDescriptor (
565 ACPI_OP_WALK_INFO *Info,
566 AML_RESOURCE *Resource,
567 UINT32 Length,
568 UINT32 Level)
569 {
570 UINT32 ResourceSourceOffset;
571 char *DeviceName;
572
573
574 /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
575
576 AcpiDmIndent (Level);
577 AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n",
578 Resource->SpiSerialBus.DeviceSelection,
579 AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
580 AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
581 Resource->SpiSerialBus.DataBitLength);
582
583 /* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */
584
585 AcpiDmIndent (Level + 1);
586 AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
587 AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.Flags)],
588 Resource->SpiSerialBus.ConnectionSpeed,
589 AcpiGbl_CpoDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPolarity)]);
590
591 AcpiDmIndent (Level + 1);
592 AcpiOsPrintf ("%s, ",
593 AcpiGbl_CphDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPhase)]);
594
595 /* ResourceSource is a required field */
596
597 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
598 Resource->CommonSerialBus.TypeDataLength;
599
600 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
601 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
602
603 /* ResourceSourceIndex, ResourceUsage */
604
605 AcpiOsPrintf (",\n");
606 AcpiDmIndent (Level + 1);
607 AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
608
609 AcpiOsPrintf ("%s, ",
610 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 1)]);
611
612 /* Insert a descriptor name */
613
614 AcpiDmDescriptorName ();
615 AcpiOsPrintf (",\n");
616
617 /* Dump the vendor data */
618
619 AcpiDmIndent (Level + 1);
620 AcpiDmDumpSerialBusVendorData (Resource, Level);
621 AcpiOsPrintf (")\n");
622
623 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
624 }
625
626
627 /*******************************************************************************
628 *
629 * FUNCTION: AcpiDmUartSerialBusDescriptor
630 *
631 * PARAMETERS: Info - Extra resource info
632 * Resource - Pointer to the resource descriptor
633 * Length - Length of the descriptor in bytes
634 * Level - Current source code indentation level
635 *
636 * RETURN: None
637 *
638 * DESCRIPTION: Decode a UART serial bus descriptor
639 *
640 ******************************************************************************/
641
642 static void
643 AcpiDmUartSerialBusDescriptor (
644 ACPI_OP_WALK_INFO *Info,
645 AML_RESOURCE *Resource,
646 UINT32 Length,
647 UINT32 Level)
648 {
649 UINT32 ResourceSourceOffset;
650 char *DeviceName;
651
652
653 /* ConnectionSpeed, BitsPerByte, StopBits */
654
655 AcpiDmIndent (Level);
656 AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n",
657 Resource->UartSerialBus.DefaultBaudRate,
658 AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
659 AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
660
661 /* LinesInUse, IsBigEndian, Parity, FlowControl */
662
663 AcpiDmIndent (Level + 1);
664 AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n",
665 Resource->UartSerialBus.LinesEnabled,
666 AcpiGbl_EdDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 7)],
667 AcpiGbl_PtDecode [ACPI_GET_3BIT_FLAG (Resource->UartSerialBus.Parity)],
668 AcpiGbl_FcDecode [ACPI_GET_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags)]);
669
670 /* ReceiveBufferSize, TransmitBufferSize */
671
672 AcpiDmIndent (Level + 1);
673 AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ",
674 Resource->UartSerialBus.RxFifoSize,
675 Resource->UartSerialBus.TxFifoSize);
676
677 /* ResourceSource is a required field */
678
679 ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
680 Resource->CommonSerialBus.TypeDataLength;
681
682 DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset),
683 AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
684
685 /* ResourceSourceIndex, ResourceUsage */
686
687 AcpiOsPrintf (",\n");
688 AcpiDmIndent (Level + 1);
689 AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
690
691 AcpiOsPrintf ("%s, ",
692 AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 1)]);
693
694 /* Insert a descriptor name */
695
696 AcpiDmDescriptorName ();
697 AcpiOsPrintf (",\n");
698
699 /* Dump the vendor data */
700
701 AcpiDmIndent (Level + 1);
702 AcpiDmDumpSerialBusVendorData (Resource, Level);
703 AcpiOsPrintf (")\n");
704
705 MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
706 }
707
708
709 /*******************************************************************************
710 *
711 * FUNCTION: AcpiDmSerialBusDescriptor
712 *
713 * PARAMETERS: Info - Extra resource info
714 * Resource - Pointer to the resource descriptor
715 * Length - Length of the descriptor in bytes
716 * Level - Current source code indentation level
717 *
718 * RETURN: None
719 *
720 * DESCRIPTION: Decode a I2C/SPI/UART serial bus descriptor
721 *
722 ******************************************************************************/
723
724 void
725 AcpiDmSerialBusDescriptor (
726 ACPI_OP_WALK_INFO *Info,
727 AML_RESOURCE *Resource,
728 UINT32 Length,
729 UINT32 Level)
730 {
731
732 SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
733 Info, Resource, Length, Level);
734 }
735