36272296e638a9a8fde6c87d33a6c9c3dbf0d9f6
[oweals/u-boot.git] / arch / x86 / cpu / x86_64 / cpu.c
1 /*
2  * (C) Copyright 2016 Google, Inc
3  * Written by Simon Glass <sjg@chromium.org>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #include <common.h>
9 #include <debug_uart.h>
10
11 DECLARE_GLOBAL_DATA_PTR;
12
13 /* Global declaration of gd */
14 struct global_data *global_data_ptr;
15
16 void arch_setup_gd(gd_t *new_gd)
17 {
18         global_data_ptr = new_gd;
19
20         /*
21          * TODO(sjg@chromium.org): For some reason U-Boot does not boot
22          * without this line. It fails to start up U-Boot proper and instead
23          * restarts SPL. Need to figure out why:
24          *
25          * U-Boot SPL 2017.01
26          *
27          * U-Boot SPL 2017.01
28          * CPU:   Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz
29          * Trying to boot from SPIJumping to 64-bit U-Boot: Note many
30          * features are missing
31          *
32          * U-Boot SPL 2017.01
33          */
34         printch(' ');
35 }
36
37 int cpu_has_64bit(void)
38 {
39         return true;
40 }
41
42 void enable_caches(void)
43 {
44         /* Not implemented */
45 }
46
47 void disable_caches(void)
48 {
49         /* Not implemented */
50 }
51
52 int dcache_status(void)
53 {
54         return true;
55 }
56
57 int x86_mp_init(void)
58 {
59         /* Not implemented */
60         return 0;
61 }