4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #include <sys/cpu_module.h>
27 #include <sys/lockstat.h>
30 * This is a dummy file that provides the default cpu module
31 * that is linked to unix.
34 uint_t root_phys_addr_lo_mask
;
36 hrtime_t hres_last_tick
;
37 volatile timestruc_t hrestime
;
39 volatile int hres_lock
;
44 int traptrace_use_stick
;
45 uint_t cpu_impl_dual_pgsz
;
52 cpu_init_tick_freq(void)
57 vtag_flushpage(caddr_t addr
, uint64_t sfmmup
)
65 vtag_flushall_uctxs(void)
70 vtag_flushpage_tl1(uint64_t addr
, uint64_t sfmmup
)
75 vtag_flush_pgcnt_tl1(uint64_t addr
, uint64_t sfmmup_pgcnt
)
80 vtag_flushall_tl1(uint64_t dummy1
, uint64_t dummy2
)
85 vac_flushpage(pfn_t pf
, int color
)
90 vac_flushpage_tl1(uint64_t pf
, uint64_t color
)
95 vac_flushcolor(int color
, pfn_t pf
)
100 vac_flushcolor_tl1(uint64_t color
, uint64_t dummy
)
105 init_mondo(xcfunc_t func
, uint64_t arg1
, uint64_t arg2
)
110 send_one_mondo(int cpuid
)
115 send_mondo_set(cpuset_t set
)
120 flush_instr_mem(caddr_t addr
, size_t len
)
129 cpu_change_speed(uint64_t divisor
, uint64_t arg2
)
137 gettick_counter(void)
142 gethrestime(timespec_t
*tp
)
146 gethrestime_sec(void)
151 gethrestime_lasttick(timespec_t
*tp
)
159 gethrtime_unscaled(void)
163 gethrtime_waitfree(void)
167 dtrace_gethrtime(void)
192 scalehrtime(hrtime_t
*hrt
)
201 tickcmpr_set(uint64_t clock_cycles
)
205 tickcmpr_disable(void)
210 tick_write_delta(uint64_t delta
)
214 tickcmpr_disabled(void)
219 drv_usecwait(clock_t n
)
223 * Processor-optimized memory routines
227 kcopy(const void *from
, void *to
, size_t count
)
232 kcopy_nta(const void *from
, void *to
, size_t count
, int dummy
)
237 bcopy(const void *from
, void *to
, size_t count
)
242 ovbcopy(const void *from
, void *to
, size_t count
)
247 copyin(const void *uaddr
, void *kaddr
, size_t count
)
252 xcopyin(const void *uaddr
, void *kaddr
, size_t count
)
257 xcopyin_nta(const void *uaddr
, void *kaddr
, size_t count
, int dummy
)
262 copyout(const void *kaddr
, void *uaddr
, size_t count
)
267 xcopyout(const void *kaddr
, void *uaddr
, size_t count
)
272 xcopyout_nta(const void *kaddr
, void *uaddr
, size_t count
, int dummy
)
277 copyout_noerr(const void *kfrom
, void *uto
, size_t count
)
282 copyin_noerr(const void *kfrom
, void *uto
, size_t count
)
287 xcopyin_little(const void *uaddr
, void *kaddr
, size_t count
)
292 xcopyout_little(const void *kaddr
, void *uaddr
, size_t count
)
297 hwblkpagecopy(const void *src
, void *dst
)
302 hw_pa_bcopy32(uint64_t src
, uint64_t dst
)
307 hwblkclr(void *addr
, size_t len
)
312 uint_t hw_copy_limit_1
;
313 uint_t hw_copy_limit_2
;
314 uint_t hw_copy_limit_4
;
315 uint_t hw_copy_limit_8
;
326 pil14_interrupt(void)
330 pil15_interrupt(void)
335 cpu_init_private(struct cpu
*cp
)
340 cpu_uninit_private(struct cpu
*cp
)
344 sticksync_slave(void)
348 sticksync_master(void)
353 dtrace_blksuword32(uintptr_t addr
, uint32_t *data
, int tryagain
)