diff options
author | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-01-22 15:14:24 +0000 |
---|---|---|
committer | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-01-22 15:14:24 +0000 |
commit | 93f917f5412cd7717a3fde149ca81aa1b9e3615e (patch) | |
tree | 6777f854cc8de238b994a14b334a7f0ff764a27d /firmware | |
parent | 70fba667086d02e4db8ee7dde9092e0e6f9a192e (diff) | |
download | rockbox-93f917f5412cd7717a3fde149ca81aa1b9e3615e.tar.gz rockbox-93f917f5412cd7717a3fde149ca81aa1b9e3615e.zip |
simplification and better integration of the gmini port
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5631 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/crt0.S | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index 0abc3bdbc6..a0ff26684e 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S | |||
@@ -21,17 +21,20 @@ | |||
21 | 21 | ||
22 | //#define BOOTLOADER | 22 | //#define BOOTLOADER |
23 | 23 | ||
24 | .section .init.text | ||
25 | .global start | ||
26 | start: | ||
24 | #if defined(ARCHOS_GMINI120) | 27 | #if defined(ARCHOS_GMINI120) |
25 | .section .text | ||
26 | .global _start | ||
27 | _start: | ||
28 | ;; disable all interrupts | 28 | ;; disable all interrupts |
29 | clrsr fe | 29 | clrsr fe |
30 | clrsr ie | 30 | clrsr ie |
31 | clrsr te | 31 | clrsr te |
32 | 32 | ld a14, #0x3F0000 | |
33 | ;; copy data section from flash to ram. | 33 | ;; copy data section from flash to ram. |
34 | 34 | ||
35 | ld r5, 0xA5 | ||
36 | ldb @[a14 + 6], r5 ; disable watchdog | ||
37 | |||
35 | ld a11, #(_datacopy) ; where the data section is in the flash | 38 | ld a11, #(_datacopy) ; where the data section is in the flash |
36 | ld a8, #(_datastart) ; destination | 39 | ld a8, #(_datastart) ; destination |
37 | 40 | ||
@@ -56,9 +59,9 @@ _start: | |||
56 | 59 | ||
57 | ld r2, #0 | 60 | ld r2, #0 |
58 | ld a8, #(_bssstart) ; destination | 61 | ld a8, #(_bssstart) ; destination |
59 | ld a9, #_bsssize | 62 | ld a9, #_bsssize |
60 | |||
61 | ld r6, e9 | 63 | ld r6, e9 |
64 | |||
62 | cmp eq, r6, #0 | 65 | cmp eq, r6, #0 |
63 | brf .bss_init_loop | 66 | brf .bss_init_loop |
64 | cmp eq, r9, #0 | 67 | cmp eq, r9, #0 |
@@ -76,12 +79,6 @@ _start: | |||
76 | 79 | ||
77 | ld a15, _stackend | 80 | ld a15, _stackend |
78 | 81 | ||
79 | ;; rest of the setup in C | ||
80 | jsr _cpu_setup | ||
81 | |||
82 | ;; enable IRQs (keep traps and fast interrupts low) | ||
83 | setsr ie | ||
84 | |||
85 | ;; go! | 82 | ;; go! |
86 | jsr _main | 83 | jsr _main |
87 | 84 | ||
@@ -119,9 +116,6 @@ irq_handler: | |||
119 | ret_irq | 116 | ret_irq |
120 | 117 | ||
121 | #elif defined(IRIVER_H100) | 118 | #elif defined(IRIVER_H100) |
122 | .section .init.text | ||
123 | .global start | ||
124 | start: | ||
125 | 119 | ||
126 | /* Platform: iRiver H1xx */ | 120 | /* Platform: iRiver H1xx */ |
127 | move.w #0x2700,%sr | 121 | move.w #0x2700,%sr |
@@ -264,9 +258,6 @@ vectors: | |||
264 | .long _stackend | 258 | .long _stackend |
265 | .long start | 259 | .long start |
266 | #else | 260 | #else |
267 | .section .init.text | ||
268 | .global start | ||
269 | start: | ||
270 | /* Platform: Archos Jukebox | 261 | /* Platform: Archos Jukebox |
271 | * We begin with some tricks. If we have built our code to be loaded | 262 | * We begin with some tricks. If we have built our code to be loaded |
272 | * via the standalone GDB stub, we will have out VBR at some other | 263 | * via the standalone GDB stub, we will have out VBR at some other |