From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Sun, 14 Nov 2010 21:59:32 +0100 Subject: [U-Boot] previous two e-mails are RFC/demonstration! In-Reply-To: <20101114204445.4531714EA7E@gemini.denx.de> References: <4CE00793.8070501@emk-elektronik.de> <20101114162340.9766714EA7E@gemini.denx.de> <4CE03BA0.7010800@emk-elektronik.de> <4CE04585.807@free.fr> <20101114204445.4531714EA7E@gemini.denx.de> Message-ID: <4CE04DB4.6010109@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear All, > Dear Albert ARIBAUD, > > In message<4CE04585.807@free.fr> you wrote: >> >> Currently start.S sets the stack twice, once before calling >> board_init_f, and once in relocate_code. Are you suggesting we remove >> the second sp setting? > > As relocation can move the stack to some completely different location > the SP has to be re-initialized (in this setup, after copying the > global data to their new location). In the *most general* case stack and gd will have to be relocated to SDRAM, since the pre-relocation memory *could* be locked data cache or some buffer memory that is not free anymore when u-boot is up. Of course, on SoCs like AT91SAM9 where several (4k - 32k) of SRAM are available it would be tempting to keep stack and gd just in SRAM. But we don't want to specialize, we want to generalize... Best regards, Reinhard