summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/start.S
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-06 13:20:10 -0700
committerSimon Glass <sjg@chromium.org>2014-11-21 07:24:10 +0100
commitf67cd51e654ba6498230314b6e82b4dbbd4bfca7 (patch)
tree9f0b5e3b81734484df64e8b679a0eb66532ec49a /arch/x86/cpu/start.S
parente1ffd81797d59652124bd9cda813a58644f5dea9 (diff)
downloadu-boot-imx-f67cd51e654ba6498230314b6e82b4dbbd4bfca7.zip
u-boot-imx-f67cd51e654ba6498230314b6e82b4dbbd4bfca7.tar.gz
u-boot-imx-f67cd51e654ba6498230314b6e82b4dbbd4bfca7.tar.bz2
x86: Save the BIST value on reset
The built in self test value is available in register eax on start-up. Save it so that it can be accessed later. Unfortunately we must wait until the global_data is available before we can do this, so there is a little bit of shuffling to keep it around. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/start.S')
-rw-r--r--arch/x86/cpu/start.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index 781d324..b18f320 100644
--- a/arch/x86/cpu/start.S
+++ b/arch/x86/cpu/start.S
@@ -49,6 +49,8 @@ _start:
*/
movw $GD_FLG_COLD_BOOT, %bx
1:
+ /* Save BIST */
+ movl %eax, %ebp
/* Load the segement registes to match the gdt loaded in start16.S */
movl $(X86_GDT_ENTRY_32BIT_DS * X86_GDT_ENTRY_SIZE), %eax
@@ -117,9 +119,10 @@ car_init_ret:
addl $GD_MALLOC_BASE, %edx
movl %esp, (%edx)
#endif
-
- /* Align temporary global descriptor table to 16-byte boundary */
- andl $0xfffffff0, %esp
+ /* Store BIST */
+ movl %eax, %edx
+ addl $GD_BIST, %edx
+ movl %ebp, (%edx)
/* Set second parameter to setup_gdt */
movl %ecx, %edx