forked from len0rd/rockbox
x1000: add TCSM section to linker script
This is intended for debugging OF kernel boot problems and has to be enabled manually at compile time to make it usable. Change-Id: Ie5ce9f0a7639be0acf5e3879cfc3a7b8b89caa5c
This commit is contained in:
parent
0de2d3a0b6
commit
8b4949381c
2 changed files with 22 additions and 0 deletions
|
@ -23,6 +23,7 @@ MEMORY
|
|||
{
|
||||
IRAM : ORIGIN = X1000_IRAM_BASE, LENGTH = X1000_IRAM_SIZE
|
||||
DRAM : ORIGIN = X1000_DRAM_BASE, LENGTH = X1000_DRAM_SIZE
|
||||
TCSM : ORIGIN = X1000_TCSM_BASE, LENGTH = X1000_TCSM_SIZE
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
|
@ -68,6 +69,14 @@ SECTIONS
|
|||
} > IRAM
|
||||
_iramcopy = LOADADDR(.iram);
|
||||
|
||||
.tcsm X1000_TCSM_BASE: AT (_bssbegin + SIZEOF(.iram))
|
||||
{
|
||||
_tcsmstart = .;
|
||||
KEEP(*(.tcsm*));
|
||||
_tcsmend = .;
|
||||
} > TCSM
|
||||
_tcsmcopy = LOADADDR(.tcsm);
|
||||
|
||||
. = ALIGN(4);
|
||||
.stack (NOLOAD) :
|
||||
{
|
||||
|
|
|
@ -79,6 +79,19 @@ _iram_loop:
|
|||
bne t1, t2, _iram_loop
|
||||
sw t3, -4(t1)
|
||||
|
||||
#if 0
|
||||
/* Copy TCSM from BSS */
|
||||
la t0, _tcsmcopy
|
||||
la t1, _tcsmstart
|
||||
la t2, _tcsmend
|
||||
_tcsm_loop:
|
||||
lw t3, 0(t0)
|
||||
addiu t0, 4
|
||||
sw t3, 0(t1)
|
||||
bne t1, t2, _tcsm_loop
|
||||
addiu t1, 4
|
||||
#endif
|
||||
|
||||
/* Clear the BSS segment (needed to zero-initialize C static values) */
|
||||
la t0, _bssbegin
|
||||
la t1, _bssend
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue