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/debugger/dbdisply.c
          +++ new/usr/src/common/acpica/components/debugger/dbdisply.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: dbdisply - debug display commands
   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 ↓ 42 lines elided ↑ open up ↑
  61   61  /* Local prototypes */
  62   62  
  63   63  static void
  64   64  AcpiDbDumpParserDescriptor (
  65   65      ACPI_PARSE_OBJECT       *Op);
  66   66  
  67   67  static void *
  68   68  AcpiDbGetPointer (
  69   69      void                    *Target);
  70   70  
       71 +static ACPI_STATUS
       72 +AcpiDbDisplayNonRootHandlers (
       73 +    ACPI_HANDLE             ObjHandle,
       74 +    UINT32                  NestingLevel,
       75 +    void                    *Context,
       76 +    void                    **ReturnValue);
  71   77  
  72   78  /*
  73   79   * System handler information.
  74   80   * Used for Handlers command, in AcpiDbDisplayHandlers.
  75   81   */
  76   82  #define ACPI_PREDEFINED_PREFIX          "%25s (%.2X) : "
  77   83  #define ACPI_HANDLER_NAME_STRING               "%30s : "
  78   84  #define ACPI_HANDLER_PRESENT_STRING                    "%-9s (%p)\n"
       85 +#define ACPI_HANDLER_PRESENT_STRING2                   "%-9s (%p)"
  79   86  #define ACPI_HANDLER_NOT_PRESENT_STRING                "%-9s\n"
  80   87  
  81   88  /* All predefined Address Space IDs */
  82   89  
  83   90  static ACPI_ADR_SPACE_TYPE  AcpiGbl_SpaceIdList[] =
  84   91  {
  85   92      ACPI_ADR_SPACE_SYSTEM_MEMORY,
  86   93      ACPI_ADR_SPACE_SYSTEM_IO,
  87   94      ACPI_ADR_SPACE_PCI_CONFIG,
  88   95      ACPI_ADR_SPACE_EC,
  89   96      ACPI_ADR_SPACE_SMBUS,
  90   97      ACPI_ADR_SPACE_CMOS,
  91   98      ACPI_ADR_SPACE_PCI_BAR_TARGET,
  92   99      ACPI_ADR_SPACE_IPMI,
      100 +    ACPI_ADR_SPACE_GPIO,
      101 +    ACPI_ADR_SPACE_GSBUS,
  93  102      ACPI_ADR_SPACE_DATA_TABLE,
  94  103      ACPI_ADR_SPACE_FIXED_HARDWARE
  95  104  };
  96  105  
  97  106  /* Global handler information */
  98  107  
  99  108  typedef struct acpi_handler_info
 100  109  {
 101  110      void                    *Handler;
 102  111      char                    *Name;
 103  112  
 104  113  } ACPI_HANDLER_INFO;
 105  114  
 106  115  static ACPI_HANDLER_INFO    AcpiGbl_HandlerList[] =
 107  116  {
 108      -    {&AcpiGbl_SystemNotify.Handler,     "System Notifications"},
 109      -    {&AcpiGbl_DeviceNotify.Handler,     "Device Notifications"},
      117 +    {&AcpiGbl_GlobalNotify[0].Handler,  "System Notifications"},
      118 +    {&AcpiGbl_GlobalNotify[1].Handler,  "Device Notifications"},
 110  119      {&AcpiGbl_TableHandler,             "ACPI Table Events"},
 111  120      {&AcpiGbl_ExceptionHandler,         "Control Method Exceptions"},
 112  121      {&AcpiGbl_InterfaceHandler,         "OSI Invocations"}
 113  122  };
 114  123  
 115  124  
 116  125  /*******************************************************************************
 117  126   *
 118  127   * FUNCTION:    AcpiDbGetPointer
 119  128   *
↓ open down ↓ 3 lines elided ↑ open up ↑
 123  132   *
 124  133   * DESCRIPTION: Convert an ascii pointer value to a real value
 125  134   *
 126  135   ******************************************************************************/
 127  136  
 128  137  static void *
 129  138  AcpiDbGetPointer (
 130  139      void                    *Target)
 131  140  {
 132  141      void                    *ObjPtr;
      142 +    ACPI_SIZE               Address;
 133  143  
 134  144  
 135      -    ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16));
      145 +    Address = ACPI_STRTOUL (Target, NULL, 16);
      146 +    ObjPtr = ACPI_TO_POINTER (Address);
 136  147      return (ObjPtr);
 137  148  }
 138  149  
 139  150  
 140  151  /*******************************************************************************
 141  152   *
 142  153   * FUNCTION:    AcpiDbDumpParserDescriptor
 143  154   *
 144  155   * PARAMETERS:  Op              - A parser Op descriptor
 145  156   *
↓ open down ↓ 21 lines elided ↑ open up ↑
 167  178      AcpiOsPrintf ("%20.20s : %p\n", "Value/ArgList", Op->Common.Value.Arg);
 168  179      AcpiOsPrintf ("%20.20s : %p\n", "Parent", Op->Common.Parent);
 169  180      AcpiOsPrintf ("%20.20s : %p\n", "NextOp", Op->Common.Next);
 170  181  }
 171  182  
 172  183  
 173  184  /*******************************************************************************
 174  185   *
 175  186   * FUNCTION:    AcpiDbDecodeAndDisplayObject
 176  187   *
 177      - * PARAMETERS:  Target          - String with object to be displayed.  Names
      188 + * PARAMETERS:  Target          - String with object to be displayed. Names
 178  189   *                                and hex pointers are supported.
 179  190   *              OutputType      - Byte, Word, Dword, or Qword (B|W|D|Q)
 180  191   *
 181  192   * RETURN:      None
 182  193   *
 183  194   * DESCRIPTION: Display a formatted ACPI object
 184  195   *
 185  196   ******************************************************************************/
 186  197  
 187  198  void
↓ open down ↓ 61 lines elided ↑ open up ↑
 249  260              if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_NAMESPACE_NODE)))
 250  261              {
 251  262                  AcpiOsPrintf (
 252  263                      "Cannot read entire Named object at address %p\n", ObjPtr);
 253  264                  return;
 254  265              }
 255  266  
 256  267              Node = ObjPtr;
 257  268              goto DumpNode;
 258  269  
 259      -
 260  270          case ACPI_DESC_TYPE_OPERAND:
 261  271  
 262  272              /* This is a ACPI OPERAND OBJECT */
 263  273  
 264  274              if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_OPERAND_OBJECT)))
 265  275              {
 266  276                  AcpiOsPrintf ("Cannot read entire ACPI object at address %p\n",
 267  277                      ObjPtr);
 268  278                  return;
 269  279              }
 270  280  
 271      -            AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
      281 +            AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
 272  282                  ACPI_UINT32_MAX);
 273  283              AcpiExDumpObjectDescriptor (ObjPtr, 1);
 274  284              break;
 275  285  
 276      -
 277  286          case ACPI_DESC_TYPE_PARSER:
 278  287  
 279  288              /* This is a Parser Op object */
 280  289  
 281  290              if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_PARSE_OBJECT)))
 282  291              {
 283  292                  AcpiOsPrintf (
 284  293                      "Cannot read entire Parser object at address %p\n", ObjPtr);
 285  294                  return;
 286  295              }
 287  296  
 288      -            AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
      297 +            AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
 289  298                  ACPI_UINT32_MAX);
 290  299              AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
 291  300              break;
 292  301  
 293      -
 294  302          default:
 295  303  
 296  304              /* Is not a recognizeable object */
 297  305  
 298  306              Size = 16;
 299  307              if (AcpiOsReadable (ObjPtr, 64))
 300  308              {
 301  309                  Size = 64;
 302  310              }
 303  311  
 304  312              /* Just dump some memory */
 305  313  
 306      -            AcpiUtDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
      314 +            AcpiUtDebugDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
 307  315              break;
 308  316          }
 309  317  
 310  318          return;
 311  319      }
 312  320  
 313  321      /* The parameter is a name string that must be resolved to a Named obj */
 314  322  
 315  323      Node = AcpiDbLocalNsLookup (Target);
 316  324      if (!Node)
↓ open down ↓ 16 lines elided ↑ open up ↑
 333  341          AcpiOsPrintf ("Object (%p) Pathname:  %s\n",
 334  342              Node, (char *) RetBuf.Pointer);
 335  343      }
 336  344  
 337  345      if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
 338  346      {
 339  347          AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
 340  348          return;
 341  349      }
 342  350  
 343      -    AcpiUtDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
      351 +    AcpiUtDebugDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
 344  352          Display, ACPI_UINT32_MAX);
 345  353      AcpiExDumpNamespaceNode (Node, 1);
 346  354  
 347  355      ObjDesc = AcpiNsGetAttachedObject (Node);
 348  356      if (ObjDesc)
 349  357      {
 350  358          AcpiOsPrintf ("\nAttached Object (%p):\n", ObjDesc);
 351  359          if (!AcpiOsReadable (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)))
 352  360          {
 353  361              AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n",
 354  362                  ObjDesc);
 355  363              return;
 356  364          }
 357  365  
 358      -        AcpiUtDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
      366 +        AcpiUtDebugDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
 359  367              Display, ACPI_UINT32_MAX);
 360  368          AcpiExDumpObjectDescriptor (ObjDesc, 1);
 361  369      }
 362  370  }
 363  371  
 364  372  
 365  373  /*******************************************************************************
 366  374   *
 367  375   * FUNCTION:    AcpiDbDisplayMethodInfo
 368  376   *
↓ open down ↓ 61 lines elided ↑ open up ↑
 430  438          {
 431  439              NumRemainingOps++;
 432  440          }
 433  441  
 434  442          /* Decode the opcode */
 435  443  
 436  444          OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
 437  445          switch (OpInfo->Class)
 438  446          {
 439  447          case AML_CLASS_ARGUMENT:
      448 +
 440  449              if (CountRemaining)
 441  450              {
 442  451                  NumRemainingOperands++;
 443  452              }
 444  453  
 445  454              NumOperands++;
 446  455              break;
 447  456  
 448  457          case AML_CLASS_UNKNOWN:
      458 +
 449  459              /* Bad opcode or ASCII character */
 450  460  
 451  461              continue;
 452  462  
 453  463          default:
      464 +
 454  465              if (CountRemaining)
 455  466              {
 456  467                  NumRemainingOperators++;
 457  468              }
 458  469  
 459  470              NumOperators++;
 460  471              break;
 461  472          }
 462  473  
 463  474          Op = AcpiPsGetDepthNext (StartOp, Op);
↓ open down ↓ 170 lines elided ↑ open up ↑
 634  645  
 635  646          WalkState = WalkState->Next;
 636  647      }
 637  648  }
 638  649  
 639  650  
 640  651  /*******************************************************************************
 641  652   *
 642  653   * FUNCTION:    AcpiDbDisplayObjectType
 643  654   *
 644      - * PARAMETERS:  ObjectArg       - User entered NS node handle
      655 + * PARAMETERS:  Name            - User entered NS node handle or name
 645  656   *
 646  657   * RETURN:      None
 647  658   *
 648  659   * DESCRIPTION: Display type of an arbitrary NS node
 649  660   *
 650  661   ******************************************************************************/
 651  662  
 652  663  void
 653  664  AcpiDbDisplayObjectType (
 654      -    char                    *ObjectArg)
      665 +    char                    *Name)
 655  666  {
 656      -    ACPI_HANDLE             Handle;
      667 +    ACPI_NAMESPACE_NODE     *Node;
 657  668      ACPI_DEVICE_INFO        *Info;
 658  669      ACPI_STATUS             Status;
 659  670      UINT32                  i;
 660  671  
 661  672  
 662      -    Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
      673 +    Node = AcpiDbConvertToNode (Name);
      674 +    if (!Node)
      675 +    {
      676 +        return;
      677 +    }
 663  678  
 664      -    Status = AcpiGetObjectInfo (Handle, &Info);
      679 +    Status = AcpiGetObjectInfo (ACPI_CAST_PTR (ACPI_HANDLE, Node), &Info);
 665  680      if (ACPI_FAILURE (Status))
 666  681      {
 667  682          AcpiOsPrintf ("Could not get object info, %s\n",
 668  683              AcpiFormatException (Status));
 669  684          return;
 670  685      }
 671  686  
 672      -    AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
 673      -        ACPI_FORMAT_UINT64 (Info->Address),
 674      -        Info->CurrentStatus, Info->Flags);
      687 +    if (Info->Valid & ACPI_VALID_ADR)
      688 +    {
      689 +        AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
      690 +            ACPI_FORMAT_UINT64 (Info->Address),
      691 +            Info->CurrentStatus, Info->Flags);
      692 +    }
      693 +    if (Info->Valid & ACPI_VALID_SXDS)
      694 +    {
      695 +        AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
      696 +            Info->HighestDstates[0], Info->HighestDstates[1],
      697 +            Info->HighestDstates[2], Info->HighestDstates[3]);
      698 +    }
      699 +    if (Info->Valid & ACPI_VALID_SXWS)
      700 +    {
      701 +        AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
      702 +            Info->LowestDstates[0], Info->LowestDstates[1],
      703 +            Info->LowestDstates[2], Info->LowestDstates[3],
      704 +            Info->LowestDstates[4]);
      705 +    }
 675  706  
 676      -    AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
 677      -        Info->HighestDstates[0], Info->HighestDstates[1],
 678      -        Info->HighestDstates[2], Info->HighestDstates[3]);
 679      -
 680      -    AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
 681      -        Info->LowestDstates[0], Info->LowestDstates[1],
 682      -        Info->LowestDstates[2], Info->LowestDstates[3],
 683      -        Info->LowestDstates[4]);
 684      -
 685  707      if (Info->Valid & ACPI_VALID_HID)
 686  708      {
 687  709          AcpiOsPrintf ("HID: %s\n", Info->HardwareId.String);
 688  710      }
 689  711      if (Info->Valid & ACPI_VALID_UID)
 690  712      {
 691  713          AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
 692  714      }
      715 +    if (Info->Valid & ACPI_VALID_SUB)
      716 +    {
      717 +        AcpiOsPrintf ("SUB: %s\n", Info->SubsystemId.String);
      718 +    }
 693  719      if (Info->Valid & ACPI_VALID_CID)
 694  720      {
 695  721          for (i = 0; i < Info->CompatibleIdList.Count; i++)
 696  722          {
 697  723              AcpiOsPrintf ("CID %u: %s\n", i,
 698  724                  Info->CompatibleIdList.Ids[i].String);
 699  725          }
 700  726      }
 701  727  
 702  728      ACPI_FREE (Info);
↓ open down ↓ 58 lines elided ↑ open up ↑
 761  787      if (!AcpiGbl_CmSingleStep)
 762  788      {
 763  789          return;
 764  790      }
 765  791  
 766  792      AcpiOsPrintf ("ArgObj:    ");
 767  793      AcpiDmDisplayInternalObject (ObjDesc, WalkState);
 768  794  }
 769  795  
 770  796  
      797 +#if (!ACPI_REDUCED_HARDWARE)
 771  798  /*******************************************************************************
 772  799   *
 773  800   * FUNCTION:    AcpiDbDisplayGpes
 774  801   *
 775  802   * PARAMETERS:  None
 776  803   *
 777  804   * RETURN:      None
 778  805   *
 779  806   * DESCRIPTION: Display the current GPE structures
 780  807   *
↓ open down ↓ 1 lines elided ↑ open up ↑
 782  809  
 783  810  void
 784  811  AcpiDbDisplayGpes (
 785  812      void)
 786  813  {
 787  814      ACPI_GPE_BLOCK_INFO     *GpeBlock;
 788  815      ACPI_GPE_XRUPT_INFO     *GpeXruptInfo;
 789  816      ACPI_GPE_EVENT_INFO     *GpeEventInfo;
 790  817      ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
 791  818      char                    *GpeType;
      819 +    ACPI_GPE_NOTIFY_INFO    *Notify;
 792  820      UINT32                  GpeIndex;
 793  821      UINT32                  Block = 0;
 794  822      UINT32                  i;
 795  823      UINT32                  j;
      824 +    UINT32                  Count;
 796  825      char                    Buffer[80];
 797  826      ACPI_BUFFER             RetBuf;
 798  827      ACPI_STATUS             Status;
 799  828  
 800  829  
 801  830      RetBuf.Length = sizeof (Buffer);
 802  831      RetBuf.Pointer = Buffer;
 803  832  
 804  833      Block = 0;
 805  834  
↓ open down ↓ 91 lines elided ↑ open up ↑
 897  926                          AcpiOsPrintf ("CanWake, ");
 898  927                      }
 899  928                      else
 900  929                      {
 901  930                          AcpiOsPrintf ("RunOnly, ");
 902  931                      }
 903  932  
 904  933                      switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
 905  934                      {
 906  935                      case ACPI_GPE_DISPATCH_NONE:
      936 +
 907  937                          AcpiOsPrintf ("NotUsed");
 908  938                          break;
      939 +
 909  940                      case ACPI_GPE_DISPATCH_METHOD:
      941 +
 910  942                          AcpiOsPrintf ("Method");
 911  943                          break;
 912  944                      case ACPI_GPE_DISPATCH_HANDLER:
      945 +
 913  946                          AcpiOsPrintf ("Handler");
 914  947                          break;
      948 +
 915  949                      case ACPI_GPE_DISPATCH_NOTIFY:
 916      -                        AcpiOsPrintf ("Notify");
      950 +
      951 +                        Count = 0;
      952 +                        Notify = GpeEventInfo->Dispatch.NotifyList;
      953 +                        while (Notify)
      954 +                        {
      955 +                            Count++;
      956 +                            Notify = Notify->Next;
      957 +                        }
      958 +                        AcpiOsPrintf ("Implicit Notify on %u devices", Count);
 917  959                          break;
      960 +
 918  961                      default:
      962 +
 919  963                          AcpiOsPrintf ("UNKNOWN: %X",
 920  964                              GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
 921  965                          break;
 922  966                      }
 923  967  
 924  968                      AcpiOsPrintf (")\n");
 925  969                  }
 926  970              }
 927  971              Block++;
 928  972              GpeBlock = GpeBlock->Next;
 929  973          }
 930  974          GpeXruptInfo = GpeXruptInfo->Next;
 931  975      }
 932  976  }
      977 +#endif /* !ACPI_REDUCED_HARDWARE */
 933  978  
 934  979  
 935  980  /*******************************************************************************
 936  981   *
 937  982   * FUNCTION:    AcpiDbDisplayHandlers
 938  983   *
 939  984   * PARAMETERS:  None
 940  985   *
 941  986   * RETURN:      None
 942  987   *
↓ open down ↓ 6 lines elided ↑ open up ↑
 949  994      void)
 950  995  {
 951  996      ACPI_OPERAND_OBJECT     *ObjDesc;
 952  997      ACPI_OPERAND_OBJECT     *HandlerObj;
 953  998      ACPI_ADR_SPACE_TYPE     SpaceId;
 954  999      UINT32                  i;
 955 1000  
 956 1001  
 957 1002      /* Operation region handlers */
 958 1003  
 959      -    AcpiOsPrintf ("\nOperation Region Handlers:\n");
     1004 +    AcpiOsPrintf ("\nOperation Region Handlers at the namespace root:\n");
 960 1005  
 961 1006      ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
 962 1007      if (ObjDesc)
 963 1008      {
 964 1009          for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_SpaceIdList); i++)
 965 1010          {
 966 1011              SpaceId = AcpiGbl_SpaceIdList[i];
 967 1012              HandlerObj = ObjDesc->Device.Handler;
 968 1013  
 969 1014              AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
 970 1015                  AcpiUtGetRegionName ((UINT8) SpaceId), SpaceId);
 971 1016  
 972 1017              while (HandlerObj)
 973 1018              {
 974      -                if (i == HandlerObj->AddressSpace.SpaceId)
     1019 +                if (AcpiGbl_SpaceIdList[i] == HandlerObj->AddressSpace.SpaceId)
 975 1020                  {
 976 1021                      AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
 977 1022                          (HandlerObj->AddressSpace.HandlerFlags &
 978 1023                              ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
 979 1024                          HandlerObj->AddressSpace.Handler);
 980 1025                      goto FoundHandler;
 981 1026                  }
 982 1027  
 983 1028                  HandlerObj = HandlerObj->AddressSpace.Next;
 984 1029              }
 985 1030  
 986 1031              /* There is no handler for this SpaceId */
 987 1032  
 988 1033              AcpiOsPrintf ("None\n");
 989 1034  
 990 1035          FoundHandler:;
 991 1036          }
     1037 +
     1038 +        /* Find all handlers for user-defined SpaceIDs */
     1039 +
     1040 +        HandlerObj = ObjDesc->Device.Handler;
     1041 +        while (HandlerObj)
     1042 +        {
     1043 +            if (HandlerObj->AddressSpace.SpaceId >= ACPI_USER_REGION_BEGIN)
     1044 +            {
     1045 +                AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
     1046 +                    "User-defined ID", HandlerObj->AddressSpace.SpaceId);
     1047 +                AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
     1048 +                    (HandlerObj->AddressSpace.HandlerFlags &
     1049 +                        ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
     1050 +                    HandlerObj->AddressSpace.Handler);
     1051 +            }
     1052 +
     1053 +            HandlerObj = HandlerObj->AddressSpace.Next;
     1054 +        }
 992 1055      }
 993 1056  
     1057 +#if (!ACPI_REDUCED_HARDWARE)
     1058 +
 994 1059      /* Fixed event handlers */
 995 1060  
 996 1061      AcpiOsPrintf ("\nFixed Event Handlers:\n");
 997 1062  
 998 1063      for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
 999 1064      {
1000 1065          AcpiOsPrintf (ACPI_PREDEFINED_PREFIX, AcpiUtGetEventName (i), i);
1001 1066          if (AcpiGbl_FixedEventHandlers[i].Handler)
1002 1067          {
1003 1068              AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1004 1069                  AcpiGbl_FixedEventHandlers[i].Handler);
1005 1070          }
1006 1071          else
1007 1072          {
1008 1073              AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1009 1074          }
1010 1075      }
1011 1076  
     1077 +#endif /* !ACPI_REDUCED_HARDWARE */
     1078 +
1012 1079      /* Miscellaneous global handlers */
1013 1080  
1014 1081      AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
1015 1082  
1016 1083      for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_HandlerList); i++)
1017 1084      {
1018 1085          AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, AcpiGbl_HandlerList[i].Name);
1019 1086          if (AcpiGbl_HandlerList[i].Handler)
1020 1087          {
1021 1088              AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1022 1089                  AcpiGbl_HandlerList[i].Handler);
1023 1090          }
1024 1091          else
1025 1092          {
1026 1093              AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1027 1094          }
1028 1095      }
     1096 +
     1097 +
     1098 +    /* Other handlers that are installed throughout the namespace */
     1099 +
     1100 +    AcpiOsPrintf ("\nOperation Region Handlers for specific devices:\n");
     1101 +
     1102 +    (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
     1103 +                ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
     1104 +                NULL, NULL, NULL);
1029 1105  }
1030 1106  
     1107 +
     1108 +/*******************************************************************************
     1109 + *
     1110 + * FUNCTION:    AcpiDbDisplayNonRootHandlers
     1111 + *
     1112 + * PARAMETERS:  ACPI_WALK_CALLBACK
     1113 + *
     1114 + * RETURN:      Status
     1115 + *
     1116 + * DESCRIPTION: Display information about all handlers installed for a
     1117 + *              device object.
     1118 + *
     1119 + ******************************************************************************/
     1120 +
     1121 +static ACPI_STATUS
     1122 +AcpiDbDisplayNonRootHandlers (
     1123 +    ACPI_HANDLE             ObjHandle,
     1124 +    UINT32                  NestingLevel,
     1125 +    void                    *Context,
     1126 +    void                    **ReturnValue)
     1127 +{
     1128 +    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
     1129 +    ACPI_OPERAND_OBJECT     *ObjDesc;
     1130 +    ACPI_OPERAND_OBJECT     *HandlerObj;
     1131 +    char                    *Pathname;
     1132 +
     1133 +
     1134 +    ObjDesc = AcpiNsGetAttachedObject (Node);
     1135 +    if (!ObjDesc)
     1136 +    {
     1137 +        return (AE_OK);
     1138 +    }
     1139 +
     1140 +    Pathname = AcpiNsGetExternalPathname (Node);
     1141 +    if (!Pathname)
     1142 +    {
     1143 +        return (AE_OK);
     1144 +    }
     1145 +
     1146 +    /* Display all handlers associated with this device */
     1147 +
     1148 +    HandlerObj = ObjDesc->Device.Handler;
     1149 +    while (HandlerObj)
     1150 +    {
     1151 +        AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
     1152 +            AcpiUtGetRegionName ((UINT8) HandlerObj->AddressSpace.SpaceId),
     1153 +            HandlerObj->AddressSpace.SpaceId);
     1154 +
     1155 +        AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING2,
     1156 +            (HandlerObj->AddressSpace.HandlerFlags &
     1157 +                ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
     1158 +            HandlerObj->AddressSpace.Handler);
     1159 +
     1160 +        AcpiOsPrintf (" Device Name: %s (%p)\n", Pathname, Node);
     1161 +
     1162 +        HandlerObj = HandlerObj->AddressSpace.Next;
     1163 +    }
     1164 +
     1165 +    ACPI_FREE (Pathname);
     1166 +    return (AE_OK);
     1167 +}
     1168 +
1031 1169  #endif /* ACPI_DEBUGGER */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX