From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 23 Aug 2012 12:31:47 -0700 Subject: [U-Boot] [PATCH 3/6] SPL: Port SPL framework to powerpc In-Reply-To: <50367371.7080206@denx.de> References: <1345709565-28862-1-git-send-email-sr@denx.de> <1345709565-28862-4-git-send-email-sr@denx.de> <503663EE.9000902@ti.com> <50367371.7080206@denx.de> Message-ID: <50368523.4080107@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 On 08/23/2012 11:16 AM, Stefan Roese wrote: > On 08/23/2012 07:10 PM, Tom Rini wrote: >>> +#ifdef CONFIG_ARM >>> /* Define global data structure pointer to it*/ >>> gd_t gdata __attribute__ ((section(".data"))); >>> +#endif >> >> So you handle cleaning up the BSS differently, interesting. I'm going >> to see if that would work for ARM too.. > > Yes. Might be that I missed something though. I'll re-check tomorrow. > >> [snip] >>> @@ -89,7 +106,11 @@ void spl_parse_image_header(const struct image_header *header) >>> spl_image.size = __be32_to_cpu(header->ih_size) + header_size; >>> spl_image.entry_point = __be32_to_cpu(header->ih_load); >>> /* Load including the header */ >>> +#ifdef CONFIG_ARM >>> spl_image.load_addr = spl_image.entry_point - header_size; >>> +#else >>> + spl_image.load_addr = __be32_to_cpu(header->ih_load); >>> +#endif >> >> This isn't an ARM-ism but is instead because spl_nor.c isn't offsetting >> where the header is like mmc/nand/ymodem do, yes? Would it be possible >> to make spl_nor.c behave like the others? One of the reasons I ask is >> I'm looking at a NOR chip on my desk... > > I was wondering about this line as well. Please explain: Why can't ARM > just use header->ih_load as load_addr? Off the top of my head, I believe what goes on is that we read things into SDRAM such that the header is taken into account and we don't need to relocate the payload (U-Boot or Linux). -- Tom