From b5811c0b487ac6e5a12b69c5c2db7c6839f48fc0 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Thu, 4 Nov 2021 11:52:17 -0600 Subject: lib/hardwaremain: Run timers more frequently This change makes it so the timers run after each boot state callback, and after each boot state. This gives coop threads the opportunity to run more frequently and predictably. BUG=b:179699789 TEST=Boot guybrush to OS, see SPI transactions progress faster. Signed-off-by: Raul E Rangel Change-Id: I9508e7777d52fe934cc09d486abc0dab5cf7dad8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58955 Tested-by: build bot (Jenkins) Reviewed-by: Rob Barnes --- src/lib/hardwaremain.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib') diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c index fe8e53f83a..28c2b82fed 100644 --- a/src/lib/hardwaremain.c +++ b/src/lib/hardwaremain.c @@ -290,6 +290,9 @@ static void bs_call_callbacks(struct boot_state *state, mono_time_diff_microseconds(&mt_start, &mt_stop) / USECS_PER_MSEC); } + + bs_run_timers(0); + continue; } @@ -355,6 +358,8 @@ static void bs_walk_state_machine(void) bs_sample_time(state); + bs_run_timers(0); + bs_call_callbacks(state, current_phase.seq); if (CONFIG(DEBUG_BOOT_STATE)) -- cgit v1.2.3