From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Harvey Date: Wed, 16 Apr 2014 23:07:51 -0700 Subject: [U-Boot] [PATCH 06/11] MX6: add struct for sharing data between SPL and uboot In-Reply-To: <534BD60F.3030504@denx.de> References: <1396504871-1454-1-git-send-email-tharvey@gateworks.com> <1396504871-1454-7-git-send-email-tharvey@gateworks.com> <534BD60F.3030504@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Apr 14, 2014 at 5:35 AM, Stefano Babic wrote: > Hi Tim, > > I see checking your patch that the MXS uses the same concept. And as far > as I can see, boot_mode_idx is used only to print the boot devioce Stefano, yes, that is where I got the concept from. > > However, we have not generally a concept to pass data between SPL and > u-boot. My question is even if it is really needed. The size of DRAM is > retrived at run time by u-boot running get_ram_size(), that is a better > solution. I've been told this before, but I've found that get_ram_size() will hang on an i.MX6 if you pass it a maxsize larger than the memory in your system. Perhaps you can verify you see the same behavior? > > SPL is thought to generally load an image (of course, in most cases it > is u-boot). In Falcon mode, the kernel is started without running > u-boot, making this structure useless. Do we really need such a way (but > then, it must be generalized as SPL API), or can we get rid of it ? As we have an EEPROM on the board that tells us the physical ram size, I use that to avoid the lockup. Eventually I would like to read and validate the entire EEPROM once in SPL and pass this to u-boot.img to avoid reading and validating it again. I think this is a good example of why sharing data between SPL and u-boot.img could be useful. Regards, Tim