cmd_main.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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"
/*
* processors.
*/
#include <cmd_state.h>
#include <cmd_cpu.h>
#include <cmd_ecache.h>
#include <cmd_mem.h>
#include <cmd_page.h>
#include <cmd_dimm.h>
#include <cmd_bank.h>
#include <cmd.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <strings.h>
#include <sys/cheetahregs.h>
typedef struct cmd_subscriber {
const char *subr_class;
const char *, cmd_errcl_t);
static cmd_subscriber_t cmd_subscribers[] = {
{ "ereport.cpu.*.ipe", cmd_icache },
{ "ereport.cpu.*.idspe", cmd_icache },
{ "ereport.cpu.*.itspe", cmd_icache },
{ "ereport.cpu.*.dpe", cmd_dcache },
{ "ereport.cpu.*.ddspe", cmd_dcache },
{ "ereport.cpu.*.dtspe", cmd_dcache },
{ "ereport.cpu.*.pdspe", cmd_pcache },
{ "ereport.cpu.*.l3-thce", cmd_l3_thce },
{ "ereport.io.*.ecc.s-drce", cmd_ioxe_sec },
{ "ereport.io.*.ecc.s-dwce", cmd_ioxe_sec },
{ "ereport.io.*.ecc.s-drue", cmd_ioxe_sec },
{ "ereport.io.*.ecc.s-dwue", cmd_ioxe_sec },
};
static void
{
int disp;
return;
}
}
}
static void
{
if (CMD_TIMERTYPE_ISCPU(arg))
else
}
static void
{
/*
* Our active cases all have closers registered in case-specific data.
* Cases in the process of closing (for which we've freed all associated
* data, but which haven't had an fmd-initiated fmdo_close callback)
* have had their case-specific data nulled out.
*/
}
static void
{
}
static const cmd_stat_t cmd_stats = {
{ "ce_psticky_noptnr", FMD_TYPE_UINT64,
"possibly sticky CEs, no partner test" },
{ "ce_psticky_ptnrnoerr", FMD_TYPE_UINT64,
"possibly sticky CEs, partner sees no CE" },
{ "ce_psticky_ptnrclrd", FMD_TYPE_UINT64,
"possibly sticky CEs, partner can clear CE" },
};
static const fmd_prop_t fmd_props[] = {
};
static const fmd_hdl_ops_t fmd_ops = {
cmd_recv, /* fmdo_recv */
cmd_timeout, /* fmdo_timeout */
cmd_close, /* fmdo_close */
NULL, /* fmdo_stats */
cmd_gc /* fmdo_gc */
};
static const fmd_hdl_info_t fmd_info = {
};
static const struct cmd_evdisp_name {
const char *evn_name;
const char *evn_desc;
} cmd_evdisp_names[] = {
{ "%s", "ok %s ereports" }, /* CMD_EVD_OK */
{ "bad_%s", "bad %s ereports" }, /* CMD_EVD_BAD */
{ "unused_%s", "unused %s ereports" }, /* CMD_EVD_UNUSED */
{ "redun_%s", "redundant %s ereports" }, /* CMD_EVD_REDUN */
};
void
{
}
void
{
return; /* error in configuration file or fmd_info */
if (!cmd_cpu_check_support()) {
return;
}
/*
* Need to subscribe to secondary I/O ECC ereports, but
* since they contain no data regarding the failure we
* are unable to do anything with them.
*/
sizeof (cmd_stats) / sizeof (fmd_stat_t),
(fmd_stat_t *)&cmd_stats);
int i;
for (i = 0; i < sizeof (cmd_evdisp_names) /
sizeof (struct cmd_evdisp_name); i++) {
}
}
if (cmd_ecache_init() < 0) {
}
"thresh_tpct_sysmem")) > 100000) {
}
"thresh_abs_sysmem");
"thresh_abs_badrw");
if (cmd_state_restore(hdl) < 0) {
}
}