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