diff options
Diffstat (limited to 'utils/hwstub')
-rw-r--r-- | utils/hwstub/stub/stmp/crt0.S | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/utils/hwstub/stub/stmp/crt0.S b/utils/hwstub/stub/stmp/crt0.S index f4a0c28360..38b6f18ac5 100644 --- a/utils/hwstub/stub/stmp/crt0.S +++ b/utils/hwstub/stub/stmp/crt0.S | |||
@@ -5,12 +5,10 @@ | |||
5 | start: | 5 | start: |
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 | /* Disable MMU, disable caching and buffering; | 8 | /* The stub could be located at a virtual address so killing the MMU at |
9 | * use low exception range address */ | 9 | * this point would be mere suicide. We assume that the remap location |
10 | mrc p15, 0, r0, c1, c0, 0 | 10 | * is identically mapped and kill the MMU after the copy */ |
11 | ldr r1, =0x3005 | 11 | |
12 | bic r0, r1 | ||
13 | mcr p15, 0, r0, c1, c0, 0 | ||
14 | /* Relocate to right address */ | 12 | /* Relocate to right address */ |
15 | mov r2, r7 | 13 | mov r2, r7 |
16 | ldr r3, =_copystart | 14 | ldr r3, =_copystart |
@@ -25,6 +23,12 @@ start: | |||
25 | /* Jump to real location */ | 23 | /* Jump to real location */ |
26 | ldr pc, =remap | 24 | ldr pc, =remap |
27 | remap: | 25 | remap: |
26 | /* Disable MMU, disable caching and buffering; | ||
27 | * use low exception range address */ | ||
28 | mrc p15, 0, r0, c1, c0, 0 | ||
29 | ldr r1, =0x3005 | ||
30 | bic r0, r1 | ||
31 | mcr p15, 0, r0, c1, c0, 0 | ||
28 | /* clear bss */ | 32 | /* clear bss */ |
29 | ldr r2, =bss_start | 33 | ldr r2, =bss_start |
30 | ldr r3, =bss_end | 34 | ldr r3, =bss_end |