summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/app.lds200
-rw-r--r--firmware/target/arm/ipod/boot.lds80
2 files changed, 2 insertions, 278 deletions
diff --git a/firmware/target/arm/ipod/app.lds b/firmware/target/arm/ipod/app.lds
index 258f296a85..856cc52bb0 100644
--- a/firmware/target/arm/ipod/app.lds
+++ b/firmware/target/arm/ipod/app.lds
@@ -1,200 +1,2 @@
1#include "config.h" 1#include "config.h"
2 2#include "../pp/app-pp.lds"
3ENTRY(start)
4
5OUTPUT_FORMAT(elf32-littlearm)
6OUTPUT_ARCH(arm)
7STARTUP(target/arm/pp/crt0-pp.o)
8
9#define PLUGINSIZE PLUGIN_BUFFER_SIZE
10#define CODECSIZE CODEC_SIZE
11
12#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE
13
14#define DRAMORIG 0x00000000
15#define IRAMORIG 0x40000000
16#define IRAMSIZE 0xc000
17
18#ifdef CPU_PP502x
19#define NOCACHE_BASE 0x10000000
20#else
21#define NOCACHE_BASE 0x28000000
22#endif
23
24#define CACHEALIGN_SIZE 16
25
26/* End of the audio buffer, where the codec buffer starts */
27#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
28
29/* Where the codec buffer ends, and the plugin buffer starts */
30#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
31
32MEMORY
33{
34 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
35 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
36}
37
38SECTIONS
39{
40 .text :
41 {
42 loadaddress = .;
43 _loadaddress = .;
44 . = ALIGN(0x200);
45 *(.init.text)
46 *(.text*)
47 *(.glue_7)
48 *(.glue_7t)
49 . = ALIGN(0x4);
50 } > DRAM
51
52 .rodata :
53 {
54 *(.rodata) /* problems without this, dunno why */
55 *(.rodata*)
56 *(.rodata.str1.1)
57 *(.rodata.str1.4)
58 . = ALIGN(0x4);
59 } > DRAM
60
61 .data :
62 {
63 *(.data*)
64 . = ALIGN(0x4);
65 } > DRAM
66
67#if NOCACHE_BASE != 0
68 /* .ncdata section is placed at uncached physical alias address and is
69 * loaded at the proper cached virtual address - no copying is
70 * performed in the init code */
71 .ncdata . + NOCACHE_BASE :
72 {
73 . = ALIGN(CACHEALIGN_SIZE);
74 *(.ncdata*)
75 . = ALIGN(CACHEALIGN_SIZE);
76 } AT> DRAM
77#endif
78
79 /DISCARD/ :
80 {
81 *(.eh_frame)
82 }
83
84 .vectors 0x0 :
85 {
86 _vectorsstart = .;
87 KEEP(*(.vectors));
88 _vectorsend = .;
89 } AT> DRAM
90
91 _vectorscopy = LOADADDR(.vectors);
92 _noloaddram = LOADADDR(.vectors);
93
94 .ibss IRAMORIG (NOLOAD) :
95 {
96 _iedata = .;
97 *(.qharray)
98 *(.ibss)
99 . = ALIGN(0x4);
100 _iend = .;
101 } > IRAM
102
103 .iram _iend :
104 {
105 _iramstart = .;
106 *(.icode)
107 *(.irodata)
108 *(.idata)
109 . = ALIGN(0x4);
110 _iramend = .;
111 } > IRAM AT> DRAM
112
113 _iramcopy = LOADADDR(.iram);
114
115
116 .init ENDAUDIOADDR :
117 {
118 . = ALIGN(4);
119 _initstart = .;
120 *(.init*)
121 _initend = .;
122 } AT> DRAM
123
124 _initcopy = LOADADDR(.init);
125
126 .idle_stacks (NOLOAD) :
127 {
128 *(.idle_stacks)
129#if NUM_CORES > 1
130 cpu_idlestackbegin = .;
131 . += IDLE_STACK_SIZE;
132 cpu_idlestackend = .;
133#endif
134 cop_idlestackbegin = .;
135 . += IDLE_STACK_SIZE;
136 cop_idlestackend = .;
137 } > IRAM
138
139 .stack (NOLOAD) :
140 {
141 *(.stack)
142 stackbegin = .;
143 . += 0x2000;
144 stackend = .;
145 } > IRAM
146
147 /* .bss and .ncbss are treated as a single section to use one init loop to
148 * zero it - note "_edata" and "_end" */
149 .bss _noloaddram (NOLOAD) :
150 {
151 _edata = .;
152 *(.bss*)
153 *(COMMON)
154 . = ALIGN(0x4);
155 } > DRAM
156
157#if NOCACHE_BASE != 0
158 .ncbss . + NOCACHE_BASE (NOLOAD):
159 {
160 . = ALIGN(CACHEALIGN_SIZE);
161 *(.ncbss*)
162 . = ALIGN(CACHEALIGN_SIZE);
163 } AT> DRAM
164#endif
165
166 /* This will be aligned by preceding alignments */
167 .endaddr . - NOCACHE_BASE (NOLOAD) :
168 {
169 _end = .;
170 } > DRAM
171
172 .audiobuf (NOLOAD) :
173 {
174 _audiobuffer = .;
175 . = ALIGN(0x4);
176 audiobuffer = .;
177 } > DRAM
178
179 .audiobufend ENDAUDIOADDR (NOLOAD) :
180 {
181#ifdef IPOD_VIDEO
182 audiobufend_lds = .;
183#else
184 audiobufend = .;
185#endif
186 _audiobufend = .;
187 } > DRAM
188
189 .codec ENDAUDIOADDR (NOLOAD) :
190 {
191 codecbuf = .;
192 _codecbuf = .;
193 }
194
195 .plugin ENDADDR (NOLOAD) :
196 {
197 _pluginbuf = .;
198 pluginbuf = .;
199 }
200}
diff --git a/firmware/target/arm/ipod/boot.lds b/firmware/target/arm/ipod/boot.lds
index 6cd30c9eee..33b826bec8 100644
--- a/firmware/target/arm/ipod/boot.lds
+++ b/firmware/target/arm/ipod/boot.lds
@@ -1,80 +1,2 @@
1#include "config.h" 1#include "config.h"
2 2#include "../pp/boot-pp.lds"
3ENTRY(start)
4OUTPUT_FORMAT(elf32-littlearm)
5OUTPUT_ARCH(arm)
6STARTUP(target/arm/pp/crt0-pp-bl.o)
7
8#define DRAMSIZE (MEMORYSIZE * 0x100000)
9
10#if CONFIG_CPU == PP5020
11#define DRAMORIG 0x10000000
12#define IRAMORIG 0x40000000
13#define IRAMSIZE 0x18000
14#define FLASHORIG 0x001f0000
15#define FLASHSIZE 2M
16#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
17#define DRAMORIG 0x10000000
18#ifndef IRAMORIG
19#define IRAMORIG 0x40000000
20#endif
21#define IRAMSIZE 0x20000
22#define FLASHORIG 0x001f0000
23#define FLASHSIZE 2M
24#elif CONFIG_CPU == PP5002
25#define DRAMORIG 0x28000000
26#define IRAMORIG 0x40000000
27#define IRAMSIZE 0x18000
28#define FLASHORIG 0x001f0000
29#define FLASHSIZE 2M
30#endif
31
32MEMORY
33{
34 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
35 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
36}
37
38SECTIONS
39{
40 . = IRAMORIG;
41
42 .text : {
43 *(.init.text)
44 *(.text*)
45 *(.glue_7)
46 *(.glue_7t)
47 } > IRAM
48
49 .data : {
50 *(.icode)
51 *(.irodata)
52 *(.idata)
53 *(.data*)
54 *(.ncdata*)
55 *(.rodata*)
56 _dataend = . ;
57 } > IRAM
58
59 .stack (NOLOAD) : {
60 *(.stack)
61 _stackbegin = .;
62 stackbegin = .;
63 . += 0x2000;
64 _stackend = .;
65 stackend = .;
66 } > IRAM
67
68 /* The bss section is too large for IRAM - we just move it 16MB into the
69 DRAM */
70
71 . = DRAMORIG;
72 .bss . + (16*1024*1024) (NOLOAD) : {
73 _edata = .;
74 *(.bss*);
75 *(.ibss);
76 *(COMMON)
77 *(.ncbss*);
78 _end = .;
79 } > DRAM
80}