diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-10 22:03:45 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-10 22:03:45 +0000 |
commit | 209aa8eda5b5c7cecde65885e6beaf37c92ba622 (patch) | |
tree | 6beddeac6d9714732931b211c2d4cd84ce5db920 /firmware/target/arm | |
parent | ab15fa7e00a4d98685dba186125d0805d1deb22c (diff) |
Real fake IRAM by placing .i.... section in the analagous DRAM sections in the linker scripts that hasn't done this yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17449 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/imx31/app.lds | 24 | ||||
-rw-r--r-- | firmware/target/arm/imx31/crt0.S | 19 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/app.lds | 37 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/boot.lds | 24 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/crt0.S | 20 |
5 files changed, 22 insertions, 102 deletions
diff --git a/firmware/target/arm/imx31/app.lds b/firmware/target/arm/imx31/app.lds index 9b35e8dd53..80123fee9d 100644 --- a/firmware/target/arm/imx31/app.lds +++ b/firmware/target/arm/imx31/app.lds @@ -46,6 +46,7 @@ SECTIONS . = ALIGN(0x200); *(.init.text) *(.text*) + *(.icode) *(.glue_7) *(.glue_7t) . = ALIGN(0x4); @@ -57,6 +58,7 @@ SECTIONS *(.rodata*) *(.rodata.str1.1) *(.rodata.str1.4) + *(.irodata) . = ALIGN(0x4); /* Pseudo-allocate the copies of the data sections */ @@ -70,6 +72,7 @@ SECTIONS { _datastart = .; *(.data*) + *(.idata) . = ALIGN(0x4); _dataend = .; } > DRAM @@ -88,26 +91,6 @@ SECTIONS _vectorscopy = LOADADDR(.vectors); - .iram : - { - _iramstart = .; - *(.icode) - *(.irodata) - *(.idata) - . = ALIGN(0x4); - _iramend = .; - } > DRAM - - _iramcopy = LOADADDR(.iram); - - .ibss (NOLOAD) : - { - _iedata = .; - *(.ibss) - . = ALIGN(0x4); - _iend = .; - } > DRAM - .stack : { *(.stack) @@ -120,6 +103,7 @@ SECTIONS { _edata = .; *(.bss*) + *(.ibss) *(COMMON) . = ALIGN(0x4); _end = .; diff --git a/firmware/target/arm/imx31/crt0.S b/firmware/target/arm/imx31/crt0.S index 046578b5bf..55cd74180f 100644 --- a/firmware/target/arm/imx31/crt0.S +++ b/firmware/target/arm/imx31/crt0.S @@ -229,25 +229,6 @@ remap_end: ldrhi r5, [r4], #4 strhi r5, [r2], #4 bhi 1b -#else - /* Zero out IBSS */ - ldr r2, =_iedata - ldr r3, =_iend - mov r4, #0 -1: - cmp r3, r2 - strhi r4, [r2], #4 - bhi 1b - - /* Copy the IRAM */ - ldr r2, =_iramcopy - ldr r3, =_iramstart - ldr r4, =_iramend -1: - cmp r4, r3 - ldrhi r5, [r2], #4 - strhi r5, [r3], #4 - bhi 1b #endif /* BOOTLOADER */ /* Initialise bss section to zero */ diff --git a/firmware/target/arm/s3c2440/app.lds b/firmware/target/arm/s3c2440/app.lds index 7321df8af2..a436d65770 100644 --- a/firmware/target/arm/s3c2440/app.lds +++ b/firmware/target/arm/s3c2440/app.lds @@ -51,6 +51,7 @@ SECTIONS _textstart = .; *(.text) *(.text*) + *(.icode) *(.glue_7) *(.glue_7t) . = ALIGN(0x4); @@ -64,12 +65,14 @@ SECTIONS *(.rodata*) *(.rodata.str1.1) *(.rodata.str1.4) + *(.irodata*) . = ALIGN(0x4); } > DRAM .data : { *(.data*) + *(.idata*) . = ALIGN(0x4); } > DRAM @@ -78,27 +81,9 @@ SECTIONS *(.eh_frame) } - .iram : - { - _iramstart = .; - *(.icode) - *(.irodata) - *(.idata) - . = ALIGN(0x4); - _iramend = .; - } > DRAM - - _iramcopy = LOADADDR(.iram); - - .ibss : - { - _iedata = .; - *(.ibss) - . = ALIGN(0x4); - _iend = .; - } > DRAM + _initdata_end =.; - .stack : + .stack (NOLOAD) : { *(.stack) stackbegin = .; @@ -106,34 +91,36 @@ SECTIONS stackend = .; } > DRAM - .bss : + .bss (NOLOAD) : { _edata = .; *(.bss*) + *(.ibss*) *(COMMON) . = ALIGN(0x4); _end = .; } > DRAM - .audiobuf ALIGN(4) : + .audiobuf (NOLOAD) : { + . = ALIGN(4); _audiobuffer = .; audiobuffer = .; } > DRAM - .audiobufend ENDAUDIOADDR: + .audiobufend ENDAUDIOADDR (NOLOAD) : { audiobufend = .; _audiobufend = .; } > DRAM - .codec ENDAUDIOADDR: + .codec ENDAUDIOADDR (NOLOAD) : { codecbuf = .; _codecbuf = .; } - .plugin ENDADDR: + .plugin ENDADDR (NOLOAD) : { _pluginbuf = .; pluginbuf = .; diff --git a/firmware/target/arm/s3c2440/boot.lds b/firmware/target/arm/s3c2440/boot.lds index 3cb88c9e7b..2f22b7603f 100644 --- a/firmware/target/arm/s3c2440/boot.lds +++ b/firmware/target/arm/s3c2440/boot.lds @@ -33,6 +33,7 @@ SECTIONS _textstart = .; *(.text) *(.text*) + *(.icode) *(.glue_7) *(.glue_7t) . = ALIGN(0x4); @@ -46,12 +47,14 @@ SECTIONS *(.rodata*) *(.rodata.str1.1) *(.rodata.str1.4) + *(.irodata) . = ALIGN(0x4); } > DRAM .data : { *(.data*) + *(.idata) . = ALIGN(0x4); } > DRAM @@ -60,26 +63,6 @@ SECTIONS *(.eh_frame) } - .iram : - { - _iramstart = .; - *(.icode) - *(.irodata) - *(.idata) - . = ALIGN(0x4); - _iramend = .; - } > DRAM - - _iramcopy = LOADADDR(.iram); - - .ibss : - { - _iedata = .; - *(.ibss) - . = ALIGN(0x4); - _iend = .; - } > DRAM - .stack : { *(.stack) @@ -92,6 +75,7 @@ SECTIONS { _edata = .; *(.bss*) + *(.ibss) *(COMMON) . = ALIGN(0x4); _end = .; diff --git a/firmware/target/arm/s3c2440/crt0.S b/firmware/target/arm/s3c2440/crt0.S index 7f1ebf8dec..efdb3f7248 100644 --- a/firmware/target/arm/s3c2440/crt0.S +++ b/firmware/target/arm/s3c2440/crt0.S @@ -97,7 +97,7 @@ start: /* Calculate the length of the code needed to run/copy */ ldr r1, = _vectorstart - ldr r2, = _iramend + ldr r2, = _initdata_end sub r2, r2, r1 add r3, r2, #0x30000000 @@ -364,7 +364,7 @@ start: /* Copy code to 0x30000000 */ ldr r2, = _vectorstart - ldr r3, = _iramend + ldr r3, = _initdata_end sub r2, r3, r2 /* length of loader */ @@ -408,22 +408,6 @@ donecopy: bl enable_mmu - /* Zero out IBSS */ - ldr r2, =_iedata - ldr r3, =_iend - mov r4, #0 -ibsszero: - cmp r3, r2 - strhi r4, [r2], #4 - bhi ibsszero - - /* Copy the IRAM */ - ldr r0, =_iramcopy - ldr r1, =_iramstart - ldr r2, =_iramend - sub r2, r2, r1 - bl word_copy - /* Initialise bss section to zero */ ldr r2, =_edata ldr r3, =_end |