locore.S 478 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * locore.S
  4. */
  5. #include <asm/asm.h>
  6. #include <asm/regdef.h>
  7. #include <asm/mipsregs.h>
  8. .text
  9. /*
  10. * Simple general exception handling routine. This one is used for the
  11. * Memory sizing routine for pmax machines. HK
  12. */
  13. NESTED(genexcept_early, 0, sp)
  14. .set noat
  15. .set noreorder
  16. mfc0 k0, CP0_STATUS
  17. la k1, mem_err
  18. sw k0, 0(k1)
  19. mfc0 k0, CP0_EPC
  20. nop
  21. addiu k0, 4 # skip the causing instruction
  22. jr k0
  23. rfe
  24. END(genexcept_early)