1 /* 2 * CDDL HEADER START 3 * 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. 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #pragma ident "%Z%%M% %I% %E% SMI" 27 28 #include <sys/cpu_module.h> 29 #include <sys/lockstat.h> 30 31 /* 32 * This is a dummy file that provides the default cpu module 33 * that is linked to unix. 34 */ 35 36 uint_t root_phys_addr_lo_mask; 37 int64_t timedelta; 38 hrtime_t hres_last_tick; 39 timestruc_t hrestime; 40 int64_t hrestime_adj; 41 int hres_lock; 42 uint_t nsec_scale; 43 uint_t nsec_shift; 44 uint_t adj_shift; 45 hrtime_t hrtime_base; 46 int traptrace_use_stick; 47 uint_t cpu_impl_dual_pgsz; 48 49 void 50 cpu_setup(void) 51 {} 52 53 void 54 cpu_init_tick_freq(void) 55 {} 56 57 /*ARGSUSED*/ 58 void 59 vtag_flushpage(caddr_t addr, uint64_t sfmmup) 60 {} 61 62 void 63 vtag_flushall(void) 64 {} 65 66 void 67 vtag_flushall_uctxs(void) 68 {} 69 70 /*ARGSUSED*/ 71 void 72 vtag_flushpage_tl1(uint64_t addr, uint64_t sfmmup) 73 {} 74 75 /*ARGSUSED*/ 76 void 77 vtag_flush_pgcnt_tl1(uint64_t addr, uint64_t sfmmup_pgcnt) 78 {} 79 80 /*ARGSUSED*/ 81 void 82 vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2) 83 {} 84 85 /*ARGSUSED*/ 86 void 87 vac_flushpage(pfn_t pf, int color) 88 {} 89 90 /*ARGSUSED*/ 91 void 92 vac_flushpage_tl1(uint64_t pf, uint64_t color) 93 {} 94 95 /*ARGSUSED*/ 96 void 97 vac_flushcolor(int color, pfn_t pf) 98 {} 99 100 /*ARGSUSED*/ 101 void 102 vac_flushcolor_tl1(uint64_t color, uint64_t dummy) 103 {} 104 105 /*ARGSUSED*/ 106 void 107 init_mondo(xcfunc_t func, uint64_t arg1, uint64_t arg2) 108 {} 109 110 /*ARGSUSED*/ 111 void 112 send_one_mondo(int cpuid) 113 {} 114 115 /*ARGSUSED*/ 116 void 117 send_mondo_set(cpuset_t set) 118 {} 119 120 /*ARGSUSED*/ 121 void 122 flush_instr_mem(caddr_t addr, size_t len) 123 {} 124 125 void 126 syncfpu(void) 127 {} 128 129 /*ARGSUSED*/ 130 void 131 cpu_change_speed(uint64_t divisor, uint64_t arg2) 132 {} 133 134 u_longlong_t 135 gettick(void) 136 { return (0); } 137 138 uint64_t 139 gettick_counter(void) 140 { return (0); } 141 142 /*ARGSUSED*/ 143 void 144 gethrestime(timespec_t *tp) 145 {} 146 147 time_t 148 gethrestime_sec(void) 149 { return (0); } 150 151 /*ARGSUSED*/ 152 void 153 gethrestime_lasttick(timespec_t *tp) 154 {} 155 156 hrtime_t 157 gethrtime(void) 158 { return (0); } 159 160 hrtime_t 161 gethrtime_unscaled(void) 162 { return (0); } 163 164 hrtime_t 165 gethrtime_waitfree(void) 166 { return (0); } 167 168 hrtime_t 169 dtrace_gethrtime(void) 170 { return (0); } 171 172 uint_t 173 get_impl(void) 174 { return (0); } 175 176 hrtime_t 177 get_hrestime(void) 178 { return (0); } 179 180 ulong_t 181 get_timestamp(void) 182 { return (0); } 183 184 ulong_t 185 get_virtime(void) 186 { return (0); } 187 188 hrtime_t 189 gethrtime_max(void) 190 { return (0); } 191 192 /*ARGSUSED*/ 193 void 194 scalehrtime(hrtime_t *hrt) 195 {} 196 197 void 198 hres_tick(void) 199 {} 200 201 /*ARGSUSED*/ 202 void 203 tickcmpr_set(uint64_t clock_cycles) 204 {} 205 206 void 207 tickcmpr_disable(void) 208 {} 209 210 /*ARGSUSED*/ 211 void 212 tick_write_delta(uint64_t delta) 213 {} 214 215 int 216 tickcmpr_disabled(void) 217 { return (0); } 218 219 /*ARGSUSED*/ 220 void 221 drv_usecwait(clock_t n) 222 {} 223 224 /* 225 * Processor-optimized memory routines 226 */ 227 /*ARGSUSED*/ 228 int 229 kcopy(const void *from, void *to, size_t count) 230 { return (0); } 231 232 /*ARGSUSED*/ 233 int 234 kcopy_nta(const void *from, void *to, size_t count, int dummy) 235 { return (0); } 236 237 /*ARGSUSED*/ 238 void 239 bcopy(const void *from, void *to, size_t count) 240 {} 241 242 /*ARGSUSED*/ 243 void 244 ovbcopy(const void *from, void *to, size_t count) 245 {} 246 247 /*ARGSUSED*/ 248 int 249 copyin(const void *uaddr, void *kaddr, size_t count) 250 { return (0); } 251 252 /*ARGSUSED*/ 253 int 254 xcopyin(const void *uaddr, void *kaddr, size_t count) 255 { return (0); } 256 257 /*ARGSUSED*/ 258 int 259 xcopyin_nta(const void *uaddr, void *kaddr, size_t count, int dummy) 260 { return (0); } 261 262 /*ARGSUSED*/ 263 int 264 copyout(const void *kaddr, void *uaddr, size_t count) 265 { return (0); } 266 267 /*ARGSUSED*/ 268 int 269 xcopyout(const void *kaddr, void *uaddr, size_t count) 270 { return (0); } 271 272 /*ARGSUSED*/ 273 int 274 xcopyout_nta(const void *kaddr, void *uaddr, size_t count, int dummy) 275 { return (0); } 276 277 /*ARGSUSED*/ 278 void 279 copyout_noerr(const void *kfrom, void *uto, size_t count) 280 {} 281 282 /*ARGSUSED*/ 283 void 284 copyin_noerr(const void *kfrom, void *uto, size_t count) 285 {} 286 287 /*ARGSUSED*/ 288 int 289 xcopyin_little(const void *uaddr, void *kaddr, size_t count) 290 { return (0); } 291 292 /*ARGSUSED*/ 293 int 294 xcopyout_little(const void *kaddr, void *uaddr, size_t count) 295 { return (0); } 296 297 /*ARGSUSED*/ 298 void 299 hwblkpagecopy(const void *src, void *dst) 300 {} 301 302 /*ARGSUSED*/ 303 void 304 hw_pa_bcopy32(uint64_t src, uint64_t dst) 305 {} 306 307 /*ARGSUSED*/ 308 int 309 hwblkclr(void *addr, size_t len) 310 { return (0); } 311 312 int use_hw_bzero; 313 int use_hw_bcopy; 314 uint_t hw_copy_limit_1; 315 uint_t hw_copy_limit_2; 316 uint_t hw_copy_limit_4; 317 uint_t hw_copy_limit_8; 318 319 /* 320 * tick operations 321 */ 322 323 void 324 tick_rtt(void) 325 { } 326 327 void 328 pil14_interrupt(void) 329 { } 330 331 /* ARGSUSED */ 332 void 333 cpu_init_private(struct cpu *cp) 334 {} 335 336 /* ARGSUSED */ 337 void 338 cpu_uninit_private(struct cpu *cp) 339 {} 340 341 void 342 sticksync_slave(void) 343 {} 344 345 void 346 sticksync_master(void) 347 {} 348 349 /*ARGSUSED*/ 350 int 351 dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain) 352 { return (-1); } 353