17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* 237c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #include <sys/cpu_module.h> 307c478bd9Sstevel@tonic-gate #include <vm/page.h> 317c478bd9Sstevel@tonic-gate #include <vm/seg_map.h> 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate void 34fa9e4066Sahrens cpu_fiximp(pnode_t dnode) 357c478bd9Sstevel@tonic-gate {} 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate void 387c478bd9Sstevel@tonic-gate ce_err(void) 397c478bd9Sstevel@tonic-gate {} 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate void 427c478bd9Sstevel@tonic-gate ce_err_tl1(void) 437c478bd9Sstevel@tonic-gate {} 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate void 467c478bd9Sstevel@tonic-gate async_err(void) 477c478bd9Sstevel@tonic-gate {} 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate void 507c478bd9Sstevel@tonic-gate cpu_flush_ecache(void) 517c478bd9Sstevel@tonic-gate {} 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate void 547c478bd9Sstevel@tonic-gate cpu_disable_errors(void) 557c478bd9Sstevel@tonic-gate {} 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate /* It could be removed later if prom enables error handling */ 587c478bd9Sstevel@tonic-gate void 597c478bd9Sstevel@tonic-gate cpu_enable_errors(void) 607c478bd9Sstevel@tonic-gate {} 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 637c478bd9Sstevel@tonic-gate void 647c478bd9Sstevel@tonic-gate cpu_faulted_enter(struct cpu *cp) 657c478bd9Sstevel@tonic-gate {} 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 687c478bd9Sstevel@tonic-gate void 697c478bd9Sstevel@tonic-gate cpu_faulted_exit(struct cpu *cp) 707c478bd9Sstevel@tonic-gate {} 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 737c478bd9Sstevel@tonic-gate void 747c478bd9Sstevel@tonic-gate cpu_ce_count_unum(struct async_flt *ecc, int len, char *unum) 757c478bd9Sstevel@tonic-gate {} 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 787c478bd9Sstevel@tonic-gate void 797c478bd9Sstevel@tonic-gate cpu_ce_scrub_mem_err(struct async_flt *ecc, boolean_t triedcpulogout) 807c478bd9Sstevel@tonic-gate {} 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 837c478bd9Sstevel@tonic-gate void 847c478bd9Sstevel@tonic-gate cpu_ce_log_err(struct async_flt *ecc, errorq_elem_t *eqep) 857c478bd9Sstevel@tonic-gate {} 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 887c478bd9Sstevel@tonic-gate void 897c478bd9Sstevel@tonic-gate cpu_ue_log_err(struct async_flt *ecc) 907c478bd9Sstevel@tonic-gate {} 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 937c478bd9Sstevel@tonic-gate int 947c478bd9Sstevel@tonic-gate ce_scrub_xdiag_recirc(struct async_flt *aflt, errorq_t *eqp, 957c478bd9Sstevel@tonic-gate errorq_elem_t *eqep, size_t afltoffset) 967c478bd9Sstevel@tonic-gate { return (0); } 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 997c478bd9Sstevel@tonic-gate char * 1007c478bd9Sstevel@tonic-gate flt_to_error_type(struct async_flt *aflt) 1017c478bd9Sstevel@tonic-gate { return (NULL); } 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate int 1047c478bd9Sstevel@tonic-gate cpu_aflt_size(void) 1057c478bd9Sstevel@tonic-gate { return (0); } 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate void 1087c478bd9Sstevel@tonic-gate cpu_async_panic_callb(void) 1097c478bd9Sstevel@tonic-gate {} 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1127c478bd9Sstevel@tonic-gate void 1137c478bd9Sstevel@tonic-gate cpu_check_allcpus(struct async_flt *aflt) 1147c478bd9Sstevel@tonic-gate {} 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1177c478bd9Sstevel@tonic-gate int 118*d00f0155Sayznaga cpu_get_mem_sid(char *unum, char *buf, int buflen, int *lenp) 119*d00f0155Sayznaga { return (ENOTSUP); } 120*d00f0155Sayznaga 121*d00f0155Sayznaga /*ARGSUSED*/ 122*d00f0155Sayznaga int 123*d00f0155Sayznaga cpu_get_mem_offset(uint64_t flt_addr, uint64_t *offp) 124*d00f0155Sayznaga { return (ENOTSUP); } 125*d00f0155Sayznaga 126*d00f0155Sayznaga /*ARGSUSED*/ 127*d00f0155Sayznaga int 128*d00f0155Sayznaga cpu_get_mem_addr(char *unum, char *sid, uint64_t offset, 129*d00f0155Sayznaga uint64_t *addrp) 130*d00f0155Sayznaga { return (ENOTSUP); } 131*d00f0155Sayznaga 132*d00f0155Sayznaga /*ARGSUSED*/ 133*d00f0155Sayznaga int 1347c478bd9Sstevel@tonic-gate cpu_get_mem_unum(int synd_stat, ushort_t synd, uint64_t afsr, uint64_t afar, 1357c478bd9Sstevel@tonic-gate int cpuid, int flt_in_memory, ushort_t flt_status, char *buf, 1367c478bd9Sstevel@tonic-gate int buflen, int *lenp) 1377c478bd9Sstevel@tonic-gate { return (ENOTSUP); } 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1407c478bd9Sstevel@tonic-gate int 1417c478bd9Sstevel@tonic-gate cpu_get_mem_unum_aflt(int synd_stat, struct async_flt *aflt, 1427c478bd9Sstevel@tonic-gate char *buf, int buflen, int *lenp) 1437c478bd9Sstevel@tonic-gate { return (ENOTSUP); } 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1467c478bd9Sstevel@tonic-gate int 1477c478bd9Sstevel@tonic-gate cpu_get_cpu_unum(int cpuid, char *buf, int buflen, int *lenp) 1487c478bd9Sstevel@tonic-gate { return (ENOTSUP); } 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1517c478bd9Sstevel@tonic-gate int 1527c478bd9Sstevel@tonic-gate cpu_get_mem_name(uint64_t synd, uint64_t *afsr, uint64_t afar, 1537c478bd9Sstevel@tonic-gate char *buf, int buflen, int *lenp) 1547c478bd9Sstevel@tonic-gate { return (ENOTSUP); } 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1577c478bd9Sstevel@tonic-gate size_t 1587c478bd9Sstevel@tonic-gate cpu_get_name_bufsize() 1597c478bd9Sstevel@tonic-gate { return (0); } 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1627c478bd9Sstevel@tonic-gate int 1637c478bd9Sstevel@tonic-gate cpu_get_mem_info(uint64_t synd, uint64_t afar, 1647c478bd9Sstevel@tonic-gate uint64_t *mem_sizep, uint64_t *seg_sizep, uint64_t *bank_sizep, 1657c478bd9Sstevel@tonic-gate int *segsp, int *banksp, int *mcidp) 1667c478bd9Sstevel@tonic-gate { return (ENOTSUP); } 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1697c478bd9Sstevel@tonic-gate void 1707c478bd9Sstevel@tonic-gate cpu_ereport_post(struct async_flt *aflt) 1717c478bd9Sstevel@tonic-gate {} 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1747c478bd9Sstevel@tonic-gate void 1757c478bd9Sstevel@tonic-gate cpu_run_bus_error_handlers(struct async_flt *aflt, int expected) 1767c478bd9Sstevel@tonic-gate {} 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate void 1797c478bd9Sstevel@tonic-gate cpu_errorq_dispatch(char *error_class, void *payload, size_t payload_sz, 1807c478bd9Sstevel@tonic-gate errorq_t *eqp, uint_t flag) 1817c478bd9Sstevel@tonic-gate {} 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gate void 1847c478bd9Sstevel@tonic-gate clr_datapath(void) 1857c478bd9Sstevel@tonic-gate {} 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1887c478bd9Sstevel@tonic-gate void 1897c478bd9Sstevel@tonic-gate read_ecc_data(struct async_flt *ecc, short verbose, short ce_err) 1907c478bd9Sstevel@tonic-gate {} 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1937c478bd9Sstevel@tonic-gate void 1947c478bd9Sstevel@tonic-gate itlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag) 1957c478bd9Sstevel@tonic-gate {} 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 1987c478bd9Sstevel@tonic-gate void 1997c478bd9Sstevel@tonic-gate dtlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag) 2007c478bd9Sstevel@tonic-gate {} 2017c478bd9Sstevel@tonic-gate 2027c478bd9Sstevel@tonic-gate /* 2037c478bd9Sstevel@tonic-gate * tick operations 2047c478bd9Sstevel@tonic-gate */ 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gate void 2077c478bd9Sstevel@tonic-gate cpu_clearticknpt(void) 2087c478bd9Sstevel@tonic-gate { } 2097c478bd9Sstevel@tonic-gate 2107c478bd9Sstevel@tonic-gate /* 2117c478bd9Sstevel@tonic-gate * Ecache scrub operations 2127c478bd9Sstevel@tonic-gate */ 2137c478bd9Sstevel@tonic-gate void 2147c478bd9Sstevel@tonic-gate cpu_init_cache_scrub(void) 2157c478bd9Sstevel@tonic-gate {} 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2187c478bd9Sstevel@tonic-gate void 2197c478bd9Sstevel@tonic-gate cpu_busy_ecache_scrub(struct cpu *cp) 2207c478bd9Sstevel@tonic-gate {} 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 2237c478bd9Sstevel@tonic-gate void 2247c478bd9Sstevel@tonic-gate cpu_idle_ecache_scrub(struct cpu *cp) 2257c478bd9Sstevel@tonic-gate {} 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate /* ARGSUSED */ 2287c478bd9Sstevel@tonic-gate void 2297c478bd9Sstevel@tonic-gate cpu_check_ce(int flag, uint64_t pa, caddr_t va, uint_t bpp) 2307c478bd9Sstevel@tonic-gate {} 2317c478bd9Sstevel@tonic-gate 2327c478bd9Sstevel@tonic-gate /* ARGSUSED */ 2337c478bd9Sstevel@tonic-gate void 2347c478bd9Sstevel@tonic-gate prefetch_page_w(void *pp) 2357c478bd9Sstevel@tonic-gate { 2367c478bd9Sstevel@tonic-gate #define ECACHE_SUBBLOCKS_PER_PAGE 2 2377c478bd9Sstevel@tonic-gate #define ECACHE_SUBBLOCK_SIZE_BYTES 64 2387c478bd9Sstevel@tonic-gate #define ECACHE_PAGE_BYTE_MAX \ 2397c478bd9Sstevel@tonic-gate (ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1) 2407c478bd9Sstevel@tonic-gate 2417c478bd9Sstevel@tonic-gate /* 2427c478bd9Sstevel@tonic-gate * The following line is intended to cause an error 2437c478bd9Sstevel@tonic-gate * whenever the sun4u page_t grows beyond 128 2447c478bd9Sstevel@tonic-gate * bytes. 2457c478bd9Sstevel@tonic-gate * 2467c478bd9Sstevel@tonic-gate * If you get an error here, you'll need to change 2477c478bd9Sstevel@tonic-gate * the 'prefetch_page_w' assembly language code 2487c478bd9Sstevel@tonic-gate * (see also prefetch_page_w prologue comment) 2497c478bd9Sstevel@tonic-gate */ 2507c478bd9Sstevel@tonic-gate /*LINTED*/ 2517c478bd9Sstevel@tonic-gate volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)]; 2527c478bd9Sstevel@tonic-gate } 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate /* ARGSUSED */ 2557c478bd9Sstevel@tonic-gate void 2567c478bd9Sstevel@tonic-gate prefetch_page_r(void *pp) 2577c478bd9Sstevel@tonic-gate { 2587c478bd9Sstevel@tonic-gate #define ECACHE_SUBBLOCKS_PER_PAGE 2 2597c478bd9Sstevel@tonic-gate #define ECACHE_SUBBLOCK_SIZE_BYTES 64 2607c478bd9Sstevel@tonic-gate #define ECACHE_PAGE_BYTE_MAX \ 2617c478bd9Sstevel@tonic-gate (ECACHE_SUBBLOCKS_PER_PAGE*ECACHE_SUBBLOCK_SIZE_BYTES+1) 2627c478bd9Sstevel@tonic-gate 2637c478bd9Sstevel@tonic-gate /* 2647c478bd9Sstevel@tonic-gate * The following line is intended to cause an error 2657c478bd9Sstevel@tonic-gate * whenever the sun4u page_t grows beyond 128 2667c478bd9Sstevel@tonic-gate * bytes. 2677c478bd9Sstevel@tonic-gate * 2687c478bd9Sstevel@tonic-gate * If you get an error here, you'll need to change 2697c478bd9Sstevel@tonic-gate * the 'prefetch_page_r' assembly language code 2707c478bd9Sstevel@tonic-gate * (see also prefetch_page_w prologue comment) 2717c478bd9Sstevel@tonic-gate */ 2727c478bd9Sstevel@tonic-gate /*LINTED*/ 2737c478bd9Sstevel@tonic-gate volatile int garbage[ECACHE_PAGE_BYTE_MAX - sizeof (page_t)]; 2747c478bd9Sstevel@tonic-gate } 2757c478bd9Sstevel@tonic-gate 2767c478bd9Sstevel@tonic-gate 2777c478bd9Sstevel@tonic-gate #ifdef SEGKPM_SUPPORT 2787c478bd9Sstevel@tonic-gate #define SMAP_SIZE 80 2797c478bd9Sstevel@tonic-gate #else 2807c478bd9Sstevel@tonic-gate #define SMAP_SIZE 56 2817c478bd9Sstevel@tonic-gate #endif 2827c478bd9Sstevel@tonic-gate 2837c478bd9Sstevel@tonic-gate /* ARGSUSED */ 2847c478bd9Sstevel@tonic-gate void 2857c478bd9Sstevel@tonic-gate prefetch_smap_w(void *smp) 2867c478bd9Sstevel@tonic-gate { 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate /* 2897c478bd9Sstevel@tonic-gate * The following lines are intended to cause an error 2907c478bd9Sstevel@tonic-gate * whenever the smap object size changes from the current 2917c478bd9Sstevel@tonic-gate * size of 48 bytes. If you get an error here, you'll 2927c478bd9Sstevel@tonic-gate * need to update the code in the 'prefetch_smap_w' assembly 2937c478bd9Sstevel@tonic-gate * language code. 2947c478bd9Sstevel@tonic-gate */ 2957c478bd9Sstevel@tonic-gate /*LINTED*/ 2967c478bd9Sstevel@tonic-gate volatile int smap_size_changed [SMAP_SIZE - sizeof (struct smap) + 1]; 2977c478bd9Sstevel@tonic-gate volatile int smap_size_changed2 [sizeof (struct smap) - SMAP_SIZE + 1]; 2987c478bd9Sstevel@tonic-gate } 2997c478bd9Sstevel@tonic-gate 3007c478bd9Sstevel@tonic-gate void 3017c478bd9Sstevel@tonic-gate kdi_flush_caches(void) 3027c478bd9Sstevel@tonic-gate {} 3037c478bd9Sstevel@tonic-gate 3047c478bd9Sstevel@tonic-gate /*ARGSUSED*/ 3057c478bd9Sstevel@tonic-gate void 3067c478bd9Sstevel@tonic-gate mmu_init_kernel_pgsz(struct hat *hat) 3077c478bd9Sstevel@tonic-gate { 3087c478bd9Sstevel@tonic-gate } 3097c478bd9Sstevel@tonic-gate 3107c478bd9Sstevel@tonic-gate size_t 3117c478bd9Sstevel@tonic-gate mmu_get_kernel_lpsize(size_t value) 3127c478bd9Sstevel@tonic-gate { 3137c478bd9Sstevel@tonic-gate return (value); 3147c478bd9Sstevel@tonic-gate } 315