mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
MIPS:Target support for qemu -M mips
With serial, NE2000, IDE support. Tested in big-endian mode. Memory size hard-coded to 128M for now, so don't play with the -m option. Signed-off-by: Vlad Lungu <vlad@comsys.ro>
This commit is contained in:
parent
4c9e98ace7
commit
0764c164fe
11 changed files with 482 additions and 0 deletions
41
board/qemu-mips/lowlevel_init.S
Normal file
41
board/qemu-mips/lowlevel_init.S
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* 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
|
||||
|
||||
j ra
|
||||
nop
|
Loading…
Add table
Add a link
Reference in a new issue