mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-20 17:08:52 +09:00
![Shinya Kuribayashi](/assets/img/avatar_default.png)
Current assembler codes are inconsistent in the way of register jump instruction usage; some use jr, some use j. Of course GNU as allows both usages, but as can be expected from `Jump Register' the mnemonic `jr' is more intuitive than `j'. For example, Linux doesn't have `j <reg>' usage at all. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
42 lines
615 B
ArmAsm
42 lines
615 B
ArmAsm
/* Memory sub-system initialization code */
|
|
|
|
#include <config.h>
|
|
#include <version.h>
|
|
#include <asm/regdef.h>
|
|
#include <asm/mipsregs.h>
|
|
|
|
.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
|