simmstat.h revision 29949e866e40b95795203f3ee46f44a197c946e4
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 1998 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifndef _SYS_SIMMSTAT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define _SYS_SIMMSTAT_H
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ifdef __cplusplus
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern "C" {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* useful debugging stuff */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SIMMSTAT_ATTACH_DEBUG 0x1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SIMMSTAT_REGISTERS_DEBUG 0x2
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * OBP supplies us with 1 register set for the simm-staus node, so
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * we do not need multiple register set number defines and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * register offsets.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* Use predefined strings to name the kstats from this driver. */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SIMMSTAT_KSTAT_NAME "simm-status"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* Number of SIMM slots in Sunfire System Board */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SIMM_COUNT 16
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if defined(_KERNEL)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstruct simmstat_soft_state {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin dev_info_t *dip; /* dev info of myself */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin dev_info_t *pdip; /* dev info of my parent */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin int board; /* Board number for this FHC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* Mapped addresses of registers */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin volatile uchar_t *simmstat_base; /* base of simmstatus registers */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin kstat_t *simmstat_ksp;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _KERNEL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner#ifdef __cplusplus
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#endif /* _SYS_SIMMSTAT_H */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin