/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_MCA_AMD_H
#define _SYS_MCA_AMD_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Constants for the Machine Check Architecture as implemented on AMD CPUs.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Data Cache (DC) bank error-detection enabling bits and CTL register
* initializer value.
*/
#define AMD_DC_CTL_INIT_CMN \
/*
* Instruction Cache (IC) bank error-detection enabling bits and CTL register
* initializer value.
*
* The Northbridge will handle Read Data errors. Our initializer will enable
* all but the RDDE detector.
*/
#define AMD_IC_CTL_INIT_CMN \
/*
* Bus Unit (BU) bank error-detection enabling bits and CTL register
* initializer value.
*
* The Northbridge will handle Read Data errors. Our initializer will enable
* all but the S_RDE_* detectors.
*/
#define AMD_BU_CTL_INIT_CMN \
/*
* initializer value.
*
* The Northbridge will handle Read Data errors. That's the only type of
* error the LS unit can detect at present, so we won't be enabling any
* LS detectors.
*/
/*
* NorthBridge (NB) MCi_MISC - DRAM Errors Threshold Register.
*/
/*
* The Northbridge (NB) is configured using both the standard MCA CTL register
* and a NB-specific configuration register (NB CFG). The AMD_NB_EN_* macros
* are the detector enabling bits for the NB MCA CTL register. The
* AMD_NB_CFG_* bits are for the NB CFG register.
*
* The CTL register can be initialized statically, but portions of the NB CFG
* register must be initialized based on the current machine's configuration.
*
* The MCA NB Control Register maps to MC4_CTL[31:0], but we initialize it
* via and MSR write of 64 bits so define all as ULL.
*
*/
/*
* NB MCA Configuration register
*/
/*
* We do not initialize the NB config with an absolute value; instead we
* selectively add some bits and remove others. Note that
* AMD_NB_CFG_{ADD,REMOVE}_{CMN,REV_FG} below are not the whole
* story here - additional config is performed regarding the watchdog (see
* ao_mca.c for details).
*/
/*
* The AMD extended error code is just one nibble of the upper 16 bits
* of the bank status (the resy being used for syndrome etc). So we use
* AMD_EXT_ERRCODE to retrieve that extended error code, not the generic
* MCAX86_MSERRCODE.
*/
/* syndrome[7:0] */
AMD_BANK_SYND((stat)))
#define AMD_SYNDTYPE_ECC 0
#define AMD_NB_SCRUBCTL_DRAM_SHIFT 0
#define AMD_NB_SCRUBCTL_RATE_NONE 0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MCA_AMD_H */