From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Mon, 04 Oct 2010 21:06:03 +1100 Subject: [U-Boot] [PATCH 10/19] x86: Move ECC initialisation outside RAM initialisation In-Reply-To: <4CA9A582.8070107@mvista.com> References: <1286163483-21697-1-git-send-email-graeme.russ@gmail.com> <1286163483-21697-11-git-send-email-graeme.russ@gmail.com> <4CA9A582.8070107@mvista.com> Message-ID: <4CA9A70B.6030302@gmail.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 04/10/10 20:59, Sergei Shtylyov wrote: > Hello. > > On 04-10-2010 7:37, Graeme Russ wrote: > >> To allow for 'load anywhere' images, the %ebp return pointer 'hack' must >> be removed, so we cannot have two 'calls' to get_mem_size > >> Signed-off-by: Graeme Russ > [...] > >> diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S >> index cb47ce7..9e6e0bf 100644 >> --- a/arch/i386/cpu/start.S >> +++ b/arch/i386/cpu/start.S >> @@ -93,6 +93,17 @@ mem_init_ret: >> jmp get_mem_size >> get_mem_size_ret: >> >> +#if CONFIG_SYS_SDRAM_ECC_ENABLE >> + /* Skip ECC initialization if not starting from cold-reset */ >> + movl %ebx, %ecx >> + andl $GD_FLG_COLD_BOOT, %ecx >> + jz ecc_init_ret > > But the label you added is called 'init_ecc_ret'. Are you sure the > name is correct here? Yes, if the board has not been cold-booted (i.e. a new U-Boot image has been loaded into RAM and executed) we must skip ECC initialization (it destroys the contents of memory) > >> + mov $init_ecc_ret, %ebp >> + jmp init_ecc >> + >> +init_ecc_ret: >> +#endif >> + >> /* Check we have enough memory for stack */ >> movl $CONFIG_SYS_STACK_SIZE, %ecx >> cmpl %ecx, %eax > > WBR, Sergei > Regards, Graeme