freemyipod r928 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r927‎ | r928 | r929 >
Date:02:07, 11 May 2014
Author:user890104
Status:new
Tags:
Comment:
iPod Touch 2G: Copy the MMU setup code from iPod Nano 4G
Modified paths:
  • /emcore/trunk/target/ipodtouch2g/crt0.S (modified) (history)

Diff [purge]

Index: emcore/trunk/target/ipodtouch2g/crt0.S
@@ -41,8 +41,52 @@
4242 .section .initcode,"ax",%progbits
4343 .global _start
4444 _start:
45 - ldr r0, =0x00450878
46 - mcr p15, 0, r0,c1,c0,0
 45+ mrc p15, 0, r0,c1,c0
 46+ bic r0, r0, #0x200
 47+ orr r0, r0, #0x100
 48+ mcr p15, 0, r0,c1,c0
 49+ mov r0, #0x7fffffff
 50+ mcr p15, 0, r0,c3,c0
 51+ mov r0, #0x22000000
 52+ orr r1, r0, #0x00000100
 53+ orr r0, r0, #0x0003c000
 54+ orr r1, r1, #0x000000fe
 55+ add r2, r0, #0x200
 56+ mov r3, #0
 57+ str r1, [r0], #4
 58+.mmuloop1:
 59+ str r3, [r0], #4
 60+ cmp r0, r2
 61+ bne .mmuloop1
 62+ add r0, r0, #0x080
 63+ add r2, r0, #0x580
 64+.mmuloop2:
 65+ str r3, [r0], #4
 66+ cmp r0, r2
 67+ bne .mmuloop2
 68+ add r0, r0, #0x4
 69+ add r2, r0, #0x7c
 70+.mmuloop3:
 71+ str r3, [r0], #4
 72+ cmp r0, r2
 73+ bne .mmuloop3
 74+ add r0, r0, #0x4
 75+ add r2, r0, #0x500
 76+ add r2, r2, #0x7c
 77+.mmuloop4:
 78+ str r3, [r0], #4
 79+ cmp r0, r2
 80+ bne .mmuloop4
 81+ add r0, r0, #0x200
 82+ add r2, r0, #0x3000
 83+.mmuloop5:
 84+ str r3, [r0], #4
 85+ cmp r0, r2
 86+ bne .mmuloop5
 87+ mrc p15, 0, r0,c1,c0
 88+ orr r0, r0, #5
 89+ orr r0, r0, #0x400000
 90+ mcr p15, 0, r0,c1,c0
4791 ldr r0, =_sramsource
4892 ldr r1, =_sramstart
4993 ldr r2, =_sramend