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