Changeset 89c57b6 in mainline for boot/arch/mips32/src/asm.S
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/mips32/src/asm.S
rcefb126 r89c57b6 36 36 .global start 37 37 .global halt 38 .global memcpy39 38 .global jump_to_kernel 40 39 … … 42 41 43 42 start: 44 /* Setup CPU map (on msim this code 45 is executed in parallel on all CPUs, 46 but it not an issue) */ 43 /* 44 * Setup the CP0 configuration 45 * - Disable 64-bit kernel addressing mode 46 * - DIsable 64-bit supervisor adressing mode 47 * - Disable 64-bit user addressing mode 48 */ 49 mfc0 $a0, $status 50 la $a1, 0xffffff1f 51 and $a0, $a1, $a0 52 mtc0 $a0, $status 53 54 /* 55 * Setup CPU map (on msim this code 56 * is executed in parallel on all CPUs, 57 * but it not an issue). 58 */ 47 59 la $a0, PA2KA(CPUMAP_OFFSET) 48 60 … … 95 107 lw $k1, ($k0) 96 108 97 /* If we are not running on BSP 98 then end in an infinite loop */ 109 /* 110 * If we are not running on BSP 111 * then end in an infinite loop. 112 */ 99 113 beq $k1, $zero, bsp 100 114 nop … … 127 141 nop 128 142 129 memcpy:130 addiu $v0, $a1, 3131 li $v1, -4132 and $v0, $v0, $v1133 beq $a1, $v0, 3f134 move $t0, $a0135 move $t2, $a0136 137 0:138 beq $a2, $zero, 2f139 move $a3, $zero140 141 1:142 addu $v0, $a1, $a3143 lbu $a0, 0($v0)144 addu $v1, $t0, $a3145 addiu $a3, $a3, 1146 bne $a3, $a2, 1b147 sb $a0, 0($v1)148 149 2:150 jr $ra151 move $v0, $t2152 153 3:154 addiu $v0, $a0, 3155 and $v0, $v0, $v1156 bne $a0, $v0, 0b157 srl $t1, $a2, 2158 159 beq $t1, $zero, 5f160 move $a3, $zero161 162 move $a3, $zero163 move $a0, $zero164 165 4:166 addu $v0, $a1, $a0167 lw $v1, 0($v0)168 addiu $a3, $a3, 1169 addu $v0, $t0, $a0170 sw $v1, 0($v0)171 bne $a3, $t1, 4b172 addiu $a0, $a0, 4173 174 5:175 andi $a2, $a2, 0x3176 beq $a2, $zero, 2b177 nop178 179 sll $v0, $a3, 2180 addu $t1, $v0, $t0181 move $a3, $zero182 addu $t0, $v0, $a1183 184 6:185 addu $v0, $t0, $a3186 lbu $a0, 0($v0)187 addu $v1, $t1, $a3188 addiu $a3, $a3, 1189 bne $a3, $a2, 6b190 sb $a0, 0($v1)191 192 jr $ra193 move $v0, $t2194 195 143 jump_to_kernel: 196 # 197 # TODO: 198 # Make sure that the I-cache, D-cache and memory are mutually coherent 199 # before passing control to the copied code. 200 # 144 /* 145 * TODO: 146 * 147 * Make sure that the I-cache, D-cache and memory are mutually 148 * coherent before passing control to the copied code. 149 */ 201 150 j $a0 202 151 nop
Note:
See TracChangeset
for help on using the changeset viewer.