FreeCalypso > hg > freecalypso-sw
comparison nuc-fw/sysglue/sysinit.S @ 79:947b1f473960
beginning of nuc-fw
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 11 Aug 2013 07:17:25 +0000 |
parents | |
children | 39b1c369b67f |
comparison
equal
deleted
inserted
replaced
78:2c266d4339ff | 79:947b1f473960 |
---|---|
1 /* | |
2 * This assembly module, which puts bits of code into several different | |
3 * sections, contains those essential entry point etc bits which are common | |
4 * to both the regular flashable build and the fc-xram development build. | |
5 */ | |
6 | |
7 .section iram.vectors | |
8 .code 32 | |
9 /* no useful handlers for the 5 error exceptions yet */ | |
10 b . | |
11 b . | |
12 b . | |
13 b . | |
14 b . | |
15 /* IRQ */ | |
16 b _INT_IRQ | |
17 /* no useful FIQ handler yet */ | |
18 b . | |
19 | |
20 .section xip.text | |
21 .code 32 | |
22 .globl _FlashorXram_entry | |
23 _FlashorXram_entry: | |
24 /* first order of business: copy iram.text to where it's supposed to be */ | |
25 ldr r8, =__iramtext_flash_addr | |
26 ldr r9, =__iramtext_ram_addr | |
27 ldr r10, =__iramtext_size | |
28 1: ldm r8!, {r0-r7} | |
29 stm r9!, {r0-r7} | |
30 subs r10, r10, #0x20 | |
31 bhi 1b | |
32 /* now we can call any function w/o worry as to where it lives */ | |
33 /* clear int.bss and ext.bss, using bzero() from libc */ | |
34 ldr r0, =__intbss_start | |
35 ldr r1, =__intbss_size | |
36 bl bzero | |
37 ldr r0, =__extbss_start | |
38 ldr r1, =__extbss_size | |
39 bl bzero | |
40 /* we can start Nucleus now! */ | |
41 b INT_Initialize |