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/utilities/uteval.c
          +++ new/usr/src/common/acpica/components/utilities/uteval.c
   1    1  /******************************************************************************
   2    2   *
   3    3   * Module Name: uteval - Object evaluation
   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 ↓ 69 lines elided ↑ open up ↑
  88   88  
  89   89      /* Allocate the evaluation information block */
  90   90  
  91   91      Info = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
  92   92      if (!Info)
  93   93      {
  94   94          return_ACPI_STATUS (AE_NO_MEMORY);
  95   95      }
  96   96  
  97   97      Info->PrefixNode = PrefixNode;
  98      -    Info->Pathname = Path;
       98 +    Info->RelativePathname = Path;
  99   99  
 100  100      /* Evaluate the object/method */
 101  101  
 102  102      Status = AcpiNsEvaluate (Info);
 103  103      if (ACPI_FAILURE (Status))
 104  104      {
 105  105          if (Status == AE_NOT_FOUND)
 106  106          {
 107  107              ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s.%s] was not found\n",
 108  108                  AcpiUtGetNodeName (PrefixNode), Path));
↓ open down ↓ 20 lines elided ↑ open up ↑
 129  129          }
 130  130  
 131  131          goto Cleanup;
 132  132      }
 133  133  
 134  134      /* Map the return object type to the bitmapped type */
 135  135  
 136  136      switch ((Info->ReturnObject)->Common.Type)
 137  137      {
 138  138      case ACPI_TYPE_INTEGER:
      139 +
 139  140          ReturnBtype = ACPI_BTYPE_INTEGER;
 140  141          break;
 141  142  
 142  143      case ACPI_TYPE_BUFFER:
      144 +
 143  145          ReturnBtype = ACPI_BTYPE_BUFFER;
 144  146          break;
 145  147  
 146  148      case ACPI_TYPE_STRING:
      149 +
 147  150          ReturnBtype = ACPI_BTYPE_STRING;
 148  151          break;
 149  152  
 150  153      case ACPI_TYPE_PACKAGE:
      154 +
 151  155          ReturnBtype = ACPI_BTYPE_PACKAGE;
 152  156          break;
 153  157  
 154  158      default:
      159 +
 155  160          ReturnBtype = 0;
 156  161          break;
 157  162      }
 158  163  
 159  164      if ((AcpiGbl_EnableInterpreterSlack) &&
 160  165          (!ExpectedReturnBtypes))
 161  166      {
 162  167          /*
 163  168           * We received a return object, but one was not expected. This can
 164  169           * happen frequently if the "implicit return" feature is enabled.
↓ open down ↓ 83 lines elided ↑ open up ↑
 248  253  /*******************************************************************************
 249  254   *
 250  255   * FUNCTION:    AcpiUtExecute_STA
 251  256   *
 252  257   * PARAMETERS:  DeviceNode          - Node for the device
 253  258   *              Flags               - Where the status flags are returned
 254  259   *
 255  260   * RETURN:      Status
 256  261   *
 257  262   * DESCRIPTION: Executes _STA for selected device and stores results in
 258      - *              *Flags.
      263 + *              *Flags. If _STA does not exist, then the device is assumed
      264 + *              to be present/functional/enabled (as per the ACPI spec).
 259  265   *
 260  266   *              NOTE: Internal function, no parameter validation
 261  267   *
 262  268   ******************************************************************************/
 263  269  
 264  270  ACPI_STATUS
 265  271  AcpiUtExecute_STA (
 266  272      ACPI_NAMESPACE_NODE     *DeviceNode,
 267  273      UINT32                  *Flags)
 268  274  {
↓ open down ↓ 3 lines elided ↑ open up ↑
 272  278  
 273  279      ACPI_FUNCTION_TRACE (UtExecute_STA);
 274  280  
 275  281  
 276  282      Status = AcpiUtEvaluateObject (DeviceNode, METHOD_NAME__STA,
 277  283                  ACPI_BTYPE_INTEGER, &ObjDesc);
 278  284      if (ACPI_FAILURE (Status))
 279  285      {
 280  286          if (AE_NOT_FOUND == Status)
 281  287          {
      288 +            /*
      289 +             * if _STA does not exist, then (as per the ACPI specification),
      290 +             * the returned flags will indicate that the device is present,
      291 +             * functional, and enabled.
      292 +             */
 282  293              ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
 283  294                  "_STA on %4.4s was not found, assuming device is present\n",
 284  295                  AcpiUtGetNodeName (DeviceNode)));
 285  296  
 286  297              *Flags = ACPI_UINT32_MAX;
 287  298              Status = AE_OK;
 288  299          }
 289  300  
 290  301          return_ACPI_STATUS (Status);
 291  302      }
↓ open down ↓ 79 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX