FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/sysglue/flashboot.S @ 636:06ecb305f650
flashImage for BootROM-enabled targets: put something sensible at 0
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Sep 2014 19:34:31 +0000 |
parents | 658a83ff7221 |
children | a8fc7526935e |
comparison
equal
deleted
inserted
replaced
635:658a83ff7221 | 636:06ecb305f650 |
---|---|
2 * This assembly module contains those bits which are specific to flashable | 2 * This assembly module contains those bits which are specific to flashable |
3 * image builds only. It puts bits of code into several different sections. | 3 * image builds only. It puts bits of code into several different sections. |
4 */ | 4 */ |
5 | 5 |
6 #include "../include/config.h" | 6 #include "../include/config.h" |
7 | |
8 #if FLASH_BOOT_VIA_BOOTROM | |
9 /* | |
10 * Put something sensible in the boot ROM overlay area, just for the | |
11 * heck of it, or for extra robustness. | |
12 */ | |
13 .section bootrom.overlay,"ax",%progbits | |
14 .code 32 | |
15 .org 0 | |
16 b BootROM_disabled_entry | |
17 #include "vectors.S" | |
18 BootROM_disabled_entry: | |
19 /* copy the boot ROM switch code to IRAM and jump to it */ | |
20 ldr r4, =__romswitch_flash_addr | |
21 ldr r5, =__romswitch_ram_addr | |
22 ldr r2, =__romswitch_size | |
23 1: ldr r0, [r4], #4 | |
24 str r0, [r5], #4 | |
25 subs r2, r2, #4 | |
26 bhi 1b | |
27 ldr pc, =__romswitch_ram_addr | |
28 | |
29 .section bootrom.switch,"ax",%progbits | |
30 .code 32 | |
31 .org 0 | |
32 @ enable the Calypso boot ROM | |
33 ldr r1, =0xFFFFFB10 | |
34 mov r2, #0x0100 | |
35 strh r2, [r1] | |
36 @ jump to it! | |
37 mov pc, #0 | |
38 #endif | |
7 | 39 |
8 .section flashboot.text,"ax",%progbits | 40 .section flashboot.text,"ax",%progbits |
9 .code 32 | 41 .code 32 |
10 .org 0 | 42 .org 0 |
11 #if FLASH_BOOT_VIA_BOOTROM | 43 #if FLASH_BOOT_VIA_BOOTROM |