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