blob: 836e0271a1ce62eda3bdebffbb17156a06a3be1f [file] [log] [blame]
Vlad Lungu0764c162008-01-16 19:27:51 +02001/* 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
13lowlevel_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
Shinya Kuribayashi43c50922008-04-17 23:35:13 +090040 jr ra
Vlad Lungu0764c162008-01-16 19:27:51 +020041 nop