25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CDDL HEADER START
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * The contents of this file are subject to the terms of the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Common Development and Distribution License (the "License").
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * You may not use this file except in compliance with the License.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * See the License for the specific language governing permissions
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * and limitations under the License.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * When distributing Covered Code, include this CDDL HEADER in each
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * If applicable, add the following below this CDDL HEADER, with the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * fields enclosed by brackets "[]" replaced with your own identifying
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * information: Portions Copyright [yyyy] [name of copyright owner]
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CDDL HEADER END
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Use is subject to license terms.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CPU-specific functions needed by the Kernel-Debugger Interface (KDI). These
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * functions are invoked directly by the kernel debugger (kmdb) while the system
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * has been stopped, and as such must not use any kernel facilities that block
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * or otherwise rely on forward progress by other parts of the kernel.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * These functions may also be called before unix`_start, and as such cannot
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * use any kernel facilities that must be initialized as part of system start.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * An example of such a facility is drv_usecwait(), which relies on a parameter
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * that is initialized by the unix module. As a result, drv_usecwait() may not
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * be used by KDI functions.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * We keep our own copies, used for cache flushing, because we can be called
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * before cpu_fiximpl().
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Assembly support for SPARC64-VI modules in opl_olympus_asm.s
25cf1a301a396c38e8adf52c15f537b80d2483f7jlextern int idsr_busy(void);
25cf1a301a396c38e8adf52c15f537b80d2483f7jlextern void init_mondo_nocheck(xcfunc_t *func, uint64_t arg1, uint64_t arg2);
25cf1a301a396c38e8adf52c15f537b80d2483f7jlextern void shipit(int, int);
25cf1a301a396c38e8adf52c15f537b80d2483f7jlextern void kdi_flush_idcache(int, int, int, int);
25cf1a301a396c38e8adf52c15f537b80d2483f7jl return (rc);
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Sends a cross-call to a specified processor. The caller assumes
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * responsibility for repetition of cross-calls, as appropriate (MARSA for
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * debugging).
25cf1a301a396c38e8adf52c15f537b80d2483f7jlkdi_xc_one(int cpuid, void (*func)(uintptr_t, uintptr_t), uintptr_t arg1,
25cf1a301a396c38e8adf52c15f537b80d2483f7jl /* Spin for at most 1 second for checking */
25cf1a301a396c38e8adf52c15f537b80d2483f7jlstatic void
25cf1a301a396c38e8adf52c15f537b80d2483f7jlstatic void
25cf1a301a396c38e8adf52c15f537b80d2483f7jlkdi_cpu_init(int dcache_size, int dcache_linesize, int icache_size,
25cf1a301a396c38e8adf52c15f537b80d2483f7jl/* used directly by kdi_read/write_phys */