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