aboutsummaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/elkhartlake/Kconfig10
-rw-r--r--src/soc/intel/elkhartlake/bootblock/bootblock.c9
2 files changed, 19 insertions, 0 deletions
diff --git a/src/soc/intel/elkhartlake/Kconfig b/src/soc/intel/elkhartlake/Kconfig
index 37807897aa..b8296021fc 100644
--- a/src/soc/intel/elkhartlake/Kconfig
+++ b/src/soc/intel/elkhartlake/Kconfig
@@ -251,4 +251,14 @@ config SOC_INTEL_ELKHARTLAKE_DEBUG_CONSENT
config PRERAM_CBMEM_CONSOLE_SIZE
hex
default 0x1400
+
+config SOC_INTEL_ELKHARTLAKE_TCO_NO_REBOOT_EN
+ bool "Disable reset on second TCO expiration"
+ depends on SOC_INTEL_COMMON_BLOCK_TCO
+ default n
+ help
+ Setting this option will prevent a host reset if the TCO timer expires
+ for the second time. Since this feature is not exposed to the OS in the
+ standard TCO interface, this setting can be enabled on firmware level.
+ This might be useful depending on the TCO policy.
endif
diff --git a/src/soc/intel/elkhartlake/bootblock/bootblock.c b/src/soc/intel/elkhartlake/bootblock/bootblock.c
index b8086a42ab..cc0bb8f0c4 100644
--- a/src/soc/intel/elkhartlake/bootblock/bootblock.c
+++ b/src/soc/intel/elkhartlake/bootblock/bootblock.c
@@ -1,10 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <console/console.h>
#include <intelblocks/fast_spi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
#include <intelblocks/uart.h>
+#include <intelpch/smbus.h>
#include <soc/bootblock.h>
asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
@@ -30,4 +32,11 @@ void bootblock_soc_init(void)
/* Programming TCO_BASE_ADDRESS and TCO Timer Halt */
tco_configure();
+ if (CONFIG(SOC_INTEL_ELKHARTLAKE_TCO_NO_REBOOT_EN)) {
+ uint16_t reg = tco_read_reg(TCO1_CNT);
+ /* NO_REBOOT is enabled via bit 0 in TCO1_CNT. */
+ reg |= 0x01;
+ tco_write_reg(TCO1_CNT, reg);
+ printk(BIOS_DEBUG, "TCO: Disable reset on second expiration.\n");
+ }
}