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 50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 70Sstevel@tonic-gate * with the License. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate * See the License for the specific language governing permissions 120Sstevel@tonic-gate * and limitations under the License. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * CDDL HEADER END 210Sstevel@tonic-gate */ 220Sstevel@tonic-gate /* 230Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 280Sstevel@tonic-gate 290Sstevel@tonic-gate #include <sys/cpu_module.h> 300Sstevel@tonic-gate #include <vm/page.h> 310Sstevel@tonic-gate #include <vm/seg_map.h> 320Sstevel@tonic-gate 330Sstevel@tonic-gate void 34789Sahrens cpu_fiximp(pnode_t dnode) 350Sstevel@tonic-gate {} 360Sstevel@tonic-gate 370Sstevel@tonic-gate void 380Sstevel@tonic-gate ce_err(void) 390Sstevel@tonic-gate {} 400Sstevel@tonic-gate 410Sstevel@tonic-gate void 420Sstevel@tonic-gate ce_err_tl1(void) 430Sstevel@tonic-gate {} 440Sstevel@tonic-gate 450Sstevel@tonic-gate void 460Sstevel@tonic-gate async_err(void) 470Sstevel@tonic-gate {} 480Sstevel@tonic-gate 490Sstevel@tonic-gate void 500Sstevel@tonic-gate cpu_flush_ecache(void) 510Sstevel@tonic-gate {} 520Sstevel@tonic-gate 530Sstevel@tonic-gate void 540Sstevel@tonic-gate cpu_disable_errors(void) 550Sstevel@tonic-gate {} 560Sstevel@tonic-gate 570Sstevel@tonic-gate /* It could be removed later if prom enables error handling */ 580Sstevel@tonic-gate void 590Sstevel@tonic-gate cpu_enable_errors(void) 600Sstevel@tonic-gate {} 610Sstevel@tonic-gate 620Sstevel@tonic-gate /*ARGSUSED*/ 630Sstevel@tonic-gate void 640Sstevel@tonic-gate cpu_faulted_enter(struct cpu *cp) 650Sstevel@tonic-gate {} 660Sstevel@tonic-gate 670Sstevel@tonic-gate /*ARGSUSED*/ 680Sstevel@tonic-gate void 690Sstevel@tonic-gate cpu_faulted_exit(struct cpu *cp) 700Sstevel@tonic-gate {} 710Sstevel@tonic-gate 720Sstevel@tonic-gate /*ARGSUSED*/ 730Sstevel@tonic-gate void 740Sstevel@tonic-gate cpu_ce_count_unum(struct async_flt *ecc, int len, char *unum) 750Sstevel@tonic-gate {} 760Sstevel@tonic-gate 770Sstevel@tonic-gate /*ARGSUSED*/ 780Sstevel@tonic-gate void 790Sstevel@tonic-gate cpu_ce_scrub_mem_err(struct async_flt *ecc, boolean_t triedcpulogout) 800Sstevel@tonic-gate {} 810Sstevel@tonic-gate 820Sstevel@tonic-gate /*ARGSUSED*/ 830Sstevel@tonic-gate void 840Sstevel@tonic-gate cpu_ce_log_err(struct async_flt *ecc, errorq_elem_t *eqep) 850Sstevel@tonic-gate {} 860Sstevel@tonic-gate 870Sstevel@tonic-gate /*ARGSUSED*/ 880Sstevel@tonic-gate void 890Sstevel@tonic-gate cpu_ue_log_err(struct async_flt *ecc) 900Sstevel@tonic-gate {} 910Sstevel@tonic-gate 920Sstevel@tonic-gate /*ARGSUSED*/ 930Sstevel@tonic-gate int 940Sstevel@tonic-gate ce_scrub_xdiag_recirc(struct async_flt *aflt, errorq_t *eqp, 950Sstevel@tonic-gate errorq_elem_t *eqep, size_t afltoffset) 960Sstevel@tonic-gate { return (0); } 970Sstevel@tonic-gate 980Sstevel@tonic-gate /*ARGSUSED*/ 990Sstevel@tonic-gate char * 1000Sstevel@tonic-gate flt_to_error_type(struct async_flt *aflt) 1010Sstevel@tonic-gate { return (NULL); } 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate int 1040Sstevel@tonic-gate cpu_aflt_size(void) 1050Sstevel@tonic-gate { return (0); } 1060Sstevel@tonic-gate 1070Sstevel@tonic-gate void 1080Sstevel@tonic-gate cpu_async_panic_callb(void) 1090Sstevel@tonic-gate {} 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate /*ARGSUSED*/ 1120Sstevel@tonic-gate void 1130Sstevel@tonic-gate cpu_check_allcpus(struct async_flt *aflt) 1140Sstevel@tonic-gate {} 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate /*ARGSUSED*/ 1170Sstevel@tonic-gate int 118*1186Sayznaga cpu_get_mem_sid(char *unum, char *buf, int buflen, int *lenp) 119*1186Sayznaga { return (ENOTSUP); } 120*1186Sayznaga 121*1186Sayznaga /*ARGSUSED*/ 122*1186Sayznaga int 123*1186Sayznaga cpu_get_mem_offset(uint64_t flt_addr, uint64_t *offp) 124*1186Sayznaga { return (ENOTSUP); } 125*1186Sayznaga 126*1186Sayznaga /*ARGSUSED*/ 127*1186Sayznaga int 128*1186Sayznaga cpu_get_mem_addr(char *unum, char *sid, uint64_t offset, 129*1186Sayznaga uint64_t *addrp) 130*1186Sayznaga { return (ENOTSUP); } 131*1186Sayznaga 132*1186Sayznaga /*ARGSUSED*/ 133*1186Sayznaga int 1340Sstevel@tonic-gate cpu_get_mem_unum(int synd_stat, ushort_t synd, uint64_t afsr, uint64_t afar, 1350Sstevel@tonic-gate int cpuid, int flt_in_memory, ushort_t flt_status, char *buf, 1360Sstevel@tonic-gate int buflen, int *lenp) 1370Sstevel@tonic-gate { return (ENOTSUP); } 1380Sstevel@tonic-gate 1390Sstevel@tonic-gate /*ARGSUSED*/ 1400Sstevel@tonic-gate int 1410Sstevel@tonic-gate cpu_get_mem_unum_aflt(int synd_stat, struct async_flt *aflt, 1420Sstevel@tonic-gate char *buf, int buflen, int *lenp) 1430Sstevel@tonic-gate { return (ENOTSUP); } 1440Sstevel@tonic-gate 1450Sstevel@tonic-gate /*ARGSUSED*/ 1460Sstevel@tonic-gate int 1470Sstevel@tonic-gate cpu_get_cpu_unum(int cpuid, char *buf, int buflen, int *lenp) 1480Sstevel@tonic-gate { return (ENOTSUP); } 1490Sstevel@tonic-gate 1500Sstevel@tonic-gate /*ARGSUSED*/ 1510Sstevel@tonic-gate int 1520Sstevel@tonic-gate cpu_get_mem_name(uint64_t synd, uint64_t *afsr, uint64_t afar, 1530Sstevel@tonic-gate char *buf, int buflen, int *lenp) 1540Sstevel@tonic-gate { return (ENOTSUP); } 1550Sstevel@tonic-gate 1560Sstevel@tonic-gate /*ARGSUSED*/ 1570Sstevel@tonic-gate size_t 1580Sstevel@tonic-gate cpu_get_name_bufsize() 1590Sstevel@tonic-gate { return (0); } 1600Sstevel@tonic-gate 1610Sstevel@tonic-gate /*ARGSUSED*/ 1620Sstevel@tonic-gate int 1630Sstevel@tonic-gate cpu_get_mem_info(uint64_t synd, uint64_t afar, 1640Sstevel@tonic-gate uint64_t *mem_sizep, uint64_t *seg_sizep, uint64_t *bank_sizep, 1650Sstevel@tonic-gate int *segsp, int *banksp, int *mcidp) 1660Sstevel@tonic-gate { return (ENOTSUP); } 1670Sstevel@tonic-gate 1680Sstevel@tonic-gate /*ARGSUSED*/ 1690Sstevel@tonic-gate void 1700Sstevel@tonic-gate cpu_ereport_post(struct async_flt *aflt) 1710Sstevel@tonic-gate {} 1720Sstevel@tonic-gate 1730Sstevel@tonic-gate /*ARGSUSED*/ 1740Sstevel@tonic-gate void 1750Sstevel@tonic-gate cpu_run_bus_error_handlers(struct async_flt *aflt, int expected) 1760Sstevel@tonic-gate {} 1770Sstevel@tonic-gate 1780Sstevel@tonic-gate void 1790Sstevel@tonic-gate cpu_errorq_dispatch(char *error_class, void *payload, size_t payload_sz, 1800Sstevel@tonic-gate errorq_t *eqp, uint_t flag) 1810Sstevel@tonic-gate {} 1820Sstevel@tonic-gate 1830Sstevel@tonic-gate void 1840Sstevel@tonic-gate clr_datapath(void) 1850Sstevel@tonic-gate {} 1860Sstevel@tonic-gate 1870Sstevel@tonic-gate /*ARGSUSED*/ 1880Sstevel@tonic-gate void 1890Sstevel@tonic-gate read_ecc_data(struct async_flt *ecc, short verbose, short ce_err) 1900Sstevel@tonic-gate {} 1910Sstevel@tonic-gate 1920Sstevel@tonic-gate /*ARGSUSED*/ 1930Sstevel@tonic-gate void 1940Sstevel@tonic-gate itlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag) 1950Sstevel@tonic-gate {} 1960Sstevel@tonic-gate 1970Sstevel@tonic-gate /*ARGSUSED*/ 1980Sstevel@tonic-gate void 1990Sstevel@tonic-gate dtlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag) 2000Sstevel@tonic-gate {} 2010Sstevel@tonic-gate 2020Sstevel@tonic-gate /* 2030Sstevel@tonic-gate * tick operations 2040Sstevel@tonic-gate */ 2050Sstevel@tonic-gate 2060Sstevel@tonic-gate void 2070Sstevel@tonic-gate cpu_clearticknpt(void) 2080Sstevel@tonic-gate { } 2090Sstevel@tonic-gate 2100Sstevel@tonic-gate /* 2110Sstevel@tonic-gate * Ecache scrub operations 2120Sstevel@tonic-gate */ 2130Sstevel@tonic-gate void 2140Sstevel@tonic-gate cpu_init_cache_scrub(void) 2150Sstevel@tonic-gate {} 2160Sstevel@tonic-gate 2170Sstevel@tonic-gate /*ARGSUSED*/ 2180Sstevel@tonic-gate void 2190Sstevel@tonic-gate cpu_busy_ecache_scrub(struct cpu *cp) 2200Sstevel@tonic-gate {} 2210Sstevel@tonic-gate 2220Sstevel@tonic-gate /*ARGSUSED*/ 2230Sstevel@tonic-gate void 2240Sstevel@tonic-gate cpu_idle_ecache_scrub(struct cpu *cp) 2250Sstevel@tonic-gate {} 2260Sstevel@tonic-gate 2270Sstevel@tonic-gate /* ARGSUSED */ 2280Sstevel@tonic-gate void 2290Sstevel@tonic-gate cpu_check_ce(int flag, uint64_t pa, caddr_t va, uint_t bpp) 2300Sstevel@tonic-gate {} 2310Sstevel@tonic-gate 2320Sstevel@tonic-gate /* ARGSUSED */ 2330Sstevel@tonic-gate void 2340Sstevel@tonic-gate prefetch_page_w(void *pp) 2350Sstevel@tonic-gate { 2360Sstevel@tonic-gate #define ECACHE_SUBBLOCKS_PER_PAGE 2 2370Sstevel@tonic-gate #define ECACHE_SUBBLOCK_SIZE_BYTES 64 2380Sstevel@tonic-gate #define ECACHE_PAGE_BYTE_MAX \ 2390Sstevel@tonic-gate (ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1) 2400Sstevel@tonic-gate 2410Sstevel@tonic-gate /* 2420Sstevel@tonic-gate * The following line is intended to cause an error 2430Sstevel@tonic-gate * whenever the sun4u page_t grows beyond 128 2440Sstevel@tonic-gate * bytes. 2450Sstevel@tonic-gate * 2460Sstevel@tonic-gate * If you get an error here, you'll need to change 2470Sstevel@tonic-gate * the 'prefetch_page_w' assembly language code 2480Sstevel@tonic-gate * (see also prefetch_page_w prologue comment) 2490Sstevel@tonic-gate */ 2500Sstevel@tonic-gate /*LINTED*/ 2510Sstevel@tonic-gate volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)]; 2520Sstevel@tonic-gate } 2530Sstevel@tonic-gate 2540Sstevel@tonic-gate /* ARGSUSED */ 2550Sstevel@tonic-gate void 2560Sstevel@tonic-gate prefetch_page_r(void *pp) 2570Sstevel@tonic-gate { 2580Sstevel@tonic-gate #define ECACHE_SUBBLOCKS_PER_PAGE 2 2590Sstevel@tonic-gate #define ECACHE_SUBBLOCK_SIZE_BYTES 64 2600Sstevel@tonic-gate #define ECACHE_PAGE_BYTE_MAX \ 2610Sstevel@tonic-gate (ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1) 2620Sstevel@tonic-gate 2630Sstevel@tonic-gate /* 2640Sstevel@tonic-gate * The following line is intended to cause an error 2650Sstevel@tonic-gate * whenever the sun4u page_t grows beyond 128 2660Sstevel@tonic-gate * bytes. 2670Sstevel@tonic-gate * 2680Sstevel@tonic-gate * If you get an error here, you'll need to change 2690Sstevel@tonic-gate * the 'prefetch_page_r' assembly language code 2700Sstevel@tonic-gate * (see also prefetch_page_w prologue comment) 2710Sstevel@tonic-gate */ 2720Sstevel@tonic-gate /*LINTED*/ 2730Sstevel@tonic-gate volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)]; 2740Sstevel@tonic-gate } 2750Sstevel@tonic-gate 2760Sstevel@tonic-gate 2770Sstevel@tonic-gate #ifdef SEGKPM_SUPPORT 2780Sstevel@tonic-gate #define SMAP_SIZE 80 2790Sstevel@tonic-gate #else 2800Sstevel@tonic-gate #define SMAP_SIZE 56 2810Sstevel@tonic-gate #endif 2820Sstevel@tonic-gate 2830Sstevel@tonic-gate /* ARGSUSED */ 2840Sstevel@tonic-gate void 2850Sstevel@tonic-gate prefetch_smap_w(void *smp) 2860Sstevel@tonic-gate { 2870Sstevel@tonic-gate 2880Sstevel@tonic-gate /* 2890Sstevel@tonic-gate * The following lines are intended to cause an error 2900Sstevel@tonic-gate * whenever the smap object size changes from the current 2910Sstevel@tonic-gate * size of 48 bytes. If you get an error here, you'll 2920Sstevel@tonic-gate * need to update the code in the 'prefetch_smap_w' assembly 2930Sstevel@tonic-gate * language code. 2940Sstevel@tonic-gate */ 2950Sstevel@tonic-gate /*LINTED*/ 2960Sstevel@tonic-gate volatile int smap_size_changed [SMAP_SIZE - sizeof (struct smap) + 1]; 2970Sstevel@tonic-gate volatile int smap_size_changed2 [sizeof (struct smap) - SMAP_SIZE + 1]; 2980Sstevel@tonic-gate } 2990Sstevel@tonic-gate 3000Sstevel@tonic-gate void 3010Sstevel@tonic-gate kdi_flush_caches(void) 3020Sstevel@tonic-gate {} 3030Sstevel@tonic-gate 3040Sstevel@tonic-gate /*ARGSUSED*/ 3050Sstevel@tonic-gate void 3060Sstevel@tonic-gate mmu_init_kernel_pgsz(struct hat *hat) 3070Sstevel@tonic-gate { 3080Sstevel@tonic-gate } 3090Sstevel@tonic-gate 3100Sstevel@tonic-gate size_t 3110Sstevel@tonic-gate mmu_get_kernel_lpsize(size_t value) 3120Sstevel@tonic-gate { 3130Sstevel@tonic-gate return (value); 3140Sstevel@tonic-gate } 315