2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2017-01-16 14:03:58 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2016 Google, Inc
|
|
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-11-14 19:57:34 +00:00
|
|
|
#include <cpu_func.h>
|
2017-01-16 14:03:59 +00:00
|
|
|
#include <debug_uart.h>
|
2020-05-10 17:40:02 +00:00
|
|
|
#include <init.h>
|
2023-09-20 03:00:05 +00:00
|
|
|
#include <asm/cpu.h>
|
2021-11-04 03:09:08 +00:00
|
|
|
#include <asm/global_data.h>
|
2017-01-16 14:03:58 +00:00
|
|
|
|
2023-09-20 03:00:05 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2017-01-16 14:03:58 +00:00
|
|
|
int cpu_has_64bit(void)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void enable_caches(void)
|
|
|
|
{
|
|
|
|
/* Not implemented */
|
|
|
|
}
|
|
|
|
|
|
|
|
void disable_caches(void)
|
|
|
|
{
|
|
|
|
/* Not implemented */
|
|
|
|
}
|
|
|
|
|
|
|
|
int dcache_status(void)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
int x86_mp_init(void)
|
|
|
|
{
|
|
|
|
/* Not implemented */
|
|
|
|
return 0;
|
|
|
|
}
|
2017-01-16 14:04:08 +00:00
|
|
|
|
2019-04-26 03:58:42 +00:00
|
|
|
int x86_cpu_reinit_f(void)
|
|
|
|
{
|
2023-09-20 03:00:05 +00:00
|
|
|
/* set the vendor to Intel so that native_calibrate_tsc() works */
|
|
|
|
gd->arch.x86_vendor = X86_VENDOR_INTEL;
|
|
|
|
gd->arch.has_mtrr = true;
|
|
|
|
|
2019-04-26 03:58:42 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2020-09-22 18:45:26 +00:00
|
|
|
|
|
|
|
int cpu_phys_address_size(void)
|
|
|
|
{
|
|
|
|
return CONFIG_CPU_ADDR_BITS;
|
|
|
|
}
|
2022-01-04 10:51:13 +00:00
|
|
|
|
|
|
|
int x86_cpu_init_f(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2023-05-04 22:50:51 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_UART_BOARD_INIT
|
|
|
|
void board_debug_uart_init(void)
|
|
|
|
{
|
|
|
|
/* this was already done in SPL */
|
|
|
|
}
|
|
|
|
#endif
|