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/dmnames.c
          +++ new/usr/src/common/acpica/components/disassembler/dmnames.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: dmnames - AML disassembler, names, namestrings, pathnames
   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 ↓ 18 lines elided ↑ open up ↑
  37   37   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  38   38   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  39   39   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  40   40   * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  41   41   * POSSIBILITY OF SUCH DAMAGES.
  42   42   */
  43   43  
  44   44  
  45   45  #include "acpi.h"
  46   46  #include "accommon.h"
  47      -#include "acparser.h"
  48   47  #include "amlcode.h"
  49   48  #include "acnamesp.h"
  50   49  #include "acdisasm.h"
  51   50  
  52   51  
  53   52  #ifdef ACPI_DISASSEMBLER
  54   53  
  55   54  #define _COMPONENT          ACPI_CA_DEBUGGER
  56   55          ACPI_MODULE_NAME    ("dmnames")
  57   56  
↓ open down ↓ 63 lines elided ↑ open up ↑
 121  120  
 122  121  /*******************************************************************************
 123  122   *
 124  123   * FUNCTION:    AcpiPsDisplayObjectPathname
 125  124   *
 126  125   * PARAMETERS:  WalkState       - Current walk state
 127  126   *              Op              - Object whose pathname is to be obtained
 128  127   *
 129  128   * RETURN:      Status
 130  129   *
 131      - * DESCRIPTION: Diplay the pathname associated with a named object.  Two
      130 + * DESCRIPTION: Diplay the pathname associated with a named object. Two
 132  131   *              versions. One searches the parse tree (for parser-only
 133  132   *              applications suchas AcpiDump), and the other searches the
 134  133   *              ACPI namespace (the parse tree is probably deleted)
 135  134   *
 136  135   ******************************************************************************/
 137  136  
 138  137  ACPI_STATUS
 139  138  AcpiPsDisplayObjectPathname (
 140  139      ACPI_WALK_STATE         *WalkState,
 141  140      ACPI_PARSE_OBJECT       *Op)
↓ open down ↓ 17 lines elided ↑ open up ↑
 159  158          /* Node not defined in this scope, look it up */
 160  159  
 161  160          Status = AcpiNsLookup (WalkState->ScopeInfo, Op->Common.Value.String,
 162  161                      ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
 163  162                      WalkState, &(Node));
 164  163  
 165  164          if (ACPI_FAILURE (Status))
 166  165          {
 167  166              /*
 168  167               * We can't get the pathname since the object
 169      -             * is not in the namespace.  This can happen during single
      168 +             * is not in the namespace. This can happen during single
 170  169               * stepping where a dynamic named object is *about* to be created.
 171  170               */
 172  171              AcpiOsPrintf ("  [Path not found]");
 173  172              goto Exit;
 174  173          }
 175  174  
 176  175          /* Save it for next time. */
 177  176  
 178  177          Op->Common.Node = Node;
 179  178      }
↓ open down ↓ 39 lines elided ↑ open up ↑
 219  218      UINT32                  SegCount;
 220  219  
 221  220  
 222  221      if (!Name)
 223  222      {
 224  223          return;
 225  224      }
 226  225  
 227  226      /* Handle all Scope Prefix operators */
 228  227  
 229      -    while (AcpiPsIsPrefixChar (ACPI_GET8 (Name)))
      228 +    while (ACPI_IS_ROOT_PREFIX (ACPI_GET8 (Name)) ||
      229 +           ACPI_IS_PARENT_PREFIX (ACPI_GET8 (Name)))
 230  230      {
 231  231          /* Append prefix character */
 232  232  
 233  233          AcpiOsPrintf ("%1c", ACPI_GET8 (Name));
 234  234          Name++;
 235  235      }
 236  236  
 237  237      switch (ACPI_GET8 (Name))
 238  238      {
 239  239      case 0:
      240 +
 240  241          SegCount = 0;
 241  242          break;
 242  243  
 243  244      case AML_DUAL_NAME_PREFIX:
      245 +
 244  246          SegCount = 2;
 245  247          Name++;
 246  248          break;
 247  249  
 248  250      case AML_MULTI_NAME_PREFIX_OP:
      251 +
 249  252          SegCount = (UINT32) ACPI_GET8 (Name + 1);
 250  253          Name += 2;
 251  254          break;
 252  255  
 253  256      default:
      257 +
 254  258          SegCount = 1;
 255  259          break;
 256  260      }
 257  261  
 258  262      while (SegCount)
 259  263      {
 260  264          /* Append Name segment */
 261  265  
 262  266          AcpiDmDumpName (*ACPI_CAST_PTR (UINT32, Name));
 263  267  
↓ open down ↓ 52 lines elided ↑ open up ↑
 316  320          {
 317  321              NamePath = AcpiPsGetArg (Op, 3);
 318  322          }
 319  323          else
 320  324          {
 321  325              NamePath = AcpiPsGetArg (Op, 2);
 322  326          }
 323  327  
 324  328          if ((NamePath) &&
 325  329              (NamePath->Common.Value.String) &&
 326      -            (NamePath->Common.Value.String[0] == '\\'))
      330 +            (ACPI_IS_ROOT_PREFIX (NamePath->Common.Value.String[0])))
 327  331          {
 328  332              AcpiDmNamestring (NamePath->Common.Value.String);
 329  333              return;
 330  334          }
 331  335      }
 332  336  
 333  337      Prev = NULL;            /* Start with Root Node */
 334  338  
 335  339      while (Prev != Op)
 336  340      {
↓ open down ↓ 93 lines elided ↑ open up ↑
 430  434      if ((!Name) ||
 431  435          (!Op->Common.Parent))
 432  436      {
 433  437          return;
 434  438      }
 435  439  
 436  440      TargetOp = AcpiPsFind (Op, Name, 0, 0);
 437  441      if (!TargetOp)
 438  442      {
 439  443          /*
 440      -         * Didn't find the name in the parse tree.  This may be
      444 +         * Didn't find the name in the parse tree. This may be
 441  445           * a problem, or it may simply be one of the predefined names
 442      -         * (such as _OS_).  Rather than worry about looking up all
      446 +         * (such as _OS_). Rather than worry about looking up all
 443  447           * the predefined names, just display the name as given
 444  448           */
 445  449          AcpiOsPrintf (
 446  450              " /**** Name not found or not accessible from this scope ****/ ");
 447  451      }
 448  452  }
 449  453  #endif
 450  454  
 451  455  #endif
 452      -
 453      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX