scfsnap.c revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* 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
*/
/*
* All Rights Reserved, Copyright (c) FUJITSU LIMITED 2006
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef DEBUG
/*
* Function list
*/
int snap_size);
/*
* External function
*/
extern scf_dscp_comtbl_t scf_dscp_comtbl;
/*
* scf_snapshotsize()
*/
int
{
#define SCF_FUNC_NAME "scf_snapshotsize() "
int snap_size;
int ret = 0;
sizeof (scfsnapsize_t), mode) != 0) {
goto END_snapshotsize;
}
if (snap_size == (-1)) {
"dbg_snap", 8);
goto END_snapshotsize;
}
sizeof (scfsnapsize_t), mode) != 0) {
"dbg_snap", 8);
}
} else {
}
/*
* END_snapshotsize
*/
return (ret);
}
/*
* scf_get_snapize()
*/
int
{
#define SCF_FUNC_NAME "scf_get_snapize() "
int wk_size;
int ii;
int snap_driver_size;
int snap_register_size;
int snap_sram_size;
int ret = 0;
if (info == SCFSNAPINFO_AUTO) {
}
} else {
ret = (-1);
goto END_get_snapize;
}
/* Set driver area size */
wk_size = sizeof (scfsnap_value_t) +
wk_size = sizeof (scfsnap_value_t) +
wk_size = sizeof (scf_comtbl_t);
wk_size = sizeof (scfsnap_value_t) +
wk_size = sizeof (scf_state_t);
wk_size = sizeof (scfsnap_value_t) +
}
wk_size = sizeof (scf_dscp_comtbl_t);
wk_size = sizeof (scfsnap_value_t) +
wk_size = sizeof (scfsnap_value_t) +
}
wk_size = sizeof (scfsnap_value_t) +
}
wk_size = sizeof (scfsnap_value_t) +
}
wk_size = sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
wk_size = sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
}
/* Set register area size */
wk_size = sizeof (scfsnap_value_t) +
} else {
snap_register_size = 0;
}
/* Set sram area size */
wk_size = sizeof (scf_dscp_sram_t) +
wk_size = sizeof (scfsnap_value_t) +
} else {
snap_sram_size = 0;
}
switch (type) {
case SCFSNAPTYPE_ALL:
/* Set all area snap size */
} else {
}
break;
case SCFSNAPTYPE_DRIVER:
/* Set driver area snap size */
break;
case SCFSNAPTYPE_REGISTER:
/* Set register area snap size */
break;
case SCFSNAPTYPE_SRAM:
/* Set use SRAM area snap size */
break;
default:
/* Invalid parameter */
ret = (-1);
break;
}
/*
* END_get_snapize
*/
return (ret);
}
/*
* scf_snapshot()
*/
int
{
#define SCF_FUNC_NAME "scf_snapshot() "
int snap_size;
int ret = 0;
#ifdef _MULTI_DATAMODEL
case DDI_MODEL_ILP32:
sizeof (scfsnap32_t), mode) != 0) {
"dbg_snap", 8);
goto END_snapshot;
}
break;
case DDI_MODEL_NONE:
"dbg_snap", 8);
goto END_snapshot;
}
break;
}
#else /* ! _MULTI_DATAMODEL */
goto END_snapshot;
}
#endif /* _MULTI_DATAMODEL */
if (snap_size == (-1)) {
"dbg_snap", 8);
goto END_snapshot;
}
if (snap_size != 0) {
} else {
}
} else {
}
if (ret == 0) {
#ifdef _MULTI_DATAMODEL
case DDI_MODEL_ILP32:
if (ddi_copyout((void *)scfsnap_p,
"dbg_snap", 8);
}
break;
case DDI_MODEL_NONE:
if (ddi_copyout((void *)scfsnap_p,
(void *)scfsnap.ss_entries,
"dbg_snap", 8);
}
break;
}
#else /* ! _MULTI_DATAMODEL */
"dbg_snap", 8);
}
#endif /* _MULTI_DATAMODEL */
}
/*
* END_snapshot
*/
if (scfsnap_p) {
}
return (ret);
}
/*
* scf_get_snap()
*/
int
{
#define SCF_FUNC_NAME "scf_get_snap() "
int wk_size;
int wk_nextoff;
int exec_model;
int ii;
int ret = 0;
#ifdef _MULTI_DATAMODEL
#else /* ! _MULTI_DATAMODEL */
#endif /* _MULTI_DATAMODEL */
goto END_get_snap;
}
if (info == SCFSNAPINFO_AUTO) {
}
} else {
goto END_get_snap;
}
snap_p = snap_top_p;
wk_nextoff = 0;
/* Set driver vl area */
wk_size = sizeof (SCF_DRIVER_VERSION);
if (wk_size > DRV_ID_SIZE) {
}
wk_nextoff += (sizeof (scfsnap_value_t) +
bcopy((void *)SCF_DRIVER_VERSION,
/* Set driver timer area */
wk_nextoff += (sizeof (scfsnap_value_t) +
/* Set driver common area */
wk_size = sizeof (scf_comtbl);
wk_nextoff += (sizeof (scfsnap_value_t) +
/* Set device area */
wk_size = sizeof (scf_state_t);
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
/* Set driver DSCP common area */
wk_size = sizeof (scf_dscp_comtbl_t);
wk_nextoff += (sizeof (scfsnap_value_t) +
/* Set driver DSCP TxDSC area */
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
/* Set driver DSCP RxDSC area */
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
/* Set driver DSCP Tx SRAM area */
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
/* Set driver DSCP Event data area */
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
/* Set driver DSCP Recv data area */
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
}
}
/* Set register area */
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
} else {
if (type == SCFSNAPTYPE_REGISTER) {
}
}
}
/* Set use SRAM area */
wk_size = sizeof (scf_dscp_sram_t) +
sizeof (scf_sys_sram_t) +
wk_nextoff += (sizeof (scfsnap_value_t) +
((wk_size + SCF_S_CNT_15) &
}
}
}
} else {
if (type == SCFSNAPTYPE_SRAM) {
}
}
}
/*
* END_get_snap
*/
return (ret);
}
#endif /* DEBUG */