x86: Unify reserve_arch() for all x86 boards
Instead of asking each platform to provide reserve_arch(), supply it in arch/x86/cpu/cpu.c in a unified way. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
789b6dcecc
commit
0c2b7eef97
|
|
@ -53,14 +53,6 @@ int arch_misc_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int reserve_arch(void)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_ENABLE_MRC_CACHE
|
|
||||||
return mrccache_reserve();
|
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void reset_cpu(ulong addr)
|
void reset_cpu(ulong addr)
|
||||||
|
|
|
||||||
|
|
@ -190,11 +190,6 @@ static int prepare_mrc_cache(struct pei_data *pei_data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int reserve_arch(void)
|
|
||||||
{
|
|
||||||
return mrccache_reserve();
|
|
||||||
}
|
|
||||||
|
|
||||||
int dram_init(void)
|
int dram_init(void)
|
||||||
{
|
{
|
||||||
struct pei_data _pei_data __aligned(8);
|
struct pei_data _pei_data __aligned(8);
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include <asm/lapic.h>
|
#include <asm/lapic.h>
|
||||||
#include <asm/microcode.h>
|
#include <asm/microcode.h>
|
||||||
#include <asm/mp.h>
|
#include <asm/mp.h>
|
||||||
|
#include <asm/mrccache.h>
|
||||||
#include <asm/msr.h>
|
#include <asm/msr.h>
|
||||||
#include <asm/mtrr.h>
|
#include <asm/mtrr.h>
|
||||||
#include <asm/post.h>
|
#include <asm/post.h>
|
||||||
|
|
@ -751,3 +752,14 @@ int cpu_init_r(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_EFI_STUB
|
||||||
|
int reserve_arch(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_ENABLE_MRC_CACHE
|
||||||
|
return mrccache_reserve();
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -201,11 +201,6 @@ static int recovery_mode_enabled(void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int reserve_arch(void)
|
|
||||||
{
|
|
||||||
return mrccache_reserve();
|
|
||||||
}
|
|
||||||
|
|
||||||
static int copy_spd(struct udevice *dev, struct pei_data *peid)
|
static int copy_spd(struct udevice *dev, struct pei_data *peid)
|
||||||
{
|
{
|
||||||
const void *data;
|
const void *data;
|
||||||
|
|
|
||||||
|
|
@ -360,12 +360,3 @@ void board_final_cleanup(void)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int reserve_arch(void)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_ENABLE_MRC_CACHE
|
|
||||||
return mrccache_reserve();
|
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue