[coreboot-gerrit] Change in ...coreboot[master]: soc/intel/fsp_broadwell_de/romstage: Workaround broken platform state
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Tue Dec 18 11:53:26 CET 2018
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30290
Change subject: soc/intel/fsp_broadwell_de/romstage: Workaround broken platform state
......................................................................
soc/intel/fsp_broadwell_de/romstage: Workaround broken platform state
Sometimes the platform boots in an invalid state, that will cause
FSP-M to fail. As a board_reset() doesn't fix it, issue an full_reset()
as soon as the IA32_FEATURE_CONTROL MSR is locked at beging of romstage.
Tested on wedge100s. After full reset the system behaves as normal.
Change-Id: I1a382b8fb650311b0c24b48e0986d22edfa2d261
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
M src/soc/intel/fsp_broadwell_de/romstage/romstage.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/30290/1
diff --git a/src/soc/intel/fsp_broadwell_de/romstage/romstage.c b/src/soc/intel/fsp_broadwell_de/romstage/romstage.c
index 801f9e0..453f7c7 100644
--- a/src/soc/intel/fsp_broadwell_de/romstage/romstage.c
+++ b/src/soc/intel/fsp_broadwell_de/romstage/romstage.c
@@ -34,6 +34,7 @@
#include <soc/romstage.h>
#include <soc/gpio.h>
#include <build.h>
+#include <cf9_reset.h>
static void init_rtc(void)
{
@@ -68,6 +69,21 @@
LPC_EN, 0x340f);
}
console_init();
+
+ /*
+ * 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) {
+ printk(BIOS_EMERG, "Detected broken platform state. Issuing full reset\n");
+ full_reset();
+ }
+
init_rtc();
setup_gpio_io_address();
--
To view, visit https://review.coreboot.org/c/coreboot/+/30290
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1a382b8fb650311b0c24b48e0986d22edfa2d261
Gerrit-Change-Number: 30290
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181218/3b216bfd/attachment.html>
More information about the coreboot-gerrit
mailing list