xref: /onnv-gate/usr/src/uts/sun4/cpu/cpu_module.c (revision 10106:b235491976d3)
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 /*
228803SJonathan.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
85*10106SJason.Beloro@Sun.COM vtag_unmap_perm_tl1(uint64_t addr, uint64_t ctx)
86*10106SJason.Beloro@Sun.COM {}
87*10106SJason.Beloro@Sun.COM 
88*10106SJason.Beloro@Sun.COM /*ARGSUSED*/
89*10106SJason.Beloro@Sun.COM void
900Sstevel@tonic-gate vac_flushpage(pfn_t pf, int color)
910Sstevel@tonic-gate {}
920Sstevel@tonic-gate 
930Sstevel@tonic-gate /*ARGSUSED*/
940Sstevel@tonic-gate void
950Sstevel@tonic-gate vac_flushpage_tl1(uint64_t pf, uint64_t color)
960Sstevel@tonic-gate {}
970Sstevel@tonic-gate 
980Sstevel@tonic-gate /*ARGSUSED*/
990Sstevel@tonic-gate void
1000Sstevel@tonic-gate vac_flushcolor(int color, pfn_t pf)
1010Sstevel@tonic-gate {}
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate /*ARGSUSED*/
1040Sstevel@tonic-gate void
1050Sstevel@tonic-gate vac_flushcolor_tl1(uint64_t color, uint64_t dummy)
1060Sstevel@tonic-gate {}
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate /*ARGSUSED*/
1090Sstevel@tonic-gate void
1100Sstevel@tonic-gate init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2)
1110Sstevel@tonic-gate {}
1120Sstevel@tonic-gate 
1130Sstevel@tonic-gate /*ARGSUSED*/
1140Sstevel@tonic-gate void
1150Sstevel@tonic-gate send_one_mondo(int cpuid)
1160Sstevel@tonic-gate {}
1170Sstevel@tonic-gate 
1180Sstevel@tonic-gate /*ARGSUSED*/
1190Sstevel@tonic-gate void
1200Sstevel@tonic-gate send_mondo_set(cpuset_t set)
1210Sstevel@tonic-gate {}
1220Sstevel@tonic-gate 
1230Sstevel@tonic-gate /*ARGSUSED*/
1240Sstevel@tonic-gate void
1250Sstevel@tonic-gate flush_instr_mem(caddr_t addr, size_t len)
1260Sstevel@tonic-gate {}
1270Sstevel@tonic-gate 
1280Sstevel@tonic-gate void
1290Sstevel@tonic-gate syncfpu(void)
1300Sstevel@tonic-gate {}
1310Sstevel@tonic-gate 
1320Sstevel@tonic-gate /*ARGSUSED*/
1330Sstevel@tonic-gate void
1340Sstevel@tonic-gate cpu_change_speed(uint64_t divisor, uint64_t arg2)
1350Sstevel@tonic-gate {}
1360Sstevel@tonic-gate 
1370Sstevel@tonic-gate u_longlong_t
1380Sstevel@tonic-gate gettick(void)
1390Sstevel@tonic-gate { return (0); }
1400Sstevel@tonic-gate 
1410Sstevel@tonic-gate uint64_t
1420Sstevel@tonic-gate gettick_counter(void)
1430Sstevel@tonic-gate { return (0); }
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate /*ARGSUSED*/
1460Sstevel@tonic-gate void
1470Sstevel@tonic-gate gethrestime(timespec_t *tp)
1480Sstevel@tonic-gate {}
1490Sstevel@tonic-gate 
1500Sstevel@tonic-gate time_t
1510Sstevel@tonic-gate gethrestime_sec(void)
1520Sstevel@tonic-gate { return (0); }
1530Sstevel@tonic-gate 
1540Sstevel@tonic-gate /*ARGSUSED*/
1550Sstevel@tonic-gate void
1560Sstevel@tonic-gate gethrestime_lasttick(timespec_t *tp)
1570Sstevel@tonic-gate {}
1580Sstevel@tonic-gate 
1590Sstevel@tonic-gate hrtime_t
1600Sstevel@tonic-gate gethrtime(void)
1610Sstevel@tonic-gate { return (0); }
1620Sstevel@tonic-gate 
1630Sstevel@tonic-gate hrtime_t
1640Sstevel@tonic-gate gethrtime_unscaled(void)
1650Sstevel@tonic-gate { return (0); }
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate hrtime_t
1680Sstevel@tonic-gate gethrtime_waitfree(void)
1690Sstevel@tonic-gate { return (0); }
1700Sstevel@tonic-gate 
1710Sstevel@tonic-gate hrtime_t
1720Sstevel@tonic-gate dtrace_gethrtime(void)
1730Sstevel@tonic-gate { return (0); }
1740Sstevel@tonic-gate 
1750Sstevel@tonic-gate uint_t
1760Sstevel@tonic-gate get_impl(void)
1770Sstevel@tonic-gate { return (0); }
1780Sstevel@tonic-gate 
1790Sstevel@tonic-gate hrtime_t
1800Sstevel@tonic-gate get_hrestime(void)
1810Sstevel@tonic-gate { return (0); }
1820Sstevel@tonic-gate 
1830Sstevel@tonic-gate ulong_t
1840Sstevel@tonic-gate get_timestamp(void)
1850Sstevel@tonic-gate { return (0); }
1860Sstevel@tonic-gate 
1870Sstevel@tonic-gate ulong_t
1880Sstevel@tonic-gate get_virtime(void)
1890Sstevel@tonic-gate { return (0); }
1900Sstevel@tonic-gate 
1910Sstevel@tonic-gate hrtime_t
1920Sstevel@tonic-gate gethrtime_max(void)
1930Sstevel@tonic-gate { return (0); }
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate /*ARGSUSED*/
1960Sstevel@tonic-gate void
1970Sstevel@tonic-gate scalehrtime(hrtime_t *hrt)
1980Sstevel@tonic-gate {}
1990Sstevel@tonic-gate 
2000Sstevel@tonic-gate void
2010Sstevel@tonic-gate hres_tick(void)
2020Sstevel@tonic-gate {}
2030Sstevel@tonic-gate 
2040Sstevel@tonic-gate /*ARGSUSED*/
2050Sstevel@tonic-gate void
2060Sstevel@tonic-gate tickcmpr_set(uint64_t clock_cycles)
2070Sstevel@tonic-gate {}
2080Sstevel@tonic-gate 
2090Sstevel@tonic-gate void
2100Sstevel@tonic-gate tickcmpr_disable(void)
2110Sstevel@tonic-gate {}
2120Sstevel@tonic-gate 
2130Sstevel@tonic-gate /*ARGSUSED*/
2140Sstevel@tonic-gate void
2150Sstevel@tonic-gate tick_write_delta(uint64_t delta)
2160Sstevel@tonic-gate {}
2170Sstevel@tonic-gate 
2180Sstevel@tonic-gate int
2190Sstevel@tonic-gate tickcmpr_disabled(void)
2200Sstevel@tonic-gate { return (0); }
2210Sstevel@tonic-gate 
2220Sstevel@tonic-gate /*ARGSUSED*/
2230Sstevel@tonic-gate void
2240Sstevel@tonic-gate drv_usecwait(clock_t n)
2250Sstevel@tonic-gate {}
2260Sstevel@tonic-gate 
2270Sstevel@tonic-gate /*
2280Sstevel@tonic-gate  * Processor-optimized memory routines
2290Sstevel@tonic-gate  */
2300Sstevel@tonic-gate /*ARGSUSED*/
2310Sstevel@tonic-gate int
2320Sstevel@tonic-gate kcopy(const void *from, void *to, size_t count)
2330Sstevel@tonic-gate { return (0); }
2340Sstevel@tonic-gate 
2350Sstevel@tonic-gate /*ARGSUSED*/
2360Sstevel@tonic-gate int
2370Sstevel@tonic-gate kcopy_nta(const void *from, void *to, size_t count, int dummy)
2380Sstevel@tonic-gate { return (0); }
2390Sstevel@tonic-gate 
2400Sstevel@tonic-gate /*ARGSUSED*/
2410Sstevel@tonic-gate void
2420Sstevel@tonic-gate bcopy(const void *from, void *to, size_t count)
2430Sstevel@tonic-gate {}
2440Sstevel@tonic-gate 
2450Sstevel@tonic-gate /*ARGSUSED*/
2460Sstevel@tonic-gate void
2470Sstevel@tonic-gate ovbcopy(const void *from, void *to, size_t count)
2480Sstevel@tonic-gate {}
2490Sstevel@tonic-gate 
2500Sstevel@tonic-gate /*ARGSUSED*/
2510Sstevel@tonic-gate int
2520Sstevel@tonic-gate copyin(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(const void *uaddr, void *kaddr, size_t count)
2580Sstevel@tonic-gate { return (0); }
2590Sstevel@tonic-gate 
2600Sstevel@tonic-gate /*ARGSUSED*/
2610Sstevel@tonic-gate int
2620Sstevel@tonic-gate xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy)
2630Sstevel@tonic-gate { return (0); }
2640Sstevel@tonic-gate 
2650Sstevel@tonic-gate /*ARGSUSED*/
2660Sstevel@tonic-gate int
2670Sstevel@tonic-gate copyout(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(const void *kaddr, void *uaddr, size_t count)
2730Sstevel@tonic-gate { return (0); }
2740Sstevel@tonic-gate 
2750Sstevel@tonic-gate /*ARGSUSED*/
2760Sstevel@tonic-gate int
2770Sstevel@tonic-gate xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy)
2780Sstevel@tonic-gate { return (0); }
2790Sstevel@tonic-gate 
2800Sstevel@tonic-gate /*ARGSUSED*/
2810Sstevel@tonic-gate void
2820Sstevel@tonic-gate copyout_noerr(const void *kfrom, void *uto, size_t count)
2830Sstevel@tonic-gate {}
2840Sstevel@tonic-gate 
2850Sstevel@tonic-gate /*ARGSUSED*/
2860Sstevel@tonic-gate void
2870Sstevel@tonic-gate copyin_noerr(const void *kfrom, void *uto, size_t count)
2880Sstevel@tonic-gate {}
2890Sstevel@tonic-gate 
2900Sstevel@tonic-gate /*ARGSUSED*/
2910Sstevel@tonic-gate int
2920Sstevel@tonic-gate xcopyin_little(const void *uaddr, void *kaddr, size_t count)
2930Sstevel@tonic-gate { return (0); }
2940Sstevel@tonic-gate 
2950Sstevel@tonic-gate /*ARGSUSED*/
2960Sstevel@tonic-gate int
2970Sstevel@tonic-gate xcopyout_little(const void *kaddr, void *uaddr, size_t count)
2980Sstevel@tonic-gate { return (0); }
2990Sstevel@tonic-gate 
3000Sstevel@tonic-gate /*ARGSUSED*/
3010Sstevel@tonic-gate void
3020Sstevel@tonic-gate hwblkpagecopy(const void *src, void *dst)
3030Sstevel@tonic-gate {}
3040Sstevel@tonic-gate 
3050Sstevel@tonic-gate /*ARGSUSED*/
3060Sstevel@tonic-gate void
3070Sstevel@tonic-gate hw_pa_bcopy32(uint64_t src, uint64_t dst)
3080Sstevel@tonic-gate {}
3090Sstevel@tonic-gate 
3100Sstevel@tonic-gate /*ARGSUSED*/
3110Sstevel@tonic-gate int
3120Sstevel@tonic-gate hwblkclr(void *addr, size_t len)
3130Sstevel@tonic-gate { return (0); }
3140Sstevel@tonic-gate 
3150Sstevel@tonic-gate int use_hw_bzero;
3160Sstevel@tonic-gate int use_hw_bcopy;
3170Sstevel@tonic-gate uint_t hw_copy_limit_1;
3180Sstevel@tonic-gate uint_t hw_copy_limit_2;
3190Sstevel@tonic-gate uint_t hw_copy_limit_4;
3200Sstevel@tonic-gate uint_t hw_copy_limit_8;
3210Sstevel@tonic-gate 
3220Sstevel@tonic-gate /*
3230Sstevel@tonic-gate  * tick operations
3240Sstevel@tonic-gate  */
3250Sstevel@tonic-gate 
3260Sstevel@tonic-gate void
3270Sstevel@tonic-gate tick_rtt(void)
3280Sstevel@tonic-gate { }
3290Sstevel@tonic-gate 
3300Sstevel@tonic-gate void
3310Sstevel@tonic-gate pil14_interrupt(void)
3320Sstevel@tonic-gate { }
3330Sstevel@tonic-gate 
3348803SJonathan.Haslam@Sun.COM void
3358803SJonathan.Haslam@Sun.COM pil15_interrupt(void)
3368803SJonathan.Haslam@Sun.COM { }
3378803SJonathan.Haslam@Sun.COM 
3380Sstevel@tonic-gate /* ARGSUSED */
3390Sstevel@tonic-gate void
3400Sstevel@tonic-gate cpu_init_private(struct cpu *cp)
3410Sstevel@tonic-gate {}
3420Sstevel@tonic-gate 
3430Sstevel@tonic-gate /* ARGSUSED */
3440Sstevel@tonic-gate void
3450Sstevel@tonic-gate cpu_uninit_private(struct cpu *cp)
3460Sstevel@tonic-gate {}
3470Sstevel@tonic-gate 
3480Sstevel@tonic-gate void
3490Sstevel@tonic-gate sticksync_slave(void)
3500Sstevel@tonic-gate {}
3510Sstevel@tonic-gate 
3520Sstevel@tonic-gate void
3530Sstevel@tonic-gate sticksync_master(void)
3540Sstevel@tonic-gate {}
3550Sstevel@tonic-gate 
3560Sstevel@tonic-gate /*ARGSUSED*/
3570Sstevel@tonic-gate int
3580Sstevel@tonic-gate dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain)
3590Sstevel@tonic-gate { return (-1); }
360