comparison target-utils/tf-breakin/payload.S @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
1 .text
2 .org 0
3
4 @ allow entry in Thumb state
5 .code 16
6 bx pc
7 nop
8
9 .code 32
10
11 @ set CPSR like mot931c payload does
12 msr CPSR_c, #0xd3
13 @ disable the watchdog
14 ldr r1, =0xfffff802
15 mov r0, #0xf5
16 strh r0, [r1, #2]
17 mov r0, #0xa0
18 strh r0, [r1, #2]
19 @ MODEM UART
20 ldr r6, =0xffff5800
21 @ wait for any previous output to flush out
22 1: ldrb r0, [r6, #5]
23 tst r0, #0x20
24 beq 1b
25 @ send our indication
26 adr r1, outstr
27 mov r2, #6
28 1: ldrb r0, [r1], #1
29 strb r0, [r6]
30 subs r2, r2, #1
31 bne 1b
32 @ wait for this output to go out to the TxD pin
33 1: ldrb r0, [r6, #5]
34 tst r0, #0x40
35 beq 1b
36 @ enable the Calypso boot ROM
37 ldr r1, =0xFFFFFB10
38 mov r2, #0x0100
39 strh r2, [r1]
40 @ jump to it!
41 mov pc, #0
42 .ltorg
43 outstr: .byte 2,2,2,'O','K',2