瀏覽代碼

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>
Simon Glass 10 年之前
父節點
當前提交
fbd7282426
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      arch/x86/cpu/start.S

+ 6 - 0
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