2019-04-26 03:58:56 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Google, Inc
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <dm.h>
|
|
|
|
#include <errno.h>
|
2019-09-25 14:11:41 +00:00
|
|
|
#include <handoff.h>
|
2020-05-10 17:40:02 +00:00
|
|
|
#include <init.h>
|
2019-04-26 03:58:56 +00:00
|
|
|
#include <asm/cpu_common.h>
|
|
|
|
#include <asm/intel_regs.h>
|
|
|
|
#include <asm/lapic.h>
|
|
|
|
#include <asm/lpc_common.h>
|
|
|
|
#include <asm/msr.h>
|
|
|
|
#include <asm/mtrr.h>
|
|
|
|
#include <asm/post.h>
|
|
|
|
#include <asm/microcode.h>
|
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
|
|
|
int arch_cpu_init(void)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2019-09-25 14:11:41 +00:00
|
|
|
#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
|
|
|
|
struct spl_handoff *ho = gd->spl_handoff;
|
|
|
|
|
|
|
|
gd->arch.hob_list = ho->arch.hob_list;
|
|
|
|
#endif
|
2019-04-26 03:58:56 +00:00
|
|
|
ret = x86_cpu_reinit_f();
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|