summaryrefslogtreecommitdiff
path: root/arch/i386/cpu/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/cpu/start.S')
-rw-r--r--arch/i386/cpu/start.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S
index 8fdcd81..829468f 100644
--- a/arch/i386/cpu/start.S
+++ b/arch/i386/cpu/start.S
@@ -118,6 +118,11 @@ mem_ok:
wbinvd
+ /* Determine our load offset */
+ call 1f
+1: popl %ecx
+ subl $1b, %ecx
+
/* Set the upper memory limit parameter */
subl $CONFIG_SYS_STACK_SIZE, %eax
@@ -127,6 +132,7 @@ mem_ok:
/* %eax points to the global data structure */
movl %esp, (GD_RAM_SIZE * 4)(%eax)
movl %ebx, (GD_FLAGS * 4)(%eax)
+ movl %ecx, (GD_LOAD_OFF * 4)(%eax)
call board_init_f /* Enter, U-boot! */