17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51e2e7a75Shuah * Common Development and Distribution License (the "License"). 61e2e7a75Shuah * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22b9e93c10SJonathan Haslam * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #include <sys/cpu_module.h> 277c478bd9Sstevel@tonic-gate #include <sys/lockstat.h> 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate /* 307c478bd9Sstevel@tonic-gate * This is a dummy file that provides the default cpu module 317c478bd9Sstevel@tonic-gate * that is linked to unix. 327c478bd9Sstevel@tonic-gate */ 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate uint_t root_phys_addr_lo_mask; 357c478bd9Sstevel@tonic-gate int64_t timedelta; 367c478bd9Sstevel@tonic-gate hrtime_t hres_last_tick; 37b5b48cc1Ssudheer volatile timestruc_t hrestime; 387c478bd9Sstevel@tonic-gate int64_t hrestime_adj; 39b5b48cc1Ssudheer volatile int hres_lock; 407c478bd9Sstevel@tonic-gate uint_t nsec_scale; 417c478bd9Sstevel@tonic-gate uint_t nsec_shift; 427c478bd9Sstevel@tonic-gate uint_t adj_shift; 437c478bd9Sstevel@tonic-gate hrtime_t hrtime_base; 447c478bd9Sstevel@tonic-gate int traptrace_use_stick; 451e2e7a75Shuah uint_t cpu_impl_dual_pgsz; 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate void 487c478bd9Sstevel@tonic-gate cpu_setup(void) 497c478bd9Sstevel@tonic-gate {} 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate void 527c478bd9Sstevel@tonic-gate cpu_init_tick_freq(void) 537c478bd9Sstevel@tonic-gate {} 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 567c478bd9Sstevel@tonic-gate void 571e2e7a75Shuah vtag_flushpage(caddr_t addr, uint64_t sfmmup) 587c478bd9Sstevel@tonic-gate {} 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate void 617c478bd9Sstevel@tonic-gate vtag_flushall(void) 627c478bd9Sstevel@tonic-gate {} 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate void 651e2e7a75Shuah vtag_flushall_uctxs(void) 667c478bd9Sstevel@tonic-gate {} 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 697c478bd9Sstevel@tonic-gate void 701e2e7a75Shuah vtag_flushpage_tl1(uint64_t addr, uint64_t sfmmup) 717c478bd9Sstevel@tonic-gate {} 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 747c478bd9Sstevel@tonic-gate void 751e2e7a75Shuah vtag_flush_pgcnt_tl1(uint64_t addr, uint64_t sfmmup_pgcnt) 767c478bd9Sstevel@tonic-gate {} 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 797c478bd9Sstevel@tonic-gate void 807c478bd9Sstevel@tonic-gate vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2) 817c478bd9Sstevel@tonic-gate {} 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 847c478bd9Sstevel@tonic-gate void 85*9853d9e8SJason Beloro vtag_unmap_perm_tl1(uint64_t addr, uint64_t ctx) 86*9853d9e8SJason Beloro {} 87*9853d9e8SJason Beloro 88*9853d9e8SJason Beloro /*ARGSUSED*/ 89*9853d9e8SJason Beloro void 907c478bd9Sstevel@tonic-gate vac_flushpage(pfn_t pf, int color) 917c478bd9Sstevel@tonic-gate {} 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 947c478bd9Sstevel@tonic-gate void 957c478bd9Sstevel@tonic-gate vac_flushpage_tl1(uint64_t pf, uint64_t color) 967c478bd9Sstevel@tonic-gate {} 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 997c478bd9Sstevel@tonic-gate void 1007c478bd9Sstevel@tonic-gate vac_flushcolor(int color, pfn_t pf) 1017c478bd9Sstevel@tonic-gate {} 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1047c478bd9Sstevel@tonic-gate void 1057c478bd9Sstevel@tonic-gate vac_flushcolor_tl1(uint64_t color, uint64_t dummy) 1067c478bd9Sstevel@tonic-gate {} 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1097c478bd9Sstevel@tonic-gate void 1107c478bd9Sstevel@tonic-gate init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2) 1117c478bd9Sstevel@tonic-gate {} 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1147c478bd9Sstevel@tonic-gate void 1157c478bd9Sstevel@tonic-gate send_one_mondo(int cpuid) 1167c478bd9Sstevel@tonic-gate {} 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1197c478bd9Sstevel@tonic-gate void 1207c478bd9Sstevel@tonic-gate send_mondo_set(cpuset_t set) 1217c478bd9Sstevel@tonic-gate {} 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1247c478bd9Sstevel@tonic-gate void 1257c478bd9Sstevel@tonic-gate flush_instr_mem(caddr_t addr, size_t len) 1267c478bd9Sstevel@tonic-gate {} 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate void 1297c478bd9Sstevel@tonic-gate syncfpu(void) 1307c478bd9Sstevel@tonic-gate {} 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1337c478bd9Sstevel@tonic-gate void 1347c478bd9Sstevel@tonic-gate cpu_change_speed(uint64_t divisor, uint64_t arg2) 1357c478bd9Sstevel@tonic-gate {} 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate u_longlong_t 1387c478bd9Sstevel@tonic-gate gettick(void) 1397c478bd9Sstevel@tonic-gate { return (0); } 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate uint64_t 1427c478bd9Sstevel@tonic-gate gettick_counter(void) 1437c478bd9Sstevel@tonic-gate { return (0); } 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1467c478bd9Sstevel@tonic-gate void 1477c478bd9Sstevel@tonic-gate gethrestime(timespec_t *tp) 1487c478bd9Sstevel@tonic-gate {} 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate time_t 1517c478bd9Sstevel@tonic-gate gethrestime_sec(void) 1527c478bd9Sstevel@tonic-gate { return (0); } 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1557c478bd9Sstevel@tonic-gate void 1567c478bd9Sstevel@tonic-gate gethrestime_lasttick(timespec_t *tp) 1577c478bd9Sstevel@tonic-gate {} 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate hrtime_t 1607c478bd9Sstevel@tonic-gate gethrtime(void) 1617c478bd9Sstevel@tonic-gate { return (0); } 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate hrtime_t 1647c478bd9Sstevel@tonic-gate gethrtime_unscaled(void) 1657c478bd9Sstevel@tonic-gate { return (0); } 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate hrtime_t 1687c478bd9Sstevel@tonic-gate gethrtime_waitfree(void) 1697c478bd9Sstevel@tonic-gate { return (0); } 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate hrtime_t 1727c478bd9Sstevel@tonic-gate dtrace_gethrtime(void) 1737c478bd9Sstevel@tonic-gate { return (0); } 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate uint_t 1767c478bd9Sstevel@tonic-gate get_impl(void) 1777c478bd9Sstevel@tonic-gate { return (0); } 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate hrtime_t 1807c478bd9Sstevel@tonic-gate get_hrestime(void) 1817c478bd9Sstevel@tonic-gate { return (0); } 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gate ulong_t 1847c478bd9Sstevel@tonic-gate get_timestamp(void) 1857c478bd9Sstevel@tonic-gate { return (0); } 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate ulong_t 1887c478bd9Sstevel@tonic-gate get_virtime(void) 1897c478bd9Sstevel@tonic-gate { return (0); } 1907c478bd9Sstevel@tonic-gate 1917c478bd9Sstevel@tonic-gate hrtime_t 1927c478bd9Sstevel@tonic-gate gethrtime_max(void) 1937c478bd9Sstevel@tonic-gate { return (0); } 1947c478bd9Sstevel@tonic-gate 1957c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1967c478bd9Sstevel@tonic-gate void 1977c478bd9Sstevel@tonic-gate scalehrtime(hrtime_t *hrt) 1987c478bd9Sstevel@tonic-gate {} 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate void 2017c478bd9Sstevel@tonic-gate hres_tick(void) 2027c478bd9Sstevel@tonic-gate {} 2037c478bd9Sstevel@tonic-gate 2047c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2057c478bd9Sstevel@tonic-gate void 2067c478bd9Sstevel@tonic-gate tickcmpr_set(uint64_t clock_cycles) 2077c478bd9Sstevel@tonic-gate {} 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate void 2107c478bd9Sstevel@tonic-gate tickcmpr_disable(void) 2117c478bd9Sstevel@tonic-gate {} 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2147c478bd9Sstevel@tonic-gate void 2157c478bd9Sstevel@tonic-gate tick_write_delta(uint64_t delta) 2167c478bd9Sstevel@tonic-gate {} 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate int 2197c478bd9Sstevel@tonic-gate tickcmpr_disabled(void) 2207c478bd9Sstevel@tonic-gate { return (0); } 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2237c478bd9Sstevel@tonic-gate void 2247c478bd9Sstevel@tonic-gate drv_usecwait(clock_t n) 2257c478bd9Sstevel@tonic-gate {} 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate /* 2287c478bd9Sstevel@tonic-gate * Processor-optimized memory routines 2297c478bd9Sstevel@tonic-gate */ 2307c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2317c478bd9Sstevel@tonic-gate int 2327c478bd9Sstevel@tonic-gate kcopy(const void *from, void *to, size_t count) 2337c478bd9Sstevel@tonic-gate { return (0); } 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2367c478bd9Sstevel@tonic-gate int 2377c478bd9Sstevel@tonic-gate kcopy_nta(const void *from, void *to, size_t count, int dummy) 2387c478bd9Sstevel@tonic-gate { return (0); } 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2417c478bd9Sstevel@tonic-gate void 2427c478bd9Sstevel@tonic-gate bcopy(const void *from, void *to, size_t count) 2437c478bd9Sstevel@tonic-gate {} 2447c478bd9Sstevel@tonic-gate 2457c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2467c478bd9Sstevel@tonic-gate void 2477c478bd9Sstevel@tonic-gate ovbcopy(const void *from, void *to, size_t count) 2487c478bd9Sstevel@tonic-gate {} 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2517c478bd9Sstevel@tonic-gate int 2527c478bd9Sstevel@tonic-gate copyin(const void *uaddr, void *kaddr, size_t count) 2537c478bd9Sstevel@tonic-gate { return (0); } 2547c478bd9Sstevel@tonic-gate 2557c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2567c478bd9Sstevel@tonic-gate int 2577c478bd9Sstevel@tonic-gate xcopyin(const void *uaddr, void *kaddr, size_t count) 2587c478bd9Sstevel@tonic-gate { return (0); } 2597c478bd9Sstevel@tonic-gate 2607c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2617c478bd9Sstevel@tonic-gate int 2627c478bd9Sstevel@tonic-gate xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy) 2637c478bd9Sstevel@tonic-gate { return (0); } 2647c478bd9Sstevel@tonic-gate 2657c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2667c478bd9Sstevel@tonic-gate int 2677c478bd9Sstevel@tonic-gate copyout(const void *kaddr, void *uaddr, size_t count) 2687c478bd9Sstevel@tonic-gate { return (0); } 2697c478bd9Sstevel@tonic-gate 2707c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2717c478bd9Sstevel@tonic-gate int 2727c478bd9Sstevel@tonic-gate xcopyout(const void *kaddr, void *uaddr, size_t count) 2737c478bd9Sstevel@tonic-gate { return (0); } 2747c478bd9Sstevel@tonic-gate 2757c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2767c478bd9Sstevel@tonic-gate int 2777c478bd9Sstevel@tonic-gate xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy) 2787c478bd9Sstevel@tonic-gate { return (0); } 2797c478bd9Sstevel@tonic-gate 2807c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2817c478bd9Sstevel@tonic-gate void 2827c478bd9Sstevel@tonic-gate copyout_noerr(const void *kfrom, void *uto, size_t count) 2837c478bd9Sstevel@tonic-gate {} 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2867c478bd9Sstevel@tonic-gate void 2877c478bd9Sstevel@tonic-gate copyin_noerr(const void *kfrom, void *uto, size_t count) 2887c478bd9Sstevel@tonic-gate {} 2897c478bd9Sstevel@tonic-gate 2907c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2917c478bd9Sstevel@tonic-gate int 2927c478bd9Sstevel@tonic-gate xcopyin_little(const void *uaddr, void *kaddr, size_t count) 2937c478bd9Sstevel@tonic-gate { return (0); } 2947c478bd9Sstevel@tonic-gate 2957c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2967c478bd9Sstevel@tonic-gate int 2977c478bd9Sstevel@tonic-gate xcopyout_little(const void *kaddr, void *uaddr, size_t count) 2987c478bd9Sstevel@tonic-gate { return (0); } 2997c478bd9Sstevel@tonic-gate 3007c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 3017c478bd9Sstevel@tonic-gate void 3027c478bd9Sstevel@tonic-gate hwblkpagecopy(const void *src, void *dst) 3037c478bd9Sstevel@tonic-gate {} 3047c478bd9Sstevel@tonic-gate 3057c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 3067c478bd9Sstevel@tonic-gate void 3077c478bd9Sstevel@tonic-gate hw_pa_bcopy32(uint64_t src, uint64_t dst) 3087c478bd9Sstevel@tonic-gate {} 3097c478bd9Sstevel@tonic-gate 3107c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 3117c478bd9Sstevel@tonic-gate int 3127c478bd9Sstevel@tonic-gate hwblkclr(void *addr, size_t len) 3137c478bd9Sstevel@tonic-gate { return (0); } 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gate int use_hw_bzero; 3167c478bd9Sstevel@tonic-gate int use_hw_bcopy; 3177c478bd9Sstevel@tonic-gate uint_t hw_copy_limit_1; 3187c478bd9Sstevel@tonic-gate uint_t hw_copy_limit_2; 3197c478bd9Sstevel@tonic-gate uint_t hw_copy_limit_4; 3207c478bd9Sstevel@tonic-gate uint_t hw_copy_limit_8; 3217c478bd9Sstevel@tonic-gate 3227c478bd9Sstevel@tonic-gate /* 3237c478bd9Sstevel@tonic-gate * tick operations 3247c478bd9Sstevel@tonic-gate */ 3257c478bd9Sstevel@tonic-gate 3267c478bd9Sstevel@tonic-gate void 3277c478bd9Sstevel@tonic-gate tick_rtt(void) 3287c478bd9Sstevel@tonic-gate { } 3297c478bd9Sstevel@tonic-gate 3307c478bd9Sstevel@tonic-gate void 3317c478bd9Sstevel@tonic-gate pil14_interrupt(void) 3327c478bd9Sstevel@tonic-gate { } 3337c478bd9Sstevel@tonic-gate 334b9e93c10SJonathan Haslam void 335b9e93c10SJonathan Haslam pil15_interrupt(void) 336b9e93c10SJonathan Haslam { } 337b9e93c10SJonathan Haslam 3387c478bd9Sstevel@tonic-gate /* ARGSUSED */ 3397c478bd9Sstevel@tonic-gate void 3407c478bd9Sstevel@tonic-gate cpu_init_private(struct cpu *cp) 3417c478bd9Sstevel@tonic-gate {} 3427c478bd9Sstevel@tonic-gate 3437c478bd9Sstevel@tonic-gate /* ARGSUSED */ 3447c478bd9Sstevel@tonic-gate void 3457c478bd9Sstevel@tonic-gate cpu_uninit_private(struct cpu *cp) 3467c478bd9Sstevel@tonic-gate {} 3477c478bd9Sstevel@tonic-gate 3487c478bd9Sstevel@tonic-gate void 3497c478bd9Sstevel@tonic-gate sticksync_slave(void) 3507c478bd9Sstevel@tonic-gate {} 3517c478bd9Sstevel@tonic-gate 3527c478bd9Sstevel@tonic-gate void 3537c478bd9Sstevel@tonic-gate sticksync_master(void) 3547c478bd9Sstevel@tonic-gate {} 3557c478bd9Sstevel@tonic-gate 3567c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 3577c478bd9Sstevel@tonic-gate int 3587c478bd9Sstevel@tonic-gate dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain) 3597c478bd9Sstevel@tonic-gate { return (-1); } 360