forked from len0rd/rockbox
Temporary solution for code and data in IRAM for iriver codecs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6029 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b9c9d80fef
commit
e638eadaff
4 changed files with 24 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
#include <private/coldfire.h>
|
#include <private/coldfire.h>
|
||||||
|
|
||||||
|
void FLAC__lpc_restore_signal_order8_mac(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) __attribute__ ((section (".icode")));
|
||||||
void FLAC__lpc_restore_signal_order8_mac(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[])
|
void FLAC__lpc_restore_signal_order8_mac(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[])
|
||||||
{
|
{
|
||||||
register const FLAC__int32 *qlp0 = &qlp_coeff[(order-1)];
|
register const FLAC__int32 *qlp0 = &qlp_coeff[(order-1)];
|
||||||
|
|
|
@ -155,6 +155,9 @@ FLAC__bool flac_eof_handler (const FLAC__SeekableStreamDecoder *decoder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern char iramcopy[];
|
||||||
|
extern char iramstart[];
|
||||||
|
extern char iramend[];
|
||||||
|
|
||||||
/* this is the plugin entry point */
|
/* this is the plugin entry point */
|
||||||
enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
|
@ -168,6 +171,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
|
||||||
otherwise you will get lovely "I04: IllInstr" errors... :-) */
|
otherwise you will get lovely "I04: IllInstr" errors... :-) */
|
||||||
rb = api;
|
rb = api;
|
||||||
|
|
||||||
|
rb->memcpy(iramstart, iramcopy, iramend-iramstart);
|
||||||
|
|
||||||
/* This function sets up the buffers and reads the file into RAM */
|
/* This function sets up the buffers and reads the file into RAM */
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ OUTPUT_FORMAT(elf32-sh)
|
||||||
|
|
||||||
#ifdef IRIVER_H100
|
#ifdef IRIVER_H100
|
||||||
#define DRAMORIG 0x30000000
|
#define DRAMORIG 0x30000000
|
||||||
|
#define IRAMORIG 0x10010000
|
||||||
|
#define IRAMSIZE 0x8000
|
||||||
#else
|
#else
|
||||||
#define DRAMORIG 0x09000000 + STUBOFFSET
|
#define DRAMORIG 0x09000000 + STUBOFFSET
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,6 +33,9 @@ OUTPUT_FORMAT(elf32-sh)
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
PLUGIN_RAM : ORIGIN = PLUGIN_ORIGIN, LENGTH = PLUGIN_LENGTH
|
PLUGIN_RAM : ORIGIN = PLUGIN_ORIGIN, LENGTH = PLUGIN_LENGTH
|
||||||
|
#ifdef IRIVER_H100
|
||||||
|
PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
@ -57,5 +62,18 @@ SECTIONS
|
||||||
*(.rodata.str1.1)
|
*(.rodata.str1.1)
|
||||||
*(.rodata.str1.4)
|
*(.rodata.str1.4)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
|
#ifdef IRIVER_H100
|
||||||
|
iramcopy = .;
|
||||||
|
#endif
|
||||||
} > PLUGIN_RAM
|
} > PLUGIN_RAM
|
||||||
|
|
||||||
|
#ifdef IRIVER_H100
|
||||||
|
.iram IRAMORIG : AT ( iramcopy)
|
||||||
|
{
|
||||||
|
iramstart = .;
|
||||||
|
*(.icode)
|
||||||
|
*(.idata)
|
||||||
|
iramend = .;
|
||||||
|
} > PLUGIN_IRAM
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ _pluginbuf = 0;
|
||||||
#ifdef IRIVER_H100
|
#ifdef IRIVER_H100
|
||||||
#define DRAMORIG 0x30000000 + STUBOFFSET
|
#define DRAMORIG 0x30000000 + STUBOFFSET
|
||||||
#define IRAMORIG 0x10000000
|
#define IRAMORIG 0x10000000
|
||||||
#define IRAMSIZE 0x18000
|
#define IRAMSIZE 0x10000
|
||||||
#else
|
#else
|
||||||
#define DRAMORIG 0x09000000 + STUBOFFSET
|
#define DRAMORIG 0x09000000 + STUBOFFSET
|
||||||
#define IRAMORIG 0x0f000000
|
#define IRAMORIG 0x0f000000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue