diff mbox

[U-Boot,10/32] x86: Call early_board_init when warm booting

Message ID 1296822959-3927-11-git-send-email-graeme.russ@gmail.com
State Accepted
Commit 4e33467d44620edf224aad03c2c7396fb4918696
Delegated to: Graeme Russ
Headers show

Commit Message

Graeme Russ Feb. 4, 2011, 12:35 p.m. UTC
early_board_init has been skipped to avoid SDRAM corruption in the case
that a fully relocatable image has been loaded into SDRAM and is being
executed from SDRAM. x86 is being aligned with other architectures (ARM
and PPC in particlar) and will be using Cache-As-RAM to run a C
environment from Flash (or SRAM if you have some). early_board_init may
be needed to assist in the setup of Cache-As-RAM and the early C
environment

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
---
 arch/i386/cpu/start.S |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Comments

Graeme Russ Feb. 12, 2011, 4:28 a.m. UTC | #1
On 04/02/11 23:35, Graeme Russ wrote:
> early_board_init has been skipped to avoid SDRAM corruption in the case
> that a fully relocatable image has been loaded into SDRAM and is being
> executed from SDRAM. x86 is being aligned with other architectures (ARM
> and PPC in particlar) and will be using Cache-As-RAM to run a C
> environment from Flash (or SRAM if you have some). early_board_init may
> be needed to assist in the setup of Cache-As-RAM and the early C
> environment
> 
> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
> ---
>  arch/i386/cpu/start.S |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 

Applied to u-boot-x86

Regards,

Graeme
diff mbox

Patch

diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S
index 460c21b..97bac8f 100644
--- a/arch/i386/cpu/start.S
+++ b/arch/i386/cpu/start.S
@@ -67,16 +67,16 @@  _start:
 	/* Clear the interupt vectors */
 	lidt	blank_idt_ptr
 
-	/* Skip low-level initialization if not starting from cold-reset */
-	movl	%ebx, %ecx
-	andl	$GD_FLG_COLD_BOOT, %ecx
-	jz	skip_mem_init
-
 	/* Early platform init (setup gpio, etc ) */
 	jmp	early_board_init
 .globl early_board_init_ret
 early_board_init_ret:
 
+	/* Skip memory initialization if not starting from cold-reset */
+	movl	%ebx, %ecx
+	andl	$GD_FLG_COLD_BOOT, %ecx
+	jz	skip_mem_init
+
 	/* size memory */
 	jmp	mem_init
 .globl mem_init_ret