cmd_memerr_arch.c revision 31e37bb439502e3f7c4c0a9a77d655ea5d56887a
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Ereport-handling routines for memory errors
*/
#include <cmd_mem.h>
#include <cmd_dimm.h>
#include <cmd_bank.h>
#include <cmd_page.h>
#include <cmd_cpu.h>
#include <cmd.h>
#include <assert.h>
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/errclassify.h>
#include <sys/niagararegs.h>
extern ldom_hdl_t *cpumem_diagnosis_lhp;
static void *
{
}
static void
{
}
/*ARGSUSED*/
{
/*
* Niagara writebacks from L2 containing UEs are placed in memory
* with the poison syndrome NI_DRAM_POISON_SYND_FROM_LDWU.
* Memory UE ereports showing this syndrome are dropped because they
* indicate an L2 problem, which should be diagnosed from the
* corresponding L2 cache ereport.
*/
if (synd == NI_DRAM_POISON_SYND_FROM_LDWU) {
"discarding UE due to magic syndrome %x\n",
synd);
return (CMD_EVD_UNUSED);
}
}
return (CMD_EVD_OK);
}
/*
* sun4v's xe_common routine has an extra argument, clcode, compared
* to routine of same name in sun4u.
*/
static cmd_evdisp_t
{
char *typenm;
int minorvers = 1;
if (nvlist_lookup_pairs(nvl, 0,
&l2_afar,
NULL) != 0)
return (CMD_EVD_BAD);
/*
* Niagara afar and synd validity.
* For a given set of error registers, the payload value is valid if
* no higher priority error status bit is set. See UltraSPARC-T1.h for
* error status bit values and priority settings. Note that for DAC
* and DAU, afar value is taken from l2 error registers, syndrome
* from dram error * registers; for DSC and DSU, both afar and
* syndrome are taken from dram * error registers. DSU afar and
* syndrome are always valid because no
* higher priority error will override.
*/
switch (clcode) {
case CMD_ERRCL_DAC:
break;
case CMD_ERRCL_DSC:
break;
case CMD_ERRCL_DAU:
break;
case CMD_ERRCL_DSU:
break;
default:
clcode);
return (CMD_EVD_UNUSED);
}
&disp) != 0)
minorvers = 0;
}
/*ARGSUSED*/
{
}
/*ARGSUSED*/
{
}
/*ARGSUSED*/
{
return (CMD_EVD_UNUSED);
}
/*ARGSUSED*/
{
/*
* return the total physical memory in pages
*/
if (cpumem_hdl == NULL) {
cpumem_hdl = hdl;
}
if (bufsiz > 0) {
}
return (0);
for (i = 0; i < nmblocks; i++) {
physmem = 0;
break;
}
}
}