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