1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 28*0Sstevel@tonic-gate 29*0Sstevel@tonic-gate #include <sys/cpu_module.h> 30*0Sstevel@tonic-gate #include <vm/page.h> 31*0Sstevel@tonic-gate #include <vm/seg_map.h> 32*0Sstevel@tonic-gate 33*0Sstevel@tonic-gate void 34*0Sstevel@tonic-gate cpu_fiximp(dnode_t dnode) 35*0Sstevel@tonic-gate {} 36*0Sstevel@tonic-gate 37*0Sstevel@tonic-gate void 38*0Sstevel@tonic-gate ce_err(void) 39*0Sstevel@tonic-gate {} 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gate void 42*0Sstevel@tonic-gate ce_err_tl1(void) 43*0Sstevel@tonic-gate {} 44*0Sstevel@tonic-gate 45*0Sstevel@tonic-gate void 46*0Sstevel@tonic-gate async_err(void) 47*0Sstevel@tonic-gate {} 48*0Sstevel@tonic-gate 49*0Sstevel@tonic-gate void 50*0Sstevel@tonic-gate cpu_flush_ecache(void) 51*0Sstevel@tonic-gate {} 52*0Sstevel@tonic-gate 53*0Sstevel@tonic-gate void 54*0Sstevel@tonic-gate cpu_disable_errors(void) 55*0Sstevel@tonic-gate {} 56*0Sstevel@tonic-gate 57*0Sstevel@tonic-gate /* It could be removed later if prom enables error handling */ 58*0Sstevel@tonic-gate void 59*0Sstevel@tonic-gate cpu_enable_errors(void) 60*0Sstevel@tonic-gate {} 61*0Sstevel@tonic-gate 62*0Sstevel@tonic-gate /*ARGSUSED*/ 63*0Sstevel@tonic-gate void 64*0Sstevel@tonic-gate cpu_faulted_enter(struct cpu *cp) 65*0Sstevel@tonic-gate {} 66*0Sstevel@tonic-gate 67*0Sstevel@tonic-gate /*ARGSUSED*/ 68*0Sstevel@tonic-gate void 69*0Sstevel@tonic-gate cpu_faulted_exit(struct cpu *cp) 70*0Sstevel@tonic-gate {} 71*0Sstevel@tonic-gate 72*0Sstevel@tonic-gate /*ARGSUSED*/ 73*0Sstevel@tonic-gate void 74*0Sstevel@tonic-gate cpu_ce_count_unum(struct async_flt *ecc, int len, char *unum) 75*0Sstevel@tonic-gate {} 76*0Sstevel@tonic-gate 77*0Sstevel@tonic-gate /*ARGSUSED*/ 78*0Sstevel@tonic-gate void 79*0Sstevel@tonic-gate cpu_ce_scrub_mem_err(struct async_flt *ecc, boolean_t triedcpulogout) 80*0Sstevel@tonic-gate {} 81*0Sstevel@tonic-gate 82*0Sstevel@tonic-gate /*ARGSUSED*/ 83*0Sstevel@tonic-gate void 84*0Sstevel@tonic-gate cpu_ce_log_err(struct async_flt *ecc, errorq_elem_t *eqep) 85*0Sstevel@tonic-gate {} 86*0Sstevel@tonic-gate 87*0Sstevel@tonic-gate /*ARGSUSED*/ 88*0Sstevel@tonic-gate void 89*0Sstevel@tonic-gate cpu_ue_log_err(struct async_flt *ecc) 90*0Sstevel@tonic-gate {} 91*0Sstevel@tonic-gate 92*0Sstevel@tonic-gate /*ARGSUSED*/ 93*0Sstevel@tonic-gate int 94*0Sstevel@tonic-gate ce_scrub_xdiag_recirc(struct async_flt *aflt, errorq_t *eqp, 95*0Sstevel@tonic-gate errorq_elem_t *eqep, size_t afltoffset) 96*0Sstevel@tonic-gate { return (0); } 97*0Sstevel@tonic-gate 98*0Sstevel@tonic-gate /*ARGSUSED*/ 99*0Sstevel@tonic-gate char * 100*0Sstevel@tonic-gate flt_to_error_type(struct async_flt *aflt) 101*0Sstevel@tonic-gate { return (NULL); } 102*0Sstevel@tonic-gate 103*0Sstevel@tonic-gate int 104*0Sstevel@tonic-gate cpu_aflt_size(void) 105*0Sstevel@tonic-gate { return (0); } 106*0Sstevel@tonic-gate 107*0Sstevel@tonic-gate void 108*0Sstevel@tonic-gate cpu_async_panic_callb(void) 109*0Sstevel@tonic-gate {} 110*0Sstevel@tonic-gate 111*0Sstevel@tonic-gate /*ARGSUSED*/ 112*0Sstevel@tonic-gate void 113*0Sstevel@tonic-gate cpu_check_allcpus(struct async_flt *aflt) 114*0Sstevel@tonic-gate {} 115*0Sstevel@tonic-gate 116*0Sstevel@tonic-gate /*ARGSUSED*/ 117*0Sstevel@tonic-gate int 118*0Sstevel@tonic-gate cpu_get_mem_unum(int synd_stat, ushort_t synd, uint64_t afsr, uint64_t afar, 119*0Sstevel@tonic-gate int cpuid, int flt_in_memory, ushort_t flt_status, char *buf, 120*0Sstevel@tonic-gate int buflen, int *lenp) 121*0Sstevel@tonic-gate { return (ENOTSUP); } 122*0Sstevel@tonic-gate 123*0Sstevel@tonic-gate /*ARGSUSED*/ 124*0Sstevel@tonic-gate int 125*0Sstevel@tonic-gate cpu_get_mem_unum_aflt(int synd_stat, struct async_flt *aflt, 126*0Sstevel@tonic-gate char *buf, int buflen, int *lenp) 127*0Sstevel@tonic-gate { return (ENOTSUP); } 128*0Sstevel@tonic-gate 129*0Sstevel@tonic-gate /*ARGSUSED*/ 130*0Sstevel@tonic-gate int 131*0Sstevel@tonic-gate cpu_get_cpu_unum(int cpuid, char *buf, int buflen, int *lenp) 132*0Sstevel@tonic-gate { return (ENOTSUP); } 133*0Sstevel@tonic-gate 134*0Sstevel@tonic-gate /*ARGSUSED*/ 135*0Sstevel@tonic-gate int 136*0Sstevel@tonic-gate cpu_get_mem_name(uint64_t synd, uint64_t *afsr, uint64_t afar, 137*0Sstevel@tonic-gate char *buf, int buflen, int *lenp) 138*0Sstevel@tonic-gate { return (ENOTSUP); } 139*0Sstevel@tonic-gate 140*0Sstevel@tonic-gate /*ARGSUSED*/ 141*0Sstevel@tonic-gate size_t 142*0Sstevel@tonic-gate cpu_get_name_bufsize() 143*0Sstevel@tonic-gate { return (0); } 144*0Sstevel@tonic-gate 145*0Sstevel@tonic-gate /*ARGSUSED*/ 146*0Sstevel@tonic-gate int 147*0Sstevel@tonic-gate cpu_get_mem_info(uint64_t synd, uint64_t afar, 148*0Sstevel@tonic-gate uint64_t *mem_sizep, uint64_t *seg_sizep, uint64_t *bank_sizep, 149*0Sstevel@tonic-gate int *segsp, int *banksp, int *mcidp) 150*0Sstevel@tonic-gate { return (ENOTSUP); } 151*0Sstevel@tonic-gate 152*0Sstevel@tonic-gate /*ARGSUSED*/ 153*0Sstevel@tonic-gate void 154*0Sstevel@tonic-gate cpu_ereport_post(struct async_flt *aflt) 155*0Sstevel@tonic-gate {} 156*0Sstevel@tonic-gate 157*0Sstevel@tonic-gate /*ARGSUSED*/ 158*0Sstevel@tonic-gate void 159*0Sstevel@tonic-gate cpu_run_bus_error_handlers(struct async_flt *aflt, int expected) 160*0Sstevel@tonic-gate {} 161*0Sstevel@tonic-gate 162*0Sstevel@tonic-gate void 163*0Sstevel@tonic-gate cpu_errorq_dispatch(char *error_class, void *payload, size_t payload_sz, 164*0Sstevel@tonic-gate errorq_t *eqp, uint_t flag) 165*0Sstevel@tonic-gate {} 166*0Sstevel@tonic-gate 167*0Sstevel@tonic-gate void 168*0Sstevel@tonic-gate clr_datapath(void) 169*0Sstevel@tonic-gate {} 170*0Sstevel@tonic-gate 171*0Sstevel@tonic-gate /*ARGSUSED*/ 172*0Sstevel@tonic-gate void 173*0Sstevel@tonic-gate read_ecc_data(struct async_flt *ecc, short verbose, short ce_err) 174*0Sstevel@tonic-gate {} 175*0Sstevel@tonic-gate 176*0Sstevel@tonic-gate /*ARGSUSED*/ 177*0Sstevel@tonic-gate void 178*0Sstevel@tonic-gate itlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag) 179*0Sstevel@tonic-gate {} 180*0Sstevel@tonic-gate 181*0Sstevel@tonic-gate /*ARGSUSED*/ 182*0Sstevel@tonic-gate void 183*0Sstevel@tonic-gate dtlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag) 184*0Sstevel@tonic-gate {} 185*0Sstevel@tonic-gate 186*0Sstevel@tonic-gate /* 187*0Sstevel@tonic-gate * tick operations 188*0Sstevel@tonic-gate */ 189*0Sstevel@tonic-gate 190*0Sstevel@tonic-gate void 191*0Sstevel@tonic-gate cpu_clearticknpt(void) 192*0Sstevel@tonic-gate { } 193*0Sstevel@tonic-gate 194*0Sstevel@tonic-gate /* 195*0Sstevel@tonic-gate * Ecache scrub operations 196*0Sstevel@tonic-gate */ 197*0Sstevel@tonic-gate void 198*0Sstevel@tonic-gate cpu_init_cache_scrub(void) 199*0Sstevel@tonic-gate {} 200*0Sstevel@tonic-gate 201*0Sstevel@tonic-gate /*ARGSUSED*/ 202*0Sstevel@tonic-gate void 203*0Sstevel@tonic-gate cpu_busy_ecache_scrub(struct cpu *cp) 204*0Sstevel@tonic-gate {} 205*0Sstevel@tonic-gate 206*0Sstevel@tonic-gate /*ARGSUSED*/ 207*0Sstevel@tonic-gate void 208*0Sstevel@tonic-gate cpu_idle_ecache_scrub(struct cpu *cp) 209*0Sstevel@tonic-gate {} 210*0Sstevel@tonic-gate 211*0Sstevel@tonic-gate /* ARGSUSED */ 212*0Sstevel@tonic-gate void 213*0Sstevel@tonic-gate cpu_check_ce(int flag, uint64_t pa, caddr_t va, uint_t bpp) 214*0Sstevel@tonic-gate {} 215*0Sstevel@tonic-gate 216*0Sstevel@tonic-gate /* ARGSUSED */ 217*0Sstevel@tonic-gate void 218*0Sstevel@tonic-gate prefetch_page_w(void *pp) 219*0Sstevel@tonic-gate { 220*0Sstevel@tonic-gate #define ECACHE_SUBBLOCKS_PER_PAGE 2 221*0Sstevel@tonic-gate #define ECACHE_SUBBLOCK_SIZE_BYTES 64 222*0Sstevel@tonic-gate #define ECACHE_PAGE_BYTE_MAX \ 223*0Sstevel@tonic-gate (ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1) 224*0Sstevel@tonic-gate 225*0Sstevel@tonic-gate /* 226*0Sstevel@tonic-gate * The following line is intended to cause an error 227*0Sstevel@tonic-gate * whenever the sun4u page_t grows beyond 128 228*0Sstevel@tonic-gate * bytes. 229*0Sstevel@tonic-gate * 230*0Sstevel@tonic-gate * If you get an error here, you'll need to change 231*0Sstevel@tonic-gate * the 'prefetch_page_w' assembly language code 232*0Sstevel@tonic-gate * (see also prefetch_page_w prologue comment) 233*0Sstevel@tonic-gate */ 234*0Sstevel@tonic-gate /*LINTED*/ 235*0Sstevel@tonic-gate volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)]; 236*0Sstevel@tonic-gate } 237*0Sstevel@tonic-gate 238*0Sstevel@tonic-gate /* ARGSUSED */ 239*0Sstevel@tonic-gate void 240*0Sstevel@tonic-gate prefetch_page_r(void *pp) 241*0Sstevel@tonic-gate { 242*0Sstevel@tonic-gate #define ECACHE_SUBBLOCKS_PER_PAGE 2 243*0Sstevel@tonic-gate #define ECACHE_SUBBLOCK_SIZE_BYTES 64 244*0Sstevel@tonic-gate #define ECACHE_PAGE_BYTE_MAX \ 245*0Sstevel@tonic-gate (ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1) 246*0Sstevel@tonic-gate 247*0Sstevel@tonic-gate /* 248*0Sstevel@tonic-gate * The following line is intended to cause an error 249*0Sstevel@tonic-gate * whenever the sun4u page_t grows beyond 128 250*0Sstevel@tonic-gate * bytes. 251*0Sstevel@tonic-gate * 252*0Sstevel@tonic-gate * If you get an error here, you'll need to change 253*0Sstevel@tonic-gate * the 'prefetch_page_r' assembly language code 254*0Sstevel@tonic-gate * (see also prefetch_page_w prologue comment) 255*0Sstevel@tonic-gate */ 256*0Sstevel@tonic-gate /*LINTED*/ 257*0Sstevel@tonic-gate volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)]; 258*0Sstevel@tonic-gate } 259*0Sstevel@tonic-gate 260*0Sstevel@tonic-gate 261*0Sstevel@tonic-gate #ifdef SEGKPM_SUPPORT 262*0Sstevel@tonic-gate #define SMAP_SIZE 80 263*0Sstevel@tonic-gate #else 264*0Sstevel@tonic-gate #define SMAP_SIZE 56 265*0Sstevel@tonic-gate #endif 266*0Sstevel@tonic-gate 267*0Sstevel@tonic-gate /* ARGSUSED */ 268*0Sstevel@tonic-gate void 269*0Sstevel@tonic-gate prefetch_smap_w(void *smp) 270*0Sstevel@tonic-gate { 271*0Sstevel@tonic-gate 272*0Sstevel@tonic-gate /* 273*0Sstevel@tonic-gate * The following lines are intended to cause an error 274*0Sstevel@tonic-gate * whenever the smap object size changes from the current 275*0Sstevel@tonic-gate * size of 48 bytes. If you get an error here, you'll 276*0Sstevel@tonic-gate * need to update the code in the 'prefetch_smap_w' assembly 277*0Sstevel@tonic-gate * language code. 278*0Sstevel@tonic-gate */ 279*0Sstevel@tonic-gate /*LINTED*/ 280*0Sstevel@tonic-gate volatile int smap_size_changed [SMAP_SIZE - sizeof (struct smap) + 1]; 281*0Sstevel@tonic-gate volatile int smap_size_changed2 [sizeof (struct smap) - SMAP_SIZE + 1]; 282*0Sstevel@tonic-gate } 283*0Sstevel@tonic-gate 284*0Sstevel@tonic-gate void 285*0Sstevel@tonic-gate kdi_flush_caches(void) 286*0Sstevel@tonic-gate {} 287*0Sstevel@tonic-gate 288*0Sstevel@tonic-gate /*ARGSUSED*/ 289*0Sstevel@tonic-gate void 290*0Sstevel@tonic-gate mmu_init_kernel_pgsz(struct hat *hat) 291*0Sstevel@tonic-gate { 292*0Sstevel@tonic-gate } 293*0Sstevel@tonic-gate 294*0Sstevel@tonic-gate size_t 295*0Sstevel@tonic-gate mmu_get_kernel_lpsize(size_t value) 296*0Sstevel@tonic-gate { 297*0Sstevel@tonic-gate return (value); 298*0Sstevel@tonic-gate } 299