From 8927df42054d1b3aae505f917281a20fe2536ec6 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Mon, 17 Feb 2014 19:02:21 +0100 Subject: imx233: fix app.lds to properly support INIT_ATTR Original fix by Marcin: it had a problem because crt0 on imx233 is more complicated than many targets: since we use virtual memory, we first disable the MMU, then move the entire image (including init and itext stuff), then setup a temporary stack to setup the MMU. Only when the MMU is enabled, can we move the init and itext stuff to its right location and finally boot. This requires some trickery because: - the initial move copies everything, including init and itext - the stack overlaps with init and itext to reclaim space - the temporary stack cannot be the same as the main stack to avoid trashing the init and itext code, also it needs to be a physical address Change-Id: Ibaf331c7d90b61f99225d93c9e621eb0f3f8f2dc --- firmware/target/arm/imx233/boot.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/target/arm/imx233/boot.lds') diff --git a/firmware/target/arm/imx233/boot.lds b/firmware/target/arm/imx233/boot.lds index 68472d129c..ca455b47ca 100644 --- a/firmware/target/arm/imx233/boot.lds +++ b/firmware/target/arm/imx233/boot.lds @@ -74,7 +74,7 @@ SECTIONS } > DRAM /* physical address of the stack */ - stackend_phys = stackend - CACHED_DRAM_ADDR + UNCACHED_DRAM_ADDR; + crt0_tmpstack_phys = stackend - CACHED_DRAM_ADDR + UNCACHED_DRAM_ADDR; /* treat .bss and .ncbss as a single section */ .bss (NOLOAD) : -- cgit v1.2.3