Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/disassembler/dmutils.c
          +++ new/usr/src/common/acpica/components/disassembler/dmutils.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: dmutils - AML disassembler utilities
   4    4   *
   5    5   ******************************************************************************/
   6    6  
   7    7  /*
   8      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2013, Intel Corp.
   9    9   * All rights reserved.
  10   10   *
  11   11   * Redistribution and use in source and binary forms, with or without
  12   12   * modification, are permitted provided that the following conditions
  13   13   * are met:
  14   14   * 1. Redistributions of source code must retain the above copyright
  15   15   *    notice, this list of conditions, and the following disclaimer,
  16   16   *    without modification.
  17   17   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18   18   *    substantially similar to the "NO WARRANTY" disclaimer below
↓ open down ↓ 109 lines elided ↑ open up ↑
 128  128  
 129  129  
 130  130  /*******************************************************************************
 131  131   *
 132  132   * FUNCTION:    AcpiDmDecodeAttribute
 133  133   *
 134  134   * PARAMETERS:  Attribute       - Attribute field of AccessAs keyword
 135  135   *
 136  136   * RETURN:      None
 137  137   *
 138      - * DESCRIPTION: Decode the AccessAs attribute byte.  (Mostly SMBus stuff)
      138 + * DESCRIPTION: Decode the AccessAs attribute byte. (Mostly SMBus and
      139 + *              GenericSerialBus stuff.)
 139  140   *
 140  141   ******************************************************************************/
 141  142  
 142  143  void
 143  144  AcpiDmDecodeAttribute (
 144  145      UINT8                   Attribute)
 145  146  {
 146  147  
 147  148      switch (Attribute)
 148  149      {
 149      -    case AML_FIELD_ATTRIB_SMB_QUICK:
      150 +    case AML_FIELD_ATTRIB_QUICK:
 150  151  
 151      -        AcpiOsPrintf ("SMBQuick");
      152 +        AcpiOsPrintf ("AttribQuick");
 152  153          break;
 153  154  
 154      -    case AML_FIELD_ATTRIB_SMB_SEND_RCV:
      155 +    case AML_FIELD_ATTRIB_SEND_RCV:
 155  156  
 156      -        AcpiOsPrintf ("SMBSendReceive");
      157 +        AcpiOsPrintf ("AttribSendReceive");
 157  158          break;
 158  159  
 159      -    case AML_FIELD_ATTRIB_SMB_BYTE:
      160 +    case AML_FIELD_ATTRIB_BYTE:
 160  161  
 161      -        AcpiOsPrintf ("SMBByte");
      162 +        AcpiOsPrintf ("AttribByte");
 162  163          break;
 163  164  
 164      -    case AML_FIELD_ATTRIB_SMB_WORD:
      165 +    case AML_FIELD_ATTRIB_WORD:
 165  166  
 166      -        AcpiOsPrintf ("SMBWord");
      167 +        AcpiOsPrintf ("AttribWord");
 167  168          break;
 168  169  
 169      -    case AML_FIELD_ATTRIB_SMB_WORD_CALL:
      170 +    case AML_FIELD_ATTRIB_BLOCK:
 170  171  
 171      -        AcpiOsPrintf ("SMBProcessCall");
      172 +        AcpiOsPrintf ("AttribBlock");
 172  173          break;
 173  174  
 174      -    case AML_FIELD_ATTRIB_SMB_BLOCK:
      175 +    case AML_FIELD_ATTRIB_MULTIBYTE:
 175  176  
 176      -        AcpiOsPrintf ("SMBBlock");
      177 +        AcpiOsPrintf ("AttribBytes");
 177  178          break;
 178  179  
 179      -    case AML_FIELD_ATTRIB_SMB_BLOCK_CALL:
      180 +    case AML_FIELD_ATTRIB_WORD_CALL:
 180  181  
 181      -        AcpiOsPrintf ("SMBBlockProcessCall");
      182 +        AcpiOsPrintf ("AttribProcessCall");
 182  183          break;
 183  184  
      185 +    case AML_FIELD_ATTRIB_BLOCK_CALL:
      186 +
      187 +        AcpiOsPrintf ("AttribBlockProcessCall");
      188 +        break;
      189 +
      190 +    case AML_FIELD_ATTRIB_RAW_BYTES:
      191 +
      192 +        AcpiOsPrintf ("AttribRawBytes");
      193 +        break;
      194 +
      195 +    case AML_FIELD_ATTRIB_RAW_PROCESS:
      196 +
      197 +        AcpiOsPrintf ("AttribRawProcessBytes");
      198 +        break;
      199 +
 184  200      default:
 185  201  
 186      -        AcpiOsPrintf ("0x%.2X", Attribute);
      202 +        /* A ByteConst is allowed by the grammar */
      203 +
      204 +        AcpiOsPrintf ("0x%2.2X", Attribute);
 187  205          break;
 188  206      }
 189  207  }
 190  208  
 191  209  
 192  210  /*******************************************************************************
 193  211   *
 194  212   * FUNCTION:    AcpiDmIndent
 195  213   *
 196  214   * PARAMETERS:  Level               - Current source code indentation level
↓ open down ↓ 30 lines elided ↑ open up ↑
 227  245   *
 228  246   ******************************************************************************/
 229  247  
 230  248  BOOLEAN
 231  249  AcpiDmCommaIfListMember (
 232  250      ACPI_PARSE_OBJECT       *Op)
 233  251  {
 234  252  
 235  253      if (!Op->Common.Next)
 236  254      {
 237      -        return FALSE;
      255 +        return (FALSE);
 238  256      }
 239  257  
 240  258      if (AcpiDmListType (Op->Common.Parent) & BLOCK_COMMA_LIST)
 241  259      {
 242  260          /* Check for a NULL target operand */
 243  261  
 244  262          if ((Op->Common.Next->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
 245  263              (!Op->Common.Next->Common.Value.String))
 246  264          {
 247  265              /*
 248  266               * To handle the Divide() case where there are two optional
 249      -             * targets, look ahead one more op.  If null, this null target
 250      -             * is the one and only target -- no comma needed.  Otherwise,
      267 +             * targets, look ahead one more op. If null, this null target
      268 +             * is the one and only target -- no comma needed. Otherwise,
 251  269               * we need a comma to prepare for the next target.
 252  270               */
 253  271              if (!Op->Common.Next->Common.Next)
 254  272              {
 255      -                return FALSE;
      273 +                return (FALSE);
 256  274              }
 257  275          }
 258  276  
 259  277          if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST) &&
 260  278              (!(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)))
 261  279          {
 262      -            return FALSE;
      280 +            return (FALSE);
 263  281          }
 264  282  
 265  283          AcpiOsPrintf (", ");
 266  284          return (TRUE);
 267  285      }
 268  286  
 269  287      else if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST) &&
 270  288               (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
 271  289      {
 272  290          AcpiOsPrintf (", ");
↓ open down ↓ 31 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX