xref: /onnv-gate/usr/src/uts/sun4/cpu/cpu_module.c (revision 4551:af6e7cd796cc)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
52241Shuah  * Common Development and Distribution License (the "License").
62241Shuah  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*4551Ssudheer  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #include <sys/cpu_module.h>
290Sstevel@tonic-gate #include <sys/lockstat.h>
300Sstevel@tonic-gate 
310Sstevel@tonic-gate /*
320Sstevel@tonic-gate  * This is a dummy file that provides the default cpu module
330Sstevel@tonic-gate  * that is linked to unix.
340Sstevel@tonic-gate  */
350Sstevel@tonic-gate 
360Sstevel@tonic-gate uint_t	root_phys_addr_lo_mask;
370Sstevel@tonic-gate int64_t timedelta;
380Sstevel@tonic-gate hrtime_t hres_last_tick;
39*4551Ssudheer volatile timestruc_t hrestime;
400Sstevel@tonic-gate int64_t hrestime_adj;
41*4551Ssudheer volatile int hres_lock;
420Sstevel@tonic-gate uint_t nsec_scale;
430Sstevel@tonic-gate uint_t nsec_shift;
440Sstevel@tonic-gate uint_t adj_shift;
450Sstevel@tonic-gate hrtime_t hrtime_base;
460Sstevel@tonic-gate int traptrace_use_stick;
472241Shuah uint_t cpu_impl_dual_pgsz;
480Sstevel@tonic-gate 
490Sstevel@tonic-gate void
500Sstevel@tonic-gate cpu_setup(void)
510Sstevel@tonic-gate {}
520Sstevel@tonic-gate 
530Sstevel@tonic-gate void
540Sstevel@tonic-gate cpu_init_tick_freq(void)
550Sstevel@tonic-gate {}
560Sstevel@tonic-gate 
570Sstevel@tonic-gate /*ARGSUSED*/
580Sstevel@tonic-gate void
592241Shuah vtag_flushpage(caddr_t addr, uint64_t sfmmup)
600Sstevel@tonic-gate {}
610Sstevel@tonic-gate 
620Sstevel@tonic-gate void
630Sstevel@tonic-gate vtag_flushall(void)
640Sstevel@tonic-gate {}
650Sstevel@tonic-gate 
660Sstevel@tonic-gate void
672241Shuah vtag_flushall_uctxs(void)
680Sstevel@tonic-gate {}
690Sstevel@tonic-gate 
700Sstevel@tonic-gate /*ARGSUSED*/
710Sstevel@tonic-gate void
722241Shuah vtag_flushpage_tl1(uint64_t addr, uint64_t sfmmup)
730Sstevel@tonic-gate {}
740Sstevel@tonic-gate 
750Sstevel@tonic-gate /*ARGSUSED*/
760Sstevel@tonic-gate void
772241Shuah vtag_flush_pgcnt_tl1(uint64_t addr, uint64_t sfmmup_pgcnt)
780Sstevel@tonic-gate {}
790Sstevel@tonic-gate 
800Sstevel@tonic-gate /*ARGSUSED*/
810Sstevel@tonic-gate void
820Sstevel@tonic-gate vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2)
830Sstevel@tonic-gate {}
840Sstevel@tonic-gate 
850Sstevel@tonic-gate /*ARGSUSED*/
860Sstevel@tonic-gate void
870Sstevel@tonic-gate vac_flushpage(pfn_t pf, int color)
880Sstevel@tonic-gate {}
890Sstevel@tonic-gate 
900Sstevel@tonic-gate /*ARGSUSED*/
910Sstevel@tonic-gate void
920Sstevel@tonic-gate vac_flushpage_tl1(uint64_t pf, uint64_t color)
930Sstevel@tonic-gate {}
940Sstevel@tonic-gate 
950Sstevel@tonic-gate /*ARGSUSED*/
960Sstevel@tonic-gate void
970Sstevel@tonic-gate vac_flushcolor(int color, pfn_t pf)
980Sstevel@tonic-gate {}
990Sstevel@tonic-gate 
1000Sstevel@tonic-gate /*ARGSUSED*/
1010Sstevel@tonic-gate void
1020Sstevel@tonic-gate vac_flushcolor_tl1(uint64_t color, uint64_t dummy)
1030Sstevel@tonic-gate {}
1040Sstevel@tonic-gate 
1050Sstevel@tonic-gate /*ARGSUSED*/
1060Sstevel@tonic-gate void
1070Sstevel@tonic-gate init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2)
1080Sstevel@tonic-gate {}
1090Sstevel@tonic-gate 
1100Sstevel@tonic-gate /*ARGSUSED*/
1110Sstevel@tonic-gate void
1120Sstevel@tonic-gate send_one_mondo(int cpuid)
1130Sstevel@tonic-gate {}
1140Sstevel@tonic-gate 
1150Sstevel@tonic-gate /*ARGSUSED*/
1160Sstevel@tonic-gate void
1170Sstevel@tonic-gate send_mondo_set(cpuset_t set)
1180Sstevel@tonic-gate {}
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate /*ARGSUSED*/
1210Sstevel@tonic-gate void
1220Sstevel@tonic-gate flush_instr_mem(caddr_t addr, size_t len)
1230Sstevel@tonic-gate {}
1240Sstevel@tonic-gate 
1250Sstevel@tonic-gate void
1260Sstevel@tonic-gate syncfpu(void)
1270Sstevel@tonic-gate {}
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate /*ARGSUSED*/
1300Sstevel@tonic-gate void
1310Sstevel@tonic-gate cpu_change_speed(uint64_t divisor, uint64_t arg2)
1320Sstevel@tonic-gate {}
1330Sstevel@tonic-gate 
1340Sstevel@tonic-gate u_longlong_t
1350Sstevel@tonic-gate gettick(void)
1360Sstevel@tonic-gate { return (0); }
1370Sstevel@tonic-gate 
1380Sstevel@tonic-gate uint64_t
1390Sstevel@tonic-gate gettick_counter(void)
1400Sstevel@tonic-gate { return (0); }
1410Sstevel@tonic-gate 
1420Sstevel@tonic-gate /*ARGSUSED*/
1430Sstevel@tonic-gate void
1440Sstevel@tonic-gate gethrestime(timespec_t *tp)
1450Sstevel@tonic-gate {}
1460Sstevel@tonic-gate 
1470Sstevel@tonic-gate time_t
1480Sstevel@tonic-gate gethrestime_sec(void)
1490Sstevel@tonic-gate { return (0); }
1500Sstevel@tonic-gate 
1510Sstevel@tonic-gate /*ARGSUSED*/
1520Sstevel@tonic-gate void
1530Sstevel@tonic-gate gethrestime_lasttick(timespec_t *tp)
1540Sstevel@tonic-gate {}
1550Sstevel@tonic-gate 
1560Sstevel@tonic-gate hrtime_t
1570Sstevel@tonic-gate gethrtime(void)
1580Sstevel@tonic-gate { return (0); }
1590Sstevel@tonic-gate 
1600Sstevel@tonic-gate hrtime_t
1610Sstevel@tonic-gate gethrtime_unscaled(void)
1620Sstevel@tonic-gate { return (0); }
1630Sstevel@tonic-gate 
1640Sstevel@tonic-gate hrtime_t
1650Sstevel@tonic-gate gethrtime_waitfree(void)
1660Sstevel@tonic-gate { return (0); }
1670Sstevel@tonic-gate 
1680Sstevel@tonic-gate hrtime_t
1690Sstevel@tonic-gate dtrace_gethrtime(void)
1700Sstevel@tonic-gate { return (0); }
1710Sstevel@tonic-gate 
1720Sstevel@tonic-gate uint_t
1730Sstevel@tonic-gate get_impl(void)
1740Sstevel@tonic-gate { return (0); }
1750Sstevel@tonic-gate 
1760Sstevel@tonic-gate hrtime_t
1770Sstevel@tonic-gate get_hrestime(void)
1780Sstevel@tonic-gate { return (0); }
1790Sstevel@tonic-gate 
1800Sstevel@tonic-gate ulong_t
1810Sstevel@tonic-gate get_timestamp(void)
1820Sstevel@tonic-gate { return (0); }
1830Sstevel@tonic-gate 
1840Sstevel@tonic-gate ulong_t
1850Sstevel@tonic-gate get_virtime(void)
1860Sstevel@tonic-gate { return (0); }
1870Sstevel@tonic-gate 
1880Sstevel@tonic-gate hrtime_t
1890Sstevel@tonic-gate gethrtime_max(void)
1900Sstevel@tonic-gate { return (0); }
1910Sstevel@tonic-gate 
1920Sstevel@tonic-gate /*ARGSUSED*/
1930Sstevel@tonic-gate void
1940Sstevel@tonic-gate scalehrtime(hrtime_t *hrt)
1950Sstevel@tonic-gate {}
1960Sstevel@tonic-gate 
1970Sstevel@tonic-gate void
1980Sstevel@tonic-gate hres_tick(void)
1990Sstevel@tonic-gate {}
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate /*ARGSUSED*/
2020Sstevel@tonic-gate void
2030Sstevel@tonic-gate tickcmpr_set(uint64_t clock_cycles)
2040Sstevel@tonic-gate {}
2050Sstevel@tonic-gate 
2060Sstevel@tonic-gate void
2070Sstevel@tonic-gate tickcmpr_disable(void)
2080Sstevel@tonic-gate {}
2090Sstevel@tonic-gate 
2100Sstevel@tonic-gate /*ARGSUSED*/
2110Sstevel@tonic-gate void
2120Sstevel@tonic-gate tick_write_delta(uint64_t delta)
2130Sstevel@tonic-gate {}
2140Sstevel@tonic-gate 
2150Sstevel@tonic-gate int
2160Sstevel@tonic-gate tickcmpr_disabled(void)
2170Sstevel@tonic-gate { return (0); }
2180Sstevel@tonic-gate 
2190Sstevel@tonic-gate /*ARGSUSED*/
2200Sstevel@tonic-gate void
2210Sstevel@tonic-gate drv_usecwait(clock_t n)
2220Sstevel@tonic-gate {}
2230Sstevel@tonic-gate 
2240Sstevel@tonic-gate /*
2250Sstevel@tonic-gate  * Processor-optimized memory routines
2260Sstevel@tonic-gate  */
2270Sstevel@tonic-gate /*ARGSUSED*/
2280Sstevel@tonic-gate int
2290Sstevel@tonic-gate kcopy(const void *from, void *to, size_t count)
2300Sstevel@tonic-gate { return (0); }
2310Sstevel@tonic-gate 
2320Sstevel@tonic-gate /*ARGSUSED*/
2330Sstevel@tonic-gate int
2340Sstevel@tonic-gate kcopy_nta(const void *from, void *to, size_t count, int dummy)
2350Sstevel@tonic-gate { return (0); }
2360Sstevel@tonic-gate 
2370Sstevel@tonic-gate /*ARGSUSED*/
2380Sstevel@tonic-gate void
2390Sstevel@tonic-gate bcopy(const void *from, void *to, size_t count)
2400Sstevel@tonic-gate {}
2410Sstevel@tonic-gate 
2420Sstevel@tonic-gate /*ARGSUSED*/
2430Sstevel@tonic-gate void
2440Sstevel@tonic-gate ovbcopy(const void *from, void *to, size_t count)
2450Sstevel@tonic-gate {}
2460Sstevel@tonic-gate 
2470Sstevel@tonic-gate /*ARGSUSED*/
2480Sstevel@tonic-gate int
2490Sstevel@tonic-gate copyin(const void *uaddr, void *kaddr, size_t count)
2500Sstevel@tonic-gate { return (0); }
2510Sstevel@tonic-gate 
2520Sstevel@tonic-gate /*ARGSUSED*/
2530Sstevel@tonic-gate int
2540Sstevel@tonic-gate xcopyin(const void *uaddr, void *kaddr, size_t count)
2550Sstevel@tonic-gate { return (0); }
2560Sstevel@tonic-gate 
2570Sstevel@tonic-gate /*ARGSUSED*/
2580Sstevel@tonic-gate int
2590Sstevel@tonic-gate xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy)
2600Sstevel@tonic-gate { return (0); }
2610Sstevel@tonic-gate 
2620Sstevel@tonic-gate /*ARGSUSED*/
2630Sstevel@tonic-gate int
2640Sstevel@tonic-gate copyout(const void *kaddr, void *uaddr, size_t count)
2650Sstevel@tonic-gate { return (0); }
2660Sstevel@tonic-gate 
2670Sstevel@tonic-gate /*ARGSUSED*/
2680Sstevel@tonic-gate int
2690Sstevel@tonic-gate xcopyout(const void *kaddr, void *uaddr, size_t count)
2700Sstevel@tonic-gate { return (0); }
2710Sstevel@tonic-gate 
2720Sstevel@tonic-gate /*ARGSUSED*/
2730Sstevel@tonic-gate int
2740Sstevel@tonic-gate xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy)
2750Sstevel@tonic-gate { return (0); }
2760Sstevel@tonic-gate 
2770Sstevel@tonic-gate /*ARGSUSED*/
2780Sstevel@tonic-gate void
2790Sstevel@tonic-gate copyout_noerr(const void *kfrom, void *uto, size_t count)
2800Sstevel@tonic-gate {}
2810Sstevel@tonic-gate 
2820Sstevel@tonic-gate /*ARGSUSED*/
2830Sstevel@tonic-gate void
2840Sstevel@tonic-gate copyin_noerr(const void *kfrom, void *uto, size_t count)
2850Sstevel@tonic-gate {}
2860Sstevel@tonic-gate 
2870Sstevel@tonic-gate /*ARGSUSED*/
2880Sstevel@tonic-gate int
2890Sstevel@tonic-gate xcopyin_little(const void *uaddr, void *kaddr, size_t count)
2900Sstevel@tonic-gate { return (0); }
2910Sstevel@tonic-gate 
2920Sstevel@tonic-gate /*ARGSUSED*/
2930Sstevel@tonic-gate int
2940Sstevel@tonic-gate xcopyout_little(const void *kaddr, void *uaddr, size_t count)
2950Sstevel@tonic-gate { return (0); }
2960Sstevel@tonic-gate 
2970Sstevel@tonic-gate /*ARGSUSED*/
2980Sstevel@tonic-gate void
2990Sstevel@tonic-gate hwblkpagecopy(const void *src, void *dst)
3000Sstevel@tonic-gate {}
3010Sstevel@tonic-gate 
3020Sstevel@tonic-gate /*ARGSUSED*/
3030Sstevel@tonic-gate void
3040Sstevel@tonic-gate hw_pa_bcopy32(uint64_t src, uint64_t dst)
3050Sstevel@tonic-gate {}
3060Sstevel@tonic-gate 
3070Sstevel@tonic-gate /*ARGSUSED*/
3080Sstevel@tonic-gate int
3090Sstevel@tonic-gate hwblkclr(void *addr, size_t len)
3100Sstevel@tonic-gate { return (0); }
3110Sstevel@tonic-gate 
3120Sstevel@tonic-gate int use_hw_bzero;
3130Sstevel@tonic-gate int use_hw_bcopy;
3140Sstevel@tonic-gate uint_t hw_copy_limit_1;
3150Sstevel@tonic-gate uint_t hw_copy_limit_2;
3160Sstevel@tonic-gate uint_t hw_copy_limit_4;
3170Sstevel@tonic-gate uint_t hw_copy_limit_8;
3180Sstevel@tonic-gate 
3190Sstevel@tonic-gate /*
3200Sstevel@tonic-gate  * tick operations
3210Sstevel@tonic-gate  */
3220Sstevel@tonic-gate 
3230Sstevel@tonic-gate void
3240Sstevel@tonic-gate tick_rtt(void)
3250Sstevel@tonic-gate { }
3260Sstevel@tonic-gate 
3270Sstevel@tonic-gate void
3280Sstevel@tonic-gate pil14_interrupt(void)
3290Sstevel@tonic-gate { }
3300Sstevel@tonic-gate 
3310Sstevel@tonic-gate /* ARGSUSED */
3320Sstevel@tonic-gate void
3330Sstevel@tonic-gate cpu_init_private(struct cpu *cp)
3340Sstevel@tonic-gate {}
3350Sstevel@tonic-gate 
3360Sstevel@tonic-gate /* ARGSUSED */
3370Sstevel@tonic-gate void
3380Sstevel@tonic-gate cpu_uninit_private(struct cpu *cp)
3390Sstevel@tonic-gate {}
3400Sstevel@tonic-gate 
3410Sstevel@tonic-gate void
3420Sstevel@tonic-gate sticksync_slave(void)
3430Sstevel@tonic-gate {}
3440Sstevel@tonic-gate 
3450Sstevel@tonic-gate void
3460Sstevel@tonic-gate sticksync_master(void)
3470Sstevel@tonic-gate {}
3480Sstevel@tonic-gate 
3490Sstevel@tonic-gate /*ARGSUSED*/
3500Sstevel@tonic-gate int
3510Sstevel@tonic-gate dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain)
3520Sstevel@tonic-gate { return (-1); }
353