From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 26 Oct 2010 08:39:47 +0200 Subject: [U-Boot] ALERT! >90% of all board configurations BROKEN In-Reply-To: <4CC5E865.70003@emk-elektronik.de> References: <20101025200019.B5BBC152451@gemini.denx.de> <4CC5E865.70003@emk-elektronik.de> Message-ID: <4CC677B3.2020502@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Reinhard, Reinhard Meyer wrote: > Dear Wolfgang Denk, >> this is an ALERT! >> >> I just noticed (when debugging a strage phenomenon) that most of the >> board configurations (170 out of 191 for PowerPC, _ALL_ for ARM) are >> broken, because the size of struct global_data has grown but >> CONFIG_SYS_GBL_DATA_SIZE has not been adapted (commit 91a7675 added >> 32 bytes - and yes, I am to blame for that, where is that brown paper >> bag...) >> >> Fact is, the overwhelming majority of boards has currently problems >> like this: >> >> sizeof(struct global_data) = 136, CONFIG_SYS_GBL_DATA_SIZE = 128 >> >> >> This may appear to work, or may cause "funny" errors, or simply hangs >> the board hard very early in booting. > > Grep-ing for CONFIG_SYS_GBL_DATA_SIZE in *.[chsS] Makefile *.ld it > seems to me that with "ELF-reloc" active that define is not used > anywhere at least in ARM. > > Or did I miss a place? Yep, for example I use it on the beagle3 board, look in: include/configs/omap3_beagle.h Checked sizeof(struct global_data) on beagle board, I get 92 bytes, which is OK with the define in the boardconfig: #define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for */ /* initial data */ A fast look in "arch/arm/include/asm/global_data.h": I think there should be only problems on arm boards, if CONFIG_AT91FAMILY is defined, because this define adds + 44 bytes ... bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany