mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Gigabeat S: Place SDMA code load address starting in uninitialized section address and copy it to the plugin buffer since it only needed very early in initialization. Will save about 6K in RAM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19963 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ca07873607
commit
e1e8101837
3 changed files with 41 additions and 9 deletions
|
|
@ -91,16 +91,18 @@ SECTIONS
|
|||
} AT> DRAM
|
||||
|
||||
_vectorscopy = LOADADDR(.vectors);
|
||||
|
||||
.stack :
|
||||
|
||||
.stack (NOLOAD) :
|
||||
{
|
||||
*(.stack)
|
||||
stackbegin = .;
|
||||
. += 0x2000;
|
||||
stackend = .;
|
||||
} > DRAM
|
||||
|
||||
_sdmacodecopy = stackbegin;
|
||||
|
||||
.bss :
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
_edata = .;
|
||||
*(.bss*)
|
||||
|
|
@ -110,30 +112,38 @@ SECTIONS
|
|||
_end = .;
|
||||
} > DRAM
|
||||
|
||||
.audiobuf ALIGN(4) :
|
||||
.audiobuf (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(0x4);
|
||||
_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 = .;
|
||||
}
|
||||
|
||||
.sdma _pluginbuf : AT( _sdmacodecopy )
|
||||
{
|
||||
_sdmacodestart = .;
|
||||
*(.sdmacode);
|
||||
_sdmacodeend = .;
|
||||
}
|
||||
|
||||
.devbss (NOLOAD) :
|
||||
{
|
||||
_devbssdata = .;
|
||||
|
|
|
|||
|
|
@ -231,6 +231,26 @@ remap_end:
|
|||
bhi 1b
|
||||
#endif /* BOOTLOADER */
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Copy discardable SDMA code - loaded in the stack section
|
||||
* and so must be done first. Destination is the plugin buffer
|
||||
* which is safe when SDMA init takes place just after kernel
|
||||
* init. */
|
||||
ldr r4, =_sdmacodecopy
|
||||
ldr r3, =_sdmacodeend
|
||||
ldr r2, =_sdmacodestart
|
||||
1:
|
||||
cmp r3, r2
|
||||
ldrhi r5, [r4], #4
|
||||
strhi r5, [r2], #4
|
||||
bhi 1b
|
||||
|
||||
/* Make buffer coherent */
|
||||
ldr r0, =_sdmacodestart
|
||||
sub r1, r3, r0
|
||||
bl clean_dcache_range
|
||||
#endif /* BOOTLOADER */
|
||||
|
||||
/* Initialise bss section to zero */
|
||||
ldr r2, =_edata
|
||||
ldr r3, =_end
|
||||
|
|
|
|||
|
|
@ -356,7 +356,8 @@
|
|||
/*!
|
||||
* Code download for i.MX system revision = 1.0
|
||||
*/
|
||||
static __attribute__((aligned(4))) const short sdma_code_1[RAM_CODE_SIZE_1] =
|
||||
static __attribute__((aligned(4), section(".sdmacode")))
|
||||
const short sdma_code_1[RAM_CODE_SIZE_1] =
|
||||
{
|
||||
0xc0ec, 0x7d59, 0x0970, 0x0111, 0x5111, 0x5ad1, 0x5bd9, 0xc0fe,
|
||||
0x5ce1, 0x7d02, 0x0200, 0x9806, 0x08ff, 0x0011, 0x28ff, 0x00bc,
|
||||
|
|
@ -851,7 +852,8 @@ static __attribute__((aligned(4))) const short sdma_code_1[RAM_CODE_SIZE_1] =
|
|||
/*!
|
||||
* Code download for i.MX system revision > 1.0
|
||||
*/
|
||||
static __attribute__((aligned(4))) const short sdma_code_2[RAM_CODE_SIZE_2] =
|
||||
static __attribute__((aligned(4), section(".sdmacode")))
|
||||
const short sdma_code_2[RAM_CODE_SIZE_2] =
|
||||
{
|
||||
0x0870, 0x0011, 0x5010, 0xc0ec, 0x7d61, 0x5ac0, 0x5bc8, 0x5ef8,
|
||||
0xc0fe, 0x56f8, 0x7d02, 0x0200, 0x9806, 0x6ec3, 0x6d07, 0x5df0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue