/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* means by which we use the PROM to control the machine.
*/
#include <setjmp.h>
#include <kmdb/kmdb_dpi_impl.h>
#include <kmdb/kmdb_kdi.h>
#include <kmdb/kmdb_auxv.h>
#include <kmdb/kmdb_wr_impl.h>
#include <kmdb/kmdb_module.h>
#include <kmdb/kmdb_start.h>
#include <kmdb/kmdb_asmutil.h>
#include <mdb/mdb_debug.h>
#include <mdb/mdb_string.h>
static int kmdb_dpi_state;
static int kmdb_dpi_state_why;
/* Used by the style-specific resume interfaces to signal the driver */
void (*kmdb_dpi_wrintr_fire)(void);
int
{
}
/*ARGSUSED1*/
void
{
}
void
kmdb_deactivate(void)
{
}
int
kmdb_dpi_reenter(void)
{
int cmd;
/* Direct entry from the driver */
fail("kmdb_first_start returned");
/*NOTREACHED*/
}
/*
* The debugger wants us to do something - it returned a command
* via the setjmp(). The driver will know what to do with the
* command.
*/
return (cmd);
}
void
kmdb_dpi_enter_mon(void)
{
}
void
{
}
void
kmdb_dpi_modchg_cancel(void)
{
}
int
{
}
int
{
}
const mdb_tgt_gregset_t *
{
}
jmp_buf *
{
return (oldpcb);
}
void
{
(void) kmdb_dpi_set_fault_hdlr(jb);
}
/*
* Used to tell the driver that it needs to do work after the resume.
*
* CAUTION: This routine may be called *after* mdb_destroy
*/
int
kmdb_dpi_work_required(void)
{
return (kmdb_kdi_get_unload_request() ||
}
void
kmdb_dpi_resume_master(void)
{
}
void
kmdb_dpi_resume(void)
{
}
void
kmdb_dpi_resume_unload(void)
{
}
int
{
if (kmdb_dpi_get_cpu_state(tgt_cpuid) < 0)
return (-1); /* errno is set for us */
return (0);
}
void
{
}
typedef struct work_results {
static int
{
case WNTASK_DMOD_LOAD: {
/*
* If this is an ack, the driver finished processing a load we
* requested. We process it and free the message. If this
* isn't an ack, then it's a driver-initiated load. We process
* the message, and send it back as an ack so the driver can
* free it.
*/
}
return (0);
}
/* Send it back as an ack */
return (0);
}
case WNTASK_DMOD_LOAD_ALL:
/*
* We initiated the load-all, so this must be an ack. The
* individual module load messages will arrive separately -
* there's no need to do anything further with this message.
*/
return (0);
case WNTASK_DMOD_UNLOAD: {
/*
* The debugger received an unload message. The driver isn't
* supposed to initiate unloads, so we shouldn't see anything
* but acks. We tell the dmod subsystem that the module has
* been unloaded, and we free the message.
*/
}
/* Done with message */
return (0);
}
case WNTASK_DMOD_PATH_CHANGE: {
/*
* The debugger received a path change message. The driver
* can't initiate these, so it must be an acknowledgement.
* There's no processing to be done, so just free the message.
*/
return (0);
}
default:
mdb_warn("Received unknown message type %d from driver\n",
/* Ignore it */
return (0);
}
}
static void
{
mdb_var_t *v;
}
void
{
mdb_printf("Loaded modules: [");
mdb_printf(" ]\n");
}
mdb_printf("Unloaded modules: [");
mdb_printf(" ]\n");
}
}
int
kmdb_dpi_step(void)
{
}
{
}
int
{
int rc;
return (rc);
}
int
{
int rc;
addr);
return (rc);
}
int
{
return (-1); /* errno is set for us */
return (0);
}
int
{
return (-1); /* errno is set for us */
return (0);
}
void
{
}
void
{
}
void
{
}
int
{
}
void
{
if (kmdb_dpi_state != DPI_STATE_LOST) {
}
}
int
{
return (kmdb_dpi_state);
}
void
{
}