FreeCalypso > hg > freecalypso-sw
annotate target-utils/compalstage/compalstage.S @ 701:615fb8847d3f
top level README: typo fix
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 02 Oct 2014 18:48:12 +0000 |
parents | 48c08499cede |
children |
rev | line source |
---|---|
314
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 .text |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 .org 0 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 #if THUMB_ENTRY |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 .code 16 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 bx pc |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 nop |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 #endif |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 .code 32 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 /* delay loop like OsmocomBB does */ |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 mov r1, #0xa0000 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 1: subs r1, r1, #1 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 bne 1b |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 /* enable the Calypso boot ROM */ |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 ldr r1, reg_addr |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 mov r2, #0x0100 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 strh r2, [r1] |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 /* jump to it! */ |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 mov pc, #0 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 reg_addr: |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 .word 0xFFFFFB10 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #if PAD_TO_1003 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 .org 0x3be0 |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 .ascii "1003" |
48c08499cede
compalstage binaries built
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #endif |