]> git.zerfleddert.de Git - proxmark3-svn/blame - bootrom/flash-reset.s
Hopefully correct code for C's strict aliasing rules
[proxmark3-svn] / bootrom / flash-reset.s
CommitLineData
6658905f 1.extern CopyBootToRAM\r
2 \r
8652988d 3.section .startup,"ax"\r
4 .code 32\r
5 .align 0\r
6658905f 6\r
8652988d 7.global flashstart\r
8flashstart:\r
6658905f 9 b Reset\r
10 b UndefinedInstruction\r
11 b SoftwareInterrupt\r
12 b PrefetchAbort\r
13 b DataAbort\r
14 b Reserved\r
15 b Irq\r
16 b Fiq\r
17\r
18Reset:\r
e3ae0257 19 ldr sp, .stack_end @ initialize stack pointer to top of RAM\r
6658905f 20 bl CopyBootToRAM @ copy bootloader to RAM (in case the\r
21 @ user re-flashes the bootloader)\r
e3ae0257 22 ldr r3, .bootphase2_start @ start address of RAM bootloader\r
6658905f 23 bx r3 @ jump to it\r
24\r
e3ae0257 25 .stack_end:\r
26 .word _stack_end\r
27 .bootphase2_start:\r
28 .word __bootphase2_start__\r
29\r
6658905f 30Fiq:\r
31 b Fiq\r
32UndefinedInstruction:\r
33 b UndefinedInstruction\r
34SoftwareInterrupt:\r
35 b SoftwareInterrupt\r
36PrefetchAbort:\r
37 b PrefetchAbort\r
38DataAbort:\r
39 b DataAbort\r
40Reserved:\r
41 b Reserved\r
42Irq:\r
43 b Irq\r
Impressum, Datenschutz