From: Marek Vasut Date: Thu, 16 Aug 2018 16:04:43 +0200 Subject: [U-Boot] [PATCH v5] arm: socfpga: fix U-Boot running from fpga OnChip RAM In-Reply-To: References: <20180816073810.18096-1-simon.k.r.goldschmidt@gmail.com> <769aab1b-bfd2-d3d9-d050-c91eaa71302e@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 08/16/2018 03:50 PM, Simon Goldschmidt wrote: > On Thu, Aug 16, 2018 at 3:15 PM Marek Vasut wrote: >> >> On 08/16/2018 03:12 PM, Simon Goldschmidt wrote: >>> >>> >>> Marek Vasut > schrieb am Do., 16. >>> Aug. 2018, 15:06: >>> >>> On 08/16/2018 03:00 PM, Simon Goldschmidt wrote: >>> > On Thu, Aug 16, 2018 at 1:18 PM Marek Vasut >> > wrote: >>> >> >>> >> On 08/16/2018 09:38 AM, Simon Goldschmidt wrote: >>> >>> gd->env_addr points to pre-relocation address even after >>> >>> relocation. This leads to an abort in env_callback_init >>> >>> when loading the environment. >>> >>> >>> >>> Fix this by enabling CONFIG_SYS_EXTRA_ENV_RELOC. >>> >>> >>> >>> Signed-off-by: Simon Goldschmidt >>> >> > >>> >> >>> >> I have one last question -- does this somehow influence SPL ? >>> > >>> > No, it doesn't. The code that gets enabled by this define is in >>> > common/board_r.c, which is not linked for SPL. >>> >>> Ah, thanks for checking. >>> >>> btw do you think it'd make sense to just enable this by default on all >>> systems and zap the EXTRA_ENV_RELOC macro altogether ? >>> >>> >>> Yes, that's what I have thought about already. Just like the for the >>> embedded device tree relocation, we could then probably use >>> gd->reloc_off instead of CONFIG_SYS_MONITOR_BASE. I'm just not sure this >>> really works for all boards, but it would be worth a try to push after >>> this release is out. >> >> I think so too. I cannot think of a reason why this shouldn't be enabled >> in fact. > > Exactly. Too me it seems like a leftover, especially given the use of > CONFIG_SYS_MONITOR_BASE, which seems a little outdated, too. > I've set up a reminder for a patch to remove it after the release. Feel free to send it now. -- Best regards, Marek Vasut