Path: blob/master/arch/tile/include/hv/drv_mshim_intf.h
10819 views
/*1* Copyright 2011 Tilera Corporation. All Rights Reserved.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation, version 2.6*7* This program is distributed in the hope that it will be useful, but8* WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or10* NON INFRINGEMENT. See the GNU General Public License for11* more details.12*/1314/**15* @file drv_mshim_intf.h16* Interface definitions for the Linux EDAC memory controller driver.17*/1819#ifndef _SYS_HV_INCLUDE_DRV_MSHIM_INTF_H20#define _SYS_HV_INCLUDE_DRV_MSHIM_INTF_H2122/** Number of memory controllers in the public API. */23#define TILE_MAX_MSHIMS 42425/** Memory info under each memory controller. */26struct mshim_mem_info27{28uint64_t mem_size; /**< Total memory size in bytes. */29uint8_t mem_type; /**< Memory type, DDR2 or DDR3. */30uint8_t mem_ecc; /**< Memory supports ECC. */31};3233/**34* DIMM error structure.35* For now, only correctable errors are counted and the mshim doesn't record36* the error PA. HV takes panic upon uncorrectable errors.37*/38struct mshim_mem_error39{40uint32_t sbe_count; /**< Number of single-bit errors. */41};4243/** Read this offset to get the memory info per mshim. */44#define MSHIM_MEM_INFO_OFF 0x1004546/** Read this offset to check DIMM error. */47#define MSHIM_MEM_ERROR_OFF 0x2004849#endif /* _SYS_HV_INCLUDE_DRV_MSHIM_INTF_H */505152