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