diff options
Diffstat (limited to 'arch/arm/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 69371028a202..39d3ffb9ff2b 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -198,6 +198,63 @@ SECTIONS | |||
198 | } | 198 | } |
199 | _edata_loc = __data_loc + SIZEOF(.data); | 199 | _edata_loc = __data_loc + SIZEOF(.data); |
200 | 200 | ||
201 | #ifdef CONFIG_HAVE_TCM | ||
202 | /* | ||
203 | * We align everything to a page boundary so we can | ||
204 | * free it after init has commenced and TCM contents have | ||
205 | * been copied to its destination. | ||
206 | */ | ||
207 | .tcm_start : { | ||
208 | . = ALIGN(PAGE_SIZE); | ||
209 | __tcm_start = .; | ||
210 | __itcm_start = .; | ||
211 | } | ||
212 | |||
213 | /* | ||
214 | * Link these to the ITCM RAM | ||
215 | * Put VMA to the TCM address and LMA to the common RAM | ||
216 | * and we'll upload the contents from RAM to TCM and free | ||
217 | * the used RAM after that. | ||
218 | */ | ||
219 | .text_itcm ITCM_OFFSET : AT(__itcm_start) | ||
220 | { | ||
221 | __sitcm_text = .; | ||
222 | *(.tcm.text) | ||
223 | *(.tcm.rodata) | ||
224 | . = ALIGN(4); | ||
225 | __eitcm_text = .; | ||
226 | } | ||
227 | |||
228 | /* | ||
229 | * Reset the dot pointer, this is needed to create the | ||
230 | * relative __dtcm_start below (to be used as extern in code). | ||
231 | */ | ||
232 | . = ADDR(.tcm_start) + SIZEOF(.tcm_start) + SIZEOF(.text_itcm); | ||
233 | |||
234 | .dtcm_start : { | ||
235 | __dtcm_start = .; | ||
236 | } | ||
237 | |||
238 | /* TODO: add remainder of ITCM as well, that can be used for data! */ | ||
239 | .data_dtcm DTCM_OFFSET : AT(__dtcm_start) | ||
240 | { | ||
241 | . = ALIGN(4); | ||
242 | __sdtcm_data = .; | ||
243 | *(.tcm.data) | ||
244 | . = ALIGN(4); | ||
245 | __edtcm_data = .; | ||
246 | } | ||
247 | |||
248 | /* Reset the dot pointer or the linker gets confused */ | ||
249 | . = ADDR(.dtcm_start) + SIZEOF(.data_dtcm); | ||
250 | |||
251 | /* End marker for freeing TCM copy in linked object */ | ||
252 | .tcm_end : AT(ADDR(.dtcm_start) + SIZEOF(.data_dtcm)){ | ||
253 | . = ALIGN(PAGE_SIZE); | ||
254 | __tcm_end = .; | ||
255 | } | ||
256 | #endif | ||
257 | |||
201 | .bss : { | 258 | .bss : { |
202 | __bss_start = .; /* BSS */ | 259 | __bss_start = .; /* BSS */ |
203 | *(.bss) | 260 | *(.bss) |