lowlevel_init.S 594 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Memory sub-system initialization code */
  2. #include <config.h>
  3. #include <asm/regdef.h>
  4. #include <asm/mipsregs.h>
  5. .text
  6. .set noreorder
  7. .set mips32
  8. .globl lowlevel_init
  9. lowlevel_init:
  10. /*
  11. * Step 2) Establish Status Register
  12. * (set BEV, clear ERL, clear EXL, clear IE)
  13. */
  14. li t1, 0x00400000
  15. mtc0 t1, CP0_STATUS
  16. /*
  17. * Step 3) Establish CP0 Config0
  18. * (set K0=3)
  19. */
  20. li t1, 0x00000003
  21. mtc0 t1, CP0_CONFIG
  22. /*
  23. * Step 7) Establish Cause
  24. * (set IV bit)
  25. */
  26. li t1, 0x00800000
  27. mtc0 t1, CP0_CAUSE
  28. /* Establish Wired (and Random) */
  29. mtc0 zero, CP0_WIRED
  30. nop
  31. jr ra
  32. nop