From 8b4949381c9edea54547624827acf0d562ef5b76 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 6 Mar 2022 15:13:31 +0000 Subject: 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 --- firmware/target/mips/ingenic_x1000/crt0.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'firmware/target/mips/ingenic_x1000/crt0.S') 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: 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 -- cgit v1.2.3