Print this page
XXX nobios
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86pc/sys/machsystm.h
+++ new/usr/src/uts/i86pc/sys/machsystm.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 /*
23 23 * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 */
25 25 /*
26 26 * Copyright (c) 2010, Intel Corporation.
27 27 * All rights reserved.
28 28 */
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
29 29
30 30 #ifndef _SYS_MACHSYSTM_H
31 31 #define _SYS_MACHSYSTM_H
32 32
33 33 /*
34 34 * Numerous platform-dependent interfaces that don't seem to belong
35 35 * in any other header file.
36 36 *
37 37 * This file should not be included by code that purports to be
38 38 * platform-independent.
39 - *
40 39 */
41 40
42 41 #include <sys/machparam.h>
43 42 #include <sys/varargs.h>
44 43 #include <sys/thread.h>
45 44 #include <sys/cpuvar.h>
46 45 #include <sys/privregs.h>
47 46 #include <sys/systm.h>
48 47 #include <sys/traptrace.h>
49 48 #include <vm/page.h>
50 49
51 50 #ifdef __cplusplus
52 51 extern "C" {
53 52 #endif
54 53
55 54 #ifdef _KERNEL
56 55
57 56 typedef enum mach_cpu_add_arg_type {
58 57 MACH_CPU_ARG_LOCAL_APIC,
59 58 MACH_CPU_ARG_LOCAL_X2APIC,
60 59 } mach_cpu_add_arg_type_t;
61 60
62 61 typedef struct mach_cpu_add_arg {
63 62 mach_cpu_add_arg_type_t type;
64 63 union {
65 64 struct {
66 65 uint32_t apic_id;
67 66 uint32_t proc_id;
68 67 } apic;
69 68 } arg;
70 69 } mach_cpu_add_arg_t;
71 70
72 71 extern void mach_cpu_idle(void);
73 72 extern void mach_cpu_halt(char *);
74 73 extern int mach_cpu_start(cpu_t *, void *);
75 74 extern int mach_cpuid_start(processorid_t, void *);
76 75 extern int mach_cpu_stop(cpu_t *, void *);
77 76 extern int mach_cpu_add(mach_cpu_add_arg_t *, processorid_t *);
78 77 extern int mach_cpu_remove(processorid_t);
79 78 extern int mach_cpu_create_device_node(cpu_t *, dev_info_t **);
80 79 extern int mach_cpu_get_device_node(cpu_t *, dev_info_t **);
81 80
82 81 extern int Cpudelay;
83 82 extern void setcpudelay(void);
84 83
85 84 extern void send_dirint(int, int);
86 85 extern void siron(void);
87 86 extern void sir_on(int);
88 87
89 88 extern void return_instr(void);
90 89
91 90 extern int kcpc_hw_load_pcbe(void);
92 91 extern void kcpc_hw_init(cpu_t *cp);
93 92 extern void kcpc_hw_fini(cpu_t *cp);
94 93 extern int kcpc_hw_overflow_intr_installed;
95 94
96 95 struct panic_trap_info {
97 96 struct regs *trap_regs;
98 97 uint_t trap_type;
99 98 caddr_t trap_addr;
100 99 };
101 100
102 101 struct memconf {
103 102 pfn_t mcf_spfn; /* begin page frame number */
104 103 pfn_t mcf_epfn; /* end page frame number */
105 104 };
106 105
107 106 struct system_hardware {
108 107 int hd_nodes; /* number of nodes */
109 108 int hd_cpus_per_node; /* max cpus in a node */
110 109 struct memconf hd_mem[MAXNODES];
111 110 /*
112 111 * memory layout for each
113 112 * node.
114 113 */
115 114 };
116 115 extern struct system_hardware system_hardware;
117 116 extern void get_system_configuration(void);
118 117 extern void mmu_init(void);
119 118 extern int cpuid2nodeid(int);
120 119 extern void map_kaddr(caddr_t, pfn_t, int, int);
121 120
122 121 extern void memscrub_init(void);
123 122 extern void trap(struct regs *, caddr_t, processorid_t);
124 123
125 124 extern void do_interrupt(struct regs *, trap_trace_rec_t *);
126 125 extern void memscrub_disable(void);
127 126
128 127 /*
129 128 * Interrupt handling hooks
130 129 */
131 130 extern void (*do_interrupt_common)(struct regs *, trap_trace_rec_t *);
132 131 extern uintptr_t (*get_intr_handler)(int, short);
133 132
134 133 /*
135 134 * Dispatcher hooks.
136 135 */
137 136 void (*idle_cpu)();
138 137 void (*non_deep_idle_cpu)();
139 138 void (*disp_enq_thread)(cpu_t *, int);
140 139 void (*non_deep_idle_disp_enq_thread)(cpu_t *, int);
141 140
142 141 #ifndef __xpv
143 142 extern unsigned int microdata;
144 143 #endif
145 144
146 145 extern int use_mp;
147 146
148 147 extern struct cpu cpus[]; /* pointer to other cpus */
149 148 extern struct cpu *cpu[]; /* pointer to all cpus */
150 149
151 150 /* Operation types for extended mach_cpucontext interfaces */
152 151 #define MACH_CPUCONTEXT_OP_START 0
153 152 #define MACH_CPUCONTEXT_OP_STOP 1
154 153
155 154 extern int mach_cpucontext_init(void);
156 155 extern void mach_cpucontext_fini(void);
157 156 extern void *mach_cpucontext_alloc(struct cpu *);
158 157 extern void mach_cpucontext_free(struct cpu *, void *, int);
159 158 extern void *mach_cpucontext_xalloc(struct cpu *, int);
160 159 extern void mach_cpucontext_xfree(struct cpu *, void *, int, int);
161 160 extern void rmp_gdt_init(rm_platter_t *);
162 161
163 162 extern uintptr_t hole_start, hole_end;
164 163
165 164 #define INVALID_VADDR(a) \
166 165 (((a) >= (caddr_t)hole_start && (a) < (caddr_t)hole_end))
167 166
168 167 /* kpm mapping window */
169 168 extern size_t kpm_size;
170 169 extern uchar_t kpm_size_shift;
171 170 extern caddr_t kpm_vbase;
172 171
173 172 struct memlist;
174 173 extern void memlist_add(uint64_t, uint64_t, struct memlist *,
175 174 struct memlist **);
176 175 extern page_t *page_get_physical(uintptr_t seed);
177 176 extern int linear_pc(struct regs *rp, proc_t *p, caddr_t *linearp);
178 177 extern int dtrace_linear_pc(struct regs *rp, proc_t *p, caddr_t *linearp);
179 178
180 179 extern int force_shutdown_method;
181 180
182 181 /* Dynamic Reconfiguration capability interface. */
183 182 #define PLAT_DR_OPTIONS_NAME "plat-dr-options"
184 183 #define PLAT_DR_PHYSMAX_NAME "plat-dr-physmax"
185 184 #define PLAT_MAX_NCPUS_NAME "plat-max-ncpus"
186 185 #define BOOT_MAX_NCPUS_NAME "boot-max-ncpus"
187 186 #define BOOT_NCPUS_NAME "boot-ncpus"
188 187
189 188 #define PLAT_DR_FEATURE_CPU 0x1
190 189 #define PLAT_DR_FEATURE_MEMORY 0x2
191 190 #define PLAT_DR_FEATURE_ENABLED 0x1000000
192 191
193 192 #define plat_dr_enabled() \
194 193 plat_dr_check_capability(PLAT_DR_FEATURE_ENABLED)
195 194
196 195 #define plat_dr_enable() \
197 196 plat_dr_enable_capability(PLAT_DR_FEATURE_ENABLED)
198 197
199 198 #define plat_dr_disable_cpu() \
200 199 plat_dr_disable_capability(PLAT_DR_FEATURE_CPU)
201 200 #define plat_dr_disable_memory() \
202 201 plat_dr_disable_capability(PLAT_DR_FEATURE_MEMORY)
203 202
204 203 extern boolean_t plat_dr_support_cpu(void);
205 204 extern boolean_t plat_dr_support_memory(void);
206 205 extern boolean_t plat_dr_check_capability(uint64_t features);
207 206 extern void plat_dr_enable_capability(uint64_t features);
208 207 extern void plat_dr_disable_capability(uint64_t features);
209 208
210 209 #pragma weak plat_dr_support_cpu
211 210 #pragma weak plat_dr_support_memory
212 211
213 212 /*
214 213 * Used to communicate DR updates to platform lgroup framework
215 214 */
216 215 typedef struct {
217 216 uint64_t u_base;
218 217 uint64_t u_length;
219 218 uint32_t u_domain;
220 219 uint32_t u_device_id;
221 220 uint32_t u_sli_cnt;
222 221 uchar_t *u_sli_ptr;
223 222 } update_membounds_t;
224 223
↓ open down ↓ |
175 lines elided |
↑ open up ↑ |
225 224 /* Maximum physical page number (PFN) for memory DR operations. */
226 225 extern uint64_t plat_dr_physmax;
227 226
228 227 #ifdef __xpv
229 228 #include <sys/xen_mmu.h>
230 229 extern page_t *page_get_high_mfn(mfn_t);
231 230 #endif
232 231
233 232 extern hrtime_t tsc_gethrtime_tick_delta(void);
234 233
234 +extern boolean_t bios_calls_available;
235 +
235 236 #endif /* _KERNEL */
236 237
237 238 #ifdef __cplusplus
238 239 }
239 240 #endif
240 241
241 242 #endif /* _SYS_MACHSYSTM_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX