Home | History | Annotate | Line # | Download | only in disassembler
dmresrcl2.c revision 1.13
      1 /*******************************************************************************
      2  *
      3  * Module Name: dmresrcl2.c - "Large" Resource Descriptor disassembly (#2)
      4  *
      5  ******************************************************************************/
      6 
      7 /*
      8  * Copyright (C) 2000 - 2021, 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 MERCHANTABILITY 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 AcpiDmCsi2SerialBusDescriptor (
     60     ACPI_OP_WALK_INFO       *Info,
     61     AML_RESOURCE            *Resource,
     62     UINT32                  Length,
     63     UINT32                  Level);
     64 
     65 static void
     66 AcpiDmI2cSerialBusDescriptor (
     67     ACPI_OP_WALK_INFO       *Info,
     68     AML_RESOURCE            *Resource,
     69     UINT32                  Length,
     70     UINT32                  Level);
     71 
     72 static void
     73 AcpiDmSpiSerialBusDescriptor (
     74     ACPI_OP_WALK_INFO       *Info,
     75     AML_RESOURCE            *Resource,
     76     UINT32                  Length,
     77     UINT32                  Level);
     78 
     79 static void
     80 AcpiDmUartSerialBusDescriptor (
     81     ACPI_OP_WALK_INFO       *Info,
     82     AML_RESOURCE            *Resource,
     83     UINT32                  Length,
     84     UINT32                  Level);
     85 
     86 static void
     87 AcpiDmGpioCommon (
     88     ACPI_OP_WALK_INFO       *Info,
     89     AML_RESOURCE            *Resource,
     90     UINT32                  Level);
     91 
     92 static void
     93 AcpiDmDumpRawDataBuffer (
     94     UINT8                   *Buffer,
     95     UINT32                  Length,
     96     UINT32                  Level);
     97 
     98 
     99 /* Dispatch table for the serial bus descriptors */
    100 
    101 static ACPI_RESOURCE_HANDLER        SerialBusResourceDispatch [] =
    102 {
    103     NULL,
    104     AcpiDmI2cSerialBusDescriptor,
    105     AcpiDmSpiSerialBusDescriptor,
    106     AcpiDmUartSerialBusDescriptor,
    107     AcpiDmCsi2SerialBusDescriptor
    108 };
    109 
    110 
    111 /*******************************************************************************
    112  *
    113  * FUNCTION:    AcpiDmDumpRawDataBuffer
    114  *
    115  * PARAMETERS:  Buffer              - Pointer to the data bytes
    116  *              Length              - Length of the descriptor in bytes
    117  *              Level               - Current source code indentation level
    118  *
    119  * RETURN:      None
    120  *
    121  * DESCRIPTION: Dump a data buffer as a RawDataBuffer() object. Used for
    122  *              vendor data bytes.
    123  *
    124  ******************************************************************************/
    125 
    126 static void
    127 AcpiDmDumpRawDataBuffer (
    128     UINT8                   *Buffer,
    129     UINT32                  Length,
    130     UINT32                  Level)
    131 {
    132     UINT32                  Index;
    133     UINT32                  i;
    134     UINT32                  j;
    135 
    136 
    137     if (!Length)
    138     {
    139         return;
    140     }
    141 
    142     AcpiOsPrintf ("RawDataBuffer (0x%.2X)  // Vendor Data", Length);
    143 
    144     AcpiOsPrintf ("\n");
    145     AcpiDmIndent (Level + 1);
    146     AcpiOsPrintf ("{\n");
    147     AcpiDmIndent (Level + 2);
    148 
    149     for (i = 0; i < Length;)
    150     {
    151         for (j = 0; j < 8; j++)
    152         {
    153             Index = i + j;
    154             if (Index >= Length)
    155             {
    156                 goto Finish;
    157             }
    158 
    159             AcpiOsPrintf ("0x%2.2X", Buffer[Index]);
    160             if ((Index + 1) >= Length)
    161             {
    162                 goto Finish;
    163             }
    164 
    165             AcpiOsPrintf (", ");
    166         }
    167 
    168         AcpiOsPrintf ("\n");
    169         AcpiDmIndent (Level + 2);
    170 
    171         i += 8;
    172     }
    173 
    174 Finish:
    175     AcpiOsPrintf ("\n");
    176     AcpiDmIndent (Level + 1);
    177     AcpiOsPrintf ("}");
    178 }
    179 
    180 
    181 /*******************************************************************************
    182  *
    183  * FUNCTION:    AcpiDmGpioCommon
    184  *
    185  * PARAMETERS:  Info                - Extra resource info
    186  *              Resource            - Pointer to the resource descriptor
    187  *              Level               - Current source code indentation level
    188  *
    189  * RETURN:      None
    190  *
    191  * DESCRIPTION: Decode common parts of a GPIO Interrupt descriptor
    192  *
    193  ******************************************************************************/
    194 
    195 static void
    196 AcpiDmGpioCommon (
    197     ACPI_OP_WALK_INFO       *Info,
    198     AML_RESOURCE            *Resource,
    199     UINT32                  Level)
    200 {
    201     UINT16                  *PinList;
    202     UINT8                   *VendorData;
    203     char                    *DeviceName = NULL;
    204     UINT32                  PinCount;
    205     UINT32                  i;
    206 
    207 
    208     /* ResourceSource, ResourceSourceIndex, ResourceType */
    209 
    210     AcpiDmIndent (Level + 1);
    211     if (Resource->Gpio.ResSourceOffset)
    212     {
    213         DeviceName = ACPI_ADD_PTR (char,
    214             Resource, Resource->Gpio.ResSourceOffset);
    215         AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    216     }
    217 
    218     AcpiOsPrintf (", ");
    219     AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.ResSourceIndex);
    220     AcpiOsPrintf ("%s, ",
    221         AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.Flags)]);
    222 
    223     /* Insert a descriptor name */
    224 
    225     AcpiDmDescriptorName ();
    226     AcpiOsPrintf (",");
    227 
    228     /* Dump the vendor data */
    229 
    230     if (Resource->Gpio.VendorOffset)
    231     {
    232         AcpiOsPrintf ("\n");
    233         AcpiDmIndent (Level + 1);
    234         VendorData = ACPI_ADD_PTR (UINT8, Resource,
    235             Resource->Gpio.VendorOffset);
    236 
    237         AcpiDmDumpRawDataBuffer (VendorData,
    238             Resource->Gpio.VendorLength, Level);
    239     }
    240 
    241     AcpiOsPrintf (")\n");
    242 
    243     /* Dump the interrupt list */
    244 
    245     AcpiDmIndent (Level + 1);
    246     AcpiOsPrintf ("{   // Pin list\n");
    247 
    248     PinCount = ((UINT32) (Resource->Gpio.ResSourceOffset -
    249         Resource->Gpio.PinTableOffset)) /
    250         sizeof (UINT16);
    251 
    252     PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
    253         Resource->Gpio.PinTableOffset);
    254 
    255     for (i = 0; i < PinCount; i++)
    256     {
    257         AcpiDmIndent (Level + 2);
    258         AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
    259             ((i + 1) < PinCount) ? "," : "");
    260     }
    261 
    262     AcpiDmIndent (Level + 1);
    263     AcpiOsPrintf ("}\n");
    264 
    265     MpSaveGpioInfo (Info->MappingOp, Resource,
    266         PinCount, PinList, DeviceName);
    267 }
    268 
    269 
    270 /*******************************************************************************
    271  *
    272  * FUNCTION:    AcpiDmGpioIntDescriptor
    273  *
    274  * PARAMETERS:  Info                - Extra resource info
    275  *              Resource            - Pointer to the resource descriptor
    276  *              Length              - Length of the descriptor in bytes
    277  *              Level               - Current source code indentation level
    278  *
    279  * RETURN:      None
    280  *
    281  * DESCRIPTION: Decode a GPIO Interrupt descriptor
    282  *
    283  ******************************************************************************/
    284 
    285 static void
    286 AcpiDmGpioIntDescriptor (
    287     ACPI_OP_WALK_INFO       *Info,
    288     AML_RESOURCE            *Resource,
    289     UINT32                  Length,
    290     UINT32                  Level)
    291 {
    292 
    293     /* Dump the GpioInt-specific portion of the descriptor */
    294 
    295     /* EdgeLevel, ActiveLevel, Shared */
    296 
    297     AcpiDmIndent (Level);
    298     AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
    299         AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Gpio.IntFlags)],
    300         AcpiGbl_LlDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 1)],
    301         AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
    302 
    303     /* PinConfig, DebounceTimeout */
    304 
    305     if (Resource->Gpio.PinConfig <= 3)
    306     {
    307         AcpiOsPrintf ("%s, ",
    308             AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
    309     }
    310     else
    311     {
    312         AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
    313     }
    314     AcpiOsPrintf ("0x%4.4X,\n", Resource->Gpio.DebounceTimeout);
    315 
    316     /* Dump the GpioInt/GpioIo common portion of the descriptor */
    317 
    318     AcpiDmGpioCommon (Info, Resource, Level);
    319 }
    320 
    321 
    322 /*******************************************************************************
    323  *
    324  * FUNCTION:    AcpiDmGpioIoDescriptor
    325  *
    326  * PARAMETERS:  Info                - Extra resource info
    327  *              Resource            - Pointer to the resource descriptor
    328  *              Length              - Length of the descriptor in bytes
    329  *              Level               - Current source code indentation level
    330  *
    331  * RETURN:      None
    332  *
    333  * DESCRIPTION: Decode a GPIO I/O descriptor
    334  *
    335  ******************************************************************************/
    336 
    337 static void
    338 AcpiDmGpioIoDescriptor (
    339     ACPI_OP_WALK_INFO       *Info,
    340     AML_RESOURCE            *Resource,
    341     UINT32                  Length,
    342     UINT32                  Level)
    343 {
    344 
    345     /* Dump the GpioIo-specific portion of the descriptor */
    346 
    347     /* Shared, PinConfig */
    348 
    349     AcpiDmIndent (Level);
    350     AcpiOsPrintf ("GpioIo (%s, ",
    351         AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Gpio.IntFlags, 3)]);
    352 
    353     if (Resource->Gpio.PinConfig <= 3)
    354     {
    355         AcpiOsPrintf ("%s, ",
    356             AcpiGbl_PpcDecode[Resource->Gpio.PinConfig]);
    357     }
    358     else
    359     {
    360         AcpiOsPrintf ("0x%2.2X, ", Resource->Gpio.PinConfig);
    361     }
    362 
    363     /* DebounceTimeout, DriveStrength, IoRestriction */
    364 
    365     AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DebounceTimeout);
    366     AcpiOsPrintf ("0x%4.4X, ", Resource->Gpio.DriveStrength);
    367     AcpiOsPrintf ("%s,\n",
    368         AcpiGbl_IorDecode [ACPI_GET_2BIT_FLAG (Resource->Gpio.IntFlags)]);
    369 
    370     /* Dump the GpioInt/GpioIo common portion of the descriptor */
    371 
    372     AcpiDmGpioCommon (Info, Resource, Level);
    373 }
    374 
    375 
    376 /*******************************************************************************
    377  *
    378  * FUNCTION:    AcpiDmGpioDescriptor
    379  *
    380  * PARAMETERS:  Info                - Extra resource info
    381  *              Resource            - Pointer to the resource descriptor
    382  *              Length              - Length of the descriptor in bytes
    383  *              Level               - Current source code indentation level
    384  *
    385  * RETURN:      None
    386  *
    387  * DESCRIPTION: Decode a GpioInt/GpioIo GPIO Interrupt/IO descriptor
    388  *
    389  ******************************************************************************/
    390 
    391 void
    392 AcpiDmGpioDescriptor (
    393     ACPI_OP_WALK_INFO       *Info,
    394     AML_RESOURCE            *Resource,
    395     UINT32                  Length,
    396     UINT32                  Level)
    397 {
    398     UINT8                   ConnectionType;
    399 
    400 
    401     ConnectionType = Resource->Gpio.ConnectionType;
    402 
    403     switch (ConnectionType)
    404     {
    405     case AML_RESOURCE_GPIO_TYPE_INT:
    406 
    407         AcpiDmGpioIntDescriptor (Info, Resource, Length, Level);
    408         break;
    409 
    410     case AML_RESOURCE_GPIO_TYPE_IO:
    411 
    412         AcpiDmGpioIoDescriptor (Info, Resource, Length, Level);
    413         break;
    414 
    415     default:
    416 
    417         AcpiOsPrintf ("Unknown GPIO type\n");
    418         break;
    419     }
    420 }
    421 
    422 /*******************************************************************************
    423  *
    424  * FUNCTION:    AcpiDmPinFunctionDescriptor
    425  *
    426  * PARAMETERS:  Info                - Extra resource info
    427  *              Resource            - Pointer to the resource descriptor
    428  *              Length              - Length of the descriptor in bytes
    429  *              Level               - Current source code indentation level
    430  *
    431  * RETURN:      None
    432  *
    433  * DESCRIPTION: Decode a PinFunction descriptor
    434  *
    435  ******************************************************************************/
    436 
    437 void
    438 AcpiDmPinFunctionDescriptor (
    439     ACPI_OP_WALK_INFO       *Info,
    440     AML_RESOURCE            *Resource,
    441     UINT32                  Length,
    442     UINT32                  Level)
    443 {
    444     UINT16                  *PinList;
    445     UINT8                   *VendorData;
    446     char                    *DeviceName = NULL;
    447     UINT32                  PinCount;
    448     UINT32                  i;
    449 
    450     AcpiDmIndent (Level);
    451     AcpiOsPrintf ("PinFunction (%s, ",
    452         AcpiGbl_ShrDecode [ACPI_GET_1BIT_FLAG (Resource->PinFunction.Flags)]);
    453 
    454     if (Resource->PinFunction.PinConfig <= 3)
    455     {
    456         AcpiOsPrintf ("%s, ",
    457             AcpiGbl_PpcDecode[Resource->PinFunction.PinConfig]);
    458     }
    459     else
    460     {
    461         AcpiOsPrintf ("0x%2.2X, ", Resource->PinFunction.PinConfig);
    462     }
    463 
    464     /* FunctionNumber */
    465 
    466     AcpiOsPrintf ("0x%4.4X, ", Resource->PinFunction.FunctionNumber);
    467 
    468     if (Resource->PinFunction.ResSourceOffset)
    469     {
    470         DeviceName = ACPI_ADD_PTR (char,
    471             Resource, Resource->PinFunction.ResSourceOffset),
    472         AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    473     }
    474 
    475     AcpiOsPrintf (", ");
    476     AcpiOsPrintf ("0x%2.2X,\n", Resource->PinFunction.ResSourceIndex);
    477 
    478     AcpiDmIndent (Level + 1);
    479 
    480     /* Always ResourceConsumer */
    481     AcpiOsPrintf ("%s, ", AcpiGbl_ConsumeDecode [ACPI_CONSUMER]);
    482 
    483     /* Insert a descriptor name */
    484 
    485     AcpiDmDescriptorName ();
    486 
    487     AcpiOsPrintf (",");
    488 
    489     /* Dump the vendor data */
    490 
    491     if (Resource->PinFunction.VendorLength)
    492     {
    493         AcpiOsPrintf ("\n");
    494         AcpiDmIndent (Level + 1);
    495         VendorData = ACPI_ADD_PTR (UINT8, Resource,
    496             Resource->PinFunction.VendorOffset);
    497 
    498         AcpiDmDumpRawDataBuffer (VendorData,
    499             Resource->PinFunction.VendorLength, Level);
    500     }
    501 
    502     AcpiOsPrintf (")\n");
    503 
    504     AcpiDmIndent (Level + 1);
    505 
    506     /* Dump the interrupt list */
    507 
    508     AcpiOsPrintf ("{   // Pin list\n");
    509 
    510     PinCount = ((UINT32) (Resource->PinFunction.ResSourceOffset -
    511         Resource->PinFunction.PinTableOffset)) /
    512         sizeof (UINT16);
    513 
    514     PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
    515         Resource->PinFunction.PinTableOffset);
    516 
    517     for (i = 0; i < PinCount; i++)
    518     {
    519         AcpiDmIndent (Level + 2);
    520         AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
    521             ((i + 1) < PinCount) ? "," : "");
    522     }
    523 
    524     AcpiDmIndent (Level + 1);
    525     AcpiOsPrintf ("}\n");
    526 }
    527 
    528 
    529 /*******************************************************************************
    530  *
    531  * FUNCTION:    AcpiDmDumpSerialBusVendorData
    532  *
    533  * PARAMETERS:  Resource            - Pointer to the resource descriptor
    534  *
    535  * RETURN:      None
    536  *
    537  * DESCRIPTION: Dump optional serial bus vendor data
    538  *
    539  ******************************************************************************/
    540 
    541 static void
    542 AcpiDmDumpSerialBusVendorData (
    543     AML_RESOURCE            *Resource,
    544     UINT32                  Level)
    545 {
    546     UINT8                   *VendorData;
    547     UINT32                  VendorLength;
    548 
    549 
    550     /* Get the (optional) vendor data and length */
    551 
    552     switch (Resource->CommonSerialBus.Type)
    553     {
    554     case AML_RESOURCE_I2C_SERIALBUSTYPE:
    555 
    556         VendorLength = Resource->CommonSerialBus.TypeDataLength -
    557             AML_RESOURCE_I2C_MIN_DATA_LEN;
    558 
    559         VendorData = ACPI_ADD_PTR (UINT8, Resource,
    560             sizeof (AML_RESOURCE_I2C_SERIALBUS));
    561         break;
    562 
    563     case AML_RESOURCE_SPI_SERIALBUSTYPE:
    564 
    565         VendorLength = Resource->CommonSerialBus.TypeDataLength -
    566             AML_RESOURCE_SPI_MIN_DATA_LEN;
    567 
    568         VendorData = ACPI_ADD_PTR (UINT8, Resource,
    569             sizeof (AML_RESOURCE_SPI_SERIALBUS));
    570         break;
    571 
    572     case AML_RESOURCE_UART_SERIALBUSTYPE:
    573 
    574         VendorLength = Resource->CommonSerialBus.TypeDataLength -
    575             AML_RESOURCE_UART_MIN_DATA_LEN;
    576 
    577         VendorData = ACPI_ADD_PTR (UINT8, Resource,
    578             sizeof (AML_RESOURCE_UART_SERIALBUS));
    579         break;
    580 
    581     case AML_RESOURCE_CSI2_SERIALBUSTYPE:
    582 
    583         VendorLength = Resource->CommonSerialBus.TypeDataLength -
    584             AML_RESOURCE_CSI2_MIN_DATA_LEN;
    585 
    586         VendorData = ACPI_ADD_PTR (UINT8, Resource,
    587             sizeof (AML_RESOURCE_CSI2_SERIALBUS));
    588         break;
    589 
    590     default:
    591 
    592         return;
    593     }
    594 
    595     /* Dump the vendor bytes as a RawDataBuffer object */
    596 
    597     AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level);
    598 }
    599 
    600 
    601 /*******************************************************************************
    602  *
    603  * FUNCTION:    AcpiDmCsi2SerialBusDescriptor
    604  *
    605  * PARAMETERS:  Info                - Extra resource info
    606  *              Resource            - Pointer to the resource descriptor
    607  *              Length              - Length of the descriptor in bytes
    608  *              Level               - Current source code indentation level
    609  *
    610  * RETURN:      None
    611  *
    612  * DESCRIPTION: Decode a CSI2 serial bus descriptor
    613  *
    614  ******************************************************************************/
    615 
    616 static void
    617 AcpiDmCsi2SerialBusDescriptor (
    618     ACPI_OP_WALK_INFO       *Info,
    619     AML_RESOURCE            *Resource,
    620     UINT32                  Length,
    621     UINT32                  Level)
    622 {
    623     UINT32                  ResourceSourceOffset;
    624     char                    *DeviceName;
    625 
    626 
    627     /* SlaveMode, PhyType, LocalPortInstance */
    628 
    629     AcpiDmIndent (Level);
    630     AcpiOsPrintf ("Csi2Bus (%s,",
    631         AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->Csi2SerialBus.Flags)]);
    632 
    633     AcpiOsPrintf (" 0x%2.2X, 0x%2.2X,\n",
    634         Resource->Csi2SerialBus.TypeSpecificFlags & 0x03,
    635         Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC);
    636 
    637     /* ResourceSource is a required field */
    638 
    639     ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
    640         Resource->CommonSerialBus.TypeDataLength;
    641 
    642     AcpiDmIndent (Level + 1);
    643     DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset);
    644     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    645 
    646     /* ResourceSourceIndex, ResourceUsage */
    647 
    648     AcpiOsPrintf (",\n");
    649     AcpiDmIndent (Level + 1);
    650     AcpiOsPrintf ("0x%2.2X, ", Resource->Csi2SerialBus.ResSourceIndex);
    651 
    652     AcpiOsPrintf ("%s, ",
    653         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->Csi2SerialBus.Flags, 1)]);
    654 
    655     /* Insert a descriptor name */
    656 
    657     AcpiDmDescriptorName ();
    658 
    659     /* Dump the vendor data */
    660 
    661     AcpiOsPrintf (",\n");
    662     AcpiDmIndent (Level + 1);
    663     AcpiDmDumpSerialBusVendorData (Resource, Level);
    664     AcpiOsPrintf (")\n");
    665 
    666     MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
    667 }
    668 
    669 
    670 /*******************************************************************************
    671  *
    672  * FUNCTION:    AcpiDmI2cSerialBusDescriptor
    673  *
    674  * PARAMETERS:  Info                - Extra resource info
    675  *              Resource            - Pointer to the resource descriptor
    676  *              Length              - Length of the descriptor in bytes
    677  *              Level               - Current source code indentation level
    678  *
    679  * RETURN:      None
    680  *
    681  * DESCRIPTION: Decode a I2C serial bus descriptor
    682  *
    683  ******************************************************************************/
    684 
    685 static void
    686 AcpiDmI2cSerialBusDescriptor (
    687     ACPI_OP_WALK_INFO       *Info,
    688     AML_RESOURCE            *Resource,
    689     UINT32                  Length,
    690     UINT32                  Level)
    691 {
    692     UINT32                  ResourceSourceOffset;
    693     char                    *DeviceName;
    694 
    695 
    696     /* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
    697 
    698     AcpiDmIndent (Level);
    699     AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
    700         Resource->I2cSerialBus.SlaveAddress,
    701         AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
    702         Resource->I2cSerialBus.ConnectionSpeed);
    703 
    704     AcpiDmIndent (Level + 1);
    705     AcpiOsPrintf ("%s, ",
    706         AcpiGbl_AmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.TypeSpecificFlags)]);
    707 
    708     /* ResourceSource is a required field */
    709 
    710     ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
    711         Resource->CommonSerialBus.TypeDataLength;
    712 
    713     DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset);
    714     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    715 
    716     /* ResourceSourceIndex, ResourceUsage */
    717 
    718     AcpiOsPrintf (",\n");
    719     AcpiDmIndent (Level + 1);
    720     AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
    721 
    722     AcpiOsPrintf ("%s, ",
    723         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 1)]);
    724 
    725     /* Insert a descriptor name */
    726 
    727     AcpiDmDescriptorName ();
    728 
    729     /* Share */
    730 
    731     AcpiOsPrintf (", %s,\n",
    732         AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 2)]);
    733 
    734     /* Dump the vendor data */
    735 
    736     AcpiDmIndent (Level + 1);
    737     AcpiDmDumpSerialBusVendorData (Resource, Level);
    738     AcpiOsPrintf (")\n");
    739 
    740     MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
    741 }
    742 
    743 
    744 /*******************************************************************************
    745  *
    746  * FUNCTION:    AcpiDmSpiSerialBusDescriptor
    747  *
    748  * PARAMETERS:  Info                - Extra resource info
    749  *              Resource            - Pointer to the resource descriptor
    750  *              Length              - Length of the descriptor in bytes
    751  *              Level               - Current source code indentation level
    752  *
    753  * RETURN:      None
    754  *
    755  * DESCRIPTION: Decode a SPI serial bus descriptor
    756  *
    757  ******************************************************************************/
    758 
    759 static void
    760 AcpiDmSpiSerialBusDescriptor (
    761     ACPI_OP_WALK_INFO       *Info,
    762     AML_RESOURCE            *Resource,
    763     UINT32                  Length,
    764     UINT32                  Level)
    765 {
    766     UINT32                  ResourceSourceOffset;
    767     char                    *DeviceName;
    768 
    769 
    770     /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
    771 
    772     AcpiDmIndent (Level);
    773     AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
    774         Resource->SpiSerialBus.DeviceSelection,
    775         AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
    776         AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
    777         Resource->SpiSerialBus.DataBitLength);
    778 
    779     /* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */
    780 
    781     AcpiDmIndent (Level + 1);
    782     AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
    783         AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.Flags)],
    784         Resource->SpiSerialBus.ConnectionSpeed,
    785         AcpiGbl_CpoDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPolarity)]);
    786 
    787     AcpiDmIndent (Level + 1);
    788     AcpiOsPrintf ("%s, ",
    789         AcpiGbl_CphDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.ClockPhase)]);
    790 
    791     /* ResourceSource is a required field */
    792 
    793     ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
    794         Resource->CommonSerialBus.TypeDataLength;
    795 
    796     DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset);
    797     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    798 
    799     /* ResourceSourceIndex, ResourceUsage */
    800 
    801     AcpiOsPrintf (",\n");
    802     AcpiDmIndent (Level + 1);
    803     AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
    804 
    805     AcpiOsPrintf ("%s, ",
    806         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 1)]);
    807 
    808     /* Insert a descriptor name */
    809 
    810     AcpiDmDescriptorName ();
    811 
    812     /* Share */
    813 
    814     AcpiOsPrintf (", %s,\n",
    815         AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 2)]);
    816 
    817     /* Dump the vendor data */
    818 
    819     AcpiDmIndent (Level + 1);
    820     AcpiDmDumpSerialBusVendorData (Resource, Level);
    821     AcpiOsPrintf (")\n");
    822 
    823     MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
    824 }
    825 
    826 
    827 /*******************************************************************************
    828  *
    829  * FUNCTION:    AcpiDmUartSerialBusDescriptor
    830  *
    831  * PARAMETERS:  Info                - Extra resource info
    832  *              Resource            - Pointer to the resource descriptor
    833  *              Length              - Length of the descriptor in bytes
    834  *              Level               - Current source code indentation level
    835  *
    836  * RETURN:      None
    837  *
    838  * DESCRIPTION: Decode a UART serial bus descriptor
    839  *
    840  ******************************************************************************/
    841 
    842 static void
    843 AcpiDmUartSerialBusDescriptor (
    844     ACPI_OP_WALK_INFO       *Info,
    845     AML_RESOURCE            *Resource,
    846     UINT32                  Length,
    847     UINT32                  Level)
    848 {
    849     UINT32                  ResourceSourceOffset;
    850     char                    *DeviceName;
    851 
    852 
    853     /* ConnectionSpeed, BitsPerByte, StopBits */
    854 
    855     AcpiDmIndent (Level);
    856     AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n",
    857         Resource->UartSerialBus.DefaultBaudRate,
    858         AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
    859         AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
    860 
    861     /* LinesInUse, IsBigEndian, Parity, FlowControl */
    862 
    863     AcpiDmIndent (Level + 1);
    864     AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n",
    865         Resource->UartSerialBus.LinesEnabled,
    866         AcpiGbl_EdDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 7)],
    867         AcpiGbl_PtDecode [ACPI_GET_3BIT_FLAG (Resource->UartSerialBus.Parity)],
    868         AcpiGbl_FcDecode [ACPI_GET_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags)]);
    869 
    870     /* ReceiveBufferSize, TransmitBufferSize */
    871 
    872     AcpiDmIndent (Level + 1);
    873     AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ",
    874         Resource->UartSerialBus.RxFifoSize,
    875         Resource->UartSerialBus.TxFifoSize);
    876 
    877     /* ResourceSource is a required field */
    878 
    879     ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
    880         Resource->CommonSerialBus.TypeDataLength;
    881 
    882     DeviceName = ACPI_ADD_PTR (char, Resource, ResourceSourceOffset);
    883     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
    884 
    885     /* ResourceSourceIndex, ResourceUsage */
    886 
    887     AcpiOsPrintf (",\n");
    888     AcpiDmIndent (Level + 1);
    889     AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
    890 
    891     AcpiOsPrintf ("%s, ",
    892         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 1)]);
    893 
    894     /* Insert a descriptor name */
    895 
    896     AcpiDmDescriptorName ();
    897 
    898     /* Share */
    899 
    900     AcpiOsPrintf (", %s,\n",
    901         AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 2)]);
    902 
    903     /* Dump the vendor data */
    904 
    905     AcpiDmIndent (Level + 1);
    906     AcpiDmDumpSerialBusVendorData (Resource, Level);
    907     AcpiOsPrintf (")\n");
    908 
    909     MpSaveSerialInfo (Info->MappingOp, Resource, DeviceName);
    910 }
    911 
    912 
    913 /*******************************************************************************
    914  *
    915  * FUNCTION:    AcpiDmSerialBusDescriptor
    916  *
    917  * PARAMETERS:  Info                - Extra resource info
    918  *              Resource            - Pointer to the resource descriptor
    919  *              Length              - Length of the descriptor in bytes
    920  *              Level               - Current source code indentation level
    921  *
    922  * RETURN:      None
    923  *
    924  * DESCRIPTION: Decode a I2C/SPI/UART/CSI2 serial bus descriptor
    925  *
    926  ******************************************************************************/
    927 
    928 void
    929 AcpiDmSerialBusDescriptor (
    930     ACPI_OP_WALK_INFO       *Info,
    931     AML_RESOURCE            *Resource,
    932     UINT32                  Length,
    933     UINT32                  Level)
    934 {
    935 
    936     SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
    937         Info, Resource, Length, Level);
    938 }
    939 
    940 /*******************************************************************************
    941  *
    942  * FUNCTION:    AcpiDmPinConfig
    943  *
    944  * PARAMETERS:  PinConfigType       - Pin configuration type
    945  *              PinConfigValue      - Pin configuration value
    946  *
    947  * RETURN:      None
    948  *
    949  * DESCRIPTION: Pretty prints PinConfig type and value.
    950  *
    951  ******************************************************************************/
    952 
    953 static void
    954 AcpiDmPinConfig(
    955     UINT8                   PinConfigType,
    956     UINT32                  PinConfigValue)
    957 {
    958     if (PinConfigType <= 13)
    959     {
    960         AcpiOsPrintf ("0x%2.2X /* %s */, ", PinConfigType,
    961             AcpiGbl_PtypDecode[PinConfigType]);
    962     }
    963     else
    964     {
    965         AcpiOsPrintf ("0x%2.2X, /* Vendor Defined */ ", PinConfigType);
    966     }
    967 
    968     /* PinConfigValue */
    969 
    970     AcpiOsPrintf ("0x%4.4X,\n", PinConfigValue);
    971 }
    972 
    973 /*******************************************************************************
    974  *
    975  * FUNCTION:    AcpiDmPinConfigDescriptor
    976  *
    977  * PARAMETERS:  Info                - Extra resource info
    978  *              Resource            - Pointer to the resource descriptor
    979  *              Length              - Length of the descriptor in bytes
    980  *              Level               - Current source code indentation level
    981  *
    982  * RETURN:      None
    983  *
    984  * DESCRIPTION: Decode a PinConfig descriptor
    985  *
    986  ******************************************************************************/
    987 
    988 void
    989 AcpiDmPinConfigDescriptor (
    990     ACPI_OP_WALK_INFO       *Info,
    991     AML_RESOURCE            *Resource,
    992     UINT32                  Length,
    993     UINT32                  Level)
    994 {
    995     UINT16                  *PinList;
    996     UINT8                   *VendorData;
    997     char                    *DeviceName = NULL;
    998     UINT32                  PinCount;
    999     UINT32                  i;
   1000 
   1001     AcpiDmIndent (Level);
   1002     AcpiOsPrintf ("PinConfig (%s, ",
   1003         AcpiGbl_ShrDecode [ACPI_GET_1BIT_FLAG (Resource->PinConfig.Flags)]);
   1004 
   1005     AcpiDmPinConfig (Resource->PinConfig.PinConfigType,
   1006         Resource->PinConfig.PinConfigValue);
   1007 
   1008     AcpiDmIndent (Level + 1);
   1009 
   1010     if (Resource->PinConfig.ResSourceOffset)
   1011     {
   1012         DeviceName = ACPI_ADD_PTR (char,
   1013             Resource, Resource->PinConfig.ResSourceOffset),
   1014         AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
   1015     }
   1016 
   1017     AcpiOsPrintf (", ");
   1018     AcpiOsPrintf ("0x%2.2X, ", Resource->PinConfig.ResSourceIndex);
   1019 
   1020     AcpiOsPrintf ("%s, ",
   1021         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->PinConfig.Flags, 1)]);
   1022 
   1023     /* Insert a descriptor name */
   1024 
   1025     AcpiDmDescriptorName ();
   1026 
   1027     AcpiOsPrintf (",");
   1028 
   1029     /* Dump the vendor data */
   1030 
   1031     if (Resource->PinConfig.VendorLength)
   1032     {
   1033         AcpiOsPrintf ("\n");
   1034         AcpiDmIndent (Level + 1);
   1035         VendorData = ACPI_ADD_PTR (UINT8, Resource,
   1036             Resource->PinConfig.VendorOffset);
   1037 
   1038         AcpiDmDumpRawDataBuffer (VendorData,
   1039             Resource->PinConfig.VendorLength, Level);
   1040     }
   1041 
   1042     AcpiOsPrintf (")\n");
   1043 
   1044     AcpiDmIndent (Level + 1);
   1045 
   1046     /* Dump the interrupt list */
   1047 
   1048     AcpiOsPrintf ("{   // Pin list\n");
   1049 
   1050     PinCount = ((UINT32) (Resource->PinConfig.ResSourceOffset -
   1051         Resource->PinConfig.PinTableOffset)) /
   1052         sizeof (UINT16);
   1053 
   1054     PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
   1055         Resource->PinConfig.PinTableOffset);
   1056 
   1057     for (i = 0; i < PinCount; i++)
   1058     {
   1059         AcpiDmIndent (Level + 2);
   1060         AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
   1061             ((i + 1) < PinCount) ? "," : "");
   1062     }
   1063 
   1064     AcpiDmIndent (Level + 1);
   1065     AcpiOsPrintf ("}\n");
   1066 }
   1067 
   1068 /*******************************************************************************
   1069  *
   1070  * FUNCTION:    AcpiDmPinGroupDescriptor
   1071  *
   1072  * PARAMETERS:  Info                - Extra resource info
   1073  *              Resource            - Pointer to the resource descriptor
   1074  *              Length              - Length of the descriptor in bytes
   1075  *              Level               - Current source code indentation level
   1076  *
   1077  * RETURN:      None
   1078  *
   1079  * DESCRIPTION: Decode a PinGroup descriptor
   1080  *
   1081  ******************************************************************************/
   1082 
   1083 void
   1084 AcpiDmPinGroupDescriptor (
   1085     ACPI_OP_WALK_INFO       *Info,
   1086     AML_RESOURCE            *Resource,
   1087     UINT32                  Length,
   1088     UINT32                  Level)
   1089 {
   1090     char                    *Label;
   1091     UINT16                  *PinList;
   1092     UINT8                   *VendorData;
   1093     UINT32                  PinCount;
   1094     UINT32                  i;
   1095 
   1096     AcpiDmIndent (Level);
   1097     /* Always producer */
   1098     AcpiOsPrintf ("PinGroup (");
   1099 
   1100     Label = ACPI_ADD_PTR (char,
   1101         Resource, Resource->PinGroup.LabelOffset),
   1102     AcpiUtPrintString (Label, ACPI_UINT16_MAX);
   1103 
   1104     AcpiOsPrintf (", ");
   1105 
   1106     AcpiOsPrintf ("%s, ",
   1107         AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->PinGroup.Flags)]);
   1108 
   1109     /* Insert a descriptor name */
   1110 
   1111     AcpiDmDescriptorName ();
   1112 
   1113     AcpiOsPrintf (",");
   1114 
   1115     /* Dump the vendor data */
   1116 
   1117     if (Resource->PinGroup.VendorLength)
   1118     {
   1119         AcpiOsPrintf ("\n");
   1120         AcpiDmIndent (Level + 1);
   1121         VendorData = ACPI_ADD_PTR (UINT8, Resource,
   1122             Resource->PinGroup.VendorOffset);
   1123 
   1124         AcpiDmDumpRawDataBuffer (VendorData,
   1125             Resource->PinGroup.VendorLength, Level);
   1126     }
   1127 
   1128     AcpiOsPrintf (")\n");
   1129 
   1130     AcpiDmIndent (Level + 1);
   1131 
   1132     /* Dump the interrupt list */
   1133 
   1134     AcpiOsPrintf ("{   // Pin list\n");
   1135 
   1136     PinCount = (Resource->PinGroup.LabelOffset -
   1137         Resource->PinGroup.PinTableOffset) / sizeof (UINT16);
   1138 
   1139     PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource,
   1140         Resource->PinGroup.PinTableOffset);
   1141 
   1142     for (i = 0; i < PinCount; i++)
   1143     {
   1144         AcpiDmIndent (Level + 2);
   1145         AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
   1146             ((i + 1) < PinCount) ? "," : "");
   1147     }
   1148 
   1149     AcpiDmIndent (Level + 1);
   1150     AcpiOsPrintf ("}\n");
   1151 }
   1152 
   1153 /*******************************************************************************
   1154  *
   1155  * FUNCTION:    AcpiDmPinGroupFunctionDescriptor
   1156  *
   1157  * PARAMETERS:  Info                - Extra resource info
   1158  *              Resource            - Pointer to the resource descriptor
   1159  *              Length              - Length of the descriptor in bytes
   1160  *              Level               - Current source code indentation level
   1161  *
   1162  * RETURN:      None
   1163  *
   1164  * DESCRIPTION: Decode a PinGroupFunction descriptor
   1165  *
   1166  ******************************************************************************/
   1167 
   1168 void
   1169 AcpiDmPinGroupFunctionDescriptor (
   1170     ACPI_OP_WALK_INFO       *Info,
   1171     AML_RESOURCE            *Resource,
   1172     UINT32                  Length,
   1173     UINT32                  Level)
   1174 {
   1175     UINT8                   *VendorData;
   1176     char                    *DeviceName = NULL;
   1177     char                    *Label = NULL;
   1178 
   1179     AcpiDmIndent (Level);
   1180     AcpiOsPrintf ("PinGroupFunction (%s, ",
   1181         AcpiGbl_ShrDecode [ACPI_GET_1BIT_FLAG (Resource->PinGroupFunction.Flags)]);
   1182 
   1183     /* FunctionNumber */
   1184 
   1185     AcpiOsPrintf ("0x%4.4X, ", Resource->PinGroupFunction.FunctionNumber);
   1186 
   1187     DeviceName = ACPI_ADD_PTR (char,
   1188         Resource, Resource->PinGroupFunction.ResSourceOffset),
   1189     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
   1190 
   1191     AcpiOsPrintf (", ");
   1192     AcpiOsPrintf ("0x%2.2X,\n", Resource->PinGroupFunction.ResSourceIndex);
   1193 
   1194     AcpiDmIndent (Level + 1);
   1195 
   1196     Label = ACPI_ADD_PTR (char, Resource,
   1197         Resource->PinGroupFunction.ResSourceLabelOffset);
   1198     AcpiUtPrintString (Label, ACPI_UINT16_MAX);
   1199 
   1200     AcpiOsPrintf (", ");
   1201 
   1202     AcpiOsPrintf ("%s, ",
   1203         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->PinGroupFunction.Flags, 1)]);
   1204 
   1205     /* Insert a descriptor name */
   1206 
   1207     AcpiDmDescriptorName ();
   1208 
   1209     AcpiOsPrintf (",");
   1210 
   1211     /* Dump the vendor data */
   1212 
   1213     if (Resource->PinGroupFunction.VendorLength)
   1214     {
   1215         AcpiOsPrintf ("\n");
   1216         AcpiDmIndent (Level + 1);
   1217         VendorData = ACPI_ADD_PTR (UINT8, Resource,
   1218             Resource->PinGroupFunction.VendorOffset);
   1219 
   1220         AcpiDmDumpRawDataBuffer (VendorData,
   1221             Resource->PinGroupFunction.VendorLength, Level);
   1222     }
   1223 
   1224     AcpiOsPrintf (")\n");
   1225 }
   1226 
   1227 /*******************************************************************************
   1228  *
   1229  * FUNCTION:    AcpiDmPinGroupConfigDescriptor
   1230  *
   1231  * PARAMETERS:  Info                - Extra resource info
   1232  *              Resource            - Pointer to the resource descriptor
   1233  *              Length              - Length of the descriptor in bytes
   1234  *              Level               - Current source code indentation level
   1235  *
   1236  * RETURN:      None
   1237  *
   1238  * DESCRIPTION: Decode a PinGroupConfig descriptor
   1239  *
   1240  ******************************************************************************/
   1241 
   1242 void
   1243 AcpiDmPinGroupConfigDescriptor (
   1244     ACPI_OP_WALK_INFO       *Info,
   1245     AML_RESOURCE            *Resource,
   1246     UINT32                  Length,
   1247     UINT32                  Level)
   1248 {
   1249     UINT8                   *VendorData;
   1250     char                    *DeviceName = NULL;
   1251     char                    *Label = NULL;
   1252 
   1253     AcpiDmIndent (Level);
   1254     AcpiOsPrintf ("PinGroupConfig (%s, ",
   1255         AcpiGbl_ShrDecode [ACPI_GET_1BIT_FLAG (Resource->PinGroupConfig.Flags)]);
   1256 
   1257     AcpiDmPinConfig(Resource->PinGroupConfig.PinConfigType,
   1258         Resource->PinGroupConfig.PinConfigValue);
   1259 
   1260     AcpiDmIndent (Level + 1);
   1261 
   1262     DeviceName = ACPI_ADD_PTR (char,
   1263         Resource, Resource->PinGroupConfig.ResSourceOffset),
   1264     AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
   1265 
   1266     AcpiOsPrintf (", ");
   1267     AcpiOsPrintf ("0x%2.2X, ", Resource->PinGroupConfig.ResSourceIndex);
   1268 
   1269     Label = ACPI_ADD_PTR (char, Resource,
   1270         Resource->PinGroupConfig.ResSourceLabelOffset);
   1271     AcpiUtPrintString (Label, ACPI_UINT16_MAX);
   1272 
   1273     AcpiOsPrintf (", ");
   1274 
   1275     AcpiOsPrintf ("%s, ",
   1276         AcpiGbl_ConsumeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->PinGroupConfig.Flags, 1)]);
   1277 
   1278     /* Insert a descriptor name */
   1279 
   1280     AcpiDmDescriptorName ();
   1281 
   1282     AcpiOsPrintf (",");
   1283 
   1284     /* Dump the vendor data */
   1285 
   1286     if (Resource->PinGroupConfig.VendorLength)
   1287     {
   1288         AcpiOsPrintf ("\n");
   1289         AcpiDmIndent (Level + 1);
   1290         VendorData = ACPI_ADD_PTR (UINT8, Resource,
   1291             Resource->PinGroupConfig.VendorOffset);
   1292 
   1293         AcpiDmDumpRawDataBuffer (VendorData,
   1294             Resource->PinGroupConfig.VendorLength, Level);
   1295     }
   1296 
   1297     AcpiOsPrintf (")\n");
   1298 }
   1299