Print this page
XXX AVX procfs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/sys/archsystm.h
+++ new/usr/src/uts/intel/sys/archsystm.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 #ifndef _SYS_ARCHSYSTM_H
27 27 #define _SYS_ARCHSYSTM_H
28 28
29 29 /*
30 30 * A selection of ISA-dependent interfaces
31 31 */
32 32
33 33 #include <vm/seg_enum.h>
34 34 #include <vm/page.h>
35 35
36 36 #ifdef __cplusplus
37 37 extern "C" {
38 38 #endif
39 39
40 40 #ifdef _KERNEL
41 41
42 42 extern greg_t getfp(void);
43 43 extern int getpil(void);
44 44
45 45 extern ulong_t getcr0(void);
46 46 extern void setcr0(ulong_t);
47 47 extern ulong_t getcr8(void);
48 48 extern void setcr8(ulong_t);
49 49 extern ulong_t getcr2(void);
50 50 extern void clflush_insn(caddr_t addr);
51 51 extern void mfence_insn(void);
52 52
53 53 #if defined(__i386)
54 54 extern uint16_t getgs(void);
55 55 extern void setgs(uint16_t);
56 56
57 57 extern void patch_sse(void);
58 58 extern void patch_sse2(void);
59 59 #endif
60 60
61 61 extern void patch_xsave(void);
62 62
63 63 extern void cli(void);
64 64 extern void sti(void);
65 65
66 66 extern void tenmicrosec(void);
67 67
68 68 extern void restore_int_flag(ulong_t);
69 69 extern void intr_restore(ulong_t);
70 70 extern ulong_t clear_int_flag(void);
71 71 extern ulong_t intr_clear(void);
72 72 extern ulong_t getflags(void);
73 73 extern int interrupts_enabled(void);
74 74
75 75 extern void int3(void);
76 76 extern void int18(void);
77 77 extern void int20(void);
78 78 extern void int_cmci(void);
79 79
80 80 #if defined(__amd64)
81 81 extern void sys_syscall();
82 82 extern void sys_syscall32();
83 83 extern void sys_lcall32();
84 84 extern void sys_syscall_int();
85 85 extern void brand_sys_syscall();
86 86 extern void brand_sys_syscall32();
87 87 extern void brand_sys_syscall_int();
88 88 extern int update_sregs();
89 89 extern void reset_sregs();
90 90 #elif defined(__i386)
91 91 extern void sys_call();
92 92 extern void brand_sys_call();
93 93 #endif
94 94 extern void sys_sysenter();
95 95 extern void _sys_sysenter_post_swapgs();
96 96 extern void brand_sys_sysenter();
97 97 extern void _brand_sys_sysenter_post_swapgs();
98 98
99 99 extern void dosyscall(void);
100 100
101 101 extern void bind_hwcap(void);
102 102
103 103 extern uint16_t inw(int port);
104 104 extern uint32_t inl(int port);
105 105 extern void outw(int port, uint16_t value);
106 106 extern void outl(int port, uint32_t value);
107 107
108 108 extern void pc_reset(void) __NORETURN;
109 109 extern void efi_reset(void) __NORETURN;
110 110 extern void reset(void) __NORETURN;
111 111 extern int goany(void);
112 112
113 113 extern void setgregs(klwp_t *, gregset_t);
↓ open down ↓ |
113 lines elided |
↑ open up ↑ |
114 114 extern void getgregs(klwp_t *, gregset_t);
115 115 extern void setfpregs(klwp_t *, fpregset_t *);
116 116 extern void getfpregs(klwp_t *, fpregset_t *);
117 117
118 118 #if defined(_SYSCALL32_IMPL)
119 119 extern void getgregs32(klwp_t *, gregset32_t);
120 120 extern void setfpregs32(klwp_t *, fpregset32_t *);
121 121 extern void getfpregs32(klwp_t *, fpregset32_t *);
122 122 #endif
123 123
124 +struct ucontext;
125 +extern void xregs_clrptr(struct _klwp *, struct ucontext *);
126 +extern int xregs_hasptr(struct _klwp *, struct ucontext *);
127 +extern caddr_t xregs_getptr(struct _klwp *, struct ucontext *);
128 +extern void xregs_setptr(struct _klwp *, struct ucontext *, caddr_t);
129 +
130 +#if defined(_SYSCALL32_IMPL)
131 +struct ucontext32;
132 +extern void xregs_clrptr32(struct _klwp *, struct ucontext32 *);
133 +extern int xregs_hasptr32(struct _klwp *, struct ucontext32 *);
134 +extern caddr32_t xregs_getptr32(struct _klwp *, struct ucontext32 *);
135 +extern void xregs_setptr32(struct _klwp *, struct ucontext32 *, caddr32_t);
136 +#endif /* _SYSCALL32_IMPL */
137 +
138 +extern void xregs_get(struct _klwp *, caddr_t);
139 +extern void xregs_set(struct _klwp *, caddr_t);
140 +extern int xregs_getsize(struct proc *);
141 +
124 142 struct fpu_ctx;
125 143
126 144 extern void fp_free(struct fpu_ctx *, int);
127 145 extern void fp_save(struct fpu_ctx *);
128 146 extern void fp_restore(struct fpu_ctx *);
129 147
130 148 extern int fpu_pentium_fdivbug;
131 149
132 150 extern void sep_save(void *);
133 151 extern void sep_restore(void *);
134 152
135 153 extern void brand_interpositioning_enable(void);
136 154 extern void brand_interpositioning_disable(void);
137 155
138 156 struct regs;
139 157
140 158 extern int instr_size(struct regs *, caddr_t *, enum seg_rw);
141 159
142 160 extern int enable_cbcp; /* patchable in /etc/system */
143 161
144 162 extern uint_t cpu_hwcap_flags;
145 163 extern uint_t cpu_freq;
146 164 extern uint64_t cpu_freq_hz;
147 165
148 166 extern int use_sse_pagecopy;
149 167 extern int use_sse_pagezero;
150 168 extern int use_sse_copy;
151 169
152 170 extern caddr_t i86devmap(pfn_t, pgcnt_t, uint_t);
153 171 extern page_t *page_numtopp_alloc(pfn_t pfnum);
154 172
155 173 extern void hwblkclr(void *, size_t);
156 174 extern void hwblkpagecopy(const void *, void *);
157 175 extern void page_copy_no_xmm(void *dst, void *src);
158 176 extern void block_zero_no_xmm(void *dst, int len);
159 177 #define BLOCKZEROALIGN (4 * sizeof (void *))
160 178
161 179 extern void (*kcpc_hw_enable_cpc_intr)(void);
162 180
163 181 extern void init_desctbls(void);
164 182
165 183 extern user_desc_t *cpu_get_gdt(void);
166 184
167 185 extern void switch_sp_and_call(void *, void (*)(uint_t, uint_t), uint_t,
168 186 uint_t);
169 187 extern hrtime_t (*gethrtimef)(void);
170 188 extern hrtime_t (*gethrtimeunscaledf)(void);
171 189 extern void (*scalehrtimef)(hrtime_t *);
172 190 extern uint64_t (*unscalehrtimef)(hrtime_t);
173 191 extern void (*gethrestimef)(timestruc_t *);
174 192
175 193 extern void av_dispatch_softvect(uint_t);
176 194 extern void av_dispatch_autovect(uint_t);
177 195 extern uint_t atomic_btr32(uint32_t *, uint_t);
178 196 extern uint_t bsrw_insn(uint16_t);
179 197 extern int sys_rtt_common(struct regs *);
180 198 extern void fakesoftint(void);
181 199
182 200 extern void *plat_traceback(void *);
183 201
184 202 #if defined(__xpv)
185 203 extern void xen_init_callbacks(void);
186 204 extern void xen_set_callback(void (*)(void), uint_t, uint_t);
187 205 extern void xen_printf(const char *, ...);
188 206 #define cpr_dprintf xen_printf
189 207 extern int xpv_panicking;
190 208 #define IN_XPV_PANIC() (xpv_panicking > 0)
191 209 #else
192 210 extern void setup_mca(void);
193 211 extern void pat_sync(void);
194 212 extern void patch_tsc_read(int);
195 213 #if defined(__amd64) && !defined(__xpv)
196 214 extern void patch_memops(uint_t);
197 215 #endif /* defined(__amd64) && !defined(__xpv) */
198 216 extern void setup_xfem(void);
199 217 #define cpr_dprintf prom_printf
200 218 #define IN_XPV_PANIC() (__lintzero)
201 219 #endif
202 220
203 221 #endif /* _KERNEL */
204 222
205 223 #if defined(_KERNEL) || defined(_BOOT)
206 224 extern uint8_t inb(int port);
207 225 extern void outb(int port, uint8_t value);
208 226 #endif
209 227
210 228 #ifdef __cplusplus
211 229 }
212 230 #endif
213 231
214 232 #endif /* _SYS_ARCHSYSTM_H */
↓ open down ↓ |
81 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX