summaryrefslogtreecommitdiffstats
path: root/arch/x86/cpu/start16.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/start16.S
parente1ffd81797d59652124bd9cda813a58644f5dea9 (diff)
downloadtalos-obmc-uboot-f67cd51e654ba6498230314b6e82b4dbbd4bfca7.tar.gz
talos-obmc-uboot-f67cd51e654ba6498230314b6e82b4dbbd4bfca7.zip
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/start16.S')
-rw-r--r--arch/x86/cpu/start16.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index 445d5a1734..9550502e9a 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -21,6 +21,9 @@
.code16
.globl start16
start16:
+ /* Save BIST */
+ movl %eax, %ecx
+
/* Set the Cold Boot / Hard Reset flag */
movl $GD_FLG_COLD_BOOT, %ebx
@@ -45,9 +48,11 @@ o32 cs lgdt gdt_ptr
/* Flush the prefetch queue */
jmp ff
ff:
- /* Finally jump to the 32bit initialization code */
+
+ /* Finally restore BIST and jump to the 32bit initialization code */
movw $code32start, %ax
movw %ax, %bp
+ movl %ecx, %eax
o32 cs ljmp *(%bp)
/* 48-bit far pointer */
OpenPOWER on IntegriCloud