diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/a52.c | 3 | ||||
-rw-r--r-- | apps/codecs/alac.c | 7 | ||||
-rw-r--r-- | apps/codecs/flac.c | 7 | ||||
-rw-r--r-- | apps/codecs/mpa.c | 3 | ||||
-rw-r--r-- | apps/codecs/mpc.c | 3 | ||||
-rw-r--r-- | apps/codecs/shorten.c | 7 | ||||
-rw-r--r-- | apps/codecs/vorbis.c | 3 | ||||
-rw-r--r-- | apps/codecs/wav.c | 3 | ||||
-rw-r--r-- | apps/codecs/wavpack.c | 3 | ||||
-rw-r--r-- | apps/plugins/plugin.lds | 48 | ||||
-rw-r--r-- | apps/plugins/rockboy/cpu.c | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.c | 3 |
13 files changed, 70 insertions, 24 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index ee80f66892..dd504e83fd 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c | |||
@@ -117,6 +117,8 @@ void a52_decode_data(uint8_t *start, uint8_t *end) | |||
117 | extern char iramcopy[]; | 117 | extern char iramcopy[]; |
118 | extern char iramstart[]; | 118 | extern char iramstart[]; |
119 | extern char iramend[]; | 119 | extern char iramend[]; |
120 | extern char iedata[]; | ||
121 | extern char iend[]; | ||
120 | #endif | 122 | #endif |
121 | 123 | ||
122 | /* this is the codec entry point */ | 124 | /* this is the codec entry point */ |
@@ -132,6 +134,7 @@ enum codec_status codec_start(struct codec_api *api) | |||
132 | 134 | ||
133 | #ifdef USE_IRAM | 135 | #ifdef USE_IRAM |
134 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); | 136 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); |
137 | ci->memset(iedata, 0, iend - iedata); | ||
135 | #endif | 138 | #endif |
136 | 139 | ||
137 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); | 140 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); |
diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c index 58ab111755..30c1ada555 100644 --- a/apps/codecs/alac.c +++ b/apps/codecs/alac.c | |||
@@ -21,10 +21,12 @@ | |||
21 | #include "libm4a/m4a.h" | 21 | #include "libm4a/m4a.h" |
22 | #include "libalac/decomp.h" | 22 | #include "libalac/decomp.h" |
23 | 23 | ||
24 | #ifndef SIMULATOR | 24 | #ifdef USE_IRAM |
25 | extern char iramcopy[]; | 25 | extern char iramcopy[]; |
26 | extern char iramstart[]; | 26 | extern char iramstart[]; |
27 | extern char iramend[]; | 27 | extern char iramend[]; |
28 | extern char iedata[]; | ||
29 | extern char iend[]; | ||
28 | #endif | 30 | #endif |
29 | 31 | ||
30 | int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE] IBSS_ATTR; | 32 | int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE] IBSS_ATTR; |
@@ -53,8 +55,9 @@ enum codec_status codec_start(struct codec_api* api) | |||
53 | rb = api; | 55 | rb = api; |
54 | ci = (struct codec_api*)api; | 56 | ci = (struct codec_api*)api; |
55 | 57 | ||
56 | #ifndef SIMULATOR | 58 | #ifdef USE_IRAM |
57 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); | 59 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); |
60 | rb->memset(iedata, 0, iend - iedata); | ||
58 | #endif | 61 | #endif |
59 | 62 | ||
60 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); | 63 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |
diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index 7639b9a352..ae05b0f2aa 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c | |||
@@ -20,10 +20,12 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include <codecs/libffmpegFLAC/decoder.h> | 21 | #include <codecs/libffmpegFLAC/decoder.h> |
22 | 22 | ||
23 | #ifndef SIMULATOR | 23 | #ifdef USE_IRAM |
24 | extern char iramcopy[]; | 24 | extern char iramcopy[]; |
25 | extern char iramstart[]; | 25 | extern char iramstart[]; |
26 | extern char iramend[]; | 26 | extern char iramend[]; |
27 | extern char iedata[]; | ||
28 | extern char iend[]; | ||
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | struct codec_api* rb; | 31 | struct codec_api* rb; |
@@ -229,8 +231,9 @@ enum codec_status codec_start(struct codec_api* api) | |||
229 | rb = api; | 231 | rb = api; |
230 | ci = (struct codec_api*)api; | 232 | ci = (struct codec_api*)api; |
231 | 233 | ||
232 | #ifndef SIMULATOR | 234 | #ifdef USE_IRAM |
233 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | 235 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); |
236 | ci->memset(iedata, 0, iend - iedata); | ||
234 | #endif | 237 | #endif |
235 | 238 | ||
236 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); | 239 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 3e6a0455ff..3d824d9b39 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c | |||
@@ -43,6 +43,8 @@ int mpeg_latency[3] = { 0, 481, 529 }; | |||
43 | extern char iramcopy[]; | 43 | extern char iramcopy[]; |
44 | extern char iramstart[]; | 44 | extern char iramstart[]; |
45 | extern char iramend[]; | 45 | extern char iramend[]; |
46 | extern char iedata[]; | ||
47 | extern char iend[]; | ||
46 | #endif | 48 | #endif |
47 | 49 | ||
48 | struct codec_api *ci; | 50 | struct codec_api *ci; |
@@ -83,6 +85,7 @@ enum codec_status codec_start(struct codec_api *api) | |||
83 | 85 | ||
84 | #ifdef USE_IRAM | 86 | #ifdef USE_IRAM |
85 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); | 87 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); |
88 | ci->memset(iedata, 0, iend - iedata); | ||
86 | #endif | 89 | #endif |
87 | 90 | ||
88 | if (codec_init(api)) | 91 | if (codec_init(api)) |
diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c index db2501525e..207a63ce97 100644 --- a/apps/codecs/mpc.c +++ b/apps/codecs/mpc.c | |||
@@ -68,6 +68,8 @@ MPC_SAMPLE_FORMAT sample_buffer[MPC_FRAME_LENGTH*2] IBSS_ATTR; | |||
68 | extern char iramcopy[]; | 68 | extern char iramcopy[]; |
69 | extern char iramstart[]; | 69 | extern char iramstart[]; |
70 | extern char iramend[]; | 70 | extern char iramend[]; |
71 | extern char iedata[]; | ||
72 | extern char iend[]; | ||
71 | #endif | 73 | #endif |
72 | 74 | ||
73 | /* this is the codec entry point */ | 75 | /* this is the codec entry point */ |
@@ -83,6 +85,7 @@ enum codec_status codec_start(struct codec_api *api) | |||
83 | TEST_CODEC_API(api); | 85 | TEST_CODEC_API(api); |
84 | #ifdef USE_IRAM | 86 | #ifdef USE_IRAM |
85 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); | 87 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); |
88 | ci->memset(iedata, 0, iend - iedata); | ||
86 | #endif | 89 | #endif |
87 | 90 | ||
88 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); | 91 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); |
diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c index c58b009ab1..9e679f5ea7 100644 --- a/apps/codecs/shorten.c +++ b/apps/codecs/shorten.c | |||
@@ -20,10 +20,12 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include <codecs/libffmpegFLAC/shndec.h> | 21 | #include <codecs/libffmpegFLAC/shndec.h> |
22 | 22 | ||
23 | #ifndef SIMULATOR | 23 | #ifdef USE_IRAM |
24 | extern char iramcopy[]; | 24 | extern char iramcopy[]; |
25 | extern char iramstart[]; | 25 | extern char iramstart[]; |
26 | extern char iramend[]; | 26 | extern char iramend[]; |
27 | extern char iedata[]; | ||
28 | extern char iend[]; | ||
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | struct codec_api* rb; | 31 | struct codec_api* rb; |
@@ -52,8 +54,9 @@ enum codec_status codec_start(struct codec_api* api) | |||
52 | rb = api; | 54 | rb = api; |
53 | ci = (struct codec_api*)api; | 55 | ci = (struct codec_api*)api; |
54 | 56 | ||
55 | #ifndef SIMULATOR | 57 | #ifdef USE_IRAM |
56 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | 58 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); |
59 | ci->memset(iedata, 0, iend - iedata); | ||
57 | #endif | 60 | #endif |
58 | 61 | ||
59 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); | 62 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c index 69eba24bb8..795e689e7d 100644 --- a/apps/codecs/vorbis.c +++ b/apps/codecs/vorbis.c | |||
@@ -101,6 +101,8 @@ bool vorbis_set_codec_parameters(OggVorbis_File *vf) | |||
101 | extern char iramcopy[]; | 101 | extern char iramcopy[]; |
102 | extern char iramstart[]; | 102 | extern char iramstart[]; |
103 | extern char iramend[]; | 103 | extern char iramend[]; |
104 | extern char iedata[]; | ||
105 | extern char iend[]; | ||
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | /* this is the codec entry point */ | 108 | /* this is the codec entry point */ |
@@ -125,6 +127,7 @@ enum codec_status codec_start(struct codec_api *api) | |||
125 | 127 | ||
126 | #ifdef USE_IRAM | 128 | #ifdef USE_IRAM |
127 | rb->memcpy(iramstart, iramcopy, iramend - iramstart); | 129 | rb->memcpy(iramstart, iramcopy, iramend - iramstart); |
130 | rb->memset(iedata, 0, iend - iedata); | ||
128 | #endif | 131 | #endif |
129 | 132 | ||
130 | rb->configure(CODEC_DSP_ENABLE, (bool *)true); | 133 | rb->configure(CODEC_DSP_ENABLE, (bool *)true); |
diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c index 85e24124ab..e86b559caa 100644 --- a/apps/codecs/wav.c +++ b/apps/codecs/wav.c | |||
@@ -94,6 +94,8 @@ enum | |||
94 | extern char iramcopy[]; | 94 | extern char iramcopy[]; |
95 | extern char iramstart[]; | 95 | extern char iramstart[]; |
96 | extern char iramend[]; | 96 | extern char iramend[]; |
97 | extern char iedata[]; | ||
98 | extern char iend[]; | ||
97 | #endif | 99 | #endif |
98 | 100 | ||
99 | /* Those are lookup tables, so they should be in the idata section | 101 | /* Those are lookup tables, so they should be in the idata section |
@@ -235,6 +237,7 @@ enum codec_status codec_start(struct codec_api* api) | |||
235 | 237 | ||
236 | #ifdef USE_IRAM | 238 | #ifdef USE_IRAM |
237 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | 239 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); |
240 | ci->memset(iedata, 0, iend - iedata); | ||
238 | #endif | 241 | #endif |
239 | 242 | ||
240 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); | 243 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |
diff --git a/apps/codecs/wavpack.c b/apps/codecs/wavpack.c index 21c194773b..ff890ba805 100644 --- a/apps/codecs/wavpack.c +++ b/apps/codecs/wavpack.c | |||
@@ -40,6 +40,8 @@ static long read_callback (void *buffer, long bytes) | |||
40 | extern char iramcopy[]; | 40 | extern char iramcopy[]; |
41 | extern char iramstart[]; | 41 | extern char iramstart[]; |
42 | extern char iramend[]; | 42 | extern char iramend[]; |
43 | extern char iedata[]; | ||
44 | extern char iend[]; | ||
43 | #endif | 45 | #endif |
44 | 46 | ||
45 | /* this is the codec entry point */ | 47 | /* this is the codec entry point */ |
@@ -56,6 +58,7 @@ enum codec_status codec_start(struct codec_api* api) | |||
56 | 58 | ||
57 | #ifdef USE_IRAM | 59 | #ifdef USE_IRAM |
58 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | 60 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); |
61 | ci->memset(iedata, 0, iend - iedata); | ||
59 | #endif | 62 | #endif |
60 | 63 | ||
61 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); | 64 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index 83825b9035..fc9d4d4efe 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds | |||
@@ -60,7 +60,8 @@ MEMORY | |||
60 | 60 | ||
61 | SECTIONS | 61 | SECTIONS |
62 | { | 62 | { |
63 | .text : { | 63 | .text : |
64 | { | ||
64 | KEEP(*(.entry)) | 65 | KEEP(*(.entry)) |
65 | *(.text*) | 66 | *(.text*) |
66 | #if CONFIG_CPU==PP5020 | 67 | #if CONFIG_CPU==PP5020 |
@@ -69,26 +70,25 @@ SECTIONS | |||
69 | #endif | 70 | #endif |
70 | } > PLUGIN_RAM | 71 | } > PLUGIN_RAM |
71 | 72 | ||
72 | .data : { | 73 | .rodata : |
73 | *(.data*) | 74 | { |
74 | } > PLUGIN_RAM | ||
75 | |||
76 | /DISCARD/ : { | ||
77 | *(.eh_frame) | ||
78 | } | ||
79 | |||
80 | .bss : { | ||
81 | *(.bss*) | ||
82 | } > PLUGIN_RAM | ||
83 | |||
84 | .rodata : { | ||
85 | *(.rodata*) | 75 | *(.rodata*) |
86 | . = ALIGN(0x4); | 76 | . = ALIGN(0x4); |
77 | } > PLUGIN_RAM | ||
78 | |||
79 | .data : | ||
80 | { | ||
81 | *(.data*) | ||
87 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) | 82 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) |
88 | iramcopy = .; | 83 | iramcopy = .; |
89 | #endif | 84 | #endif |
90 | } > PLUGIN_RAM | 85 | } > PLUGIN_RAM |
91 | 86 | ||
87 | /DISCARD/ : | ||
88 | { | ||
89 | *(.eh_frame) | ||
90 | } | ||
91 | |||
92 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) | 92 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) |
93 | .iram IRAMORIG : AT ( iramcopy) | 93 | .iram IRAMORIG : AT ( iramcopy) |
94 | { | 94 | { |
@@ -96,13 +96,29 @@ SECTIONS | |||
96 | *(.icode) | 96 | *(.icode) |
97 | *(.irodata) | 97 | *(.irodata) |
98 | *(.idata) | 98 | *(.idata) |
99 | *(.ibss) | ||
100 | iramend = .; | 99 | iramend = .; |
101 | } > PLUGIN_IRAM | 100 | } > PLUGIN_IRAM |
101 | |||
102 | .ibss (NOLOAD) : | ||
103 | { | ||
104 | iedata = .; | ||
105 | *(.ibss) | ||
106 | . = ALIGN(0x4); | ||
107 | iend = .; | ||
108 | } > PLUGIN_IRAM | ||
109 | |||
110 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
111 | #else | ||
112 | .bss : | ||
102 | #endif | 113 | #endif |
114 | { | ||
115 | *(.bss*) | ||
116 | } > PLUGIN_RAM | ||
117 | |||
103 | /* Special trick to avoid a linker error when no other sections are | 118 | /* Special trick to avoid a linker error when no other sections are |
104 | left after garbage collection (plugin not for this platform) */ | 119 | left after garbage collection (plugin not for this platform) */ |
105 | .comment 0 : { | 120 | .comment 0 : |
121 | { | ||
106 | KEEP(*(.comment)) | 122 | KEEP(*(.comment)) |
107 | } | 123 | } |
108 | } | 124 | } |
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c index 6118633899..5c4abc519f 100644 --- a/apps/plugins/rockboy/cpu.c +++ b/apps/plugins/rockboy/cpu.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | 19 | ||
20 | struct cpu cpu IDATA_ATTR; | 20 | struct cpu cpu IBSS_ATTR; |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index a8f8c695da..883c4952fc 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | struct lcd lcd; | 16 | struct lcd lcd; |
17 | 17 | ||
18 | struct scan scan IDATA_ATTR; | 18 | struct scan scan IBSS_ATTR; |
19 | 19 | ||
20 | #define BG (scan.bg) | 20 | #define BG (scan.bg) |
21 | #define WND (scan.wnd) | 21 | #define WND (scan.wnd) |
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 90452e55d6..56773879fa 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c | |||
@@ -42,6 +42,8 @@ const struct { | |||
42 | extern char iramcopy[]; | 42 | extern char iramcopy[]; |
43 | extern char iramstart[]; | 43 | extern char iramstart[]; |
44 | extern char iramend[]; | 44 | extern char iramend[]; |
45 | extern char iedata[]; | ||
46 | extern char iend[]; | ||
45 | #endif | 47 | #endif |
46 | 48 | ||
47 | /* here is a global api struct pointer. while not strictly necessary, | 49 | /* here is a global api struct pointer. while not strictly necessary, |
@@ -116,6 +118,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
116 | 118 | ||
117 | #ifdef USE_IRAM | 119 | #ifdef USE_IRAM |
118 | memcpy(iramstart, iramcopy, iramend-iramstart); | 120 | memcpy(iramstart, iramcopy, iramend-iramstart); |
121 | memset(iedata, 0, iend - iedata); | ||
119 | #endif | 122 | #endif |
120 | shut=0; | 123 | shut=0; |
121 | cleanshut=0; | 124 | cleanshut=0; |