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