#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/slab.h>
#include <linux/mmzone.h>
#include <linux/edac.h>
#include <linux/bitfield.h>
#include <asm/cpu_device_id.h>
#include <asm/msr.h>
#include "edac_module.h"
#include "mce_amd.h"
#define amd64_info(fmt, arg...) …
#define amd64_warn(fmt, arg...) …
#define amd64_err(fmt, arg...) …
#define amd64_mc_warn(mci, fmt, arg...) …
#define amd64_mc_err(mci, fmt, arg...) …
#define EDAC_MOD_STR …
#define K8_REV_D …
#define K8_REV_E …
#define K8_REV_F …
#define NUM_CHIPSELECTS …
#define DRAM_RANGES …
#define NUM_CONTROLLERS …
#define ON …
#define OFF …
#define PCI_DEVICE_ID_AMD_15H_NB_F1 …
#define PCI_DEVICE_ID_AMD_15H_NB_F2 …
#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F1 …
#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F2 …
#define PCI_DEVICE_ID_AMD_15H_M60H_NB_F1 …
#define PCI_DEVICE_ID_AMD_15H_M60H_NB_F2 …
#define PCI_DEVICE_ID_AMD_16H_NB_F1 …
#define PCI_DEVICE_ID_AMD_16H_NB_F2 …
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F1 …
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F2 …
#define DRAM_BASE_LO …
#define DRAM_LIMIT_LO …
#define DRAM_CONT_BASE …
#define DRAM_CONT_LIMIT …
#define DRAM_CONT_HIGH_OFF …
#define dram_rw(pvt, i) …
#define dram_intlv_sel(pvt, i) …
#define dram_dst_node(pvt, i) …
#define DHAR …
#define dhar_mem_hoist_valid(pvt) …
#define dhar_base(pvt) …
#define k8_dhar_offset(pvt) …
#define f10_dhar_offset(pvt) …
#define DCT_CFG_SEL …
#define DRAM_LOCAL_NODE_BASE …
#define DRAM_LOCAL_NODE_LIM …
#define DRAM_BASE_HI …
#define DRAM_LIMIT_HI …
#define DCSB0 …
#define DCSB1 …
#define DCSB_CS_ENABLE …
#define DCSM0 …
#define DCSM1 …
#define csrow_enabled(i, dct, pvt) …
#define csrow_sec_enabled(i, dct, pvt) …
#define DRAM_CONTROL …
#define DBAM0 …
#define DBAM1 …
#define DBAM_DIMM(i, reg) …
#define DBAM_MAX_VALUE …
#define DCLR0 …
#define DCLR1 …
#define REVE_WIDTH_128 …
#define WIDTH_128 …
#define DCHR0 …
#define DCHR1 …
#define DDR3_MODE …
#define DCT_SEL_LO …
#define dct_high_range_enabled(pvt) …
#define dct_interleave_enabled(pvt) …
#define dct_ganging_enabled(pvt) …
#define dct_data_intlv_enabled(pvt) …
#define dct_memory_cleared(pvt) …
#define SWAP_INTLV_REG …
#define DCT_SEL_HI …
#define F15H_M60H_SCRCTRL …
#define NBCTL …
#define NBCFG …
#define NBCFG_CHIPKILL …
#define NBCFG_ECC_ENABLE …
#define F10_NBSL_EXT_ERR_ECC …
#define NBSL_PP_OBS …
#define SCRCTRL …
#define F10_ONLINE_SPARE …
#define online_spare_swap_done(pvt, c) …
#define online_spare_bad_dramcs(pvt, c) …
#define F10_NB_ARRAY_ADDR …
#define F10_NB_ARRAY_DRAM …
#define SET_NB_ARRAY_ADDR(section) …
#define F10_NB_ARRAY_DATA …
#define F10_NB_ARR_ECC_WR_REQ …
#define SET_NB_DRAM_INJECTION_WRITE(inj) …
#define SET_NB_DRAM_INJECTION_READ(inj) …
#define NBCAP …
#define NBCAP_CHIPKILL …
#define NBCAP_SECDED …
#define NBCAP_DCT_DUAL …
#define EXT_NB_MCA_CFG …
#define MSR_MCGCTL_NBE …
#define DF_DHAR …
#define UMCCH_BASE_ADDR …
#define UMCCH_BASE_ADDR_SEC …
#define UMCCH_ADDR_MASK …
#define UMCCH_ADDR_MASK_SEC …
#define UMCCH_ADDR_MASK_SEC_DDR5 …
#define UMCCH_DIMM_CFG …
#define UMCCH_DIMM_CFG_DDR5 …
#define UMCCH_UMC_CFG …
#define UMCCH_SDP_CTRL …
#define UMCCH_ECC_CTRL …
#define UMCCH_UMC_CAP_HI …
#define UMC_ECC_CHIPKILL_CAP …
#define UMC_ECC_ENABLED …
#define UMC_SDP_INIT …
struct error_injection { … };
struct reg_pair { … };
struct dram_range { … };
struct chip_select { … };
struct amd64_umc { … };
struct amd64_family_flags { … };
struct amd64_pvt { … };
enum err_codes { … };
struct err_info { … };
static inline u32 get_umc_base(u8 channel)
{ … }
static inline u64 get_dram_base(struct amd64_pvt *pvt, u8 i)
{ … }
static inline u64 get_dram_limit(struct amd64_pvt *pvt, u8 i)
{ … }
static inline u16 extract_syndrome(u64 status)
{ … }
static inline u8 dct_sel_interleave_addr(struct amd64_pvt *pvt)
{ … }
struct ecc_settings { … };
struct low_ops { … };
int __amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,
u32 *val, const char *func);
int __amd64_write_pci_cfg_dword(struct pci_dev *pdev, int offset,
u32 val, const char *func);
#define amd64_read_pci_cfg(pdev, offset, val) …
#define amd64_write_pci_cfg(pdev, offset, val) …
#define to_mci(k) …
static inline void disable_caches(void *dummy)
{ … }
static inline void enable_caches(void *dummy)
{ … }
static inline u8 dram_intlv_en(struct amd64_pvt *pvt, unsigned int i)
{ … }
static inline u8 dhar_valid(struct amd64_pvt *pvt)
{ … }
static inline u32 dct_sel_baseaddr(struct amd64_pvt *pvt)
{ … }