annotate target-utils/tf-breakin/payload.S @ 526:80ee7eacdaeb

L1 configuration: try a cut-down version first
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 14 Jul 2014 20:57:06 +0000
parents 4e0aa166baa5
children 7166c8311b0d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
356
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 .text
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 .org 0
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 .code 32
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 @ set CPSR like mot931c payload does
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 msr CPSR_c, #0xd3
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 @ disable the watchdog
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 ldr r1, =0xfffff802
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 mov r0, #0xf5
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 strh r0, [r1, #2]
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 mov r0, #0xa0
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 strh r0, [r1, #2]
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 @ MODEM UART
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 ldr r6, =0xffff5800
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 @ wait for any previous output to flush out
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 1: ldrb r0, [r6, #5]
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 tst r0, #0x20
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 beq 1b
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 @ send our indication
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 adr r1, outstr
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 mov r2, #6
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 1: ldrb r0, [r1], #1
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 strb r0, [r6]
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 subs r2, r2, #1
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 bne 1b
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 @ wait for this output to go out to the TxD pin
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 1: ldrb r0, [r6, #5]
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 tst r0, #0x40
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 beq 1b
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 @ enable the Calypso boot ROM
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 ldr r1, =0xFFFFFB10
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 mov r2, #0x0100
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 strh r2, [r1]
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 @ jump to it!
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 mov pc, #0
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36
4e0aa166baa5 target-utils/tf-breakin: payload written for the TF C139 break-in attempt
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 outstr: .byte 2,2,2,'O','K',2