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
34*789Sahrens 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
1180Sstevel@tonic-gate cpu_get_mem_unum(int synd_stat, ushort_t synd, uint64_t afsr, uint64_t afar,
1190Sstevel@tonic-gate     int cpuid, int flt_in_memory, ushort_t flt_status, char *buf,
1200Sstevel@tonic-gate     int buflen, int *lenp)
1210Sstevel@tonic-gate { return (ENOTSUP); }
1220Sstevel@tonic-gate 
1230Sstevel@tonic-gate /*ARGSUSED*/
1240Sstevel@tonic-gate int
1250Sstevel@tonic-gate cpu_get_mem_unum_aflt(int synd_stat, struct async_flt *aflt,
1260Sstevel@tonic-gate     char *buf, int buflen, int *lenp)
1270Sstevel@tonic-gate { return (ENOTSUP); }
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate /*ARGSUSED*/
1300Sstevel@tonic-gate int
1310Sstevel@tonic-gate cpu_get_cpu_unum(int cpuid, char *buf, int buflen, int *lenp)
1320Sstevel@tonic-gate { return (ENOTSUP); }
1330Sstevel@tonic-gate 
1340Sstevel@tonic-gate /*ARGSUSED*/
1350Sstevel@tonic-gate int
1360Sstevel@tonic-gate cpu_get_mem_name(uint64_t synd, uint64_t *afsr, uint64_t afar,
1370Sstevel@tonic-gate     char *buf, int buflen, int *lenp)
1380Sstevel@tonic-gate { return (ENOTSUP); }
1390Sstevel@tonic-gate 
1400Sstevel@tonic-gate /*ARGSUSED*/
1410Sstevel@tonic-gate size_t
1420Sstevel@tonic-gate cpu_get_name_bufsize()
1430Sstevel@tonic-gate { return (0); }
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate /*ARGSUSED*/
1460Sstevel@tonic-gate int
1470Sstevel@tonic-gate cpu_get_mem_info(uint64_t synd, uint64_t afar,
1480Sstevel@tonic-gate     uint64_t *mem_sizep, uint64_t *seg_sizep, uint64_t *bank_sizep,
1490Sstevel@tonic-gate     int *segsp, int *banksp, int *mcidp)
1500Sstevel@tonic-gate { return (ENOTSUP); }
1510Sstevel@tonic-gate 
1520Sstevel@tonic-gate /*ARGSUSED*/
1530Sstevel@tonic-gate void
1540Sstevel@tonic-gate cpu_ereport_post(struct async_flt *aflt)
1550Sstevel@tonic-gate {}
1560Sstevel@tonic-gate 
1570Sstevel@tonic-gate /*ARGSUSED*/
1580Sstevel@tonic-gate void
1590Sstevel@tonic-gate cpu_run_bus_error_handlers(struct async_flt *aflt, int expected)
1600Sstevel@tonic-gate {}
1610Sstevel@tonic-gate 
1620Sstevel@tonic-gate void
1630Sstevel@tonic-gate cpu_errorq_dispatch(char *error_class, void *payload, size_t payload_sz,
1640Sstevel@tonic-gate     errorq_t *eqp, uint_t flag)
1650Sstevel@tonic-gate {}
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate void
1680Sstevel@tonic-gate clr_datapath(void)
1690Sstevel@tonic-gate {}
1700Sstevel@tonic-gate 
1710Sstevel@tonic-gate /*ARGSUSED*/
1720Sstevel@tonic-gate void
1730Sstevel@tonic-gate read_ecc_data(struct async_flt *ecc, short verbose, short ce_err)
1740Sstevel@tonic-gate {}
1750Sstevel@tonic-gate 
1760Sstevel@tonic-gate /*ARGSUSED*/
1770Sstevel@tonic-gate void
1780Sstevel@tonic-gate itlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag)
1790Sstevel@tonic-gate {}
1800Sstevel@tonic-gate 
1810Sstevel@tonic-gate /*ARGSUSED*/
1820Sstevel@tonic-gate void
1830Sstevel@tonic-gate dtlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag)
1840Sstevel@tonic-gate {}
1850Sstevel@tonic-gate 
1860Sstevel@tonic-gate /*
1870Sstevel@tonic-gate  * tick operations
1880Sstevel@tonic-gate  */
1890Sstevel@tonic-gate 
1900Sstevel@tonic-gate void
1910Sstevel@tonic-gate cpu_clearticknpt(void)
1920Sstevel@tonic-gate { }
1930Sstevel@tonic-gate 
1940Sstevel@tonic-gate /*
1950Sstevel@tonic-gate  * Ecache scrub operations
1960Sstevel@tonic-gate  */
1970Sstevel@tonic-gate void
1980Sstevel@tonic-gate cpu_init_cache_scrub(void)
1990Sstevel@tonic-gate {}
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate /*ARGSUSED*/
2020Sstevel@tonic-gate void
2030Sstevel@tonic-gate cpu_busy_ecache_scrub(struct cpu *cp)
2040Sstevel@tonic-gate {}
2050Sstevel@tonic-gate 
2060Sstevel@tonic-gate /*ARGSUSED*/
2070Sstevel@tonic-gate void
2080Sstevel@tonic-gate cpu_idle_ecache_scrub(struct cpu *cp)
2090Sstevel@tonic-gate {}
2100Sstevel@tonic-gate 
2110Sstevel@tonic-gate /* ARGSUSED */
2120Sstevel@tonic-gate void
2130Sstevel@tonic-gate cpu_check_ce(int flag, uint64_t pa, caddr_t va, uint_t bpp)
2140Sstevel@tonic-gate {}
2150Sstevel@tonic-gate 
2160Sstevel@tonic-gate /* ARGSUSED */
2170Sstevel@tonic-gate void
2180Sstevel@tonic-gate prefetch_page_w(void *pp)
2190Sstevel@tonic-gate {
2200Sstevel@tonic-gate #define	ECACHE_SUBBLOCKS_PER_PAGE	2
2210Sstevel@tonic-gate #define	ECACHE_SUBBLOCK_SIZE_BYTES	64
2220Sstevel@tonic-gate #define	ECACHE_PAGE_BYTE_MAX	\
2230Sstevel@tonic-gate 	(ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1)
2240Sstevel@tonic-gate 
2250Sstevel@tonic-gate 	/*
2260Sstevel@tonic-gate 	 * The following line is intended to cause an error
2270Sstevel@tonic-gate 	 * whenever the sun4u page_t grows beyond 128
2280Sstevel@tonic-gate 	 * bytes.
2290Sstevel@tonic-gate 	 *
2300Sstevel@tonic-gate 	 * If you get an error here, you'll need to change
2310Sstevel@tonic-gate 	 * the 'prefetch_page_w' assembly language code
2320Sstevel@tonic-gate 	 * (see also prefetch_page_w prologue comment)
2330Sstevel@tonic-gate 	 */
2340Sstevel@tonic-gate 	/*LINTED*/
2350Sstevel@tonic-gate 	volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)];
2360Sstevel@tonic-gate }
2370Sstevel@tonic-gate 
2380Sstevel@tonic-gate /* ARGSUSED */
2390Sstevel@tonic-gate void
2400Sstevel@tonic-gate prefetch_page_r(void *pp)
2410Sstevel@tonic-gate {
2420Sstevel@tonic-gate #define	ECACHE_SUBBLOCKS_PER_PAGE	2
2430Sstevel@tonic-gate #define	ECACHE_SUBBLOCK_SIZE_BYTES	64
2440Sstevel@tonic-gate #define	ECACHE_PAGE_BYTE_MAX	\
2450Sstevel@tonic-gate 	(ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1)
2460Sstevel@tonic-gate 
2470Sstevel@tonic-gate 	/*
2480Sstevel@tonic-gate 	 * The following line is intended to cause an error
2490Sstevel@tonic-gate 	 * whenever the sun4u page_t grows beyond 128
2500Sstevel@tonic-gate 	 * bytes.
2510Sstevel@tonic-gate 	 *
2520Sstevel@tonic-gate 	 * If you get an error here, you'll need to change
2530Sstevel@tonic-gate 	 * the 'prefetch_page_r' assembly language code
2540Sstevel@tonic-gate 	 * (see also prefetch_page_w prologue comment)
2550Sstevel@tonic-gate 	 */
2560Sstevel@tonic-gate 	/*LINTED*/
2570Sstevel@tonic-gate 	volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)];
2580Sstevel@tonic-gate }
2590Sstevel@tonic-gate 
2600Sstevel@tonic-gate 
2610Sstevel@tonic-gate #ifdef	SEGKPM_SUPPORT
2620Sstevel@tonic-gate #define	SMAP_SIZE	80
2630Sstevel@tonic-gate #else
2640Sstevel@tonic-gate #define	SMAP_SIZE	56
2650Sstevel@tonic-gate #endif
2660Sstevel@tonic-gate 
2670Sstevel@tonic-gate /* ARGSUSED */
2680Sstevel@tonic-gate void
2690Sstevel@tonic-gate prefetch_smap_w(void *smp)
2700Sstevel@tonic-gate {
2710Sstevel@tonic-gate 
2720Sstevel@tonic-gate 	/*
2730Sstevel@tonic-gate 	 * The following lines are intended to cause an error
2740Sstevel@tonic-gate 	 * whenever the smap object size changes from the current
2750Sstevel@tonic-gate 	 * size of 48 bytes.  If you get an error here, you'll
2760Sstevel@tonic-gate 	 * need to update the code in the 'prefetch_smap_w' assembly
2770Sstevel@tonic-gate 	 * language code.
2780Sstevel@tonic-gate 	 */
2790Sstevel@tonic-gate 	/*LINTED*/
2800Sstevel@tonic-gate 	volatile int smap_size_changed [SMAP_SIZE - sizeof (struct smap) + 1];
2810Sstevel@tonic-gate 	volatile int smap_size_changed2 [sizeof (struct smap) - SMAP_SIZE + 1];
2820Sstevel@tonic-gate }
2830Sstevel@tonic-gate 
2840Sstevel@tonic-gate void
2850Sstevel@tonic-gate kdi_flush_caches(void)
2860Sstevel@tonic-gate {}
2870Sstevel@tonic-gate 
2880Sstevel@tonic-gate /*ARGSUSED*/
2890Sstevel@tonic-gate void
2900Sstevel@tonic-gate mmu_init_kernel_pgsz(struct hat *hat)
2910Sstevel@tonic-gate {
2920Sstevel@tonic-gate }
2930Sstevel@tonic-gate 
2940Sstevel@tonic-gate size_t
2950Sstevel@tonic-gate mmu_get_kernel_lpsize(size_t value)
2960Sstevel@tonic-gate {
2970Sstevel@tonic-gate 	return (value);
2980Sstevel@tonic-gate }
299