From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 04 Dec 2012 20:05:50 +0100 Subject: [U-Boot] [PATCH 0/57] RFC: Move arch-specific global data into its own structure In-Reply-To: References: <1353100842-20126-1-git-send-email-sjg@chromium.org> <20121120072517.295652003D0@gemini.denx.de> <20121203145414.GE15777@bill-the-cat> Message-ID: <20121204190550.70D4D201071@gemini.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 Dear Graeme Russ, In message you wrote: > > I've mentioned this before - I think gd is being abused. To me, gd > should contain only data members that are explicitly required prior to > SDRAM being initialised and BSS being available. It has become a bit > of a 'well I need this variable everywhere, I'll dump it in gd'. All too true!! > To be honest, I think gd should only be a temporary structure used to > carry specific data through the initialisation process up to the point > BSS becomes available. With the 'early malloc' patches in the > pipeline, it might even be possible to malloc the gd structure early > and then when BSS is available, copy the data into the final global > data structure in BSS. I think that would be complicated by functions > that need to use gd both before and after BSS becomes available. If we could drop gd after relocation, I'd be all too happy. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Success in marriage is not so much finding the right person as it is being the right person.