Merge tag 'u-boot-imx-20191009' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[oweals/u-boot.git] / arch / x86 / cpu / intel_common / cpu_from_spl.c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2016 Google, Inc
4  */
5
6 #include <common.h>
7 #include <dm.h>
8 #include <errno.h>
9 #include <handoff.h>
10 #include <asm/cpu_common.h>
11 #include <asm/intel_regs.h>
12 #include <asm/lapic.h>
13 #include <asm/lpc_common.h>
14 #include <asm/msr.h>
15 #include <asm/mtrr.h>
16 #include <asm/post.h>
17 #include <asm/microcode.h>
18
19 DECLARE_GLOBAL_DATA_PTR;
20
21 int arch_cpu_init(void)
22 {
23         int ret;
24
25 #if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
26         struct spl_handoff *ho = gd->spl_handoff;
27
28         gd->arch.hob_list = ho->arch.hob_list;
29 #endif
30         ret = x86_cpu_reinit_f();
31
32         return ret;
33 }