xref: /onnv-gate/usr/src/uts/sun4/cpu/cpu_module.c (revision 8803:8c01b39012c9)
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*8803SJonathan.Haslam@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #include <sys/cpu_module.h>
270Sstevel@tonic-gate #include <sys/lockstat.h>
280Sstevel@tonic-gate 
290Sstevel@tonic-gate /*
300Sstevel@tonic-gate  * This is a dummy file that provides the default cpu module
310Sstevel@tonic-gate  * that is linked to unix.
320Sstevel@tonic-gate  */
330Sstevel@tonic-gate 
340Sstevel@tonic-gate uint_t	root_phys_addr_lo_mask;
350Sstevel@tonic-gate int64_t timedelta;
360Sstevel@tonic-gate hrtime_t hres_last_tick;
374551Ssudheer volatile timestruc_t hrestime;
380Sstevel@tonic-gate int64_t hrestime_adj;
394551Ssudheer volatile int hres_lock;
400Sstevel@tonic-gate uint_t nsec_scale;
410Sstevel@tonic-gate uint_t nsec_shift;
420Sstevel@tonic-gate uint_t adj_shift;
430Sstevel@tonic-gate hrtime_t hrtime_base;
440Sstevel@tonic-gate int traptrace_use_stick;
452241Shuah uint_t cpu_impl_dual_pgsz;
460Sstevel@tonic-gate 
470Sstevel@tonic-gate void
480Sstevel@tonic-gate cpu_setup(void)
490Sstevel@tonic-gate {}
500Sstevel@tonic-gate 
510Sstevel@tonic-gate void
520Sstevel@tonic-gate cpu_init_tick_freq(void)
530Sstevel@tonic-gate {}
540Sstevel@tonic-gate 
550Sstevel@tonic-gate /*ARGSUSED*/
560Sstevel@tonic-gate void
572241Shuah vtag_flushpage(caddr_t addr, uint64_t sfmmup)
580Sstevel@tonic-gate {}
590Sstevel@tonic-gate 
600Sstevel@tonic-gate void
610Sstevel@tonic-gate vtag_flushall(void)
620Sstevel@tonic-gate {}
630Sstevel@tonic-gate 
640Sstevel@tonic-gate void
652241Shuah vtag_flushall_uctxs(void)
660Sstevel@tonic-gate {}
670Sstevel@tonic-gate 
680Sstevel@tonic-gate /*ARGSUSED*/
690Sstevel@tonic-gate void
702241Shuah vtag_flushpage_tl1(uint64_t addr, uint64_t sfmmup)
710Sstevel@tonic-gate {}
720Sstevel@tonic-gate 
730Sstevel@tonic-gate /*ARGSUSED*/
740Sstevel@tonic-gate void
752241Shuah vtag_flush_pgcnt_tl1(uint64_t addr, uint64_t sfmmup_pgcnt)
760Sstevel@tonic-gate {}
770Sstevel@tonic-gate 
780Sstevel@tonic-gate /*ARGSUSED*/
790Sstevel@tonic-gate void
800Sstevel@tonic-gate vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2)
810Sstevel@tonic-gate {}
820Sstevel@tonic-gate 
830Sstevel@tonic-gate /*ARGSUSED*/
840Sstevel@tonic-gate void
850Sstevel@tonic-gate vac_flushpage(pfn_t pf, int color)
860Sstevel@tonic-gate {}
870Sstevel@tonic-gate 
880Sstevel@tonic-gate /*ARGSUSED*/
890Sstevel@tonic-gate void
900Sstevel@tonic-gate vac_flushpage_tl1(uint64_t pf, uint64_t color)
910Sstevel@tonic-gate {}
920Sstevel@tonic-gate 
930Sstevel@tonic-gate /*ARGSUSED*/
940Sstevel@tonic-gate void
950Sstevel@tonic-gate vac_flushcolor(int color, pfn_t pf)
960Sstevel@tonic-gate {}
970Sstevel@tonic-gate 
980Sstevel@tonic-gate /*ARGSUSED*/
990Sstevel@tonic-gate void
1000Sstevel@tonic-gate vac_flushcolor_tl1(uint64_t color, uint64_t dummy)
1010Sstevel@tonic-gate {}
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate /*ARGSUSED*/
1040Sstevel@tonic-gate void
1050Sstevel@tonic-gate init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2)
1060Sstevel@tonic-gate {}
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate /*ARGSUSED*/
1090Sstevel@tonic-gate void
1100Sstevel@tonic-gate send_one_mondo(int cpuid)
1110Sstevel@tonic-gate {}
1120Sstevel@tonic-gate 
1130Sstevel@tonic-gate /*ARGSUSED*/
1140Sstevel@tonic-gate void
1150Sstevel@tonic-gate send_mondo_set(cpuset_t set)
1160Sstevel@tonic-gate {}
1170Sstevel@tonic-gate 
1180Sstevel@tonic-gate /*ARGSUSED*/
1190Sstevel@tonic-gate void
1200Sstevel@tonic-gate flush_instr_mem(caddr_t addr, size_t len)
1210Sstevel@tonic-gate {}
1220Sstevel@tonic-gate 
1230Sstevel@tonic-gate void
1240Sstevel@tonic-gate syncfpu(void)
1250Sstevel@tonic-gate {}
1260Sstevel@tonic-gate 
1270Sstevel@tonic-gate /*ARGSUSED*/
1280Sstevel@tonic-gate void
1290Sstevel@tonic-gate cpu_change_speed(uint64_t divisor, uint64_t arg2)
1300Sstevel@tonic-gate {}
1310Sstevel@tonic-gate 
1320Sstevel@tonic-gate u_longlong_t
1330Sstevel@tonic-gate gettick(void)
1340Sstevel@tonic-gate { return (0); }
1350Sstevel@tonic-gate 
1360Sstevel@tonic-gate uint64_t
1370Sstevel@tonic-gate gettick_counter(void)
1380Sstevel@tonic-gate { return (0); }
1390Sstevel@tonic-gate 
1400Sstevel@tonic-gate /*ARGSUSED*/
1410Sstevel@tonic-gate void
1420Sstevel@tonic-gate gethrestime(timespec_t *tp)
1430Sstevel@tonic-gate {}
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate time_t
1460Sstevel@tonic-gate gethrestime_sec(void)
1470Sstevel@tonic-gate { return (0); }
1480Sstevel@tonic-gate 
1490Sstevel@tonic-gate /*ARGSUSED*/
1500Sstevel@tonic-gate void
1510Sstevel@tonic-gate gethrestime_lasttick(timespec_t *tp)
1520Sstevel@tonic-gate {}
1530Sstevel@tonic-gate 
1540Sstevel@tonic-gate hrtime_t
1550Sstevel@tonic-gate gethrtime(void)
1560Sstevel@tonic-gate { return (0); }
1570Sstevel@tonic-gate 
1580Sstevel@tonic-gate hrtime_t
1590Sstevel@tonic-gate gethrtime_unscaled(void)
1600Sstevel@tonic-gate { return (0); }
1610Sstevel@tonic-gate 
1620Sstevel@tonic-gate hrtime_t
1630Sstevel@tonic-gate gethrtime_waitfree(void)
1640Sstevel@tonic-gate { return (0); }
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate hrtime_t
1670Sstevel@tonic-gate dtrace_gethrtime(void)
1680Sstevel@tonic-gate { return (0); }
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate uint_t
1710Sstevel@tonic-gate get_impl(void)
1720Sstevel@tonic-gate { return (0); }
1730Sstevel@tonic-gate 
1740Sstevel@tonic-gate hrtime_t
1750Sstevel@tonic-gate get_hrestime(void)
1760Sstevel@tonic-gate { return (0); }
1770Sstevel@tonic-gate 
1780Sstevel@tonic-gate ulong_t
1790Sstevel@tonic-gate get_timestamp(void)
1800Sstevel@tonic-gate { return (0); }
1810Sstevel@tonic-gate 
1820Sstevel@tonic-gate ulong_t
1830Sstevel@tonic-gate get_virtime(void)
1840Sstevel@tonic-gate { return (0); }
1850Sstevel@tonic-gate 
1860Sstevel@tonic-gate hrtime_t
1870Sstevel@tonic-gate gethrtime_max(void)
1880Sstevel@tonic-gate { return (0); }
1890Sstevel@tonic-gate 
1900Sstevel@tonic-gate /*ARGSUSED*/
1910Sstevel@tonic-gate void
1920Sstevel@tonic-gate scalehrtime(hrtime_t *hrt)
1930Sstevel@tonic-gate {}
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate void
1960Sstevel@tonic-gate hres_tick(void)
1970Sstevel@tonic-gate {}
1980Sstevel@tonic-gate 
1990Sstevel@tonic-gate /*ARGSUSED*/
2000Sstevel@tonic-gate void
2010Sstevel@tonic-gate tickcmpr_set(uint64_t clock_cycles)
2020Sstevel@tonic-gate {}
2030Sstevel@tonic-gate 
2040Sstevel@tonic-gate void
2050Sstevel@tonic-gate tickcmpr_disable(void)
2060Sstevel@tonic-gate {}
2070Sstevel@tonic-gate 
2080Sstevel@tonic-gate /*ARGSUSED*/
2090Sstevel@tonic-gate void
2100Sstevel@tonic-gate tick_write_delta(uint64_t delta)
2110Sstevel@tonic-gate {}
2120Sstevel@tonic-gate 
2130Sstevel@tonic-gate int
2140Sstevel@tonic-gate tickcmpr_disabled(void)
2150Sstevel@tonic-gate { return (0); }
2160Sstevel@tonic-gate 
2170Sstevel@tonic-gate /*ARGSUSED*/
2180Sstevel@tonic-gate void
2190Sstevel@tonic-gate drv_usecwait(clock_t n)
2200Sstevel@tonic-gate {}
2210Sstevel@tonic-gate 
2220Sstevel@tonic-gate /*
2230Sstevel@tonic-gate  * Processor-optimized memory routines
2240Sstevel@tonic-gate  */
2250Sstevel@tonic-gate /*ARGSUSED*/
2260Sstevel@tonic-gate int
2270Sstevel@tonic-gate kcopy(const void *from, void *to, size_t count)
2280Sstevel@tonic-gate { return (0); }
2290Sstevel@tonic-gate 
2300Sstevel@tonic-gate /*ARGSUSED*/
2310Sstevel@tonic-gate int
2320Sstevel@tonic-gate kcopy_nta(const void *from, void *to, size_t count, int dummy)
2330Sstevel@tonic-gate { return (0); }
2340Sstevel@tonic-gate 
2350Sstevel@tonic-gate /*ARGSUSED*/
2360Sstevel@tonic-gate void
2370Sstevel@tonic-gate bcopy(const void *from, void *to, size_t count)
2380Sstevel@tonic-gate {}
2390Sstevel@tonic-gate 
2400Sstevel@tonic-gate /*ARGSUSED*/
2410Sstevel@tonic-gate void
2420Sstevel@tonic-gate ovbcopy(const void *from, void *to, size_t count)
2430Sstevel@tonic-gate {}
2440Sstevel@tonic-gate 
2450Sstevel@tonic-gate /*ARGSUSED*/
2460Sstevel@tonic-gate int
2470Sstevel@tonic-gate copyin(const void *uaddr, void *kaddr, size_t count)
2480Sstevel@tonic-gate { return (0); }
2490Sstevel@tonic-gate 
2500Sstevel@tonic-gate /*ARGSUSED*/
2510Sstevel@tonic-gate int
2520Sstevel@tonic-gate xcopyin(const void *uaddr, void *kaddr, size_t count)
2530Sstevel@tonic-gate { return (0); }
2540Sstevel@tonic-gate 
2550Sstevel@tonic-gate /*ARGSUSED*/
2560Sstevel@tonic-gate int
2570Sstevel@tonic-gate xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy)
2580Sstevel@tonic-gate { return (0); }
2590Sstevel@tonic-gate 
2600Sstevel@tonic-gate /*ARGSUSED*/
2610Sstevel@tonic-gate int
2620Sstevel@tonic-gate copyout(const void *kaddr, void *uaddr, size_t count)
2630Sstevel@tonic-gate { return (0); }
2640Sstevel@tonic-gate 
2650Sstevel@tonic-gate /*ARGSUSED*/
2660Sstevel@tonic-gate int
2670Sstevel@tonic-gate xcopyout(const void *kaddr, void *uaddr, size_t count)
2680Sstevel@tonic-gate { return (0); }
2690Sstevel@tonic-gate 
2700Sstevel@tonic-gate /*ARGSUSED*/
2710Sstevel@tonic-gate int
2720Sstevel@tonic-gate xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy)
2730Sstevel@tonic-gate { return (0); }
2740Sstevel@tonic-gate 
2750Sstevel@tonic-gate /*ARGSUSED*/
2760Sstevel@tonic-gate void
2770Sstevel@tonic-gate copyout_noerr(const void *kfrom, void *uto, size_t count)
2780Sstevel@tonic-gate {}
2790Sstevel@tonic-gate 
2800Sstevel@tonic-gate /*ARGSUSED*/
2810Sstevel@tonic-gate void
2820Sstevel@tonic-gate copyin_noerr(const void *kfrom, void *uto, size_t count)
2830Sstevel@tonic-gate {}
2840Sstevel@tonic-gate 
2850Sstevel@tonic-gate /*ARGSUSED*/
2860Sstevel@tonic-gate int
2870Sstevel@tonic-gate xcopyin_little(const void *uaddr, void *kaddr, size_t count)
2880Sstevel@tonic-gate { return (0); }
2890Sstevel@tonic-gate 
2900Sstevel@tonic-gate /*ARGSUSED*/
2910Sstevel@tonic-gate int
2920Sstevel@tonic-gate xcopyout_little(const void *kaddr, void *uaddr, size_t count)
2930Sstevel@tonic-gate { return (0); }
2940Sstevel@tonic-gate 
2950Sstevel@tonic-gate /*ARGSUSED*/
2960Sstevel@tonic-gate void
2970Sstevel@tonic-gate hwblkpagecopy(const void *src, void *dst)
2980Sstevel@tonic-gate {}
2990Sstevel@tonic-gate 
3000Sstevel@tonic-gate /*ARGSUSED*/
3010Sstevel@tonic-gate void
3020Sstevel@tonic-gate hw_pa_bcopy32(uint64_t src, uint64_t dst)
3030Sstevel@tonic-gate {}
3040Sstevel@tonic-gate 
3050Sstevel@tonic-gate /*ARGSUSED*/
3060Sstevel@tonic-gate int
3070Sstevel@tonic-gate hwblkclr(void *addr, size_t len)
3080Sstevel@tonic-gate { return (0); }
3090Sstevel@tonic-gate 
3100Sstevel@tonic-gate int use_hw_bzero;
3110Sstevel@tonic-gate int use_hw_bcopy;
3120Sstevel@tonic-gate uint_t hw_copy_limit_1;
3130Sstevel@tonic-gate uint_t hw_copy_limit_2;
3140Sstevel@tonic-gate uint_t hw_copy_limit_4;
3150Sstevel@tonic-gate uint_t hw_copy_limit_8;
3160Sstevel@tonic-gate 
3170Sstevel@tonic-gate /*
3180Sstevel@tonic-gate  * tick operations
3190Sstevel@tonic-gate  */
3200Sstevel@tonic-gate 
3210Sstevel@tonic-gate void
3220Sstevel@tonic-gate tick_rtt(void)
3230Sstevel@tonic-gate { }
3240Sstevel@tonic-gate 
3250Sstevel@tonic-gate void
3260Sstevel@tonic-gate pil14_interrupt(void)
3270Sstevel@tonic-gate { }
3280Sstevel@tonic-gate 
329*8803SJonathan.Haslam@Sun.COM void
330*8803SJonathan.Haslam@Sun.COM pil15_interrupt(void)
331*8803SJonathan.Haslam@Sun.COM { }
332*8803SJonathan.Haslam@Sun.COM 
3330Sstevel@tonic-gate /* ARGSUSED */
3340Sstevel@tonic-gate void
3350Sstevel@tonic-gate cpu_init_private(struct cpu *cp)
3360Sstevel@tonic-gate {}
3370Sstevel@tonic-gate 
3380Sstevel@tonic-gate /* ARGSUSED */
3390Sstevel@tonic-gate void
3400Sstevel@tonic-gate cpu_uninit_private(struct cpu *cp)
3410Sstevel@tonic-gate {}
3420Sstevel@tonic-gate 
3430Sstevel@tonic-gate void
3440Sstevel@tonic-gate sticksync_slave(void)
3450Sstevel@tonic-gate {}
3460Sstevel@tonic-gate 
3470Sstevel@tonic-gate void
3480Sstevel@tonic-gate sticksync_master(void)
3490Sstevel@tonic-gate {}
3500Sstevel@tonic-gate 
3510Sstevel@tonic-gate /*ARGSUSED*/
3520Sstevel@tonic-gate int
3530Sstevel@tonic-gate dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain)
3540Sstevel@tonic-gate { return (-1); }
355