Deomid "rojer" Ryabkov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/50307 )
Change subject: Port locked MSR fix to Watson and Watson V2 ......................................................................
Port locked MSR fix to Watson and Watson V2
Original commit: 817994c1bec48733679c34fe717a07ad81af18ac
Signed-off-by: Deomid "rojer" Ryabkov rojer9@fb.com Change-Id: Ica9557ff159321abed55f9402aee626f18fe526b --- M src/mainboard/facebook/watson/romstage.c 1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/50307/1
diff --git a/src/mainboard/facebook/watson/romstage.c b/src/mainboard/facebook/watson/romstage.c index b8df798..8aa1a78 100644 --- a/src/mainboard/facebook/watson/romstage.c +++ b/src/mainboard/facebook/watson/romstage.c @@ -15,6 +15,9 @@ */
#include <stddef.h> +#include <cpu/x86/msr.h> +#include <cf9_reset.h> +#include <console/console.h> #include <soc/romstage.h> #include <drivers/intel/fsp1_0/fsp_util.h> #include <variants.h> @@ -25,7 +28,20 @@ */ void early_mainboard_romstage_entry(void) { - + /* + * Sometimes the system boots in an invalid state, where random values + * have been written to MSRs and then the MSRs are locked. + * Seems to always happen on warm reset. + * + * Power cycling or a board_reset() isn't sufficient in this case, so + * issue a full_reset() to "fix" this issue. + */ + msr_t msr = rdmsr(IA32_FEATURE_CONTROL); + if (msr.lo & 1) { + console_init(); + printk(BIOS_EMERG, "Detected broken platform state. Issuing full reset\n"); + full_reset(); + } }
/**