summaryrefslogtreecommitdiff
path: root/resources/coreboot/default/patches/0009-Revert-cpu-intel-Configure-IA32_FEATURE_CONTROL-for-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'resources/coreboot/default/patches/0009-Revert-cpu-intel-Configure-IA32_FEATURE_CONTROL-for-.patch')
-rw-r--r--resources/coreboot/default/patches/0009-Revert-cpu-intel-Configure-IA32_FEATURE_CONTROL-for-.patch115
1 files changed, 115 insertions, 0 deletions
diff --git a/resources/coreboot/default/patches/0009-Revert-cpu-intel-Configure-IA32_FEATURE_CONTROL-for-.patch b/resources/coreboot/default/patches/0009-Revert-cpu-intel-Configure-IA32_FEATURE_CONTROL-for-.patch
new file mode 100644
index 0000000..36f4778
--- /dev/null
+++ b/resources/coreboot/default/patches/0009-Revert-cpu-intel-Configure-IA32_FEATURE_CONTROL-for-.patch
@@ -0,0 +1,115 @@
+From 8e8704050aec67490a6d1f272840e5a04ee1bcff Mon Sep 17 00:00:00 2001
+From: Rodrigo <rm@firemail.cc>
+Date: Mon, 23 Aug 2021 02:20:32 -0300
+Subject: [PATCH 09/11] Revert "cpu/intel: Configure IA32_FEATURE_CONTROL for
+ alternative SMRR"
+
+This rendered at least the x200 unable to reboot.
+
+This reverts commit df7aecd92643d207feaf7fd840f8835097346644.
+---
+ src/cpu/intel/model_1067x/model_1067x_init.c | 3 +++
+ src/cpu/intel/model_1067x/mp_init.c | 26 --------------------
+ src/cpu/intel/model_106cx/model_106cx_init.c | 3 +++
+ src/cpu/intel/model_6ex/model_6ex_init.c | 3 +++
+ src/cpu/intel/model_6fx/model_6fx_init.c | 3 +++
+ 5 files changed, 12 insertions(+), 26 deletions(-)
+
+diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c
+index 3e4de1fa31..ca3ce274fc 100644
+--- a/src/cpu/intel/model_1067x/model_1067x_init.c
++++ b/src/cpu/intel/model_1067x/model_1067x_init.c
+@@ -274,6 +274,9 @@ 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 bc53214310..72f40f6762 100644
+--- a/src/cpu/intel/model_1067x/mp_init.c
++++ b/src/cpu/intel/model_1067x/mp_init.c
+@@ -43,34 +43,8 @@ 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 (ia32_ft_ctrl.lo & (1 << 0)) {
+- /* IA32_FEATURE_CONTROL locked. If we set it again we
+- get an illegal instruction. */
+- printk(BIOS_DEBUG, "IA32_FEATURE_CONTROL already locked\n");
+- printk(BIOS_DEBUG, "SMRR status: %senabled\n",
+- ia32_ft_ctrl.lo & (1 << 3) ? "" : "not ");
+- } else {
+- if (!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 278d8dea81..a0917045dd 100644
+--- a/src/cpu/intel/model_106cx/model_106cx_init.c
++++ b/src/cpu/intel/model_106cx/model_106cx_init.c
+@@ -70,6 +70,9 @@ 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 34646ad5e9..36cfd51f01 100644
+--- a/src/cpu/intel/model_6ex/model_6ex_init.c
++++ b/src/cpu/intel/model_6ex/model_6ex_init.c
+@@ -109,6 +109,9 @@ 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 72ece23935..6f2d6ef599 100644
+--- a/src/cpu/intel/model_6fx/model_6fx_init.c
++++ b/src/cpu/intel/model_6fx/model_6fx_init.c
+@@ -123,6 +123,9 @@ 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();
+
+--
+2.25.1
+