xref: /titanic_52/usr/src/uts/sun4/cpu/cpu_module.c (revision 7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fe)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #include <sys/cpu_module.h>
30 #include <sys/lockstat.h>
31 
32 /*
33  * This is a dummy file that provides the default cpu module
34  * that is linked to unix.
35  */
36 
37 uint_t	root_phys_addr_lo_mask;
38 int64_t timedelta;
39 hrtime_t hres_last_tick;
40 timestruc_t hrestime;
41 int64_t hrestime_adj;
42 int hres_lock;
43 uint_t nsec_scale;
44 uint_t nsec_shift;
45 uint_t adj_shift;
46 hrtime_t hrtime_base;
47 int traptrace_use_stick;
48 uchar_t *ctx_pgsz_array;
49 
50 void
51 cpu_setup(void)
52 {}
53 
54 void
55 cpu_init_tick_freq(void)
56 {}
57 
58 /*ARGSUSED*/
59 void
60 vtag_flushpage(caddr_t addr, uint_t ctx)
61 {}
62 
63 /*ARGSUSED*/
64 void
65 vtag_flushctx(uint_t ctx)
66 {}
67 
68 void
69 vtag_flushall(void)
70 {}
71 
72 /*ARGSUSED*/
73 void
74 vtag_flushpage_tl1(uint64_t addr, uint64_t ctx)
75 {}
76 
77 /*ARGSUSED*/
78 void
79 vtag_flush_pgcnt_tl1(uint64_t addr, uint64_t ctx_pgcnt)
80 {}
81 
82 /*ARGSUSED*/
83 void
84 vtag_flushctx_tl1(uint64_t ctx, uint64_t dummy)
85 {}
86 
87 /*ARGSUSED*/
88 void
89 vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2)
90 {}
91 
92 /*ARGSUSED*/
93 void
94 vac_flushpage(pfn_t pf, int color)
95 {}
96 
97 /*ARGSUSED*/
98 void
99 vac_flushpage_tl1(uint64_t pf, uint64_t color)
100 {}
101 
102 /*ARGSUSED*/
103 void
104 vac_flushcolor(int color, pfn_t pf)
105 {}
106 
107 /*ARGSUSED*/
108 void
109 vac_flushcolor_tl1(uint64_t color, uint64_t dummy)
110 {}
111 
112 /*ARGSUSED*/
113 void
114 init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2)
115 {}
116 
117 /*ARGSUSED*/
118 void
119 send_one_mondo(int cpuid)
120 {}
121 
122 /*ARGSUSED*/
123 void
124 send_mondo_set(cpuset_t set)
125 {}
126 
127 /*ARGSUSED*/
128 void
129 flush_instr_mem(caddr_t addr, size_t len)
130 {}
131 
132 void
133 syncfpu(void)
134 {}
135 
136 /*ARGSUSED*/
137 void
138 cpu_change_speed(uint64_t divisor, uint64_t arg2)
139 {}
140 
141 u_longlong_t
142 gettick(void)
143 { return (0); }
144 
145 uint64_t
146 gettick_counter(void)
147 { return (0); }
148 
149 /*ARGSUSED*/
150 void
151 gethrestime(timespec_t *tp)
152 {}
153 
154 time_t
155 gethrestime_sec(void)
156 { return (0); }
157 
158 /*ARGSUSED*/
159 void
160 gethrestime_lasttick(timespec_t *tp)
161 {}
162 
163 hrtime_t
164 gethrtime(void)
165 { return (0); }
166 
167 hrtime_t
168 gethrtime_unscaled(void)
169 { return (0); }
170 
171 hrtime_t
172 gethrtime_waitfree(void)
173 { return (0); }
174 
175 hrtime_t
176 dtrace_gethrtime(void)
177 { return (0); }
178 
179 uint_t
180 get_impl(void)
181 { return (0); }
182 
183 hrtime_t
184 get_hrestime(void)
185 { return (0); }
186 
187 ulong_t
188 get_timestamp(void)
189 { return (0); }
190 
191 ulong_t
192 get_virtime(void)
193 { return (0); }
194 
195 hrtime_t
196 gethrtime_max(void)
197 { return (0); }
198 
199 /*ARGSUSED*/
200 void
201 scalehrtime(hrtime_t *hrt)
202 {}
203 
204 void
205 hres_tick(void)
206 {}
207 
208 /*ARGSUSED*/
209 void
210 tickcmpr_set(uint64_t clock_cycles)
211 {}
212 
213 void
214 tickcmpr_disable(void)
215 {}
216 
217 /*ARGSUSED*/
218 void
219 tick_write_delta(uint64_t delta)
220 {}
221 
222 int
223 tickcmpr_disabled(void)
224 { return (0); }
225 
226 /*ARGSUSED*/
227 void
228 drv_usecwait(clock_t n)
229 {}
230 
231 /*
232  * Processor-optimized memory routines
233  */
234 /*ARGSUSED*/
235 int
236 kcopy(const void *from, void *to, size_t count)
237 { return (0); }
238 
239 /*ARGSUSED*/
240 int
241 kcopy_nta(const void *from, void *to, size_t count, int dummy)
242 { return (0); }
243 
244 /*ARGSUSED*/
245 void
246 bcopy(const void *from, void *to, size_t count)
247 {}
248 
249 /*ARGSUSED*/
250 void
251 ovbcopy(const void *from, void *to, size_t count)
252 {}
253 
254 /*ARGSUSED*/
255 int
256 copyin(const void *uaddr, void *kaddr, size_t count)
257 { return (0); }
258 
259 /*ARGSUSED*/
260 int
261 xcopyin(const void *uaddr, void *kaddr, size_t count)
262 { return (0); }
263 
264 /*ARGSUSED*/
265 int
266 xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy)
267 { return (0); }
268 
269 /*ARGSUSED*/
270 int
271 copyout(const void *kaddr, void *uaddr, size_t count)
272 { return (0); }
273 
274 /*ARGSUSED*/
275 int
276 xcopyout(const void *kaddr, void *uaddr, size_t count)
277 { return (0); }
278 
279 /*ARGSUSED*/
280 int
281 xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy)
282 { return (0); }
283 
284 /*ARGSUSED*/
285 void
286 copyout_noerr(const void *kfrom, void *uto, size_t count)
287 {}
288 
289 /*ARGSUSED*/
290 void
291 copyin_noerr(const void *kfrom, void *uto, size_t count)
292 {}
293 
294 /*ARGSUSED*/
295 int
296 xcopyin_little(const void *uaddr, void *kaddr, size_t count)
297 { return (0); }
298 
299 /*ARGSUSED*/
300 int
301 xcopyout_little(const void *kaddr, void *uaddr, size_t count)
302 { return (0); }
303 
304 /*ARGSUSED*/
305 void
306 hwblkpagecopy(const void *src, void *dst)
307 {}
308 
309 /*ARGSUSED*/
310 void
311 hw_pa_bcopy32(uint64_t src, uint64_t dst)
312 {}
313 
314 /*ARGSUSED*/
315 int
316 hwblkclr(void *addr, size_t len)
317 { return (0); }
318 
319 int use_hw_bzero;
320 int use_hw_bcopy;
321 uint_t hw_copy_limit_1;
322 uint_t hw_copy_limit_2;
323 uint_t hw_copy_limit_4;
324 uint_t hw_copy_limit_8;
325 
326 /*
327  * tick operations
328  */
329 
330 void
331 tick_rtt(void)
332 { }
333 
334 void
335 pil14_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