freemyipod r701 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r700‎ | r701 | r702 >
Date:22:06, 23 April 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Protect IRQ vectors (privileged mode: read only, user mode: no access) to catch null pointer dereferences
Modified paths:
  • /emcore/trunk/target/ipodclassic/crt0.S (modified) (history)
  • /emcore/trunk/target/ipodnano3g/crt0.S (modified) (history)

Diff [purge]

Index: emcore/trunk/target/ipodnano3g/crt0.S
@@ -41,10 +41,16 @@
4242 .section .initcode,"ax",%progbits
4343 .global _start
4444 _start:
 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
4551 mov r0, #0x22000000
46 - orr r1, r0, #0x00000c00
 52+ orr r1, r0, #0x00000100
4753 orr r0, r0, #0x0003c000
48 - orr r1, r1, #0x0000001e
 54+ orr r1, r1, #0x000000fe
4955 add r2, r0, #0x200
5056 mov r3, #0
5157 str r1, [r0], #4
Index: emcore/trunk/target/ipodclassic/crt0.S
@@ -41,10 +41,16 @@
4242 .section .initcode,"ax",%progbits
4343 .global _start
4444 _start:
 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
4551 mov r0, #0x22000000
46 - orr r1, r0, #0x00000c00
 52+ orr r1, r0, #0x00000100
4753 orr r0, r0, #0x0003c000
48 - orr r1, r1, #0x0000001e
 54+ orr r1, r1, #0x000000fe
4955 add r2, r0, #0x200
5056 mov r3, #0
5157 str r1, [r0], #4