drv_mshim_intf.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2011 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. /**
  15. * @file drv_mshim_intf.h
  16. * Interface definitions for the Linux EDAC memory controller driver.
  17. */
  18. #ifndef _SYS_HV_INCLUDE_DRV_MSHIM_INTF_H
  19. #define _SYS_HV_INCLUDE_DRV_MSHIM_INTF_H
  20. /** Number of memory controllers in the public API. */
  21. #define TILE_MAX_MSHIMS 4
  22. /** Memory info under each memory controller. */
  23. struct mshim_mem_info
  24. {
  25. uint64_t mem_size; /**< Total memory size in bytes. */
  26. uint8_t mem_type; /**< Memory type, DDR2 or DDR3. */
  27. uint8_t mem_ecc; /**< Memory supports ECC. */
  28. };
  29. /**
  30. * DIMM error structure.
  31. * For now, only correctable errors are counted and the mshim doesn't record
  32. * the error PA. HV takes panic upon uncorrectable errors.
  33. */
  34. struct mshim_mem_error
  35. {
  36. uint32_t sbe_count; /**< Number of single-bit errors. */
  37. };
  38. /** Read this offset to get the memory info per mshim. */
  39. #define MSHIM_MEM_INFO_OFF 0x100
  40. /** Read this offset to check DIMM error. */
  41. #define MSHIM_MEM_ERROR_OFF 0x200
  42. #endif /* _SYS_HV_INCLUDE_DRV_MSHIM_INTF_H */