cpu/intel/haswell: Enable MCA logging
Intel document 493770 (Haswell BIOS Writer's Guide) revision 1.8.0
recommends writing all ones to the IA32_MCi_CTL registers in order
to enable all MCA error reporting.
Change-Id: Ib5d2c759483026b5b4804c5a4b2b969d2269af22
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55463
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 8ba1c93..9fcb527 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -524,6 +524,12 @@
msr = rdmsr(IA32_MCG_CAP);
num_banks = msr.lo & 0xff;
+
+ /* Enable all error reporting */
+ msr.lo = msr.hi = ~0;
+ for (i = 0; i < num_banks; i++)
+ wrmsr(IA32_MC0_CTL + (i * 4), msr);
+
msr.lo = msr.hi = 0;
/* TODO(adurbin): This should only be done on a cold boot. Also, some
* of these banks are core vs package scope. For now every CPU clears