xref: /illumos-gate/usr/src/uts/sun4/cpu/cpu_module.c (revision 9853d9e82e7a067a2b88dae2fd257207e6be5f94)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #include <sys/cpu_module.h>
27 #include <sys/lockstat.h>
28 
29 /*
30  * This is a dummy file that provides the default cpu module
31  * that is linked to unix.
32  */
33 
34 uint_t	root_phys_addr_lo_mask;
35 int64_t timedelta;
36 hrtime_t hres_last_tick;
37 volatile timestruc_t hrestime;
38 int64_t hrestime_adj;
39 volatile int hres_lock;
40 uint_t nsec_scale;
41 uint_t nsec_shift;
42 uint_t adj_shift;
43 hrtime_t hrtime_base;
44 int traptrace_use_stick;
45 uint_t cpu_impl_dual_pgsz;
46 
47 void
48 cpu_setup(void)
49 {}
50 
51 void
52 cpu_init_tick_freq(void)
53 {}
54 
55 /*ARGSUSED*/
56 void
57 vtag_flushpage(caddr_t addr, uint64_t sfmmup)
58 {}
59 
60 void
61 vtag_flushall(void)
62 {}
63 
64 void
65 vtag_flushall_uctxs(void)
66 {}
67 
68 /*ARGSUSED*/
69 void
70 vtag_flushpage_tl1(uint64_t addr, uint64_t sfmmup)
71 {}
72 
73 /*ARGSUSED*/
74 void
75 vtag_flush_pgcnt_tl1(uint64_t addr, uint64_t sfmmup_pgcnt)
76 {}
77 
78 /*ARGSUSED*/
79 void
80 vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2)
81 {}
82 
83 /*ARGSUSED*/
84 void
85 vtag_unmap_perm_tl1(uint64_t addr, uint64_t ctx)
86 {}
87 
88 /*ARGSUSED*/
89 void
90 vac_flushpage(pfn_t pf, int color)
91 {}
92 
93 /*ARGSUSED*/
94 void
95 vac_flushpage_tl1(uint64_t pf, uint64_t color)
96 {}
97 
98 /*ARGSUSED*/
99 void
100 vac_flushcolor(int color, pfn_t pf)
101 {}
102 
103 /*ARGSUSED*/
104 void
105 vac_flushcolor_tl1(uint64_t color, uint64_t dummy)
106 {}
107 
108 /*ARGSUSED*/
109 void
110 init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2)
111 {}
112 
113 /*ARGSUSED*/
114 void
115 send_one_mondo(int cpuid)
116 {}
117 
118 /*ARGSUSED*/
119 void
120 send_mondo_set(cpuset_t set)
121 {}
122 
123 /*ARGSUSED*/
124 void
125 flush_instr_mem(caddr_t addr, size_t len)
126 {}
127 
128 void
129 syncfpu(void)
130 {}
131 
132 /*ARGSUSED*/
133 void
134 cpu_change_speed(uint64_t divisor, uint64_t arg2)
135 {}
136 
137 u_longlong_t
138 gettick(void)
139 { return (0); }
140 
141 uint64_t
142 gettick_counter(void)
143 { return (0); }
144 
145 /*ARGSUSED*/
146 void
147 gethrestime(timespec_t *tp)
148 {}
149 
150 time_t
151 gethrestime_sec(void)
152 { return (0); }
153 
154 /*ARGSUSED*/
155 void
156 gethrestime_lasttick(timespec_t *tp)
157 {}
158 
159 hrtime_t
160 gethrtime(void)
161 { return (0); }
162 
163 hrtime_t
164 gethrtime_unscaled(void)
165 { return (0); }
166 
167 hrtime_t
168 gethrtime_waitfree(void)
169 { return (0); }
170 
171 hrtime_t
172 dtrace_gethrtime(void)
173 { return (0); }
174 
175 uint_t
176 get_impl(void)
177 { return (0); }
178 
179 hrtime_t
180 get_hrestime(void)
181 { return (0); }
182 
183 ulong_t
184 get_timestamp(void)
185 { return (0); }
186 
187 ulong_t
188 get_virtime(void)
189 { return (0); }
190 
191 hrtime_t
192 gethrtime_max(void)
193 { return (0); }
194 
195 /*ARGSUSED*/
196 void
197 scalehrtime(hrtime_t *hrt)
198 {}
199 
200 void
201 hres_tick(void)
202 {}
203 
204 /*ARGSUSED*/
205 void
206 tickcmpr_set(uint64_t clock_cycles)
207 {}
208 
209 void
210 tickcmpr_disable(void)
211 {}
212 
213 /*ARGSUSED*/
214 void
215 tick_write_delta(uint64_t delta)
216 {}
217 
218 int
219 tickcmpr_disabled(void)
220 { return (0); }
221 
222 /*ARGSUSED*/
223 void
224 drv_usecwait(clock_t n)
225 {}
226 
227 /*
228  * Processor-optimized memory routines
229  */
230 /*ARGSUSED*/
231 int
232 kcopy(const void *from, void *to, size_t count)
233 { return (0); }
234 
235 /*ARGSUSED*/
236 int
237 kcopy_nta(const void *from, void *to, size_t count, int dummy)
238 { return (0); }
239 
240 /*ARGSUSED*/
241 void
242 bcopy(const void *from, void *to, size_t count)
243 {}
244 
245 /*ARGSUSED*/
246 void
247 ovbcopy(const void *from, void *to, size_t count)
248 {}
249 
250 /*ARGSUSED*/
251 int
252 copyin(const void *uaddr, void *kaddr, size_t count)
253 { return (0); }
254 
255 /*ARGSUSED*/
256 int
257 xcopyin(const void *uaddr, void *kaddr, size_t count)
258 { return (0); }
259 
260 /*ARGSUSED*/
261 int
262 xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy)
263 { return (0); }
264 
265 /*ARGSUSED*/
266 int
267 copyout(const void *kaddr, void *uaddr, size_t count)
268 { return (0); }
269 
270 /*ARGSUSED*/
271 int
272 xcopyout(const void *kaddr, void *uaddr, size_t count)
273 { return (0); }
274 
275 /*ARGSUSED*/
276 int
277 xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy)
278 { return (0); }
279 
280 /*ARGSUSED*/
281 void
282 copyout_noerr(const void *kfrom, void *uto, size_t count)
283 {}
284 
285 /*ARGSUSED*/
286 void
287 copyin_noerr(const void *kfrom, void *uto, size_t count)
288 {}
289 
290 /*ARGSUSED*/
291 int
292 xcopyin_little(const void *uaddr, void *kaddr, size_t count)
293 { return (0); }
294 
295 /*ARGSUSED*/
296 int
297 xcopyout_little(const void *kaddr, void *uaddr, size_t count)
298 { return (0); }
299 
300 /*ARGSUSED*/
301 void
302 hwblkpagecopy(const void *src, void *dst)
303 {}
304 
305 /*ARGSUSED*/
306 void
307 hw_pa_bcopy32(uint64_t src, uint64_t dst)
308 {}
309 
310 /*ARGSUSED*/
311 int
312 hwblkclr(void *addr, size_t len)
313 { return (0); }
314 
315 int use_hw_bzero;
316 int use_hw_bcopy;
317 uint_t hw_copy_limit_1;
318 uint_t hw_copy_limit_2;
319 uint_t hw_copy_limit_4;
320 uint_t hw_copy_limit_8;
321 
322 /*
323  * tick operations
324  */
325 
326 void
327 tick_rtt(void)
328 { }
329 
330 void
331 pil14_interrupt(void)
332 { }
333 
334 void
335 pil15_interrupt(void)
336 { }
337 
338 /* ARGSUSED */
339 void
340 cpu_init_private(struct cpu *cp)
341 {}
342 
343 /* ARGSUSED */
344 void
345 cpu_uninit_private(struct cpu *cp)
346 {}
347 
348 void
349 sticksync_slave(void)
350 {}
351 
352 void
353 sticksync_master(void)
354 {}
355 
356 /*ARGSUSED*/
357 int
358 dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain)
359 { return (-1); }
360