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/parser/psxface.c
          +++ new/usr/src/common/acpica/components/parser/psxface.c
   1    1  /******************************************************************************
   2    2   *
   3    3   * Module Name: psxface - Parser external interfaces
   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 ↓ 124 lines elided ↑ open up ↑
 143  143      ACPI_FUNCTION_ENTRY ();
 144  144  
 145  145  
 146  146      Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
 147  147      if (ACPI_FAILURE (Status))
 148  148      {
 149  149          return;
 150  150      }
 151  151  
 152  152      if ((!AcpiGbl_TraceMethodName) ||
 153      -        (AcpiGbl_TraceMethodName != Info->ResolvedNode->Name.Integer))
      153 +        (AcpiGbl_TraceMethodName != Info->Node->Name.Integer))
 154  154      {
 155  155          goto Exit;
 156  156      }
 157  157  
 158  158      AcpiGbl_OriginalDbgLevel = AcpiDbgLevel;
 159  159      AcpiGbl_OriginalDbgLayer = AcpiDbgLayer;
 160  160  
 161  161      AcpiDbgLevel = 0x00FFFFFF;
 162  162      AcpiDbgLayer = ACPI_UINT32_MAX;
 163  163  
↓ open down ↓ 34 lines elided ↑ open up ↑
 198  198      ACPI_FUNCTION_ENTRY ();
 199  199  
 200  200  
 201  201      Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
 202  202      if (ACPI_FAILURE (Status))
 203  203      {
 204  204          return;
 205  205      }
 206  206  
 207  207      if ((!AcpiGbl_TraceMethodName) ||
 208      -        (AcpiGbl_TraceMethodName != Info->ResolvedNode->Name.Integer))
      208 +        (AcpiGbl_TraceMethodName != Info->Node->Name.Integer))
 209  209      {
 210  210          goto Exit;
 211  211      }
 212  212  
 213  213      /* Disable further tracing if type is one-shot */
 214  214  
 215  215      if (AcpiGbl_TraceFlags & 1)
 216  216      {
 217  217          AcpiGbl_TraceMethodName = 0;
 218  218          AcpiGbl_TraceDbgLevel = 0;
↓ open down ↓ 42 lines elided ↑ open up ↑
 261  261  
 262  262      ACPI_FUNCTION_TRACE (PsExecuteMethod);
 263  263  
 264  264  
 265  265      /* Quick validation of DSDT header */
 266  266  
 267  267      AcpiTbCheckDsdtHeader ();
 268  268  
 269  269      /* Validate the Info and method Node */
 270  270  
 271      -    if (!Info || !Info->ResolvedNode)
      271 +    if (!Info || !Info->Node)
 272  272      {
 273  273          return_ACPI_STATUS (AE_NULL_ENTRY);
 274  274      }
 275  275  
 276  276      /* Init for new method, wait on concurrency semaphore */
 277  277  
 278      -    Status = AcpiDsBeginMethodExecution (Info->ResolvedNode, Info->ObjDesc, NULL);
      278 +    Status = AcpiDsBeginMethodExecution (Info->Node, Info->ObjDesc, NULL);
 279  279      if (ACPI_FAILURE (Status))
 280  280      {
 281  281          return_ACPI_STATUS (Status);
 282  282      }
 283  283  
 284  284      /*
 285  285       * The caller "owns" the parameters, so give each one an extra reference
 286  286       */
 287  287      AcpiPsUpdateParameterList (Info, REF_INCREMENT);
 288  288  
 289  289      /* Begin tracing if requested */
 290  290  
 291  291      AcpiPsStartTrace (Info);
 292  292  
 293  293      /*
 294  294       * Execute the method. Performs parse simultaneously
 295  295       */
 296  296      ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
 297  297          "**** Begin Method Parse/Execute [%4.4s] **** Node=%p Obj=%p\n",
 298      -        Info->ResolvedNode->Name.Ascii, Info->ResolvedNode, Info->ObjDesc));
      298 +        Info->Node->Name.Ascii, Info->Node, Info->ObjDesc));
 299  299  
 300  300      /* Create and init a Root Node */
 301  301  
 302  302      Op = AcpiPsCreateScopeOp ();
 303  303      if (!Op)
 304  304      {
 305  305          Status = AE_NO_MEMORY;
 306  306          goto Cleanup;
 307  307      }
 308  308  
↓ open down ↓ 1 lines elided ↑ open up ↑
 310  310  
 311  311      Info->PassNumber = ACPI_IMODE_EXECUTE;
 312  312      WalkState = AcpiDsCreateWalkState (
 313  313                      Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
 314  314      if (!WalkState)
 315  315      {
 316  316          Status = AE_NO_MEMORY;
 317  317          goto Cleanup;
 318  318      }
 319  319  
 320      -    Status = AcpiDsInitAmlWalk (WalkState, Op, Info->ResolvedNode,
      320 +    Status = AcpiDsInitAmlWalk (WalkState, Op, Info->Node,
 321  321                  Info->ObjDesc->Method.AmlStart,
 322  322                  Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
 323  323      if (ACPI_FAILURE (Status))
 324  324      {
 325  325          AcpiDsDeleteWalkState (WalkState);
 326  326          goto Cleanup;
 327  327      }
 328  328  
 329  329      if (Info->ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL)
 330  330      {
↓ open down ↓ 10 lines elided ↑ open up ↑
 341  341          /* Cleanup states */
 342  342  
 343  343          AcpiDsScopeStackClear (WalkState);
 344  344          AcpiPsCleanupScope (&WalkState->ParserState);
 345  345          AcpiDsTerminateControlMethod (WalkState->MethodDesc, WalkState);
 346  346          AcpiDsDeleteWalkState (WalkState);
 347  347          goto Cleanup;
 348  348      }
 349  349  
 350  350      /*
 351      -     * Start method evaluation with an implicit return of zero. This is done
 352      -     * for Windows compatibility.
      351 +     * Start method evaluation with an implicit return of zero.
      352 +     * This is done for Windows compatibility.
 353  353       */
 354  354      if (AcpiGbl_EnableInterpreterSlack)
 355  355      {
 356  356          WalkState->ImplicitReturnObj =
 357  357              AcpiUtCreateIntegerObject ((UINT64) 0);
 358  358          if (!WalkState->ImplicitReturnObj)
 359  359          {
 360  360              Status = AE_NO_MEMORY;
 361  361              AcpiDsDeleteWalkState (WalkState);
 362  362              goto Cleanup;
↓ open down ↓ 68 lines elided ↑ open up ↑
 431  431          /* Update reference count for each parameter */
 432  432  
 433  433          for (i = 0; Info->Parameters[i]; i++)
 434  434          {
 435  435              /* Ignore errors, just do them all */
 436  436  
 437  437              (void) AcpiUtUpdateObjectReference (Info->Parameters[i], Action);
 438  438          }
 439  439      }
 440  440  }
 441      -
 442      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX