/*
* 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
*/
/*
*/
/*
* SPARC64 VI and SPARC64 VII families of processors.
*/
#include <cmd_state.h>
#include <cmd_cpu.h>
#ifdef sun4u
#include <cmd_ecache.h>
#include <cmd_Lxcache.h>
#endif /* sun4u */
#include <cmd_mem.h>
#include <cmd_page.h>
#include <cmd_dimm.h>
#ifdef sun4u
#include <cmd_dp.h>
#include <cmd_opl.h>
#endif
#include <cmd_bank.h>
#include <cmd.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <strings.h>
#ifdef sun4v
#endif
#ifdef sun4u
#endif /* sun4u */
typedef struct cmd_subscriber {
const char *subr_class;
const char *, cmd_errcl_t);
/*ARGSUSED*/
{
return (CMD_EVD_UNUSED);
}
#ifdef sun4u
/*
* It used to be that cmd_opluecpu_detio() was called directly, with a
* 'class' argument of ereport.io.oberon.xxx. But the code underlying
* cmd_opluecpu_detio() assumed that the class would always be of the form
* ereport.cpu.<cputype>.<subclass>.
*
* Rather than generalizing the underlying code, the following adjusts the
* input to cmd_opluecpu_detio() so that it conforms to the above expectation.
*/
/*ARGSUSED*/
{
}
#endif /* sun4u */
#ifdef sun4u
{ "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.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 },
{ "ereport.asic.*.cds.cds-dp", cmd_dp_cds },
{ "ereport.asic.*.dx.dx-dp", cmd_dp_dx },
{ "ereport.asic.*.rp.rp-dp", cmd_dp_cp },
{ "ereport.asic.mac.mi-ue", cmd_opl_mac_common },
{ "ereport.asic.mac.ptrl-ue", cmd_opl_mac_common },
{ "ereport.asic.mac.mi-ce", cmd_opl_mac_common },
{ "ereport.asic.mac.ptrl-ce", cmd_opl_mac_common },
{ "ereport.asic.mac.ptrl-ice", cmd_opl_mac_common },
{ "ereport.asic.mac.mi-cmpe", cmd_opl_mac_common },
{ "ereport.asic.mac.ptrl-cmpe", cmd_opl_mac_common },
{ "ereport.asic.mac.mi-sue", cmd_opl_mac_common },
{ "ereport.asic.mac.ptrl-sue", cmd_opl_mac_common },
{ "ereport.asic.mac.mi-mue", cmd_opl_mac_common },
{ "ereport.asic.mac.ptrl-mue", cmd_opl_mac_common },
{ "ereport.cpu.*.ue-mem", cmd_opl_cpu_mem },
{ "ereport.cpu.*.ue-cpu", cmd_opluecpu_detcpu },
{ "ereport.cpu.*.inv-sfsr", cmd_oplinv_sfsr },
{ "ereport.cpu.*.mtlb", cmd_oplmtlb },
{ "ereport.cpu.*.tlbp", cmd_opltlbp },
{ "ereport.cpu.*.inv-uge", cmd_oplinv_urg },
{ "ereport.cpu.*.cre", cmd_oplcre },
{ "ereport.cpu.*.tsb-ctx", cmd_opltsb_ctx },
{ "ereport.cpu.*.tsbp", cmd_opltsbp },
{ "ereport.cpu.*.pstate", cmd_oplpstate },
{ "ereport.cpu.*.tstate", cmd_opltstate },
{ "ereport.cpu.*.iug-f", cmd_opliug_f },
{ "ereport.cpu.*.iug-r", cmd_opliug_r },
{ "ereport.cpu.*.sdc", cmd_oplsdc },
{ "ereport.cpu.*.wdt", cmd_oplwdt },
{ "ereport.cpu.*.dtlb", cmd_opldtlb },
{ "ereport.cpu.*.itlb", cmd_oplitlb },
{ "ereport.cpu.*.core-err", cmd_oplcore_err },
{ "ereport.cpu.*.dae", cmd_opldae },
{ "ereport.cpu.*.iae", cmd_opliae },
{ "ereport.cpu.*.uge", cmd_opluge },
{ "ereport.io.oberon.ubc.dmarduea-mem", cmd_opl_io_mem },
{ "ereport.io.oberon.ubc.dmarduea-channel", cmd_nop },
{ "ereport.io.oberon.ubc.dmarduea-cpu", opl_opluecpu_detio },
{ "ereport.io.oberon.ubc.dmarduea-path", cmd_nop },
{ "ereport.io.oberon.ubc.dmardueb-mem", cmd_opl_io_mem },
{ "ereport.io.oberon.ubc.dmardueb-channel", cmd_nop },
{ "ereport.io.oberon.ubc.dmardueb-cpu", opl_opluecpu_detio },
{ "ereport.io.oberon.ubc.dmardueb-path", cmd_nop },
{ "ereport.io.oberon.ubc.piowtue-mem", cmd_opl_io_mem },
{ "ereport.io.oberon.ubc.piowtue-channel", cmd_nop },
{ "ereport.io.oberon.ubc.piowtue-cpu", opl_opluecpu_detio },
{ "ereport.io.oberon.ubc.piowtue-path", cmd_nop },
{ "ereport.io.oberon.ubc.piowbeue-mem", cmd_opl_io_mem },
{ "ereport.io.oberon.ubc.piowbeue-channel", cmd_nop },
{ "ereport.io.oberon.ubc.piowbeue-cpu", opl_opluecpu_detio },
{ "ereport.io.oberon.ubc.piowbeue-path", cmd_nop },
{ "ereport.io.oberon.ubc.piorbeue-mem", cmd_opl_io_mem },
{ "ereport.io.oberon.ubc.piorbeue-channel", cmd_nop },
{ "ereport.io.oberon.ubc.piorbeue-cpu", opl_opluecpu_detio },
{ "ereport.io.oberon.ubc.piorbeue-path", cmd_nop },
#else /* i.e. sun4v */
{ "ereport.cpu.*.sbdpc", cmd_miscregs_train,
{ "ereport.cpu.*.sbdlc", cmd_miscregs_train,
{ "ereport.cpu.*.sbdpu", cmd_miscregs_ue,
{ "ereport.cpu.*.sbdlu", cmd_miscregs_ue,
{ "ereport.cpu.*.sbdio", cmd_miscregs_ue,
{ "ereport.cpu.*.sbapp", cmd_miscregs_ue,
{ "ereport.cpu.*.mrau", cmd_miscregs_ue,
{ "ereport.cpu.*.scac", cmd_miscregs_train,
{ "ereport.cpu.*.scau", cmd_miscregs_ue,
{ "ereport.cpu.*.tccp", cmd_miscregs_train,
{ "ereport.cpu.*.tccd", cmd_miscregs_train,
{ "ereport.cpu.*.tcup", cmd_miscregs_ue,
{ "ereport.cpu.*.tcud", cmd_miscregs_ue,
{ "ereport.cpu.*.tsac", cmd_miscregs_train,
{ "ereport.cpu.*.tsau", cmd_miscregs_ue,
{ "ereport.fm.ferg.invalid", cmd_fw_defect },
#endif /* sun4u */
};
static void
{
int disp;
return;
}
}
}
static void
{
switch (timertype) {
case CMD_TIMERTYPE_MEM:
break;
#ifdef sun4u
case CMD_TIMERTYPE_DP:
break;
break;
#endif
break;
default:
break;
}
}
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
{
#ifdef sun4u
#endif
}
{ "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" },
#ifdef sun4u
{ "dp_ignored_ce", FMD_TYPE_UINT64,
"memory CEs ignored due to DP error or fault" },
{ "dp_ignored_ue", FMD_TYPE_UINT64,
"memory UEs ignored due to DP fault" },
{ "dp_deferred_ue", FMD_TYPE_UINT64,
"memory UEs deferred due to DP error" },
#endif
#ifdef sun4v
#endif
};
#ifdef sun4u
#else
#endif
#ifdef sun4u
#else
#endif /* sun4u */
#ifdef sun4v
/* delta_ena value = 0x500000000nsec ~= 22sec */
#endif
};
cmd_recv, /* fmdo_recv */
cmd_timeout, /* fmdo_timeout */
cmd_close, /* fmdo_close */
NULL, /* fmdo_stats */
cmd_gc /* fmdo_gc */
};
};
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
{
#ifdef sun4v
#endif
#ifdef sun4u
#endif
}
#ifdef sun4v
static void *
{
}
static void
{
}
#endif
/* find_auth -- find hardware platform authority within libtopo */
/* ARGSUSED */
static int
{
int err;
return (TOPO_WALK_TERMINATE); /* don't overwrite previous */
return (TOPO_WALK_NEXT); /* no resource, try next */
return (TOPO_WALK_NEXT); /* no authority, try next */
}
return (TOPO_WALK_TERMINATE); /* if no space, give up */
}
/* init_auth -- read hardware platform authority from libtopo */
void
{
int err;
return;
== NULL) {
return;
}
}
void
{
return; /* error in configuration file or fmd_info */
if (cpu_family == CMD_CPU_FAM_UNSUPPORTED) {
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.
*/
#ifdef sun4u
/*
* Subscribe to datapath events
*/
/*
* OPL platform specific subscriptions.
*/
#endif
#ifdef sun4u
#endif /* sun4u */
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++) {
}
}
#ifdef sun4u
if (cmd_cpu_ecache_support() && cmd_ecache_init() < 0) {
}
#endif
"thresh_tpct_sysmem")) > 100000) {
}
"thresh_abs_sysmem");
"thresh_abs_badrw");
#ifdef sun4v
#endif
if (cmd_state_restore(hdl) < 0) {
}
#ifdef sun4v
#endif
}