cex-gen.S 1006 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1995 - 1999 Ralf Baechle
  7. * Copyright (C) 1999 Silicon Graphics, Inc.
  8. *
  9. * Cache error handler
  10. */
  11. #include <asm/asm.h>
  12. #include <asm/regdef.h>
  13. #include <asm/mipsregs.h>
  14. #include <asm/stackframe.h>
  15. /*
  16. * Game over. Go to the button. Press gently. Swear where allowed by
  17. * legislation.
  18. */
  19. LEAF(except_vec2_generic)
  20. .set noreorder
  21. .set noat
  22. .set mips0
  23. /*
  24. * This is a very bad place to be. Our cache error
  25. * detection has triggered. If we have write-back data
  26. * in the cache, we may not be able to recover. As a
  27. * first-order desperate measure, turn off KSEG0 cacheing.
  28. */
  29. mfc0 k0,CP0_CONFIG
  30. li k1,~CONF_CM_CMASK
  31. and k0,k0,k1
  32. ori k0,k0,CONF_CM_UNCACHED
  33. mtc0 k0,CP0_CONFIG
  34. /* Give it a few cycles to sink in... */
  35. nop
  36. nop
  37. nop
  38. j cache_parity_error
  39. nop
  40. END(except_vec2_generic)