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/executer/exoparg6.c
          +++ new/usr/src/common/acpica/components/executer/exoparg6.c
   1      -
   2    1  /******************************************************************************
   3    2   *
   4    3   * Module Name: exoparg6 - AML execution - opcodes with 6 arguments
   5    4   *
   6    5   *****************************************************************************/
   7    6  
   8    7  /*
   9      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2014, Intel Corp.
  10    9   * All rights reserved.
  11   10   *
  12   11   * Redistribution and use in source and binary forms, with or without
  13   12   * modification, are permitted provided that the following conditions
  14   13   * are met:
  15   14   * 1. Redistributions of source code must retain the above copyright
  16   15   *    notice, this list of conditions, and the following disclaimer,
  17   16   *    without modification.
  18   17   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  19   18   *    substantially similar to the "NO WARRANTY" disclaimer below
↓ open down ↓ 104 lines elided ↑ open up ↑
 124  123       */
 125  124      switch (MatchOp)
 126  125      {
 127  126      case MATCH_MTR:
 128  127  
 129  128          /* Always true */
 130  129  
 131  130          break;
 132  131  
 133  132      case MATCH_MEQ:
 134      -
 135  133          /*
 136  134           * True if equal: (P[i] == M)
 137  135           * Change to:     (M == P[i])
 138  136           */
 139  137          Status = AcpiExDoLogicalOp (AML_LEQUAL_OP, MatchObj, PackageObj,
 140  138                      &LogicalResult);
 141  139          if (ACPI_FAILURE (Status))
 142  140          {
 143  141              return (FALSE);
 144  142          }
 145  143          break;
 146  144  
 147  145      case MATCH_MLE:
 148      -
 149  146          /*
 150  147           * True if less than or equal: (P[i] <= M) (P[i] NotGreater than M)
 151  148           * Change to:                  (M >= P[i]) (M NotLess than P[i])
 152  149           */
 153  150          Status = AcpiExDoLogicalOp (AML_LLESS_OP, MatchObj, PackageObj,
 154  151                      &LogicalResult);
 155  152          if (ACPI_FAILURE (Status))
 156  153          {
 157  154              return (FALSE);
 158  155          }
 159  156          LogicalResult = (BOOLEAN) !LogicalResult;
 160  157          break;
 161  158  
 162  159      case MATCH_MLT:
 163      -
 164  160          /*
 165  161           * True if less than: (P[i] < M)
 166  162           * Change to:         (M > P[i])
 167  163           */
 168  164          Status = AcpiExDoLogicalOp (AML_LGREATER_OP, MatchObj, PackageObj,
 169  165                      &LogicalResult);
 170  166          if (ACPI_FAILURE (Status))
 171  167          {
 172  168              return (FALSE);
 173  169          }
 174  170          break;
 175  171  
 176  172      case MATCH_MGE:
 177      -
 178  173          /*
 179  174           * True if greater than or equal: (P[i] >= M) (P[i] NotLess than M)
 180  175           * Change to:                     (M <= P[i]) (M NotGreater than P[i])
 181  176           */
 182  177          Status = AcpiExDoLogicalOp (AML_LGREATER_OP, MatchObj, PackageObj,
 183  178                      &LogicalResult);
 184  179          if (ACPI_FAILURE (Status))
 185  180          {
 186  181              return (FALSE);
 187  182          }
 188  183          LogicalResult = (BOOLEAN)!LogicalResult;
 189  184          break;
 190  185  
 191  186      case MATCH_MGT:
 192      -
 193  187          /*
 194  188           * True if greater than: (P[i] > M)
 195  189           * Change to:            (M < P[i])
 196  190           */
 197  191          Status = AcpiExDoLogicalOp (AML_LLESS_OP, MatchObj, PackageObj,
 198  192                      &LogicalResult);
 199  193          if (ACPI_FAILURE (Status))
 200  194          {
 201  195              return (FALSE);
 202  196          }
 203  197          break;
 204  198  
 205  199      default:
 206  200  
 207  201          /* Undefined */
 208  202  
 209  203          return (FALSE);
 210  204      }
 211  205  
 212      -    return LogicalResult;
      206 +    return (LogicalResult);
 213  207  }
 214  208  
 215  209  
 216  210  /*******************************************************************************
 217  211   *
 218  212   * FUNCTION:    AcpiExOpcode_6A_0T_1R
 219  213   *
 220  214   * PARAMETERS:  WalkState           - Current walk state
 221  215   *
 222  216   * RETURN:      Status
↓ open down ↓ 58 lines elided ↑ open up ↑
 281  275  
 282  276          }
 283  277  
 284  278          /*
 285  279           * Examine each element until a match is found. Both match conditions
 286  280           * must be satisfied for a match to occur. Within the loop,
 287  281           * "continue" signifies that the current element does not match
 288  282           * and the next should be examined.
 289  283           *
 290  284           * Upon finding a match, the loop will terminate via "break" at
 291      -         * the bottom.  If it terminates "normally", MatchValue will be
      285 +         * the bottom. If it terminates "normally", MatchValue will be
 292  286           * ACPI_UINT64_MAX (Ones) (its initial value) indicating that no
 293  287           * match was found.
 294  288           */
 295  289          for ( ; Index < Operand[0]->Package.Count; Index++)
 296  290          {
 297  291              /* Get the current package element */
 298  292  
 299  293              ThisElement = Operand[0]->Package.Elements[Index];
 300  294  
 301  295              /* Treat any uninitialized (NULL) elements as non-matching */
↓ open down ↓ 20 lines elided ↑ open up ↑
 322  316                  continue;
 323  317              }
 324  318  
 325  319              /* Match found: Index is the return value */
 326  320  
 327  321              ReturnDesc->Integer.Value = Index;
 328  322              break;
 329  323          }
 330  324          break;
 331  325  
 332      -
 333  326      case AML_LOAD_TABLE_OP:
 334  327  
 335  328          Status = AcpiExLoadTableOp (WalkState, &ReturnDesc);
 336  329          break;
 337  330  
 338      -
 339  331      default:
 340  332  
 341  333          ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
 342  334              WalkState->Opcode));
 343  335          Status = AE_AML_BAD_OPCODE;
 344  336          goto Cleanup;
 345  337      }
 346  338  
 347  339  
 348  340  Cleanup:
↓ open down ↓ 17 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX