summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/x86_64
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-16 14:03:59 (GMT)
committerBin Meng <bmeng.cn@gmail.com>2017-02-06 03:38:46 (GMT)
commita160092a610f4345cea5b606a8daf27d1feba185 (patch)
treedf18c0c3a3987c65e1093401d030b478e6ad09dc /arch/x86/cpu/x86_64
parent93031595ede1c8a0ee1f7820ab9d719b0e9e51c7 (diff)
downloadu-boot-fsl-qoriq-a160092a610f4345cea5b606a8daf27d1feba185.tar.xz
x86: Support global_data on x86_64
At present this is just an ordinary variable. We may consider making it a fixed register in the future. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/x86_64')
-rw-r--r--arch/x86/cpu/x86_64/cpu.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index b12eab1..3627229 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -6,6 +6,33 @@
*/
#include <common.h>
+#include <debug_uart.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* Global declaration of gd */
+struct global_data *global_data_ptr;
+
+void arch_setup_gd(gd_t *new_gd)
+{
+ global_data_ptr = new_gd;
+
+ /*
+ * TODO(sjg@chromium.org): For some reason U-Boot does not boot
+ * without this line. It fails to start up U-Boot proper and instead
+ * restarts SPL. Need to figure out why:
+ *
+ * U-Boot SPL 2017.01
+ *
+ * U-Boot SPL 2017.01
+ * CPU: Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz
+ * Trying to boot from SPIJumping to 64-bit U-Boot: Note many
+ * features are missing
+ *
+ * U-Boot SPL 2017.01
+ */
+ printch(' ');
+}
int cpu_has_64bit(void)
{