Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/utilities/utdecode.c
          +++ new/usr/src/common/acpica/components/utilities/utdecode.c
   1    1  /******************************************************************************
   2    2   *
   3    3   * Module Name: utdecode - Utility decoding routines (value-to-string)
   4    4   *
   5    5   *****************************************************************************/
   6    6  
   7    7  /*
   8      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2013, 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 ↓ 25 lines elided ↑ open up ↑
  44   44  #define __UTDECODE_C__
  45   45  
  46   46  #include "acpi.h"
  47   47  #include "accommon.h"
  48   48  #include "acnamesp.h"
  49   49  
  50   50  #define _COMPONENT          ACPI_UTILITIES
  51   51          ACPI_MODULE_NAME    ("utdecode")
  52   52  
  53   53  
  54      -/*******************************************************************************
  55      - *
  56      - * FUNCTION:    AcpiFormatException
  57      - *
  58      - * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
  59      - *
  60      - * RETURN:      A string containing the exception text. A valid pointer is
  61      - *              always returned.
  62      - *
  63      - * DESCRIPTION: This function translates an ACPI exception into an ASCII string
  64      - *              It is here instead of utxface.c so it is always present.
  65      - *
  66      - ******************************************************************************/
  67      -
  68      -const char *
  69      -AcpiFormatException (
  70      -    ACPI_STATUS             Status)
  71      -{
  72      -    const char              *Exception = NULL;
  73      -
  74      -
  75      -    ACPI_FUNCTION_ENTRY ();
  76      -
  77      -
  78      -    Exception = AcpiUtValidateException (Status);
  79      -    if (!Exception)
  80      -    {
  81      -        /* Exception code was not recognized */
  82      -
  83      -        ACPI_ERROR ((AE_INFO,
  84      -            "Unknown exception code: 0x%8.8X", Status));
  85      -
  86      -        Exception = "UNKNOWN_STATUS_CODE";
  87      -    }
  88      -
  89      -    return (ACPI_CAST_PTR (const char, Exception));
  90      -}
  91      -
  92      -ACPI_EXPORT_SYMBOL (AcpiFormatException)
  93      -
  94      -
  95   54  /*
  96   55   * Properties of the ACPI Object Types, both internal and external.
  97   56   * The table is indexed by values of ACPI_OBJECT_TYPE
  98   57   */
  99   58  const UINT8                     AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] =
 100   59  {
 101   60      ACPI_NS_NORMAL,                     /* 00 Any              */
 102   61      ACPI_NS_NORMAL,                     /* 01 Number           */
 103   62      ACPI_NS_NORMAL,                     /* 02 String           */
 104   63      ACPI_NS_NORMAL,                     /* 03 Buffer           */
↓ open down ↓ 68 lines elided ↑ open up ↑
 173  132   * RETURN:      Decoded region SpaceId name
 174  133   *
 175  134   * DESCRIPTION: Translate a Space ID into a name string (Debug only)
 176  135   *
 177  136   ******************************************************************************/
 178  137  
 179  138  /* Region type decoding */
 180  139  
 181  140  const char        *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
 182  141  {
 183      -    "SystemMemory",
 184      -    "SystemIO",
 185      -    "PCI_Config",
 186      -    "EmbeddedControl",
 187      -    "SMBus",
 188      -    "SystemCMOS",
 189      -    "PCIBARTarget",
 190      -    "IPMI"
      142 +    "SystemMemory",     /* 0x00 */
      143 +    "SystemIO",         /* 0x01 */
      144 +    "PCI_Config",       /* 0x02 */
      145 +    "EmbeddedControl",  /* 0x03 */
      146 +    "SMBus",            /* 0x04 */
      147 +    "SystemCMOS",       /* 0x05 */
      148 +    "PCIBARTarget",     /* 0x06 */
      149 +    "IPMI",             /* 0x07 */
      150 +    "GeneralPurposeIo", /* 0x08 */
      151 +    "GenericSerialBus", /* 0x09 */
      152 +    "PCC"               /* 0x0A */
 191  153  };
 192  154  
 193  155  
 194  156  char *
 195  157  AcpiUtGetRegionName (
 196  158      UINT8                   SpaceId)
 197  159  {
 198  160  
 199  161      if (SpaceId >= ACPI_USER_REGION_BEGIN)
 200  162      {
↓ open down ↓ 357 lines elided ↑ open up ↑
 558  520   * PARAMETERS:  NotifyValue     - Value from the Notify() request
 559  521   *
 560  522   * RETURN:      Decoded name for the notify value
 561  523   *
 562  524   * DESCRIPTION: Translate a Notify Value to a notify namestring.
 563  525   *
 564  526   ******************************************************************************/
 565  527  
 566  528  /* Names for Notify() values, used for debug output */
 567  529  
 568      -static const char           *AcpiGbl_NotifyValueNames[] =
      530 +static const char           *AcpiGbl_NotifyValueNames[ACPI_NOTIFY_MAX + 1] =
 569  531  {
 570      -    "Bus Check",
 571      -    "Device Check",
 572      -    "Device Wake",
 573      -    "Eject Request",
 574      -    "Device Check Light",
 575      -    "Frequency Mismatch",
 576      -    "Bus Mode Mismatch",
 577      -    "Power Fault",
 578      -    "Capabilities Check",
 579      -    "Device PLD Check",
 580      -    "Reserved",
 581      -    "System Locality Update"
      532 +    /* 00 */ "Bus Check",
      533 +    /* 01 */ "Device Check",
      534 +    /* 02 */ "Device Wake",
      535 +    /* 03 */ "Eject Request",
      536 +    /* 04 */ "Device Check Light",
      537 +    /* 05 */ "Frequency Mismatch",
      538 +    /* 06 */ "Bus Mode Mismatch",
      539 +    /* 07 */ "Power Fault",
      540 +    /* 08 */ "Capabilities Check",
      541 +    /* 09 */ "Device PLD Check",
      542 +    /* 10 */ "Reserved",
      543 +    /* 11 */ "System Locality Update",
      544 +    /* 12 */ "Shutdown Request"
 582  545  };
 583  546  
 584  547  const char *
 585  548  AcpiUtGetNotifyName (
 586  549      UINT32                  NotifyValue)
 587  550  {
 588  551  
 589  552      if (NotifyValue <= ACPI_NOTIFY_MAX)
 590  553      {
 591  554          return (AcpiGbl_NotifyValueNames[NotifyValue]);
 592  555      }
 593  556      else if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
 594  557      {
 595  558          return ("Reserved");
 596  559      }
 597      -    else /* Greater or equal to 0x80 */
      560 +    else if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY)
 598  561      {
 599      -        return ("**Device Specific**");
      562 +        return ("Device Specific");
 600  563      }
      564 +    else
      565 +    {
      566 +        return ("Hardware Specific");
      567 +    }
 601  568  }
 602  569  #endif
 603  570  
 604  571  
 605  572  /*******************************************************************************
 606  573   *
 607  574   * FUNCTION:    AcpiUtValidObjectType
 608  575   *
 609  576   * PARAMETERS:  Type            - Object type to be validated
 610  577   *
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX