summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/cpu.c
diff options
context:
space:
mode:
authorLijian Zhao <lijian.zhao@intel.com>2017-09-14 14:51:12 -0700
committerAaron Durbin <adurbin@chromium.org>2017-10-03 20:23:41 +0000
commitf0eb99996d0baa7b0c09027f542a17d01c570a47 (patch)
tree747c6997e32e55677bc6c8e9a4007419f6724120 /src/soc/intel/cannonlake/cpu.c
parenta515849259f71eb92d5465b6bcd9957b73db1889 (diff)
soc/intel/cannonlake: Fill the SMI usage
Add SMM support for Cannonlake on top of common SMM, also include the SMM relocate support. Change-Id: I9aab141c528709b30804d327804c4031c59fcfff Signed-off-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-on: https://review.coreboot.org/21543 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/cannonlake/cpu.c')
-rw-r--r--src/soc/intel/cannonlake/cpu.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/intel/cannonlake/cpu.c b/src/soc/intel/cannonlake/cpu.c
index 4e065778fa..2dffccb923 100644
--- a/src/soc/intel/cannonlake/cpu.c
+++ b/src/soc/intel/cannonlake/cpu.c
@@ -21,10 +21,12 @@
#include <cpu/intel/turbo.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h>
+#include <intelblocks/smm.h>
#include <romstage_handoff.h>
#include <soc/cpu.h>
#include <soc/msr.h>
#include <soc/pci_devs.h>
+#include <soc/smm.h>
static void soc_fsp_load(void)
{
@@ -197,13 +199,27 @@ void soc_core_init(device_t cpu)
/* Enable Turbo */
enable_turbo();
+}
+static void per_cpu_smm_trigger(void)
+{
+ /* Relocate the SMM handler. */
+ smm_relocate();
}
static void post_mp_init(void)
{
/* Set Max Ratio */
cpu_set_max_ratio();
+
+ /*
+ * Now that all APs have been relocated as well as the BSP let SMIs
+ * start flowing.
+ */
+ smm_southbridge_enable();
+
+ /* Lock down the SMRAM space. */
+ smm_lock();
}
static const struct mp_ops mp_ops = {
@@ -214,7 +230,11 @@ static const struct mp_ops mp_ops = {
*/
.pre_mp_init = soc_fsp_load,
.get_cpu_count = get_cpu_count,
+ .get_smm_info = smm_info,
.get_microcode_info = get_microcode_info,
+ .pre_mp_smm_init = smm_initialize,
+ .per_cpu_smm_trigger = per_cpu_smm_trigger,
+ .relocation_handler = smm_relocation_handler,
.post_mp_init = post_mp_init,
};