diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-03-06 15:13:31 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-03-12 14:50:45 -0500 |
commit | 8b4949381c9edea54547624827acf0d562ef5b76 (patch) | |
tree | c051405a773493160e8773febe3245735d0b1dd2 | |
parent | 0de2d3a0b6941c566713309078eeed9a8972bae4 (diff) | |
download | rockbox-8b4949381c9edea54547624827acf0d562ef5b76.tar.gz rockbox-8b4949381c9edea54547624827acf0d562ef5b76.zip |
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
-rw-r--r-- | firmware/target/mips/ingenic_x1000/app.lds | 9 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_x1000/crt0.S | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/app.lds b/firmware/target/mips/ingenic_x1000/app.lds index 55a43af10a..2943329ba7 100644 --- a/firmware/target/mips/ingenic_x1000/app.lds +++ b/firmware/target/mips/ingenic_x1000/app.lds | |||
@@ -23,6 +23,7 @@ MEMORY | |||
23 | { | 23 | { |
24 | IRAM : ORIGIN = X1000_IRAM_BASE, LENGTH = X1000_IRAM_SIZE | 24 | IRAM : ORIGIN = X1000_IRAM_BASE, LENGTH = X1000_IRAM_SIZE |
25 | DRAM : ORIGIN = X1000_DRAM_BASE, LENGTH = X1000_DRAM_SIZE | 25 | DRAM : ORIGIN = X1000_DRAM_BASE, LENGTH = X1000_DRAM_SIZE |
26 | TCSM : ORIGIN = X1000_TCSM_BASE, LENGTH = X1000_TCSM_SIZE | ||
26 | } | 27 | } |
27 | 28 | ||
28 | SECTIONS | 29 | SECTIONS |
@@ -68,6 +69,14 @@ SECTIONS | |||
68 | } > IRAM | 69 | } > IRAM |
69 | _iramcopy = LOADADDR(.iram); | 70 | _iramcopy = LOADADDR(.iram); |
70 | 71 | ||
72 | .tcsm X1000_TCSM_BASE: AT (_bssbegin + SIZEOF(.iram)) | ||
73 | { | ||
74 | _tcsmstart = .; | ||
75 | KEEP(*(.tcsm*)); | ||
76 | _tcsmend = .; | ||
77 | } > TCSM | ||
78 | _tcsmcopy = LOADADDR(.tcsm); | ||
79 | |||
71 | . = ALIGN(4); | 80 | . = ALIGN(4); |
72 | .stack (NOLOAD) : | 81 | .stack (NOLOAD) : |
73 | { | 82 | { |
diff --git a/firmware/target/mips/ingenic_x1000/crt0.S b/firmware/target/mips/ingenic_x1000/crt0.S index 47c3c4f964..f7cb4686f1 100644 --- a/firmware/target/mips/ingenic_x1000/crt0.S +++ b/firmware/target/mips/ingenic_x1000/crt0.S | |||
@@ -79,6 +79,19 @@ _iram_loop: | |||
79 | bne t1, t2, _iram_loop | 79 | bne t1, t2, _iram_loop |
80 | sw t3, -4(t1) | 80 | sw t3, -4(t1) |
81 | 81 | ||
82 | #if 0 | ||
83 | /* Copy TCSM from BSS */ | ||
84 | la t0, _tcsmcopy | ||
85 | la t1, _tcsmstart | ||
86 | la t2, _tcsmend | ||
87 | _tcsm_loop: | ||
88 | lw t3, 0(t0) | ||
89 | addiu t0, 4 | ||
90 | sw t3, 0(t1) | ||
91 | bne t1, t2, _tcsm_loop | ||
92 | addiu t1, 4 | ||
93 | #endif | ||
94 | |||
82 | /* Clear the BSS segment (needed to zero-initialize C static values) */ | 95 | /* Clear the BSS segment (needed to zero-initialize C static values) */ |
83 | la t0, _bssbegin | 96 | la t0, _bssbegin |
84 | la t1, _bssend | 97 | la t1, _bssend |