Patrick Georgi merged this change.
soc/intel/apl: Call mca_configure() on cold boots only
By APL BIOS Spec, we must not do this on warm boots.
The TODO comment seems stale and copied over. So the actual
requirements for SGX are unknown and we add a guard for that
case.
Change-Id: I09b4a2fe22267d7318951aac20a3ea566403492e
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/31200
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/soc/intel/apollolake/cpu.c
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c
index bcec28e..d1c5f6f 100644
--- a/src/soc/intel/apollolake/cpu.c
+++ b/src/soc/intel/apollolake/cpu.c
@@ -17,6 +17,7 @@
* GNU General Public License for more details.
*/
+#include <arch/acpi.h>
#include <assert.h>
#include <console/console.h>
#include "chip.h"
@@ -70,10 +71,11 @@
void soc_core_init(struct device *cpu)
{
/* Clear out pending MCEs */
- /* 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
- * every bank. */
- mca_configure(NULL);
+ /* TODO(adurbin): Some of these banks are core vs package
+ scope. For now every CPU clears every bank. */
+ if (IS_ENABLED(SOC_INTEL_COMMON_BLOCK_SGX) ||
+ acpi_get_sleep_type() == ACPI_S5)
+ mca_configure(NULL);
/* Set core MSRs */
reg_script_run(core_msr_script);
To view, visit change 31200. To unsubscribe, or for help writing mail filters, visit settings.