Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | efedba7 | 2017-01-16 07:03:58 -0700 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2016 Google, Inc |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
Simon Glass | efedba7 | 2017-01-16 07:03:58 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Simon Glass | 1fa70f8 | 2019-11-14 12:57:34 -0700 | [diff] [blame] | 8 | #include <cpu_func.h> |
Simon Glass | 590aef7 | 2017-01-16 07:03:59 -0700 | [diff] [blame] | 9 | #include <debug_uart.h> |
Simon Glass | 9758973 | 2020-05-10 11:40:02 -0600 | [diff] [blame] | 10 | #include <init.h> |
Simon Glass | 590aef7 | 2017-01-16 07:03:59 -0700 | [diff] [blame] | 11 | |
Heinrich Schuchardt | 0928036 | 2018-10-13 20:52:07 -0700 | [diff] [blame] | 12 | /* |
| 13 | * Global declaration of gd. |
| 14 | * |
| 15 | * As we write to it before relocation we have to make sure it is not put into |
| 16 | * a .bss section which may overlap a .rela section. Initialization forces it |
| 17 | * into a .data section which cannot overlap any .rela section. |
| 18 | */ |
| 19 | struct global_data *global_data_ptr = (struct global_data *)~0; |
Simon Glass | 590aef7 | 2017-01-16 07:03:59 -0700 | [diff] [blame] | 20 | |
| 21 | void arch_setup_gd(gd_t *new_gd) |
| 22 | { |
| 23 | global_data_ptr = new_gd; |
Simon Glass | 590aef7 | 2017-01-16 07:03:59 -0700 | [diff] [blame] | 24 | } |
Simon Glass | efedba7 | 2017-01-16 07:03:58 -0700 | [diff] [blame] | 25 | |
| 26 | int cpu_has_64bit(void) |
| 27 | { |
| 28 | return true; |
| 29 | } |
| 30 | |
| 31 | void enable_caches(void) |
| 32 | { |
| 33 | /* Not implemented */ |
| 34 | } |
| 35 | |
| 36 | void disable_caches(void) |
| 37 | { |
| 38 | /* Not implemented */ |
| 39 | } |
| 40 | |
| 41 | int dcache_status(void) |
| 42 | { |
| 43 | return true; |
| 44 | } |
| 45 | |
| 46 | int x86_mp_init(void) |
| 47 | { |
| 48 | /* Not implemented */ |
| 49 | return 0; |
| 50 | } |
Simon Glass | 78a20d2 | 2017-01-16 07:04:08 -0700 | [diff] [blame] | 51 | |
| 52 | int misc_init_r(void) |
| 53 | { |
| 54 | return 0; |
| 55 | } |
| 56 | |
Simon Glass | bb88327 | 2020-04-30 21:21:43 -0600 | [diff] [blame] | 57 | #ifndef CONFIG_SYS_COREBOOT |
Simon Glass | ee7c36f | 2017-03-28 10:27:30 -0600 | [diff] [blame] | 58 | int checkcpu(void) |
| 59 | { |
| 60 | return 0; |
| 61 | } |
| 62 | |
Simon Glass | 78a20d2 | 2017-01-16 07:04:08 -0700 | [diff] [blame] | 63 | int print_cpuinfo(void) |
| 64 | { |
| 65 | return 0; |
| 66 | } |
Simon Glass | bb88327 | 2020-04-30 21:21:43 -0600 | [diff] [blame] | 67 | #endif |
Simon Glass | 05e12f7 | 2019-04-25 21:58:42 -0600 | [diff] [blame] | 68 | |
| 69 | int x86_cpu_reinit_f(void) |
| 70 | { |
| 71 | return 0; |
| 72 | } |
Simon Glass | 2d8b3c6 | 2020-09-22 12:45:26 -0600 | [diff] [blame^] | 73 | |
| 74 | int cpu_phys_address_size(void) |
| 75 | { |
| 76 | return CONFIG_CPU_ADDR_BITS; |
| 77 | } |