/*
* 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"
/*
* ddi_dki_impl.c - A pseudo-kernel to use when analyzing drivers with warlock.
*
* The main idea here is to represent all of the ways that the kernel can
* call into the driver, so that warlock has the correct view of the call
* graph.
*
* This version differs from ddi_dki_spec.c in that it represents the
*/
#include "ddi_dki_comm.inc"
int warlock_dummy(void);
int _init(void);
int _fini(void);
int scsi_init(void);
int main(void) {
/*
* The following call will cause warlock to know about
* warlock_dummy as a func that can be used to satisfy
* unbound function pointers. It shouldn't be needed
* with the new warlock on suntools.
*/
/*
* When the following functions are called, there is never
* more than one thread running in the driver.
*/
_init();
_fini();
_info(0);
(*devops_p->devo_identify)(0);
(*devops_p->devo_probe)(0);
(*devops_p->devo_attach)(0, 0);
/*
* When the following functions are called, there may be
* more than one thread running in the driver.
*/
scsi_init();
(*devops_p->devo_getinfo)(0, 0, 0, 0);
(*devops_p->devo_reset)(0, 0);
(*devops_p->devo_power)(0, 0, 0);
(*cbops_p->cb_strategy)(0);
(*cbops_p->cb_prop_op)(0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_get_intrspec)(0, 0, 0);
(*busops_p->bus_add_intrspec)(0, 0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_remove_intrspec)(0, 0, 0, 0);
(*busops_p->bus_map_fault)(0, 0, 0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_dma_map)(0, 0, 0, 0);
(*busops_p->bus_dma_allochdl)(0, 0, 0, 0, 0, 0);
(*busops_p->bus_dma_freehdl)(0, 0, 0);
(*busops_p->bus_dma_bindhdl)(0, 0, 0, 0, 0, 0);
(*busops_p->bus_dma_unbindhdl)(0, 0, 0);
(*busops_p->bus_dma_flush)(0, 0, 0, 0, 0, 0);
(*busops_p->bus_dma_win)(0, 0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_dma_ctl)(0, 0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_prop_op)(0, 0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_get_eventcookie)(0, 0, 0, 0);
(*busops_p->bus_add_eventcall)(0, 0, 0, 0, 0, 0);
(*busops_p->bus_remove_eventcall)(0, 0);
(*busops_p->bus_post_event)(0, 0, 0, 0);
(*busops_p->bus_intr_ctl)(0, 0, 0, 0, 0);
(*busops_p->bus_config)(0, 0, 0, 0, 0);
(*busops_p->bus_unconfig)(0, 0, 0, 0);
#ifndef __lock_lint
/* this causes warnings and it is unclear how to handle this */
(*busops_p->bus_fm_init)(0, 0, 0, 0);
(*busops_p->bus_fm_fini)(0, 0);
(*busops_p->bus_fm_access_enter)(0, 0);
(*busops_p->bus_fm_access_exit)(0, 0);
(*busops_p->bus_intr_op)(0, 0, 0, 0, 0);
#endif
ndi_devi_offline(0, 0);
}
/* Power managment framework calls */
int
{
(*devops_p->devo_power)(0, 0, 0);
}
int
(*devops_p->devo_power)(0, 0, 0);
}
int
(*devops_p->devo_power)(0, 0, 0);
}
void
{
mutex_enter(&mutex);
mutex_exit(&mutex);
}
void
{
mutex_enter(&mutex);
mutex_exit(&mutex);
}
int
(*busops_p->bus_dma_ctl)(0, 0, 0, 0, 0, 0, 0, 0);
(*busops_p->bus_get_eventcookie)(0, 0, 0, 0);
(*busops_p->bus_add_eventcall)(0, 0, 0, 0, 0, 0);
(*busops_p->bus_remove_eventcall)(0, 0);
(*busops_p->bus_post_event)(0, 0, 0, 0);
(*busops_p->bus_unconfig)(0, 0, 0, 0);
}
int
(*busops_p->bus_config)(0, 0, 0, 0, 0);
}