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 /apps | |
parent | ab15fa7e00a4d98685dba186125d0805d1deb22c (diff) | |
download | rockbox-209aa8eda5b5c7cecde65885e6beaf37c92ba622.tar.gz rockbox-209aa8eda5b5c7cecde65885e6beaf37c92ba622.zip |
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 'apps')
-rw-r--r-- | apps/codecs/libmad/mad_iram.h | 7 | ||||
-rw-r--r-- | apps/plugins/plugin.lds | 22 |
2 files changed, 17 insertions, 12 deletions
diff --git a/apps/codecs/libmad/mad_iram.h b/apps/codecs/libmad/mad_iram.h index ffa6be8881..08d218a1d8 100644 --- a/apps/codecs/libmad/mad_iram.h +++ b/apps/codecs/libmad/mad_iram.h | |||
@@ -30,8 +30,7 @@ | |||
30 | /* Code performs slower in IRAM on PP502x and there is no space in | 30 | /* Code performs slower in IRAM on PP502x and there is no space in |
31 | mpegplayer on the PP5002. S3C2440 doesn't have any IRAM available for | 31 | mpegplayer on the PP5002. S3C2440 doesn't have any IRAM available for |
32 | codecs */ | 32 | codecs */ |
33 | #if defined(CPU_PP502x) || (CONFIG_CPU == PP5002 && defined(MPEGPLAYER)) || \ | 33 | #if defined(CPU_PP502x) || (CONFIG_CPU == PP5002 && defined(MPEGPLAYER)) |
34 | (CONFIG_CPU==S3C2440) || (CONFIG_CPU==IMX31L) | ||
35 | #define ICODE_SECTION_MPA_ARM .text | 34 | #define ICODE_SECTION_MPA_ARM .text |
36 | #define ICODE_ATTR_MPA_SYNTH | 35 | #define ICODE_ATTR_MPA_SYNTH |
37 | #else | 36 | #else |
@@ -39,11 +38,7 @@ | |||
39 | #define ICODE_ATTR_MPA_SYNTH ICODE_ATTR | 38 | #define ICODE_ATTR_MPA_SYNTH ICODE_ATTR |
40 | #endif | 39 | #endif |
41 | 40 | ||
42 | #if CONFIG_CPU == S3C2440 || CONFIG_CPU == IMX31L | ||
43 | #define IBSS_SECTION_MPA_ARM .bss | ||
44 | #else | ||
45 | #define IBSS_SECTION_MPA_ARM .ibss | 41 | #define IBSS_SECTION_MPA_ARM .ibss |
46 | #endif | ||
47 | 42 | ||
48 | #ifndef ICONST_ATTR_MPA_HUFFMAN | 43 | #ifndef ICONST_ATTR_MPA_HUFFMAN |
49 | #define ICONST_ATTR_MPA_HUFFMAN ICONST_ATTR | 44 | #define ICONST_ATTR_MPA_HUFFMAN ICONST_ATTR |
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index 92365c6269..13a048acaf 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds | |||
@@ -63,14 +63,12 @@ OUTPUT_FORMAT(elf32-sh) | |||
63 | #define IRAMSIZE 0x9000 | 63 | #define IRAMSIZE 0x9000 |
64 | #elif CONFIG_CPU == S3C2440 | 64 | #elif CONFIG_CPU == S3C2440 |
65 | #define DRAMORIG 0x0 + STUBOFFSET | 65 | #define DRAMORIG 0x0 + STUBOFFSET |
66 | #define IRAMORIG DRAMORIG | ||
67 | #define IRAMSIZE 4K | ||
68 | #define IRAM DRAM | 66 | #define IRAM DRAM |
67 | #define IRAMSIZE 0 | ||
69 | #elif CONFIG_CPU == IMX31L | 68 | #elif CONFIG_CPU == IMX31L |
70 | #define DRAMORIG 0x0 + STUBOFFSET | 69 | #define DRAMORIG 0x0 + STUBOFFSET |
71 | #define IRAMORIG DRAMORIG | ||
72 | #define IRAMSIZE 0x4000 | ||
73 | #define IRAM DRAM | 70 | #define IRAM DRAM |
71 | #define IRAMSIZE 0 | ||
74 | #elif CONFIG_CPU==DM320 | 72 | #elif CONFIG_CPU==DM320 |
75 | #define DRAMORIG 0x00900000 + STUBOFFSET | 73 | #define DRAMORIG 0x00900000 + STUBOFFSET |
76 | #define IRAMORIG DRAMORIG | 74 | #define IRAMORIG DRAMORIG |
@@ -100,7 +98,7 @@ OUTPUT_FORMAT(elf32-sh) | |||
100 | MEMORY | 98 | MEMORY |
101 | { | 99 | { |
102 | PLUGIN_RAM : ORIGIN = THIS_ORIGIN, LENGTH = THIS_LENGTH | 100 | PLUGIN_RAM : ORIGIN = THIS_ORIGIN, LENGTH = THIS_LENGTH |
103 | #if defined(IRAMSIZE) | 101 | #if defined(IRAMSIZE) && IRAMSIZE != 0 |
104 | PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | 102 | PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE |
105 | #endif | 103 | #endif |
106 | } | 104 | } |
@@ -116,6 +114,9 @@ SECTIONS | |||
116 | .text : | 114 | .text : |
117 | { | 115 | { |
118 | *(.text*) | 116 | *(.text*) |
117 | #if defined(IRAMSIZE) && IRAMSIZE == 0 | ||
118 | *(.icode) | ||
119 | #endif | ||
119 | #ifdef CPU_ARM | 120 | #ifdef CPU_ARM |
120 | *(.glue_7) | 121 | *(.glue_7) |
121 | *(.glue_7t) | 122 | *(.glue_7t) |
@@ -125,12 +126,18 @@ SECTIONS | |||
125 | .rodata : | 126 | .rodata : |
126 | { | 127 | { |
127 | *(.rodata*) | 128 | *(.rodata*) |
129 | #if defined(IRAMSIZE) && IRAMSIZE == 0 | ||
130 | *(.irodata) | ||
131 | #endif | ||
128 | . = ALIGN(0x4); | 132 | . = ALIGN(0x4); |
129 | } > PLUGIN_RAM | 133 | } > PLUGIN_RAM |
130 | 134 | ||
131 | .data : | 135 | .data : |
132 | { | 136 | { |
133 | *(.data*) | 137 | *(.data*) |
138 | #if defined(IRAMSIZE) && IRAMSIZE == 0 | ||
139 | *(.idata) | ||
140 | #endif | ||
134 | } > PLUGIN_RAM | 141 | } > PLUGIN_RAM |
135 | 142 | ||
136 | #if NOCACHE_BASE != 0 | 143 | #if NOCACHE_BASE != 0 |
@@ -151,7 +158,7 @@ SECTIONS | |||
151 | *(.eh_frame) | 158 | *(.eh_frame) |
152 | } | 159 | } |
153 | 160 | ||
154 | #if defined(IRAMSIZE) | 161 | #if defined(IRAMSIZE) && IRAMSIZE != 0 |
155 | .iram IRAMORIG : AT ( iramcopy) | 162 | .iram IRAMORIG : AT ( iramcopy) |
156 | { | 163 | { |
157 | iramstart = .; | 164 | iramstart = .; |
@@ -175,6 +182,9 @@ SECTIONS | |||
175 | { | 182 | { |
176 | plugin_bss_start = .; | 183 | plugin_bss_start = .; |
177 | *(.bss*) | 184 | *(.bss*) |
185 | #if defined(IRAMSIZE) && IRAMSIZE == 0 | ||
186 | *(.ibss) | ||
187 | #endif | ||
178 | *(COMMON) | 188 | *(COMMON) |
179 | . = ALIGN(0x4); | 189 | . = ALIGN(0x4); |
180 | } > PLUGIN_RAM | 190 | } > PLUGIN_RAM |