kmdb_kdi_isadep.c revision febcc4a52c3ed7fe3a106da2c2ba52c56afd5111
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* SPARC-specific portions of the KDI
*/
#include <sys/kdi_impl.h>
#include <kmdb/kmdb_dpi.h>
#include <kmdb/kmdb_promif.h>
#include <mdb/mdb_debug.h>
#define KDI_XC_RETRIES 10
static size_t kdi_dcache_size;
static size_t kdi_dcache_linesize;
static size_t kdi_icache_size;
static size_t kdi_icache_linesize;
static uint_t kdi_max_cpu_freq;
static uint_t kdi_sticks_per_usec;
/* XXX needs to go into a header */
void
{
}
static int
{
}
static int
{
}
/*ARGSUSED1*/
static int
{
/*
* Sun4v dosen't support virtual address cache
*/
#ifndef sun4v
int dcache_size, dcache_linesize;
int icache_size, icache_linesize;
#endif
int cpu_freq;
#ifndef sun4v
/* Get the real cpu property node if needed */
/*
* data cache
*/
/*
* instruction cache
*/
#endif
}
return (0);
}
/*
* Called on an individual CPU. Tries to send it off to the state saver if it
* hasn't already entered the debugger. Returns non-zero if it *fails* to stop
* the CPU.
*/
static int
{
void (*state_saver)(void) = (void (*)(void))state_saverp;
const char *msg;
int rc = 0;
int res;
rc = 1;
if (res == KDI_XC_RES_OK)
msg = "accepted the";
else {
if (res == KDI_XC_RES_BUSY)
msg = "too busy for";
else if (res == KDI_XC_RES_NACK)
msg = "NACKED the";
else
msg = "errored the";
}
}
return (rc);
}
/*ARGSUSED1*/
static int
{
return (0);
}
/*ARGSUSED*/
void
{
int i;
for (i = 0; i < KDI_XC_RETRIES; i++) {
(void *)kaif_slave_entry) == 0)
break;
kdi_usecwait(2000);
}
}
void
kmdb_kdi_start_slaves(void)
{
}
void
kmdb_kdi_slave_wait(void)
{
}
int
{
}
{
}
void
{
}
/*ARGSUSED*/
void
{
/*
* If we can't find one, guess high. The CPU frequency is going to be
* used to determine the length of various delays, such as the mondo
* interrupt retry delay. Too long is generally better than too short.
*/
if (kdi_max_cpu_freq == 0) {
"500MHz\n");
}
#ifndef sun4v
#endif /* sun4v */
}