cmd_memerr_arch.c revision 6dfee4834394825da35b977ca71cdc965bc7b6a4
/*
* 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"
/*
* 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 <strings.h>
#include <string.h>
#include <errno.h>
#include <sys/cheetahregs.h>
#include <sys/errclassify.h>
/* Jalapeno-specific values from cheetahregs.h */
#define USIIIi_AFSR_AID_SHIFT 9
#define USIIIi_AFSR_JREQ_SHIFT 24
#define TOM_AID_MATCH_MASK 0xe
/*ARGSUSED*/
{
if (synd == CH_POISON_SYND_FROM_XXU_WRITE ||
"discarding UE due to magic syndrome %x\n", synd);
return (CMD_EVD_UNUSED);
}
return (CMD_EVD_OK);
}
static cmd_evdisp_t
{
char *typenm;
int minorvers = 1;
if (nvlist_lookup_pairs(nvl, 0,
NULL) != 0)
return (CMD_EVD_BAD);
&disp) != 0)
minorvers = 0;
}
/*ARGSUSED*/
{
}
/*ARGSUSED*/
{
}
{
}
/*
* create either a CE or a UE, as appropriate. Before dispatching the
* joined event to the xE handler, we need to generate the FMRI for the
* named DIMM. While one of the events may already contain a resource FMRI,
* said FMRI is incomplete. The detector didn't have the necessary
* information (the AFAR, the AFSR, *and* the syndrome) needed to create
* a DIMM-level FMRI.
*/
static cmd_evdisp_t
{
int rc;
return (CMD_EVD_UNUSED);
return (rc);
}
static cmd_iorxefrx_t *
{
"rf->rf_det_agentid = %lx, afsr_agentid = %lx\n"
"rf->rf_afsr_agentid = %lx, det_agentid = %lx\n",
continue;
/*
* For IOxEs we are unable to match based on both the detector
* and the captured Agent Id in the AFSR, because the bridge
* captures it's own Agent Id instead of the remote CPUs.
*
* Also, the LSB of Tomatillo's jpid is aliased for each chip
* and therefore needs to be factored out of our matching.
*/
CMD_ERRCL_ISIOXE(errcl)) &&
return (rf);
/*
* Check for both here since IOxE is not involved
*/
return (rf);
}
return (NULL);
}
/*
* Got an RxE or an FRx. FRx ereports can be matched with RxE ereports and
* vice versa. FRx ereports can also be matched with IOxE ereports.
*/
{
char *typenm;
int rc;
int minorvers = 1;
if (nvlist_lookup_pairs(nvl, 0,
NULL) != 0) {
return (CMD_EVD_BAD);
}
minorvers = 0;
return (CMD_EVD_UNUSED);
}
return (CMD_EVD_UNUSED);
}
if (isrxe) {
} else {
}
return (CMD_EVD_OK);
}
/*
* Found a match. Send a synthesized ereport to the appropriate
* routine.
*/
if (isrxe) {
hdlr);
} else {
hdlr);
}
return (rc);
}
static cmd_evdisp_t
{
char *typenm;
char *portid_str;
int rc;
int minorvers = 1;
if (nvlist_lookup_pairs(nvl, 0,
NULL) != 0) {
return (CMD_EVD_BAD);
}
minorvers = 0;
/*
* Lookup device path of host bridge.
*/
/*
* get Jbus port id from the device path
*/
/*
* Only 4 bits of the Jbus AID are sent on the Jbus. MSB is the one
* that is chosen not to make the trip. This is not in any of the Jbus
* or Tomatillo documents and was discovered during testing and verified
* by Jalapeno H/W designer.
*/
/*
* Need to send in the io_jpid that we get from the device path above
* for both the det_agentid and the afsr_agentid, since the CPU does not
* capture the same address as the bridge. The bridge has the LSB
* aliased and the CPU is missing the MSB.
*/
return (CMD_EVD_OK);
}
return (rc);
}
/* IOxE ereports that don't need matching with FRx ereports */
static cmd_evdisp_t
{
char *typenm;
int minorvers = 1;
if (nvlist_lookup_pairs(nvl, 0,
NULL) != 0)
return (CMD_EVD_BAD);
minorvers = 0;
rsrc));
}
{
}
{
matchmask));
} else
}
/*ARGSUSED*/
{
/*
* Secondary IOxE's can't be used to identify failed or failing
* resources, as they don't contain enough information. Ignore them.
*/
return (CMD_EVD_OK);
}