summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-10-22 00:23:33 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-10-22 00:34:44 +0200
commitbfb67f41a9e9df3b730d34041be6b4f4a4983c5b (patch)
treee2db1c81f5075828600f56b0c60279df20726611
parent4da8a441d103c40ecc9c1f84cb5bef49ca8c1e8f (diff)
downloadrockbox-bfb67f41a9e9df3b730d34041be6b4f4a4983c5b.tar.gz
rockbox-bfb67f41a9e9df3b730d34041be6b4f4a4983c5b.zip
hwstub: don't touch mmu registers on non-STMP targets, they might not exist
Change-Id: Ib18475fd90e0d29ab6d7214116f7a0041584d621
-rw-r--r--utils/hwstub/stub/crt0.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/hwstub/stub/crt0.S b/utils/hwstub/stub/crt0.S
index 5ba71905c9..8b2197823e 100644
--- a/utils/hwstub/stub/crt0.S
+++ b/utils/hwstub/stub/crt0.S
@@ -5,12 +5,14 @@
5start: 5start:
6 sub r7, pc, #8 /* Copy running address */ 6 sub r7, pc, #8 /* Copy running address */
7 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */ 7 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
8#ifdef CONFIG_STMP
8 /* Disable MMU, disable caching and buffering; 9 /* Disable MMU, disable caching and buffering;
9 * use low exception range address */ 10 * use low exception range address */
10 mrc p15, 0, r0, c1, c0, 0 11 mrc p15, 0, r0, c1, c0, 0
11 ldr r1, =0x3005 12 ldr r1, =0x3005
12 bic r0, r1 13 bic r0, r1
13 mcr p15, 0, r0, c1, c0, 0 14 mcr p15, 0, r0, c1, c0, 0
15#endif
14 ldr sp, =oc_stackend 16 ldr sp, =oc_stackend
15 /* Relocate to right address */ 17 /* Relocate to right address */
16 mov r2, r7 18 mov r2, r7