Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/disassembler/dmobject.c
          +++ new/usr/src/common/acpica/components/disassembler/dmobject.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: dmobject - ACPI object decode and display
   4    4   *
   5    5   ******************************************************************************/
   6    6  
   7    7  /*
   8      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2014, 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 ↓ 155 lines elided ↑ open up ↑
 174  174  
 175  175  
 176  176  /*******************************************************************************
 177  177   *
 178  178   * FUNCTION:    AcpiDmDecodeInternalObject
 179  179   *
 180  180   * PARAMETERS:  ObjDesc         - Object to be displayed
 181  181   *
 182  182   * RETURN:      None
 183  183   *
 184      - * DESCRIPTION: Short display of an internal object.  Numbers/Strings/Buffers.
      184 + * DESCRIPTION: Short display of an internal object. Numbers/Strings/Buffers.
 185  185   *
 186  186   ******************************************************************************/
 187  187  
 188  188  void
 189  189  AcpiDmDecodeInternalObject (
 190  190      ACPI_OPERAND_OBJECT     *ObjDesc)
 191  191  {
 192  192      UINT32                  i;
 193  193  
 194  194  
↓ open down ↓ 12 lines elided ↑ open up ↑
 207  207      AcpiOsPrintf (" %s", AcpiUtGetObjectTypeName (ObjDesc));
 208  208  
 209  209      switch (ObjDesc->Common.Type)
 210  210      {
 211  211      case ACPI_TYPE_INTEGER:
 212  212  
 213  213          AcpiOsPrintf (" %8.8X%8.8X",
 214  214                  ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
 215  215          break;
 216  216  
 217      -
 218  217      case ACPI_TYPE_STRING:
 219  218  
 220  219          AcpiOsPrintf ("(%u) \"%.24s",
 221  220                  ObjDesc->String.Length, ObjDesc->String.Pointer);
 222  221  
 223  222          if (ObjDesc->String.Length > 24)
 224  223          {
 225  224              AcpiOsPrintf ("...");
 226  225          }
 227  226          else
 228  227          {
 229  228              AcpiOsPrintf ("\"");
 230  229          }
 231  230          break;
 232  231  
 233      -
 234  232      case ACPI_TYPE_BUFFER:
 235  233  
 236  234          AcpiOsPrintf ("(%u)", ObjDesc->Buffer.Length);
 237  235          for (i = 0; (i < 8) && (i < ObjDesc->Buffer.Length); i++)
 238  236          {
 239  237              AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
 240  238          }
 241  239          break;
 242  240  
 243      -
 244  241      default:
 245  242  
 246  243          AcpiOsPrintf (" %p", ObjDesc);
 247  244          break;
 248  245      }
 249  246  }
 250  247  
 251  248  
 252  249  /*******************************************************************************
 253  250   *
↓ open down ↓ 22 lines elided ↑ open up ↑
 276  273      if (Node->Flags & ANOBJ_METHOD_LOCAL)
 277  274      {
 278  275          AcpiOsPrintf (" [Method Local]");
 279  276      }
 280  277  
 281  278      switch (Node->Type)
 282  279      {
 283  280      /* These types have no attached object */
 284  281  
 285  282      case ACPI_TYPE_DEVICE:
      283 +
 286  284          AcpiOsPrintf (" Device");
 287  285          break;
 288  286  
 289  287      case ACPI_TYPE_THERMAL:
      288 +
 290  289          AcpiOsPrintf (" Thermal Zone");
 291  290          break;
 292  291  
 293  292      default:
      293 +
 294  294          AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
 295  295          break;
 296  296      }
 297  297  }
 298  298  
 299  299  
 300  300  /*******************************************************************************
 301  301   *
 302  302   * FUNCTION:    AcpiDmDisplayInternalObject
 303  303   *
↓ open down ↓ 24 lines elided ↑ open up ↑
 328  328  
 329  329      /* Decode the object type */
 330  330  
 331  331      switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc))
 332  332      {
 333  333      case ACPI_DESC_TYPE_PARSER:
 334  334  
 335  335          AcpiOsPrintf ("<Parser>  ");
 336  336          break;
 337  337  
 338      -
 339  338      case ACPI_DESC_TYPE_NAMED:
 340  339  
 341  340          AcpiDmDecodeNode ((ACPI_NAMESPACE_NODE *) ObjDesc);
 342  341          break;
 343  342  
 344      -
 345  343      case ACPI_DESC_TYPE_OPERAND:
 346  344  
 347  345          Type = ObjDesc->Common.Type;
 348  346          if (Type > ACPI_TYPE_LOCAL_MAX)
 349  347          {
 350  348              AcpiOsPrintf (" Type %X [Invalid Type]", (UINT32) Type);
 351  349              return;
 352  350          }
 353  351  
 354  352          /* Decode the ACPI object type */
↓ open down ↓ 13 lines elided ↑ open up ↑
 368  366                  AcpiOsPrintf ("%X ", ObjDesc->Reference.Value);
 369  367                  if (WalkState)
 370  368                  {
 371  369                      ObjDesc = WalkState->LocalVariables
 372  370                                  [ObjDesc->Reference.Value].Object;
 373  371                      AcpiOsPrintf ("%p", ObjDesc);
 374  372                      AcpiDmDecodeInternalObject (ObjDesc);
 375  373                  }
 376  374                  break;
 377  375  
 378      -
 379  376              case ACPI_REFCLASS_ARG:
 380  377  
 381  378                  AcpiOsPrintf ("%X ", ObjDesc->Reference.Value);
 382  379                  if (WalkState)
 383  380                  {
 384  381                      ObjDesc = WalkState->Arguments
 385  382                                  [ObjDesc->Reference.Value].Object;
 386  383                      AcpiOsPrintf ("%p", ObjDesc);
 387  384                      AcpiDmDecodeInternalObject (ObjDesc);
 388  385                  }
 389  386                  break;
 390  387  
 391      -
 392  388              case ACPI_REFCLASS_INDEX:
 393  389  
 394  390                  switch (ObjDesc->Reference.TargetType)
 395  391                  {
 396  392                  case ACPI_TYPE_BUFFER_FIELD:
 397  393  
 398  394                      AcpiOsPrintf ("%p", ObjDesc->Reference.Object);
 399  395                      AcpiDmDecodeInternalObject (ObjDesc->Reference.Object);
 400  396                      break;
 401  397  
↓ open down ↓ 11 lines elided ↑ open up ↑
 413  409                      }
 414  410                      break;
 415  411  
 416  412                  default:
 417  413  
 418  414                      AcpiOsPrintf ("Unknown index target type");
 419  415                      break;
 420  416                  }
 421  417                  break;
 422  418  
 423      -
 424  419              case ACPI_REFCLASS_REFOF:
 425  420  
 426  421                  if (!ObjDesc->Reference.Object)
 427  422                  {
 428  423                      AcpiOsPrintf ("Uninitialized reference subobject pointer");
 429  424                      break;
 430  425                  }
 431  426  
 432  427                  /* Reference can be to a Node or an Operand object */
 433  428  
↓ open down ↓ 5 lines elided ↑ open up ↑
 439  434  
 440  435                  case ACPI_DESC_TYPE_OPERAND:
 441  436                      AcpiDmDecodeInternalObject (ObjDesc->Reference.Object);
 442  437                      break;
 443  438  
 444  439                  default:
 445  440                      break;
 446  441                  }
 447  442                  break;
 448  443  
 449      -
 450  444              case ACPI_REFCLASS_NAME:
 451  445  
 452  446                  AcpiDmDecodeNode (ObjDesc->Reference.Node);
 453  447                  break;
 454  448  
 455      -
 456  449              case ACPI_REFCLASS_DEBUG:
 457  450              case ACPI_REFCLASS_TABLE:
 458  451  
 459  452                  AcpiOsPrintf ("\n");
 460  453                  break;
 461  454  
 462      -
 463  455              default:    /* Unknown reference class */
 464  456  
 465  457                  AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
 466  458                  break;
 467  459              }
 468  460              break;
 469  461  
 470      -
 471  462          default:
 472  463  
 473  464              AcpiOsPrintf ("<Obj>            ");
 474  465              AcpiDmDecodeInternalObject (ObjDesc);
 475  466              break;
 476  467          }
 477  468          break;
 478  469  
 479      -
 480  470      default:
 481  471  
 482  472          AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> [%s]",
 483  473              AcpiUtGetDescriptorName (ObjDesc));
 484  474          break;
 485  475      }
 486  476  
 487  477      AcpiOsPrintf ("\n");
 488  478  }
 489  479  
↓ open down ↓ 88 lines elided ↑ open up ↑
 578  568  
 579  569      for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
 580  570      {
 581  571          ObjDesc = WalkState->Arguments[i].Object;
 582  572          AcpiOsPrintf ("    Arg%u:   ", i);
 583  573          AcpiDmDisplayInternalObject (ObjDesc, WalkState);
 584  574      }
 585  575  }
 586  576  
 587  577  #endif
 588      -
 589      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX