]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/x86/cpu/start.S
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / arch / x86 / cpu / start.S
index 329bb3ab35bdce43bc83692c16b60fac04529a8a..338bab19e471fdd3f4ab088aa999afeb2e10145e 100644 (file)
@@ -85,12 +85,25 @@ car_init_ret:
        /* Align global data to 16-byte boundary */
        andl    $0xfffffff0, %esp
 
+       /* Zero the global data since it won't happen later */
+       xorl    %eax, %eax
+       movl    $GENERATED_GBL_DATA_SIZE, %ecx
+       movl    %esp, %edi
+       rep     stosb
+
        /* Setup first parameter to setup_gdt */
        movl    %esp, %eax
 
        /* Reserve space for global descriptor table */
        subl    $X86_GDT_SIZE, %esp
 
+#if defined(CONFIG_SYS_MALLOC_F_LEN)
+       subl    $CONFIG_SYS_MALLOC_F_LEN, %esp
+       movl    %eax, %edx
+       addl    $GD_MALLOC_BASE, %edx
+       movl    %esp, (%edx)
+#endif
+
        /* Align temporary global descriptor table to 16-byte boundary */
        andl    $0xfffffff0, %esp