X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Froms%2Fu-boot%2Fboard%2Fqemu-mips%2Flowlevel_init.S;fp=qemu%2Froms%2Fu-boot%2Fboard%2Fqemu-mips%2Flowlevel_init.S;h=b0f70727017f33e6cf3bf55814573f0733303003;hb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;hp=0000000000000000000000000000000000000000;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/qemu/roms/u-boot/board/qemu-mips/lowlevel_init.S b/qemu/roms/u-boot/board/qemu-mips/lowlevel_init.S new file mode 100644 index 000000000..b0f707270 --- /dev/null +++ b/qemu/roms/u-boot/board/qemu-mips/lowlevel_init.S @@ -0,0 +1,40 @@ +/* Memory sub-system initialization code */ + +#include +#include +#include + + .text + .set noreorder + .set mips32 + + .globl lowlevel_init +lowlevel_init: + + /* + * Step 2) Establish Status Register + * (set BEV, clear ERL, clear EXL, clear IE) + */ + li t1, 0x00400000 + mtc0 t1, CP0_STATUS + + /* + * Step 3) Establish CP0 Config0 + * (set K0=3) + */ + li t1, 0x00000003 + mtc0 t1, CP0_CONFIG + + /* + * Step 7) Establish Cause + * (set IV bit) + */ + li t1, 0x00800000 + mtc0 t1, CP0_CAUSE + + /* Establish Wired (and Random) */ + mtc0 zero, CP0_WIRED + nop + + jr ra + nop