lowlevel_init.S 614 B

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