Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20130927
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/utilities/utglobal.c
          +++ new/usr/src/common/acpica/components/utilities/utglobal.c
   1    1  /******************************************************************************
   2    2   *
   3    3   * Module Name: utglobal - Global variables for the ACPI subsystem
   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 ↓ 16 lines elided ↑ open up ↑
  35   35   * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  36   36   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  37   37   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  38   38   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  39   39   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  40   40   * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  41   41   * POSSIBILITY OF SUCH DAMAGES.
  42   42   */
  43   43  
  44   44  #define __UTGLOBAL_C__
       45 +#define EXPORT_ACPI_INTERFACES
  45   46  #define DEFINE_ACPI_GLOBALS
  46   47  
  47   48  #include "acpi.h"
  48   49  #include "accommon.h"
  49   50  
  50   51  #define _COMPONENT          ACPI_UTILITIES
  51   52          ACPI_MODULE_NAME    ("utglobal")
  52   53  
  53   54  
  54   55  /*******************************************************************************
↓ open down ↓ 93 lines elided ↑ open up ↑
 148  149  #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
 149  150      {"_OSI",    ACPI_TYPE_METHOD,           (char *) 1},
 150  151  #endif
 151  152  
 152  153      /* Table terminator */
 153  154  
 154  155      {NULL,      ACPI_TYPE_ANY,              NULL}
 155  156  };
 156  157  
 157  158  
      159 +#if (!ACPI_REDUCED_HARDWARE)
 158  160  /******************************************************************************
 159  161   *
 160  162   * Event and Hardware globals
 161  163   *
 162  164   ******************************************************************************/
 163  165  
 164  166  ACPI_BIT_REGISTER_INFO      AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG] =
 165  167  {
 166  168      /* Name                                     Parent Register             Register Bit Position                   Register Bit Mask       */
 167  169  
↓ open down ↓ 24 lines elided ↑ open up ↑
 192  194  
 193  195  
 194  196  ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
 195  197  {
 196  198      /* ACPI_EVENT_PMTIMER       */  {ACPI_BITREG_TIMER_STATUS,          ACPI_BITREG_TIMER_ENABLE,        ACPI_BITMASK_TIMER_STATUS,          ACPI_BITMASK_TIMER_ENABLE},
 197  199      /* ACPI_EVENT_GLOBAL        */  {ACPI_BITREG_GLOBAL_LOCK_STATUS,    ACPI_BITREG_GLOBAL_LOCK_ENABLE,  ACPI_BITMASK_GLOBAL_LOCK_STATUS,    ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
 198  200      /* ACPI_EVENT_POWER_BUTTON  */  {ACPI_BITREG_POWER_BUTTON_STATUS,   ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS,   ACPI_BITMASK_POWER_BUTTON_ENABLE},
 199  201      /* ACPI_EVENT_SLEEP_BUTTON  */  {ACPI_BITREG_SLEEP_BUTTON_STATUS,   ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS,   ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
 200  202      /* ACPI_EVENT_RTC           */  {ACPI_BITREG_RT_CLOCK_STATUS,       ACPI_BITREG_RT_CLOCK_ENABLE,     ACPI_BITMASK_RT_CLOCK_STATUS,       ACPI_BITMASK_RT_CLOCK_ENABLE},
 201  203  };
      204 +#endif /* !ACPI_REDUCED_HARDWARE */
 202  205  
 203  206  
 204  207  /*******************************************************************************
 205  208   *
 206  209   * FUNCTION:    AcpiUtInitGlobals
 207  210   *
 208  211   * PARAMETERS:  None
 209  212   *
 210  213   * RETURN:      Status
 211  214   *
 212      - * DESCRIPTION: Init ACPICA globals.  All globals that require specific
 213      - *              initialization should be initialized here!
      215 + * DESCRIPTION: Initialize ACPICA globals. All globals that require specific
      216 + *              initialization should be initialized here. This allows for
      217 + *              a warm restart.
 214  218   *
 215  219   ******************************************************************************/
 216  220  
 217  221  ACPI_STATUS
 218  222  AcpiUtInitGlobals (
 219  223      void)
 220  224  {
 221  225      ACPI_STATUS             Status;
 222  226      UINT32                  i;
 223  227  
↓ open down ↓ 2 lines elided ↑ open up ↑
 226  230  
 227  231  
 228  232      /* Create all memory caches */
 229  233  
 230  234      Status = AcpiUtCreateCaches ();
 231  235      if (ACPI_FAILURE (Status))
 232  236      {
 233  237          return_ACPI_STATUS (Status);
 234  238      }
 235  239  
      240 +    /* Address Range lists */
      241 +
      242 +    for (i = 0; i < ACPI_ADDRESS_RANGE_MAX; i++)
      243 +    {
      244 +        AcpiGbl_AddressRangeList[i] = NULL;
      245 +    }
      246 +
 236  247      /* Mutex locked flags */
 237  248  
 238  249      for (i = 0; i < ACPI_NUM_MUTEX; i++)
 239  250      {
 240  251          AcpiGbl_MutexInfo[i].Mutex          = NULL;
 241  252          AcpiGbl_MutexInfo[i].ThreadId       = ACPI_MUTEX_NOT_ACQUIRED;
 242  253          AcpiGbl_MutexInfo[i].UseCount       = 0;
 243  254      }
 244  255  
 245  256      for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++)
↓ open down ↓ 9 lines elided ↑ open up ↑
 255  266  
 256  267      AcpiMethodCount                     = 0;
 257  268      AcpiSciCount                        = 0;
 258  269      AcpiGpeCount                        = 0;
 259  270  
 260  271      for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
 261  272      {
 262  273          AcpiFixedEventCount[i]              = 0;
 263  274      }
 264  275  
 265      -    /* GPE support */
      276 +#if (!ACPI_REDUCED_HARDWARE)
 266  277  
      278 +    /* GPE/SCI support */
      279 +
 267  280      AcpiGbl_AllGpesInitialized          = FALSE;
 268  281      AcpiGbl_GpeXruptListHead            = NULL;
 269  282      AcpiGbl_GpeFadtBlocks[0]            = NULL;
 270  283      AcpiGbl_GpeFadtBlocks[1]            = NULL;
 271  284      AcpiCurrentGpeCount                 = 0;
 272  285  
      286 +    AcpiGbl_GlobalEventHandler          = NULL;
      287 +    AcpiGbl_SciHandlerList              = NULL;
      288 +
      289 +#endif /* !ACPI_REDUCED_HARDWARE */
      290 +
 273  291      /* Global handlers */
 274  292  
 275      -    AcpiGbl_SystemNotify.Handler        = NULL;
 276      -    AcpiGbl_DeviceNotify.Handler        = NULL;
      293 +    AcpiGbl_GlobalNotify[0].Handler     = NULL;
      294 +    AcpiGbl_GlobalNotify[1].Handler     = NULL;
 277  295      AcpiGbl_ExceptionHandler            = NULL;
 278  296      AcpiGbl_InitHandler                 = NULL;
 279  297      AcpiGbl_TableHandler                = NULL;
 280  298      AcpiGbl_InterfaceHandler            = NULL;
 281      -    AcpiGbl_GlobalEventHandler          = NULL;
 282  299  
 283  300      /* Global Lock support */
 284  301  
 285  302      AcpiGbl_GlobalLockSemaphore         = NULL;
 286  303      AcpiGbl_GlobalLockMutex             = NULL;
 287  304      AcpiGbl_GlobalLockAcquired          = FALSE;
 288  305      AcpiGbl_GlobalLockHandle            = 0;
 289  306      AcpiGbl_GlobalLockPresent           = FALSE;
 290  307  
 291  308      /* Miscellaneous variables */
↓ open down ↓ 5 lines elided ↑ open up ↑
 297  314      AcpiGbl_NsLookupCount               = 0;
 298  315      AcpiGbl_PsFindCount                 = 0;
 299  316      AcpiGbl_AcpiHardwarePresent         = TRUE;
 300  317      AcpiGbl_LastOwnerIdIndex            = 0;
 301  318      AcpiGbl_NextOwnerIdOffset           = 0;
 302  319      AcpiGbl_TraceMethodName             = 0;
 303  320      AcpiGbl_TraceDbgLevel               = 0;
 304  321      AcpiGbl_TraceDbgLayer               = 0;
 305  322      AcpiGbl_DebuggerConfiguration       = DEBUGGER_THREADING;
 306  323      AcpiGbl_DbOutputFlags               = ACPI_DB_CONSOLE_OUTPUT;
 307      -    AcpiGbl_OsiData                     = 0;
 308  324      AcpiGbl_OsiMutex                    = NULL;
 309  325      AcpiGbl_RegMethodsExecuted          = FALSE;
 310  326  
 311  327      /* Hardware oriented */
 312  328  
 313  329      AcpiGbl_EventsInitialized           = FALSE;
 314  330      AcpiGbl_SystemAwakeAndRunning       = TRUE;
 315  331  
 316  332      /* Namespace */
 317  333  
↓ open down ↓ 3 lines elided ↑ open up ↑
 321  337      AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
 322  338      AcpiGbl_RootNodeStruct.Type         = ACPI_TYPE_DEVICE;
 323  339      AcpiGbl_RootNodeStruct.Parent       = NULL;
 324  340      AcpiGbl_RootNodeStruct.Child        = NULL;
 325  341      AcpiGbl_RootNodeStruct.Peer         = NULL;
 326  342      AcpiGbl_RootNodeStruct.Object       = NULL;
 327  343  
 328  344  
 329  345  #ifdef ACPI_DISASSEMBLER
 330  346      AcpiGbl_ExternalList                = NULL;
      347 +    AcpiGbl_NumExternalMethods          = 0;
      348 +    AcpiGbl_ResolvedExternalMethods     = 0;
 331  349  #endif
 332  350  
 333  351  #ifdef ACPI_DEBUG_OUTPUT
 334  352      AcpiGbl_LowestStackPointer          = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX);
 335  353  #endif
 336  354  
 337  355  #ifdef ACPI_DBG_TRACK_ALLOCATIONS
 338  356      AcpiGbl_DisplayFinalMemStats        = FALSE;
 339  357      AcpiGbl_DisableMemTracking          = FALSE;
 340  358  #endif
↓ open down ↓ 11 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX