xref: /openbmc/u-boot/arch/x86/cpu/qemu/qemu.c (revision 9c7dea602edd9027848d312e9b3b69f06c15f163)
1 /*
2  * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <asm/post.h>
9 #include <asm/processor.h>
10 
11 int arch_cpu_init(void)
12 {
13 	int ret;
14 
15 	post_code(POST_CPU_INIT);
16 #ifdef CONFIG_SYS_X86_TSC_TIMER
17 	timer_set_base(rdtsc());
18 #endif
19 
20 	ret = x86_cpu_init_f();
21 	if (ret)
22 		return ret;
23 
24 	return 0;
25 }
26 
27 int print_cpuinfo(void)
28 {
29 	post_code(POST_CPU_INFO);
30 	return default_print_cpuinfo();
31 }
32 
33 void reset_cpu(ulong addr)
34 {
35 	/* cold reset */
36 	x86_full_reset();
37 }
38