diff options
Diffstat (limited to 'src/cpu/intel')
-rw-r--r-- | src/cpu/intel/model_1067x/model_1067x_init.c | 3 | ||||
-rw-r--r-- | src/cpu/intel/model_1067x/mp_init.c | 18 | ||||
-rw-r--r-- | src/cpu/intel/model_106cx/model_106cx_init.c | 3 | ||||
-rw-r--r-- | src/cpu/intel/model_6ex/model_6ex_init.c | 3 | ||||
-rw-r--r-- | src/cpu/intel/model_6fx/model_6fx_init.c | 3 |
5 files changed, 18 insertions, 12 deletions
diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c index 275ff70267..6068be166d 100644 --- a/src/cpu/intel/model_1067x/model_1067x_init.c +++ b/src/cpu/intel/model_1067x/model_1067x_init.c @@ -287,9 +287,6 @@ static void model_1067x_init(struct device *cpu) /* Initialize the APIC timer */ init_timer(); - /* Set virtualization based on Kconfig option */ - set_vmx_and_lock(); - /* Configure C States */ configure_c_states(quad); diff --git a/src/cpu/intel/model_1067x/mp_init.c b/src/cpu/intel/model_1067x/mp_init.c index 52e9d3f010..ab7785989d 100644 --- a/src/cpu/intel/model_1067x/mp_init.c +++ b/src/cpu/intel/model_1067x/mp_init.c @@ -49,8 +49,26 @@ static void pre_mp_smm_init(void) smm_initialize(); } +#define SMRR_SUPPORTED (1 << 11) + static void per_cpu_smm_trigger(void) { + msr_t mtrr_cap = rdmsr(MTRR_CAP_MSR); + if (cpu_has_alternative_smrr() && mtrr_cap.lo & SMRR_SUPPORTED) { + set_feature_ctrl_vmx(); + msr_t ia32_ft_ctrl = rdmsr(IA32_FEATURE_CONTROL); + /* We don't care if the lock is already setting + as our smm relocation handler is able to handle + setups where SMRR is not enabled here. */ + if (!IS_ENABLED(CONFIG_SET_IA32_FC_LOCK_BIT)) + printk(BIOS_INFO, + "Overriding CONFIG_SET_IA32_FC_LOCK_BIT to enable SMRR\n"); + ia32_ft_ctrl.lo |= (1 << 3) | (1 << 0); + wrmsr(IA32_FEATURE_CONTROL, ia32_ft_ctrl); + } else { + set_vmx_and_lock(); + } + /* Relocate the SMM handler. */ smm_relocate(); diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c index 75e110683e..e44302606e 100644 --- a/src/cpu/intel/model_106cx/model_106cx_init.c +++ b/src/cpu/intel/model_106cx/model_106cx_init.c @@ -88,9 +88,6 @@ static void model_106cx_init(struct device *cpu) /* Enable the local CPU APICs */ setup_lapic(); - /* Set virtualization based on Kconfig option */ - set_vmx_and_lock(); - /* Configure C States */ configure_c_states(); diff --git a/src/cpu/intel/model_6ex/model_6ex_init.c b/src/cpu/intel/model_6ex/model_6ex_init.c index 72a259d34f..19a22f1839 100644 --- a/src/cpu/intel/model_6ex/model_6ex_init.c +++ b/src/cpu/intel/model_6ex/model_6ex_init.c @@ -125,9 +125,6 @@ static void model_6ex_init(struct device *cpu) /* Enable the local CPU APICs */ setup_lapic(); - /* Set virtualization based on Kconfig option */ - set_vmx_and_lock(); - /* Configure C States */ configure_c_states(); diff --git a/src/cpu/intel/model_6fx/model_6fx_init.c b/src/cpu/intel/model_6fx/model_6fx_init.c index 16ddcc4c28..4e198961ce 100644 --- a/src/cpu/intel/model_6fx/model_6fx_init.c +++ b/src/cpu/intel/model_6fx/model_6fx_init.c @@ -139,9 +139,6 @@ static void model_6fx_init(struct device *cpu) /* Enable the local CPU APICs */ setup_lapic(); - /* Set virtualization based on Kconfig option */ - set_vmx_and_lock(); - /* Configure C States */ configure_c_states(); |