freemyipod r699 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r698‎ | r699 | r700 >
Date:21:42, 23 April 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Add some basic memory protection on iPod Classic
Modified paths:
  • /emcore/trunk/target/ipodclassic/crt0.S (modified) (history)

Diff [purge]

Index: emcore/trunk/target/ipodclassic/crt0.S
@@ -41,6 +41,42 @@
4242 .section .initcode,"ax",%progbits
4343 .global _start
4444 _start:
 45+ mov r0, #0x22000000
 46+ orr r1, r0, #0x00000c00
 47+ orr r0, r0, #0x0003c000
 48+ orr r1, r1, #0x0000001e
 49+ add r2, r0, #0x200
 50+ mov r3, #0
 51+ str r1, [r0], #4
 52+.mmuloop1:
 53+ str r3, [r0], #4
 54+ cmp r0, r2
 55+ bne .mmuloop1
 56+ add r0, r0, #0x100
 57+ add r2, r0, #0x500
 58+.mmuloop2:
 59+ str r3, [r0], #4
 60+ cmp r0, r2
 61+ bne .mmuloop2
 62+ add r0, r0, #0x4
 63+ add r2, r0, #0x7c
 64+.mmuloop3:
 65+ str r3, [r0], #4
 66+ cmp r0, r2
 67+ bne .mmuloop3
 68+ add r0, r0, #0x4
 69+ add r2, r0, #0x500
 70+ add r2, r2, #0x7c
 71+.mmuloop4:
 72+ str r3, [r0], #4
 73+ cmp r0, r2
 74+ bne .mmuloop4
 75+ add r0, r0, #0x200
 76+ add r2, r0, #0x3000
 77+.mmuloop5:
 78+ str r3, [r0], #4
 79+ cmp r0, r2
 80+ bne .mmuloop5
4581 mrc p15, 0, r0,c1,c0
4682 orr r0, r0, #5
4783 mcr p15, 0, r0,c1,c0