pif2DiagBoot.s
945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* pif2Boot.s:
* Bootstrap file which jumps to the former boot location at
* 0x400; pif2 chips vector into ramrom at 0x1000.
*/
#include "regdef.h"
#include "asm.h"
#include "rcp.h"
#define PIF1_BOOT_LOCATION 0xb0000400
LEAF (tm_rdram_pif2boot) # Address = 0xB0001000.
.set noreorder
# Trigger remapping for controllers
li t0,0xbfc007fc
/*
loop1:
lw t1,0(t0)
li t2,0x800
and t1,t2
bne t1,zero,loop1
#wait for 20 usec.
nop
nop
nop
*/
lw t1,0(t0)
li t2,0x10
or t1,t2
sw t1,0(t0)
nop
nop
.set reorder
wait1:
lw t1,PHYS_TO_K1(SI_STATUS_REG)
andi t1,SI_STATUS_RD_BUSY
bnez t1,wait1
lw t1,0(t0)
li t2,0x20
sw t2,0(t0)
la t4, PIF1_BOOT_LOCATION
jr t4
END (tm_rdram_pif2boot)