tlbex-fault.S 644 B

12345678910111213141516171819202122232425262728
  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) 1999 Ralf Baechle
  7. * Copyright (C) 1999 Silicon Graphics, Inc.
  8. */
  9. #include <asm/mipsregs.h>
  10. #include <asm/regdef.h>
  11. #include <asm/stackframe.h>
  12. .macro tlb_do_page_fault, write
  13. NESTED(tlb_do_page_fault_\write, PT_SIZE, sp)
  14. SAVE_ALL
  15. MFC0 a2, CP0_BADVADDR
  16. KMODE
  17. move a0, sp
  18. REG_S a2, PT_BVADDR(sp)
  19. li a1, \write
  20. PTR_LA ra, ret_from_exception
  21. j do_page_fault
  22. END(tlb_do_page_fault_\write)
  23. .endm
  24. tlb_do_page_fault 0
  25. tlb_do_page_fault 1