6 #define zero $0 /* always zero */
7 #define AT $at /* assembler temp */
8 #define v0 $2 /* return value */
10 #define a0 $4 /* argument registers */
14 #define t0 $8 /* temp registers (not saved across subroutine calls) */
22 #define s0 $16 /* saved across subroutine calls (callee saved) */
30 #define t8 $24 /* two more temp registers */
32 #define k0 $26 /* kernel temporary */
34 #define gp $28 /* global pointer */
35 #define sp $29 /* stack pointer */
36 #define s8 $30 /* one more callee saved */
37 #define ra $31 /* return address */
41 * Coprocessor 0 registers:
43 #define COP_0_TLB_INDEX $0
44 #define COP_0_TLB_RANDOM $1
45 #define COP_0_TLB_LO0 $2
46 #define COP_0_TLB_LO1 $3
47 #define COP_0_TLB_CONTEXT $4
48 #define COP_0_TLB_PG_MASK $5
49 #define COP_0_TLB_WIRED $6
50 #define COP_0_BAD_VADDR $8
51 #define COP_0_COUNT $9
52 #define COP_0_TLB_HI $10
53 #define COP_0_COMPARE $11
54 #define COP_0_STATUS_REG $12
55 #define COP_0_CAUSE_REG $13
56 #define COP_0_EXC_PC $14
57 #define COP_0_PRID $15
58 #define COP_0_CONFIG $16
59 #define COP_0_LLADDR $17
60 #define COP_0_WATCH_LO $18
61 #define COP_0_WATCH_HI $19
62 #define COP_0_TLB_XCONTEXT $20
64 #define COP_0_CACHE_ERR $27
65 #define COP_0_TAG_LO $28
66 #define COP_0_TAG_HI $29
67 #define COP_0_ERROR_PC $30
69 #define COP_0_WATCH_1 $18
70 #define COP_0_WATCH_2 $19
71 #define COP_0_WATCH_M $24
72 #define COP_0_PC_COUNT $25
73 #define COP_0_PC_CTRL $22
75 #define COP_0_ICR $20 /* CFC */
76 #define COP_0_DERR_0 $26 /* CFC */
77 #define COP_0_DERR_1 $27 /* CFC */
78 #define SR_BOOT_EXC_VEC 0x00400000
79 //---------------------------------------------------
81 #define CONFIG_CACHE_64K_4WAY 1
90 #define CFG_IB 0x00000020
91 #define CFG_DB 0x00000010
93 #define CFG_BE 0x00008000
94 #define CFG_EPMASK 0x0f000000
95 #define CFG_EPD 0x00000000
96 #define CFG_EM_R4K 0x00000000
97 #define CFG_EMMASK 0x00c00000
98 #define CFG_AD 0x00800000
100 #define CP0_CONFIG $16
101 #define CP0_TAGLO $28
102 #define CP0_TAGHI $29
104 #define DDR100 0x04041091
105 #define DDR266 0x0410435e
106 #define DDR300 0x041453df
112 * s0 link versus load offset, used to relocate absolute adresses.
116 * s4 Bonito base address.
130 stack = start - 0x4000 /* Place PMON stack below PMON start in RAM */
131 mtc0 zero, COP_0_STATUS_REG
132 mtc0 zero, COP_0_CAUSE_REG
133 li t0, SR_BOOT_EXC_VEC /* Exception to Boostrap Location */
134 mtc0 t0, COP_0_STATUS_REG
137 move s1,a3 //struct callvectors *cv
139 bal locate /* Get current execute address */
143 * We get here from executing a bal to get the PC value of the current execute
144 * location into ra. Check to see if we run from ROM or if this is ramloaded.
166 sw a0, CpuTertiaryCacheSize /* Set L3 cache size */
180 .ascii "0123456789abcdef"