Print this page
PANKOVs restructure
   1 /*
   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */

  21 /*
  22  * Copyright (c) 2012 Gary Mills
  23  *
  24  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.


  26  */
  27 
  28 /*
  29  * ACPI enumerator
  30  */
  31 
  32 #include <sys/ddi.h>
  33 #include <sys/sunddi.h>
  34 #include <sys/sunndi.h>
  35 #include <sys/note.h>
  36 #include <sys/acpi/acpi.h>
  37 #include <sys/acpica.h>
  38 #include <util/sscanf.h>
  39 


  40 
  41 static char keyboard_alias[] = "keyboard";
  42 static char mouse_alias[] = "mouse";
  43 #define ACPI_ENUM_DEBUG         "acpi_enum_debug"
  44 #define PARSE_RESOURCES_DEBUG   0x0001
  45 #define MASTER_LOOKUP_DEBUG     0x0002
  46 #define DEVICES_NOT_ENUMED      0x0004
  47 #define PARSE_RES_IRQ           0x0008
  48 #define PARSE_RES_DMA           0x0010
  49 #define PARSE_RES_MEMORY        0x0020
  50 #define PARSE_RES_IO            0x0040
  51 #define PARSE_RES_ADDRESS       0x0080
  52 #define ISA_DEVICE_ENUM         0x1000
  53 #define PROCESS_CIDS            0x2000
  54 static unsigned long acpi_enum_debug = 0x00;
  55 
  56 static char USED_RESOURCES[] = "used-resources";
  57 static dev_info_t *usedrdip = NULL;
  58 static unsigned short used_interrupts = 0;
  59 static unsigned short used_dmas = 0;


   1 /*
   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*


  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright (c) 2012 Gary Mills
  26  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  27  */
  28 
  29 /*
  30  * ACPI enumerator
  31  */
  32 
  33 #include <sys/ddi.h>
  34 #include <sys/sunddi.h>
  35 #include <sys/sunndi.h>
  36 #include <sys/note.h>


  37 #include <util/sscanf.h>
  38 
  39 #include <acpica/include/acpi.h>
  40 #include <sys/acpica.h>
  41 
  42 static char keyboard_alias[] = "keyboard";
  43 static char mouse_alias[] = "mouse";
  44 #define ACPI_ENUM_DEBUG         "acpi_enum_debug"
  45 #define PARSE_RESOURCES_DEBUG   0x0001
  46 #define MASTER_LOOKUP_DEBUG     0x0002
  47 #define DEVICES_NOT_ENUMED      0x0004
  48 #define PARSE_RES_IRQ           0x0008
  49 #define PARSE_RES_DMA           0x0010
  50 #define PARSE_RES_MEMORY        0x0020
  51 #define PARSE_RES_IO            0x0040
  52 #define PARSE_RES_ADDRESS       0x0080
  53 #define ISA_DEVICE_ENUM         0x1000
  54 #define PROCESS_CIDS            0x2000
  55 static unsigned long acpi_enum_debug = 0x00;
  56 
  57 static char USED_RESOURCES[] = "used-resources";
  58 static dev_info_t *usedrdip = NULL;
  59 static unsigned short used_interrupts = 0;
  60 static unsigned short used_dmas = 0;