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/namespace/nsaccess.c
          +++ new/usr/src/common/acpica/components/namespace/nsaccess.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: nsaccess - Top-level functions for accessing ACPI namespace
   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 ↓ 95 lines elided ↑ open up ↑
 114  114          /* _OSI is optional for now, will be permanent later */
 115  115  
 116  116          if (!ACPI_STRCMP (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod)
 117  117          {
 118  118              continue;
 119  119          }
 120  120  
 121  121          Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type,
 122  122                          ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
 123  123                          NULL, &NewNode);
 124      -
 125      -        if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */
      124 +        if (ACPI_FAILURE (Status))
 126  125          {
 127  126              ACPI_EXCEPTION ((AE_INFO, Status,
 128  127                  "Could not create predefined name %s",
 129  128                  InitVal->Name));
      129 +            continue;
 130  130          }
 131  131  
 132  132          /*
 133  133           * Name entered successfully. If entry in PreDefinedNames[] specifies
 134  134           * an initial value, create the initial value.
 135  135           */
 136  136          if (InitVal->Val)
 137  137          {
 138  138              Status = AcpiOsPredefinedOverride (InitVal, &Val);
 139  139              if (ACPI_FAILURE (Status))
↓ open down ↓ 20 lines elided ↑ open up ↑
 160  160              }
 161  161  
 162  162              /*
 163  163               * Convert value string from table entry to
 164  164               * internal representation. Only types actually
 165  165               * used for initial values are implemented here.
 166  166               */
 167  167              switch (InitVal->Type)
 168  168              {
 169  169              case ACPI_TYPE_METHOD:
      170 +
 170  171                  ObjDesc->Method.ParamCount = (UINT8) ACPI_TO_INTEGER (Val);
 171  172                  ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID;
 172  173  
 173  174  #if defined (ACPI_ASL_COMPILER)
 174  175  
 175  176                  /* Save the parameter count for the iASL compiler */
 176  177  
 177  178                  NewNode->Value = ObjDesc->Method.ParamCount;
 178  179  #else
 179  180                  /* Mark this as a very SPECIAL method */
↓ open down ↓ 1 lines elided ↑ open up ↑
 181  182                  ObjDesc->Method.InfoFlags = ACPI_METHOD_INTERNAL_ONLY;
 182  183                  ObjDesc->Method.Dispatch.Implementation = AcpiUtOsiImplementation;
 183  184  #endif
 184  185                  break;
 185  186  
 186  187              case ACPI_TYPE_INTEGER:
 187  188  
 188  189                  ObjDesc->Integer.Value = ACPI_TO_INTEGER (Val);
 189  190                  break;
 190  191  
 191      -
 192  192              case ACPI_TYPE_STRING:
 193  193  
 194  194                  /* Build an object around the static string */
 195  195  
 196  196                  ObjDesc->String.Length = (UINT32) ACPI_STRLEN (Val);
 197  197                  ObjDesc->String.Pointer = Val;
 198  198                  ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
 199  199                  break;
 200  200  
 201      -
 202  201              case ACPI_TYPE_MUTEX:
 203  202  
 204  203                  ObjDesc->Mutex.Node = NewNode;
 205  204                  ObjDesc->Mutex.SyncLevel = (UINT8) (ACPI_TO_INTEGER (Val) - 1);
 206  205  
 207  206                  /* Create a mutex */
 208  207  
 209  208                  Status = AcpiOsCreateMutex (&ObjDesc->Mutex.OsMutex);
 210  209                  if (ACPI_FAILURE (Status))
 211  210                  {
↓ open down ↓ 12 lines elided ↑ open up ↑
 224  223                      Status = AcpiOsCreateSemaphore (
 225  224                                  1, 0, &AcpiGbl_GlobalLockSemaphore);
 226  225                      if (ACPI_FAILURE (Status))
 227  226                      {
 228  227                          AcpiUtRemoveReference (ObjDesc);
 229  228                          goto UnlockAndExit;
 230  229                      }
 231  230                  }
 232  231                  break;
 233  232  
 234      -
 235  233              default:
 236  234  
 237  235                  ACPI_ERROR ((AE_INFO, "Unsupported initial type value 0x%X",
 238  236                      InitVal->Type));
 239  237                  AcpiUtRemoveReference (ObjDesc);
 240  238                  ObjDesc = NULL;
 241  239                  continue;
 242  240              }
 243  241  
 244  242              /* Store pointer to value descriptor in the Node */
↓ open down ↓ 198 lines elided ↑ open up ↑
 443  441  
 444  442                  /* Backup to the parent node */
 445  443  
 446  444                  NumCarats++;
 447  445                  ThisNode = ThisNode->Parent;
 448  446                  if (!ThisNode)
 449  447                  {
 450  448                      /* Current scope has no parent scope */
 451  449  
 452  450                      ACPI_ERROR ((AE_INFO,
 453      -                        "ACPI path has too many parent prefixes (^) "
 454      -                        "- reached beyond root node"));
      451 +                        "%s: Path has too many parent prefixes (^) "
      452 +                        "- reached beyond root node", Pathname));
 455  453                      return_ACPI_STATUS (AE_NOT_FOUND);
 456  454                  }
 457  455              }
 458  456  
 459  457              if (SearchParentFlag == ACPI_NS_NO_UPSEARCH)
 460  458              {
 461  459                  ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
 462  460                      "Search scope is [%4.4s], path has %u carat(s)\n",
 463  461                      AcpiUtGetNodeName (ThisNode), NumCarats));
 464  462              }
↓ open down ↓ 225 lines elided ↑ open up ↑
 690  688              if (ACPI_FAILURE (Status))
 691  689              {
 692  690                  return_ACPI_STATUS (Status);
 693  691              }
 694  692          }
 695  693      }
 696  694  
 697  695      *ReturnNode = ThisNode;
 698  696      return_ACPI_STATUS (AE_OK);
 699  697  }
 700      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX