]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: x86: Zero global data before board_init_f()
authorSimon Glass <sjg@chromium.org>
Fri, 10 Oct 2014 13:49:15 +0000 (07:49 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 24 Oct 2014 01:45:28 +0000 (19:45 -0600)
To permit information to be passed from the early U-Boot code to
board_init_f() we cannot zero the global_data in board_init_f(). Instead
zero it in the start-up code.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/start.S

index 329bb3ab35bdce43bc83692c16b60fac04529a8a..71cab22e2a95008a4b72ad0b95dfbe79f13a066d 100644 (file)
@@ -85,6 +85,12 @@ 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