From: Reinhard Meyer Date: Sat, 13 Nov 2010 22:35:36 +0100 Subject: [U-Boot] RFC: Aligning arch initialisation sequences In-Reply-To: <20101113081712.C5D85150ADD@gemini.denx.de> References: <4CD67A22.9040802@gmail.com> <201011091835.38581.vapier@gentoo.org> <4CDE1107.80108@gmail.com> <4CDE30CF.9010509@emk-elektronik.de> <20101113081712.C5D85150ADD@gemini.denx.de> Message-ID: <4CDF04A8.4050802@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 Wolfgang Denk, > I think you would quickly find this becoming a pretty serious pain. Yes, I saw that soon after my first post:) But whats left of my ideas is the following: in asm: set stack to end of SRAM (or whatever) (board-config.h would not subtract GENERATED_GBL_DATA_SIZE anymore) in c: board_early_init(void) { gd_t auto_gd; gd = &auto_gd; That would rid us of all alignment concerns: Setting stack to end of initial storage will certainly be aligned, and the auto_gd will be aligned as the toolchain deems necessary. We would not need GENERATED_GBL_DATA_SIZE anymore. The auto_gd space on stack will be valid even into the call to relocate_code. Best Regards, Reinhard