From f0eb99996d0baa7b0c09027f542a17d01c570a47 Mon Sep 17 00:00:00 2001 From: Lijian Zhao Date: Thu, 14 Sep 2017 14:51:12 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/21543 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/cannonlake/cpu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/soc/intel/cannonlake/cpu.c') 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 #include #include +#include #include #include #include #include +#include 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, }; -- cgit v1.2.3