/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* CPU-specific functions needed by the Kernel-Debugger Interface (KDI). These
* functions are invoked directly by the kernel debugger (kmdb) while the system
* has been stopped, and as such must not use any kernel facilities that block
* or otherwise rely on forward progress by other parts of the kernel.
*
* These functions may also be called before unix`_start, and as such cannot
* use any kernel facilities that must be initialized as part of system start.
* An example of such a facility is drv_usecwait(), which relies on a parameter
* that is initialized by the unix module. As a result, drv_usecwait() may not
* be used by KDI functions.
*/
#include <sys/archsystm.h>
#include <sys/machsystm.h>
#include <sys/cpu_module.h>
#include <sys/kdi_impl.h>
/*
* We keep our own copies, used for cache flushing, because we can be called
* before cpu_fiximpl().
*/
static int kdi_dcache_size;
static int kdi_dcache_linesize;
static int kdi_icache_size;
static int kdi_icache_linesize;
/*
* Assembly support for SPARC64-VI modules in opl_olympus_asm.s
*/
extern int idsr_busy(void);
extern void shipit(int, int);
extern void kdi_flush_idcache(int, int, int, int);
extern int kdi_get_stick(uint64_t *);
static void kdi_tickwait(clock_t);
static int
{
int rc, i;
if (CPU_IN_SET(cpu_ready_set, i))
}
return (rc);
}
/*
* Sends a cross-call to a specified processor. The caller assumes
* responsibility for repetition of cross-calls, as appropriate (MARSA for
* debugging).
*/
static int
{
/* Spin for at most 1 second for checking */
do {
return (KDI_XC_RES_BUSY);
}
}
kdi_tickwait(20000);
return (KDI_XC_RES_NACK);
else
return (KDI_XC_RES_OK);
}
static void
{
;
}
static void
int icache_linesize)
{
}
/* used directly by kdi_read/write_phys */
void
kdi_flush_caches(void)
{
}
void
{
}