summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-10 07:49:15 -0600
committerSimon Glass <sjg@chromium.org>2014-10-23 19:45:28 -0600
commitfbd72824263dfb48bfee999f8b92ba9cc8abac1b (patch)
tree00ad08ef13a99a445640ce30202aa30dccbf62ac /arch
parent9c284ffd93cda1e434eeece0d95698157d00fe18 (diff)
downloadu-boot-imx-fbd72824263dfb48bfee999f8b92ba9cc8abac1b.zip
u-boot-imx-fbd72824263dfb48bfee999f8b92ba9cc8abac1b.tar.gz
u-boot-imx-fbd72824263dfb48bfee999f8b92ba9cc8abac1b.tar.bz2
dm: x86: Zero global data before board_init_f()
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/start.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index 329bb3a..71cab22 100644
--- a/arch/x86/cpu/start.S
+++ b/arch/x86/cpu/start.S
@@ -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