diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-18 17:33:51 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-18 17:33:51 +0000 |
commit | fd715fa95cc6bdd57f558cdbfc43bc768ec9645b (patch) | |
tree | c9e6cb9281bca93cb5b66762ba5b373fe11fd7bc /firmware/target/arm/as3525/boot.lds | |
parent | 6e5330f663a949e9a3ceab0ddb72e12491e0aa21 (diff) | |
download | rockbox-fd715fa95cc6bdd57f558cdbfc43bc768ec9645b.tar.gz rockbox-fd715fa95cc6bdd57f558cdbfc43bc768ec9645b.zip |
as3525*: enable MMU in bootloader
Reserve 1MB of DRAM for loading rockbox and use the rest as BSS
Write sdram setup in assembler and move it to a separate file, together
with MMU init code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26926 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/boot.lds')
-rw-r--r-- | firmware/target/arm/as3525/boot.lds | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/firmware/target/arm/as3525/boot.lds b/firmware/target/arm/as3525/boot.lds index 502e90c22b..2274eea13a 100644 --- a/firmware/target/arm/as3525/boot.lds +++ b/firmware/target/arm/as3525/boot.lds | |||
@@ -6,39 +6,31 @@ OUTPUT_FORMAT(elf32-littlearm) | |||
6 | OUTPUT_ARCH(arm) | 6 | OUTPUT_ARCH(arm) |
7 | STARTUP(target/arm/crt0.o) | 7 | STARTUP(target/arm/crt0.o) |
8 | 8 | ||
9 | #ifdef SANSA_CLIPV2 | 9 | #define LOAD_SIZE 0x100000 /* Reserve 1MB for loading the firmware */ |
10 | #define RAMORIG 0x0 /* DRAM */ | ||
11 | #define RAMSIZE (MEM*0x100000) | ||
12 | #else | ||
13 | #define RAMORIG 0x81000000 /* IRAM */ | ||
14 | #define RAMSIZE 0x50000 | ||
15 | #endif | ||
16 | 10 | ||
17 | MEMORY | 11 | MEMORY |
18 | { | 12 | { |
19 | RAM : ORIGIN = RAMORIG, LENGTH = RAMSIZE | 13 | IRAM : ORIGIN = IRAM_ORIG, LENGTH = IRAM_SIZE |
14 | DRAM : ORIGIN = DRAM_ORIG + LOAD_SIZE, LENGTH = DRAM_SIZE - LOAD_SIZE - TTB_SIZE | ||
20 | } | 15 | } |
21 | 16 | ||
22 | SECTIONS | 17 | SECTIONS |
23 | { | 18 | { |
24 | . = RAMORIG; | 19 | . = IRAM_ORIG; |
25 | 20 | ||
26 | .text : { | 21 | .text : { |
27 | *(.init.text) | 22 | *(.init.text) |
28 | *(.glue_7) | 23 | *(.glue_7) |
29 | *(.glue_7t) | 24 | *(.glue_7t) |
30 | *(.text*) | 25 | *(.text*) |
31 | } > RAM | 26 | *(.icode) |
27 | } > IRAM | ||
32 | 28 | ||
33 | .data : { | 29 | .data : { |
34 | *(.icode) | ||
35 | *(.irodata) | ||
36 | *(.idata) | ||
37 | *(.data*) | 30 | *(.data*) |
38 | *(.ncdata*) | ||
39 | *(.rodata*) | 31 | *(.rodata*) |
40 | _dataend = . ; | 32 | _dataend = . ; |
41 | } > RAM | 33 | } > IRAM |
42 | 34 | ||
43 | .stack (NOLOAD) : | 35 | .stack (NOLOAD) : |
44 | { | 36 | { |
@@ -48,14 +40,12 @@ SECTIONS | |||
48 | . += 0x2000; | 40 | . += 0x2000; |
49 | _stackend = .; | 41 | _stackend = .; |
50 | stackend = .; | 42 | stackend = .; |
51 | } > RAM | 43 | } > IRAM |
52 | 44 | ||
53 | .bss (NOLOAD) : { | 45 | .bss (NOLOAD) : { |
54 | _edata = .; | 46 | _edata = .; |
55 | *(.bss*); | 47 | *(.bss*); |
56 | *(.ibss); | ||
57 | *(COMMON) | 48 | *(COMMON) |
58 | *(.ncbss*); | ||
59 | _end = .; | 49 | _end = .; |
60 | } > RAM | 50 | } > DRAM |
61 | } | 51 | } |