/*
* 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"
#include <sys/bootconf.h>
#include <sys/cpu_module.h>
#include <sys/kdi_impl.h>
#include <sys/kobj_impl.h>
#ifdef sun4v
#include <sys/promif_impl.h>
#include <kmdb/kmdb_kctl.h>
#endif
extern struct scb trap_table;
static void
{
if (kctl.kctl_boot_loaded) {
/* LINTED - pointer alignment */
} else {
}
}
/*
* The traps that transfer control to kmdb (breakpoint, programmed entry, etc)
* use kmdb_trap and kmdb_trap_tl1, which normally begin with a ba,a to
* trap_table0 - a bad trap entry. When kmdb starts, it will use
* kctl_ktrap_install to replace the ba with a jmp to the appropriate kmdb
* entry points. Deactivation uses kctl_ktrap_restore to restore the ba
* instructions.
*/
static void
{
}
static void
kctl_ktrap_restore(void)
{
}
static void
{
#if defined(KMDB_TRAPCOUNT)
#else
int do_dtlb = 0;
#endif
}
static void
{
}
static void
{
}
/*
* kmdb has its own trap table. Life is made considerably easier if
* we allocate and configure it here, passing it to the debugger for
* final tweaking.
*
* The debugger code, and data accessed by the handlers are either
* a) locked into the TLB or b) accessible by our tte-lookup code. As
* such, we need only lock the trap table itself into the TLBs. We'll
* get the memory for the table from the beginning of the debugger
* segment, which has already been allocated.
*/
static void
kctl_ttable_init(void)
{
}
static void
kctl_ttable_fini(void)
{
}
static caddr_t
{
*szp = KCTL_TTABLE_SIZE;
return (tba);
}
static void
kctl_cpu_init(void)
{
}
int
kctl_preactivate_isadep(void)
{
if (!kctl.kctl_boot_loaded) {
if (kdi_watchdog_disable() != 0) {
"debugger is activated");
}
}
return (0);
}
void
{
}
void
{
}
void
{
extern void *get_tba(void);
extern int (*cif_handler)(void *);
extern int prom_exit_enter_debugger;
&kav->kav_tba_native_sz);
#ifdef sun4v
#endif
#ifdef sun4v
if (kctl.kctl_boot_loaded) {
/*
* When booting kmdb, kmdb starts before domaining is
* enabled and before the cif handler is changed to the
* kernel cif handler. So we start kmdb with using the
* OBP and we will change this when the cif handler is
* installed.
*/
kav->kav_domaining = 0;
} else {
}
#endif
}
#ifdef sun4v
void
{
}
void
kctl_switch_promif(void)
{
}
#endif
/*ARGSUSED*/
void
{
}
void *
kctl_boot_tmpinit(void)
{
return (kctl_curthread_set(kt0));
}
void
{
(void) kctl_curthread_set(old);
}