coreboot/src/mainboard
Angel Pons 7d6362d56b mb/prodrive/hermes: Ensure VMX setting is applied
VMX is enabled through a bit in the IA32_FEATURE_CONTROL MSR, which can
be locked. The MSR remains locked after a non-power cycle reset, though.
If the MSR is locked, coreboot bails out and leaves VMX in the state it
was found. Because of this, changes to the VMX enable option in the BMC
only take effect after the system is power cycled.

This behaviour is highly undesirable because users are likely not aware
that a power cycle is required for changes to VMX state to take effect.
So, if VMX is supported, the IA32_FEATURE_CONTROL MSR is locked and the
current VMX state does not match the requested state, then issue a full
reset. This will power cycle the system and unlock the MSR, so that the
desired VMX state can be programmed into the MSR. This is checked early
to avoid needlessly doing time-consuming operations (running FSP) twice
if we know we will need to power cycle the system anyway.

Note that a user may change the VMX setting after the newly-added check
but before the setting is read in ramstage to program the MSR, but this
is a non-issue as firmware settings need a reset to take effect anyway.

TEST: Toggle VMX setting in BMC and reboot without power cycle, observe
      coreboot automatically issues a power cycle reset because the MSR
      is locked and the VMX state differs. Verify that the system boots
      properly with VMX in the correct state after having power cycled.

Change-Id: Id9061ba896a7062da45a86fb26eeb58927184dcb
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75141
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-05-13 09:19:32 +00:00
..
51nb
acer
adlink
amd mb/amd/mayan: Enable MXM PCIe slot 2023-05-10 12:29:29 +00:00
aopen aopen/dxplplusu: Use ACPI_COMMON_MADT_IOAPIC 2023-04-26 11:04:08 +00:00
apple mainboard/*: Drop USB power control bits in GNVS 2023-05-01 17:33:31 +00:00
asrock mb/asrock/h77pro4-m: Make onboard NIC a child device below PCIe port 6 2023-03-30 16:31:17 +00:00
asus mb/asus/p8z77-m: Make onboard NIC a child device below PCIe port 5 2023-05-12 07:48:26 +00:00
biostar
bostentech mainboard/*: Drop USB power control bits in GNVS 2023-05-01 17:33:31 +00:00
cavium
clevo
compulab
dell
emulation Convert literal uses of CONFIG_MAINBOARD_{VENDOR,PART_NUMBER} 2023-05-05 13:56:34 +00:00
example
facebook mainboard/*: Drop USB power control bits in GNVS 2023-05-01 17:33:31 +00:00
foxconn
getac sb/intel/i82801gx/chip.h: Use 'bool' instead of 'int' 2023-04-08 03:35:39 +00:00
gigabyte util/sconfig: Remove unused ioapic and irq keywords 2023-04-11 16:23:28 +00:00
google mb/google/nissa/var/uldren: Fix Touch screen power sequence 2023-05-12 14:52:16 +00:00
hp mb/hp/snb_ivb_laptops: Add HP EliteBook 2170p as 2570p variant 2023-03-23 21:19:47 +00:00
ibase sb/intel/i82801gx/chip.h: Use 'bool' instead of 'int' 2023-04-08 03:35:39 +00:00
intel mb/google,intel: Use common ChromeEC code for lid shutdown 2023-05-09 18:08:45 +00:00
kontron sb/intel/i82801gx/chip.h: Use 'bool' instead of 'int' 2023-04-08 03:35:39 +00:00
lenovo mb/lenovo/x200/blc: Add LTN121AT07-L02 at 750Hz 2023-04-13 13:18:53 +00:00
libretrend
msi Convert literal uses of CONFIG_MAINBOARD_{VENDOR,PART_NUMBER} 2023-05-05 13:56:34 +00:00
ocp
opencellular
packardbell
pcengines cpu,nb/amd/pi/00730F01: dynamically generate CPU devices 2023-05-13 00:14:32 +00:00
pine64
portwell mainboard/*: Drop USB power control bits in GNVS 2023-05-01 17:33:31 +00:00
prodrive mb/prodrive/hermes: Ensure VMX setting is applied 2023-05-13 09:19:32 +00:00
protectli protectcli/vault_bsw: Drop USB power control bits in GNVS 2023-05-01 17:34:10 +00:00
purism mb/purism: Move selects from Kconfig.name to Kconfig 2023-05-09 17:16:51 +00:00
razer
roda sb/intel/i82801gx/chip.h: Use 'bool' instead of 'int' 2023-04-08 03:35:39 +00:00
samsung mb/google,intel,samsung: Use common poweroff() 2023-05-09 15:34:59 +00:00
sapphire
siemens mb/siemens/mc_ehl5: Add PTN3460 eDP-to-LVDS bridge 2023-05-12 15:01:47 +00:00
sifive
starlabs mb/starlabs/starbook: Let coreboot configure ASPM 2023-04-29 19:45:06 +00:00
supermicro
system76 mb/{system76,msi}: Enable PchHdaAudioLinkHdaEnable via devicetree 2023-04-26 12:05:42 +00:00
ti
up
Kconfig