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