From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 17 May 2011 16:00:59 +0530 Subject: [U-Boot] [PATCH v2 06/22] Add generic spl infrastructure In-Reply-To: <20110517081530.3EBB41491B09@gemini.denx.de> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> <1305472900-4004-7-git-send-email-aneesh@ti.com> <20110516133231.1cb2ccc8@schlenkerla.am.freescale.net> <4DD21BAA.6000601@ti.com> <20110517081530.3EBB41491B09@gemini.denx.de> Message-ID: <4DD24E63.3020006@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Aneesh, On Tuesday 17 May 2011 01:45 PM, Wolfgang Denk wrote: > Dear Aneesh V, > > In message<4DD21BAA.6000601@ti.com> you wrote: >> >>> What is MLO? >> >> MLO is the name of SPL created for OMAP. ROM code expects a file with >> this name as the first image when it boots from FAT. > > What does MLO mean? On looking up ROM code spec, this seems to stand for "MMC/SD Loader" > > >>>> +#ifdef CONFIG_PRELOADER >>>> +/* SPL works from internal RAM. gd pointer can be in .data section */ >>>> +#define DECLARE_GLOBAL_DATA_PTR extern gd_t *gd >>>> +#else >>>> #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8") >>>> +#endif >>> >>> Is this appropriate for all ARM boards (e.g. those currently using >>> nand_spl)? >> >> None of the SPL's other than this one seems to be using global data >> today. If anybody wants to use it this seems to be the logical option >> for me because by definition SPL runs from some kind of RAM so global >> data can be placed in the .data section of SPL. > > But that's not what you are doing. You are not changing the storage > of the global data itself, you are changing the storage of the POINTER > TO the global data - and this makes no sense to me. The pointer can > certainly remain in a register even if the data itself is somewhere > else. Why do we want to waste a register in the entire SPL when global data can be accessed directly from .data section? best regards, Aneesh