Print this page
PANKOVs restructure
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86pc/sys/acpidev_impl.h
+++ new/usr/src/uts/i86pc/sys/acpidev_impl.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright (c) 2009-2010, Intel Corporation.
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
23 23 * All rights reserved.
24 24 */
25 25
26 26 #ifndef _SYS_ACPIDEV_IMPL_H
27 27 #define _SYS_ACPIDEV_IMPL_H
28 28 #include <sys/types.h>
29 29 #include <sys/cmn_err.h>
30 30 #include <sys/bitmap.h>
31 31 #include <sys/synch.h>
32 32 #include <sys/sunddi.h>
33 -#include <sys/acpi/acpi.h>
33 +#include <acpica/include/acpi.h>
34 34 #include <sys/acpica.h>
35 35 #include <sys/acpidev.h>
36 36 #include <sys/acpidev_dr.h>
37 37
38 38 #ifdef __cplusplus
39 39 extern "C" {
40 40 #endif
41 41
42 42 #ifdef _KERNEL
43 43
44 44 #define ACPIDEV_ARRAY_PARAM(a) (a), (sizeof (a) / sizeof ((a)[0]))
45 45
46 46 /* Debug support facilities. */
47 47 extern int acpidev_debug;
48 48 #define ACPIDEV_DEBUG(lvl, ...) if (acpidev_debug) cmn_err((lvl), __VA_ARGS__)
49 49
50 50 /* Data attached to an ACPI object to maintain device status information. */
51 51 struct acpidev_data_impl {
52 52 uint32_t aod_eflag; /* External flags */
53 53 uint32_t aod_iflag; /* Internal flags */
54 54 uint32_t aod_level;
55 55 int aod_status; /* Cached _STA value */
56 56 ACPI_HANDLE *aod_hdl;
57 57 dev_info_t *aod_dip;
58 58 acpidev_class_t *aod_class;
59 59 acpidev_class_list_t **aod_class_list;
60 60 acpidev_board_type_t aod_bdtype; /* Type of board. */
61 61 uint32_t aod_bdnum; /* Board # for DR. */
62 62 uint32_t aod_portid; /* Port id for DR. */
63 63 uint32_t aod_bdidx; /* Index # of AP */
64 64 volatile uint32_t aod_chidx; /* Index # of child */
65 65 uint32_t aod_memidx; /* Index # of memory */
66 66 acpidev_class_id_t aod_class_id; /* Dev type for DR. */
67 67 };
68 68
69 69 #define ACPIDEV_ODF_STATUS_VALID 0x1
70 70 #define ACPIDEV_ODF_DEVINFO_CREATED 0x2
71 71 #define ACPIDEV_ODF_DEVINFO_TAGGED 0x4
72 72 #define ACPIDEV_ODF_HOTPLUG_CAPABLE 0x100
73 73 #define ACPIDEV_ODF_HOTPLUG_READY 0x200
74 74 #define ACPIDEV_ODF_HOTPLUG_FAILED 0x400
75 75
76 76 #define ACPIDEV_DR_IS_BOARD(hdl) \
77 77 ((hdl)->aod_iflag & ACPIDEV_ODF_HOTPLUG_CAPABLE)
78 78
79 79 #define ACPIDEV_DR_SET_BOARD(hdl) \
80 80 (hdl)->aod_iflag |= ACPIDEV_ODF_HOTPLUG_CAPABLE
81 81
82 82 #define ACPIDEV_DR_IS_READY(hdl) \
83 83 ((hdl)->aod_iflag & ACPIDEV_ODF_HOTPLUG_READY)
84 84
85 85 #define ACPIDEV_DR_SET_READY(hdl) \
86 86 (hdl)->aod_iflag |= ACPIDEV_ODF_HOTPLUG_READY
87 87
88 88 #define ACPIDEV_DR_IS_FAILED(hdl) \
89 89 ((hdl)->aod_iflag & ACPIDEV_ODF_HOTPLUG_FAILED)
90 90
91 91 #define ACPIDEV_DR_SET_FAILED(hdl) \
92 92 (hdl)->aod_iflag |= ACPIDEV_ODF_HOTPLUG_FAILED
93 93
94 94 #define ACPIDEV_DR_IS_WORKING(hdl) \
95 95 (((hdl)->aod_iflag & (ACPIDEV_ODF_HOTPLUG_READY | \
96 96 ACPIDEV_ODF_HOTPLUG_FAILED)) == ACPIDEV_ODF_HOTPLUG_READY)
97 97
98 98 #define ACPIDEV_DR_IS_PROCESSED(hdl) \
99 99 ((hdl)->aod_iflag & (ACPIDEV_ODF_HOTPLUG_READY | \
100 100 ACPIDEV_ODF_HOTPLUG_FAILED | ACPIDEV_ODF_HOTPLUG_CAPABLE))
101 101
102 102 #define ACPIDEV_DR_BOARD_READY(hdl) \
103 103 (((hdl)->aod_iflag & \
104 104 (ACPIDEV_ODF_HOTPLUG_READY | ACPIDEV_ODF_HOTPLUG_CAPABLE)) == \
105 105 (ACPIDEV_ODF_HOTPLUG_READY | ACPIDEV_ODF_HOTPLUG_CAPABLE))
106 106
107 107 /*
108 108 * List of registered device class drivers.
109 109 * Class drivers on the same list will be called from head to tail in turn.
110 110 */
111 111 struct acpidev_class_list {
112 112 acpidev_class_list_t *acl_next;
113 113 acpidev_class_t *acl_class;
114 114 };
115 115
116 116 typedef struct acpidev_pseudo_uid {
117 117 struct acpidev_pseudo_uid *apu_next;
118 118 char *apu_uid;
119 119 acpidev_class_id_t apu_cid;
120 120 uint_t apu_nid;
121 121 } acpidev_pseudo_uid_t;
122 122
123 123 typedef struct acpidev_pseudo_uid_head {
124 124 kmutex_t apuh_lock;
125 125 uint32_t apuh_id;
126 126 acpidev_pseudo_uid_t *apuh_first;
127 127 } acpidev_pseudo_uid_head_t;
128 128
129 129 typedef struct acpidev_dr_capacity {
130 130 uint_t cpu_vendor;
131 131 uint_t cpu_family;
132 132 uint_t cpu_model_min;
133 133 uint_t cpu_model_max;
134 134 uint_t cpu_step_min;
135 135 uint_t cpu_step_max;
136 136 boolean_t hotplug_supported;
137 137 uint64_t memory_alignment;
138 138 } acpidev_dr_capacity_t;
139 139
140 140 extern int acpidev_dr_enable;
141 141 extern krwlock_t acpidev_class_lock;
142 142 extern ulong_t acpidev_object_type_mask[BT_BITOUL(ACPI_TYPE_NS_NODE_MAX + 1)];
143 143 extern ACPI_TABLE_SRAT *acpidev_srat_tbl_ptr;
144 144 extern ACPI_TABLE_SLIT *acpidev_slit_tbl_ptr;
145 145
146 146 #endif /* _KERNEL */
147 147
148 148 #ifdef __cplusplus
149 149 }
150 150 #endif
151 151
152 152 #endif /* _SYS_ACPIDEV_IMPL_H */
↓ open down ↓ |
109 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX