memreg.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* $Id: memreg.h,v 1.8 1996/08/29 09:48:23 davem Exp $ */
  2. #ifndef _SPARC_MEMREG_H
  3. #define _SPARC_MEMREG_H
  4. /* memreg.h: Definitions of the values found in the synchronous
  5. * and asynchronous memory error registers when a fault
  6. * occurs on the sun4c.
  7. *
  8. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  9. */
  10. /* First the synchronous error codes, these are usually just
  11. * normal page faults.
  12. */
  13. #define SUN4C_SYNC_WDRESET 0x0001 /* watchdog reset */
  14. #define SUN4C_SYNC_SIZE 0x0002 /* bad access size? whuz this? */
  15. #define SUN4C_SYNC_PARITY 0x0008 /* bad ram chips caused a parity error */
  16. #define SUN4C_SYNC_SBUS 0x0010 /* the SBUS had some problems... */
  17. #define SUN4C_SYNC_NOMEM 0x0020 /* translation to non-existent ram */
  18. #define SUN4C_SYNC_PROT 0x0040 /* access violated pte protections */
  19. #define SUN4C_SYNC_NPRESENT 0x0080 /* pte said that page was not present */
  20. #define SUN4C_SYNC_BADWRITE 0x8000 /* while writing something went bogus */
  21. #define SUN4C_SYNC_BOLIXED \
  22. (SUN4C_SYNC_WDRESET | SUN4C_SYNC_SIZE | SUN4C_SYNC_SBUS | \
  23. SUN4C_SYNC_NOMEM | SUN4C_SYNC_PARITY)
  24. /* Now the asynchronous error codes, these are almost always produced
  25. * by the cache writing things back to memory and getting a bad translation.
  26. * Bad DVMA transactions can cause these faults too.
  27. */
  28. #define SUN4C_ASYNC_BADDVMA 0x0010 /* error during DVMA access */
  29. #define SUN4C_ASYNC_NOMEM 0x0020 /* write back pointed to bad phys addr */
  30. #define SUN4C_ASYNC_BADWB 0x0080 /* write back points to non-present page */
  31. /* Memory parity error register with associated bit constants. */
  32. #ifndef __ASSEMBLY__
  33. extern __volatile__ unsigned long __iomem *sun4c_memerr_reg;
  34. #endif
  35. #define SUN4C_MPE_ERROR 0x80 /* Parity error detected. (ro) */
  36. #define SUN4C_MPE_MULTI 0x40 /* Multiple parity errors detected. (ro) */
  37. #define SUN4C_MPE_TEST 0x20 /* Write inverse parity. (rw) */
  38. #define SUN4C_MPE_CHECK 0x10 /* Enable parity checking. (rw) */
  39. #define SUN4C_MPE_ERR00 0x08 /* Parity error in bits 0-7. (ro) */
  40. #define SUN4C_MPE_ERR08 0x04 /* Parity error in bits 8-15. (ro) */
  41. #define SUN4C_MPE_ERR16 0x02 /* Parity error in bits 16-23. (ro) */
  42. #define SUN4C_MPE_ERR24 0x01 /* Parity error in bits 24-31. (ro) */
  43. #define SUN4C_MPE_ERRS 0x0F /* Bit mask for the error bits. (ro) */
  44. #endif /* !(_SPARC_MEMREG_H) */