diff options
Diffstat (limited to 'firmware/target/arm/imx31/crt0.S')
-rw-r--r-- | firmware/target/arm/imx31/crt0.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/crt0.S b/firmware/target/arm/imx31/crt0.S index 8459753f87..d51de7215a 100644 --- a/firmware/target/arm/imx31/crt0.S +++ b/firmware/target/arm/imx31/crt0.S | |||
@@ -231,6 +231,26 @@ remap_end: | |||
231 | bhi 1b | 231 | bhi 1b |
232 | #endif /* BOOTLOADER */ | 232 | #endif /* BOOTLOADER */ |
233 | 233 | ||
234 | #ifndef BOOTLOADER | ||
235 | /* Copy discardable SDMA code - loaded in the stack section | ||
236 | * and so must be done first. Destination is the plugin buffer | ||
237 | * which is safe when SDMA init takes place just after kernel | ||
238 | * init. */ | ||
239 | ldr r4, =_sdmacodecopy | ||
240 | ldr r3, =_sdmacodeend | ||
241 | ldr r2, =_sdmacodestart | ||
242 | 1: | ||
243 | cmp r3, r2 | ||
244 | ldrhi r5, [r4], #4 | ||
245 | strhi r5, [r2], #4 | ||
246 | bhi 1b | ||
247 | |||
248 | /* Make buffer coherent */ | ||
249 | ldr r0, =_sdmacodestart | ||
250 | sub r1, r3, r0 | ||
251 | bl clean_dcache_range | ||
252 | #endif /* BOOTLOADER */ | ||
253 | |||
234 | /* Initialise bss section to zero */ | 254 | /* Initialise bss section to zero */ |
235 | ldr r2, =_edata | 255 | ldr r2, =_edata |
236 | ldr r3, =_end | 256 | ldr r3, =_end |