haswell: move to mp_init library
The mp_init library was based off of haswell code, but baytrail was the first chipset to take advantage of it. Move haswell over to using it so that the code duplication can be removed. Change-Id: Id6e9464df028aa6ec138051f925817c85b4c13e5 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/5413 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
committed by
Aaron Durbin
parent
60ec2ff2f0
commit
014baea1ce
@@ -24,6 +24,7 @@
|
||||
#include <cpu/cpu.h>
|
||||
#include <cpu/x86/cache.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <cpu/x86/mp.h>
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <cpu/x86/mtrr.h>
|
||||
#include <cpu/x86/smm.h>
|
||||
@@ -435,27 +436,27 @@ int smm_initialize(void)
|
||||
/* Run the relocation handler. */
|
||||
smm_initiate_relocation();
|
||||
|
||||
/* If smm_save_state_in_msrs is non-zero then parallel SMM relocation
|
||||
* shall take place. Run the relocation handler a second time to do
|
||||
* the final move. */
|
||||
if (smm_reloc_params.smm_save_state_in_msrs) {
|
||||
printk(BIOS_DEBUG, "Doing parallel SMM relocation.\n");
|
||||
release_aps_for_smm_relocation(1);
|
||||
smm_initiate_relocation_parallel();
|
||||
} else {
|
||||
release_aps_for_smm_relocation(0);
|
||||
}
|
||||
|
||||
/* Now that all APs have been relocated as well as the BSP let SMIs
|
||||
* start flowing. */
|
||||
southbridge_smm_enable_smi();
|
||||
|
||||
/* Lock down the SMRAM space. */
|
||||
smm_lock();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void smm_relocate(void)
|
||||
{
|
||||
/*
|
||||
* If smm_save_state_in_msrs is non-zero then parallel SMM relocation
|
||||
* shall take place. Run the relocation handler a second time on the
|
||||
* BSP to do * the final move. For APs, a relocation handler always
|
||||
* needs to be run.
|
||||
*/
|
||||
if (smm_reloc_params.smm_save_state_in_msrs)
|
||||
smm_initiate_relocation_parallel();
|
||||
else if (!boot_cpu())
|
||||
smm_initiate_relocation();
|
||||
}
|
||||
|
||||
void smm_init(void)
|
||||
{
|
||||
/* smm_init() is normally called from initialize_cpus() in
|
||||
|
Reference in New Issue
Block a user