On ChromeOS systems with a serial-enabled BIOS and vboot writing a new firmware image to the Chrome EC, it was possible for the TCO watchdog timer to trip 2 times before tco_configure() was called in romstage. This caused an extra reboot of the system (at a rather inopportune time) and because the EC didn't perform a full reset, the system boots into recovery mode. This patch moves the call to tco_configure() for Tiger Lake from romstage to bootblock, in order to make sure the TCO watchdog timer is halted before vboot_sync_ec() runs in romstage. It should be harmless to configure the TCO device earlier in the boot flow. BUG=b:160272400 TEST=boot Volteer (to a non-recovery kernel!) with a freshly imaged EC Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: Iefdc2c861ab8b5fde7f736c04149be7de7b3ae0c Reviewed-on: https://review.coreboot.org/c/coreboot/+/43313 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Caveh Jalali <caveh@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
33 lines
713 B
C
33 lines
713 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <bootblock_common.h>
|
|
#include <intelblocks/systemagent.h>
|
|
#include <intelblocks/tco.h>
|
|
#include <intelblocks/uart.h>
|
|
#include <soc/bootblock.h>
|
|
|
|
asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
|
|
{
|
|
/* Call lib/bootblock.c main */
|
|
bootblock_main_with_basetime(base_timestamp);
|
|
}
|
|
|
|
void bootblock_soc_early_init(void)
|
|
{
|
|
bootblock_systemagent_early_init();
|
|
bootblock_pch_early_init();
|
|
bootblock_cpu_init();
|
|
pch_early_iorange_init();
|
|
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
|
|
uart_bootblock_init();
|
|
}
|
|
|
|
void bootblock_soc_init(void)
|
|
{
|
|
report_platform_info();
|
|
pch_init();
|
|
|
|
/* Programming TCO_BASE_ADDRESS and TCO Timer Halt */
|
|
tco_configure();
|
|
}
|