FreeCalypso > hg > freecalypso-sw
comparison target-utils/tf-breakin/payload.S @ 983:7166c8311b0d
tfc139 reworked to support both ARM and Thumb entry
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 10 Dec 2015 08:07:47 +0000 |
parents | 4e0aa166baa5 |
children |
comparison
equal
deleted
inserted
replaced
982:461f7ee5f254 | 983:7166c8311b0d |
---|---|
1 .text | 1 .text |
2 .org 0 | 2 .org 0 |
3 | |
4 @ allow entry in Thumb state | |
5 .code 16 | |
6 bx pc | |
7 nop | |
8 | |
3 .code 32 | 9 .code 32 |
4 | 10 |
5 @ set CPSR like mot931c payload does | 11 @ set CPSR like mot931c payload does |
6 msr CPSR_c, #0xd3 | 12 msr CPSR_c, #0xd3 |
7 @ disable the watchdog | 13 @ disable the watchdog |
31 ldr r1, =0xFFFFFB10 | 37 ldr r1, =0xFFFFFB10 |
32 mov r2, #0x0100 | 38 mov r2, #0x0100 |
33 strh r2, [r1] | 39 strh r2, [r1] |
34 @ jump to it! | 40 @ jump to it! |
35 mov pc, #0 | 41 mov pc, #0 |
36 | 42 .ltorg |
37 outstr: .byte 2,2,2,'O','K',2 | 43 outstr: .byte 2,2,2,'O','K',2 |