intel_nb5000.c revision 5de8e333fea6455895155795aae363a0737b8e8e
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/controlregs.h>
#include <sys/sysevent.h>
#include <sys/pci_cfgspace.h>
#include <sys/mc_intel.h>
#include <sys/cpu_module_impl.h>
#include "nb5000.h"
#include "nb_log.h"
#include "dimm_phys.h"
static nb_logout_t nb_log;
struct mch_error_code {
int intel_error_list; /* error number in Chipset Error List */
};
static struct mch_error_code fat_fbd_error_code[] = {
};
static int
{
int rt = -1;
int nerr = 0;
int i;
int sz;
for (i = 0; i < sz; i++) {
nerr++;
}
}
if (emask_fbd)
if (nerr > 1)
rt = -1;
return (rt);
}
static char *
{
int channel;
char *intr = "nb.unknown";
if ((ferr_fat_fbd & ERR_FAT_FBD_MASK) == 0) {
return (intr);
}
if ((ferr_fat_fbd & ERR_FAT_FBD_M1) != 0)
else
} else {
if ((ferr_fat_fbd & ERR_FAT_FBD_M3) != 0)
else if ((ferr_fat_fbd & ERR_FAT_FBD_M23) != 0) {
intr = "nb.fbd.reset_timeout";
}
}
return (intr);
}
static struct mch_error_code nf_fbd_error_code[] = {
};
static int
{
int rt = -1;
int nerr = 0;
int i;
int sz;
for (i = 0; i < sz; i++) {
nerr++;
}
}
if (emask_fbd)
if (nerr > 1)
rt = -1;
return (rt);
}
static char *
{
char *intr = "nb.unknown";
if ((ferr_nf_fbd & ERR_NF_FBD_MASK) == 0) {
return (intr);
}
if (ferr_nf_fbd & ERR_NF_FBD_MASK) {
if (ferr_nf_fbd & ERR_NF_FBD_ECC_UE) {
/*
* uncorrectable ECC M4 - M12
* we can only isolate to pair of dimms
* for single dimm configuration let eversholt
* sort it out with out needing a special rule
*/
intr = "nb.mem_ue";
} else if (ferr_nf_fbd & ERR_NF_FBD_M13) {
/*
* write error M13
* we can only isolate to pair of dimms
*/
if (nb_mode != NB_MEMORY_MIRROR) {
}
} else if ((ferr_nf_fbd & ERR_NF_FBD_ECC_CE) != 0) {
/* correctable ECC M17-M20 */
if (ecc_locator & 0x1ff)
else if (ecc_locator & 0x3fe00)
intr = "nb.mem_ce";
} else if ((ferr_nf_fbd & ERR_NF_FBD_SPARE) != 0) {
/* spare dimm M27, M28 */
intr = "nb.mem_ds";
}
}
}
}
return (intr);
}
static struct mch_error_code fat_int_error_code[] = {
};
static struct mch_error_code nf_int_error_code[] = {
};
static int
{
int rt = -1;
int nerr = 0;
int i;
int sz;
for (i = 0; i < sz; i++) {
nerr++;
}
}
for (i = 0; i < sz; i++) {
nerr++;
}
}
if (emask_int)
if (nerr > 1)
rt = -1;
return (rt);
}
static void
{
int t = 0;
*interpose |= t;
*interpose |= t;
*interpose |= t;
/* if interpose write read-only registers to clear from pcii cache */
if (*interpose) {
NRECINT_WR();
RECINT_WR();
NRECSF_WR();
RECSF_WR();
}
}
static void
{
}
static struct mch_error_code fat_fsb_error_code[] = {
};
static struct mch_error_code nf_fsb_error_code[] = {
};
static int
{
int rt = -1;
int nerr = 0;
int i;
int sz;
for (i = 0; i < sz; i++) {
nerr++;
}
}
for (i = 0; i < sz; i++) {
nerr++;
}
}
if (emask_fsb)
if (nerr > 1)
rt = -1;
return (rt);
}
static void
{
int t = 0;
*interpose |= t;
*interpose |= t;
*interpose |= t;
/* if interpose write read-only registers to clear from pcii cache */
if (*interpose) {
}
}
static struct mch_error_code fat_pex_error_code[] = {
{ 0, EMASK_UNCOR_PEX_IO0, PEX_FAT_IO0 }
};
static struct mch_error_code fat_rp_error_code[] = {
};
static struct mch_error_code uncor_pex_error_code[] = {
{ 0, EMASK_UNCOR_PEX_IO0, PEX_NF_IO0 }
};
static struct mch_error_code cor_pex_error_code[] = {
{ 10, 0, PEX_NF_IO10 },
{ 2, 0, PEX_NF_IO2 }
};
static struct mch_error_code rp_pex_error_code[] = {
};
static int
{
int rt = -1;
int nerr = 0;
int i;
int sz;
for (i = 0; i < sz; i++) {
nerr++;
}
}
for (i = 0; i < sz; i++) {
nerr++;
}
}
for (i = 0; i < sz; i++) {
nerr++;
}
}
for (i = 0; i < sz; i++) {
nerr++;
}
}
for (i = 0; i < sz; i++) {
nerr++;
}
}
if (nerr > 1)
rt = -1;
return (rt);
}
static void
{
int t = 0;
*interpose |= t;
*interpose |= t;
*interpose |= t;
else
if (*interpose)
PEXDEVSTS_WR(pex, 0);
}
static void
{
int t = 0;
*interpose |= t;
/* if interpose write read-only registers to clear from pcii cache */
if (*interpose) {
NRECMEMA_WR();
NRECMEMB_WR();
NRECFGLOG_WR();
NRECFBDA_WR();
NRECFBDB_WR();
NRECFBDC_WR();
NRECFBDD_WR();
NRECFBDE_WR();
}
}
static void
{
int t = 0;
*interpose |= t;
/* if interpose write read-only registers to clear from pcii cache */
if (*interpose) {
RECMEMA_WR();
RECMEMB_WR();
RECFGLOG_WR();
RECFBDA_WR();
RECFBDB_WR();
RECFBDC_WR();
RECFBDD_WR();
RECFBDE_WR();
}
}
static void
{
int interpose = 0;
} else if ((ferr & GE_FBD_FATAL) != 0) {
}
if (interpose)
else
}
static void
{
int interpose = 0;
} else if ((err & GE_NERR_FBD_FATAL) != 0) {
} else if ((err & GE_NERR_FBD_NF) != 0) {
}
if (interpose)
else
}
/*ARGSUSED*/
void
{
int nmc = 0;
int i;
if (mutex_tryenter(&nb_mutex) == 0)
return;
nerr = NERR_GLOBAL_RD();
for (i = 0; i < NB_MAX_ERRORS; i++) {
ferr = FERR_GLOBAL_RD();
if (ferr) {
nmc++;
} else if (err) {
nmc++;
}
}
if (nerr) {
}
if (nmc == 0 && nb_mask_mc_set)
}
static void
{
int intel_error_list;
char buf[32];
if (intel_error_list >= 0)
else
}
static void
{
int intel_error_list;
char buf[32];
if (intel_error_list >= 0)
else
}
static void
{
int intel_error_list;
char buf[32];
if (intel_error_list >= 0)
else
}
static void
{
char buf[32];
}
}
}
if (sp->intel_error_list >= 0)
else
}
static void
{
char buf[32];
}
}
}
}
if (sp->intel_error_list >= 0)
else
}
static void
{
}
static void
{
case NB_REG_LOG_FSB:
break;
case NB_REG_LOG_PEX:
break;
case NB_REG_LOG_INT:
break;
case NB_REG_LOG_FAT_FBD:
break;
case NB_REG_LOG_NF_FBD:
break;
case NB_REG_LOG_DMA:
break;
default:
break;
}
}
void
{
int chip;
if (nb_chipset == INTEL_NB_7300)
else
} else {
}
}
void
{
int hostbridge;
"motherboard", 0);
} else {
"motherboard", 0,
"hostbridge", hostbridge);
}
} else {
}
} else {
}
}
void
void *data)
{
"motherboard", 0);
} else {
}
}
void
void *data)
{
char *intr;
"motherboard", 0,
"motherboard", 0,
"motherboard", 0,
} else {
"motherboard", 0);
}
}
void
void *data)
{
char *intr;
"motherboard", 0,
"motherboard", 0,
"motherboard", 0,
} else {
"motherboard", 0);
}
}
void
{
"motherboard", 0);
}
nvlist_t *
{
case NB_REG_LOG_FSB:
break;
case NB_REG_LOG_PEX:
break;
case NB_REG_LOG_INT:
break;
case NB_REG_LOG_FAT_FBD:
break;
case NB_REG_LOG_NF_FBD:
break;
case NB_REG_LOG_DMA:
break;
default:
"motherboard", 0);
}
return (detector);
}
/*ARGSUSED*/
void
{
char buf[FM_MAX_CLASS];
if (panicstr) {
return;
/*
* Now try to allocate another element for scratch space and
* use that for further scratch space (eg for constructing
* nvlists to add the main ereport). If we can't reserve
* a scratch element just fallback to working within the
* element we already have, and hope for the best. All this
* is necessary because the fixed buffer nv allocator does
* not reclaim freed space and nvlist construction is
* expensive.
*/
else
} else {
}
return;
/*
* We're done with 'detector' so reclaim the scratch space.
*/
if (panicstr) {
} else {
}
/*
* Encode the error-specific data that was saved in the logout area.
*/
if (panicstr) {
if (scr_eqep)
} else {
}
}