From 9c86aafe5a18068edb824faf4d2e44f0fefc6411 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 26 Apr 2017 15:02:51 -0500 Subject: soc/intel/apollolake: work around full retrain constraints on warm reset It's come to attention that apollolake doesn't support a full retrain on warm reset. Therefore force a cold reset when a full retrain is requested in the non-S5 path. BUG=b:37687843 Change-Id: If9a3de1fa8760e7bb2f06eef93a0deb9dbd3f047 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/19483 Tested-by: build bot (Jenkins) Reviewed-by: Andrey Petrov Reviewed-by: Furquan Shaikh --- src/soc/intel/apollolake/romstage.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/soc/intel/apollolake/romstage.c') diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index 0270920c95..c1353c8240 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -258,10 +259,27 @@ static void fill_console_params(FSPM_UPD *mupd) } } +static void check_full_retrain(const FSPM_UPD *mupd) +{ + struct chipset_power_state *ps; + + if (mupd->FspmArchUpd.BootMode != FSP_BOOT_WITH_FULL_CONFIGURATION) + return; + + ps = car_get_var_ptr(&power_state); + + if (ps->gen_pmcon1 & WARM_RESET_STS) { + printk(BIOS_INFO, "Full retrain unsupported on warm reboot.\n"); + hard_reset(); + } +} + void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) { struct region_device rdev; + check_full_retrain(mupd); + fill_console_params(mupd); mainboard_memory_init_params(mupd); -- cgit v1.2.3