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 <rrangel@chromium.org>
Change-Id: I9508e7777d52fe934cc09d486abc0dab5cf7dad8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58955
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
This commit is contained in:
Raul E Rangel
2021-11-04 11:52:17 -06:00
committed by Raul Rangel
parent 642508aa9c
commit b5811c0b48

View File

@ -290,6 +290,9 @@ static void bs_call_callbacks(struct boot_state *state,
mono_time_diff_microseconds(&mt_start, &mt_stop) mono_time_diff_microseconds(&mt_start, &mt_stop)
/ USECS_PER_MSEC); / USECS_PER_MSEC);
} }
bs_run_timers(0);
continue; continue;
} }
@ -355,6 +358,8 @@ static void bs_walk_state_machine(void)
bs_sample_time(state); bs_sample_time(state);
bs_run_timers(0);
bs_call_callbacks(state, current_phase.seq); bs_call_callbacks(state, current_phase.seq);
if (CONFIG(DEBUG_BOOT_STATE)) if (CONFIG(DEBUG_BOOT_STATE))