diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-05-20 21:09:53 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-05-20 21:09:53 +0000 |
| commit | 4633446517c002ed81cdbbc6acb9b8ffd9becc85 (patch) | |
| tree | aa2e1dc82908bd4568e885a37545f94f07579a2a /apps/plugins/plugin.lds | |
| parent | fba4be213f399f19933aadcce25498ea1fb0c176 (diff) | |
| download | rockbox-4633446517c002ed81cdbbc6acb9b8ffd9becc85.zip rockbox-4633446517c002ed81cdbbc6acb9b8ffd9becc85.tar.gz rockbox-4633446517c002ed81cdbbc6acb9b8ffd9becc85.tar.bz2 rockbox-4633446517c002ed81cdbbc6acb9b8ffd9becc85.tar.xz | |
Sansa AMS: Centralise mapping of RAM and IRAM in as3525.h via #defines. This will hopefully make ongoing mmu work easier as less places need to be changed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21000 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/plugin.lds')
| -rw-r--r-- | apps/plugins/plugin.lds | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index 9a65fd5..456e6b4 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -1,4 +1,5 @@ #include "config.h" +#include "cpu.h" /* These output formats should be in the config-files */ @@ -47,10 +48,11 @@ OUTPUT_FORMAT(elf32-littlemips) #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_BUFFER_SIZE - TTB_SIZE #elif CONFIG_CPU==AS3525 -#if MEMORYSIZE <= 2 -#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET +#define DRAMORIG DRAM_ORIG +#ifdef AMS_LOWMEM +#define DRAMSIZE (DRAM_SIZE - PLUGIN_BUFFER_SIZE - STUBOFFSET - TTB_SIZE) #else -#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE +#define DRAMSIZE (DRAM_SIZE - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE - TTB_SIZE) #endif #endif @@ -110,15 +112,14 @@ OUTPUT_FORMAT(elf32-littlemips) #define IRAMSIZE 0 #elif CONFIG_CPU==AS3525 -#if MEMORYSIZE <= 2 +#ifdef AMS_LOWMEM #define IRAMSIZE 0 /* simulates no IRAM since codec is already entirely in IRAM */ -#define CODEC_ORIGIN (0x50000 - CODEC_SIZE) -#define PLUGIN_ORIGIN (DRAMORIG + DRAMSIZE) +#define CODEC_ORIGIN (IRAM_ORIG + IRAM_SIZE - CODEC_SIZE) +#define PLUGIN_ORIGIN (DRAM_ORIG + DRAMSIZE) #else -#define IRAMORIG 0x20000 -#define IRAMSIZE 0x30000 +#define IRAMORIG (IRAM_ORIG + 0x20000) +#define IRAMSIZE (IRAM_ORIG + IRAM_SIZE - IRAMORIG) #endif -#define DRAMORIG 0x30000000 #elif CONFIG_CPU == JZ4732 #define DRAMORIG 0x80004000 + STUBOFFSET |