Attention is currently required from: Tarun Tuli, Subrata Banik.
Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68945 )
Change subject: soc/intel/alderlake: Hook up the OC watchdog ......................................................................
soc/intel/alderlake: Hook up the OC watchdog
Hook up the OC watchdog common block and initialize it if requested.
TEST=Enable watchdog on MSI PRO Z690-A and see the platform resets after some time. Enable the watchdog in driverless mode and see the platform no longer resets and periodic SMI keeps feeding the watchdog.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: I1c2c640d48b7e03ad8cd8d6cdf6aac447e93cd86 --- M src/soc/intel/alderlake/Kconfig M src/soc/intel/alderlake/bootblock/bootblock.c 2 files changed, 29 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/68945/1
diff --git a/src/soc/intel/alderlake/Kconfig b/src/soc/intel/alderlake/Kconfig index 1474ce8..bdde273 100644 --- a/src/soc/intel/alderlake/Kconfig +++ b/src/soc/intel/alderlake/Kconfig @@ -102,6 +102,7 @@ select SOC_INTEL_COMMON_BLOCK_IPU if !SOC_INTEL_ALDERLAKE_PCH_S select SOC_INTEL_COMMON_BLOCK_IRQ select SOC_INTEL_COMMON_BLOCK_MEMINIT + select SOC_INTEL_COMMON_BLOCK_OC_WDT select SOC_INTEL_COMMON_BLOCK_PCIE_RTD3 select SOC_INTEL_COMMON_BLOCK_PMC_EPOC select SOC_INTEL_COMMON_BLOCK_POWER_LIMIT diff --git a/src/soc/intel/alderlake/bootblock/bootblock.c b/src/soc/intel/alderlake/bootblock/bootblock.c index b8086a4..f4afb48 100644 --- a/src/soc/intel/alderlake/bootblock/bootblock.c +++ b/src/soc/intel/alderlake/bootblock/bootblock.c @@ -2,6 +2,7 @@
#include <bootblock_common.h> #include <intelblocks/fast_spi.h> +#include <intelblocks/oc_wdt.h> #include <intelblocks/systemagent.h> #include <intelblocks/tco.h> #include <intelblocks/uart.h> @@ -30,4 +31,15 @@
/* Programming TCO_BASE_ADDRESS and TCO Timer Halt */ tco_configure(); + + is_wdt_failure(); + wdt_reset_check(); + if (CONFIG(SOC_INTEL_COMMON_OC_WDT_ENABLE)) { + wdt_reload_and_start(CONFIG_SOC_INTEL_COMMON_OC_WDT_TIMEOUT); + is_wdt_enabled(); + /* Workaround for FSP that will also program OC WDT */ + wdt_allow_known_reset(); + } else { + wdt_disable(); + } }