/*
* 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
*/
/*
*/
/*
* Intel model-specific support. Right now all this conists of is
* to modify the ereport subclass to produce different ereport classes
* so that we can have different diagnosis rules and corresponding faults.
*/
#include <sys/cpu_module_ms_impl.h>
#include <sys/mc_intel.h>
#include <sys/pci_cfgspace.h>
extern int x86gentopo_legacy;
int gintel_ms_support_disable = 0;
int gintel_error_action_return = 0;
int gintel_ms_unconstrained = 0;
int quickpath;
#define CPU_GENERATION_DONT_CARE 0
/*ARGSUSED*/
int
{
return (ENOTSUP);
return (ENOTSUP);
switch (nb_chipset) {
case INTEL_NB_7300:
case INTEL_NB_5000P:
case INTEL_NB_5000X:
case INTEL_NB_5000V:
case INTEL_NB_5000Z:
case INTEL_NB_5400:
case INTEL_NB_5400A:
case INTEL_NB_5400B:
if (!gintel_ms_unconstrained)
break;
case INTEL_QP_IO:
case INTEL_QP_WP:
case INTEL_QP_36D:
case INTEL_QP_24D:
case INTEL_QP_U1:
case INTEL_QP_U2:
case INTEL_QP_U3:
case INTEL_QP_U4:
case INTEL_QP_JF:
case INTEL_QP_JF0:
case INTEL_QP_JF1:
case INTEL_QP_JF2:
case INTEL_QP_JF3:
case INTEL_QP_JF4:
case INTEL_QP_JF5:
case INTEL_QP_JF6:
case INTEL_QP_JF7:
case INTEL_QP_JF8:
case INTEL_QP_JF9:
case INTEL_QP_JFa:
case INTEL_QP_JFb:
case INTEL_QP_JFc:
case INTEL_QP_JFd:
case INTEL_QP_JFe:
case INTEL_QP_JFf:
quickpath = 1;
break;
default:
break;
}
return (0);
}
/*ARGSUSED*/
{
MCAX86_MSERRCODE(status) == 0) {
} else if ((status & MSR_MC_STATUS_PCC) == 0) {
} else {
}
return (rc);
}
/*ARGSUSED*/
{
/*
* memory controller errors
*/
if (mscode & MSCOD_MEM_SPARE_MEM) {
} else if (mscode & (MSCOD_MEM_ECC_READ |
if (status & MSR_MC_STATUS_UC)
else
} else if (mscode & (MSCOD_MEM_WR_PARITY |
} else if (mscode & MSCOD_MEM_ADDR_PARITY) {
} else if (mscode & MSCOD_MEM_REDUNDANT_MEM) {
} else if (mscode & MSCOD_MEM_ILLEGAL_ADDR) {
} else if (mscode & MSCOD_MEM_BAD_ID) {
} else {
}
} else if (quickpath &&
MCAX86_MSERRCODE(status) == 0) {
}
return (rt);
}
/*ARGSUSED*/
void
{
case GINTEL_ERROR_QUICKPATH:
*leafclsp = "quickpath.interconnect";
break;
case GINTEL_ERR_SPARE_MEM:
*leafclsp = "quickpath.mem_spare";
break;
case GINTEL_ERR_MEM_UE:
*leafclsp = "quickpath.mem_ue";
break;
case GINTEL_ERR_MEM_CE:
*leafclsp = "quickpath.mem_ce";
break;
case GINTEL_ERR_MEM_PARITY:
*leafclsp = "quickpath.mem_parity";
break;
*leafclsp = "quickpath.mem_addr_parity";
break;
case GINTEL_ERR_MEM_REDUNDANT:
*leafclsp = "quickpath.mem_redundant";
break;
case GINTEL_ERR_MEM_BAD_ADDR:
*leafclsp = "quickpath.mem_bad_addr";
break;
case GINTEL_ERR_MEM_BAD_ID:
*leafclsp = "quickpath.mem_bad_id";
break;
case GINTEL_ERR_MEM_UNKNOWN:
*leafclsp = "quickpath.mem_unknown";
break;
case GINTEL_ERROR_UNKNOWN:
*leafclsp = "unknown";
break;
}
}
static nvlist_t *
{
if (mscookie) {
if (board_list == NULL)
return (NULL);
return (NULL);
} else {
"memory-controller", 0);
}
}
return (nvl);
}
/*ARGSUSED*/
nvlist_t *
{
if (!x86gentopo_legacy) {
return (nvl);
}
if (mscookie) {
return (NULL);
"motherboard", 0,
} else {
"motherboard", 0,
"memory-controller", 0);
}
}
return (nvl);
}
static nvlist_t *
{
if (board_list == NULL) {
return (NULL);
}
return (NULL);
return (NULL);
}
unump->unum_offset);
board_list, 2,
board_list, 3,
board_list, 4,
} else {
board_list, 5,
}
return (nvl);
}
static nvlist_t *
{
return (NULL);
return (NULL);
}
unump->unum_offset);
} else {
}
return (nvl);
}
static void
{
int index;
}
static int
{
return (cpu_generation);
}
/*ARGSUSED*/
void
{
int chipid;
if (chan == 0xf)
chan = -1;
unum.unum_board = 0;
if (status & MSR_MC_STATUS_MISCV) {
(misc & MSR_MC_MISC_MEM_CHANNEL_MASK) >>
(misc & MSR_MC_MISC_MEM_DIMM_MASK) >>
DATA_TYPE_UINT32, synd, 0);
}
if (status & MSR_MC_STATUS_ADDRV) {
}
}
if (!x86gentopo_legacy) {
} else {
&unum);
}
if (chipid < MAX_CPU_NODES) {
NULL);
NULL);
}
}
}
}
{
/*
* On Intel family 6 before QuickPath we must not enable machine check
* from bank 0 detectors. bank 0 is reserved for the platform
*/
if (banknum == 0 &&
return (1);
else
return (0);
}
gintel_init, /* cms_init */
NULL, /* cms_post_startup */
NULL, /* cms_post_mpstartup */
NULL, /* cms_logout_size */
NULL, /* cms_mcgctl_val */
gintel_bankctl_skipinit, /* cms_bankctl_skipinit */
NULL, /* cms_bankctl_val */
NULL, /* cms_bankstatus_skipinit */
NULL, /* cms_bankstatus_val */
NULL, /* cms_mca_init */
NULL, /* cms_poll_ownermask */
NULL, /* cms_bank_logout */
gintel_error_action, /* cms_error_action */
gintel_disp_match, /* cms_disp_match */
gintel_ereport_class, /* cms_ereport_class */
gintel_ereport_detector, /* cms_ereport_detector */
NULL, /* cms_ereport_includestack */
gintel_ereport_add_logout, /* cms_ereport_add_logout */
NULL, /* cms_msrinject */
NULL, /* cms_fini */
};
"Generic Intel model-specific MCA"
};
(void *)&modlcpu,
};
int
_init(void)
{
return (mod_install(&modlinkage));
}
int
{
}
int
_fini(void)
{
return (mod_remove(&modlinkage));
}