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>
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 129bc3e..580f763 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -31,6 +31,9 @@
 #ifdef CONFIG_SYS_MALLOC_F_LEN
 	DEFINE(GD_MALLOC_BASE, offsetof(struct global_data, malloc_base));
 #endif
+#ifdef CONFIG_X86
+	DEFINE(GD_BIST, offsetof(struct global_data, arch.bist));
+#endif
 
 #if defined(CONFIG_ARM)