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