console,monotonic_timer: Avoid calls from APs
The code in cpu/x86/lapic/apic_timer.c for timer_monotonic_get() is not SMP safe as LAPIC timers do not run as synchronised as TSCs. The times reported for console for boot_states does not accumulate from APs now. Also remove console time tracking from ENV_SMM. Change-Id: I1ea2c1e7172f8ab3692b42dee3f669c5942d864a Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37398 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
934ae21b52
commit
05fe16c4f3
|
@ -25,20 +25,20 @@
|
|||
|
||||
DECLARE_SPIN_LOCK(console_lock)
|
||||
|
||||
#define TRACK_CONSOLE_TIME (CONFIG(HAVE_MONOTONIC_TIMER))
|
||||
#define TRACK_CONSOLE_TIME (!ENV_SMM && CONFIG(HAVE_MONOTONIC_TIMER))
|
||||
|
||||
static struct mono_time mt_start, mt_stop;
|
||||
static long console_usecs;
|
||||
|
||||
static void console_time_run(void)
|
||||
{
|
||||
if (TRACK_CONSOLE_TIME)
|
||||
if (TRACK_CONSOLE_TIME && boot_cpu())
|
||||
timer_monotonic_get(&mt_start);
|
||||
}
|
||||
|
||||
static void console_time_stop(void)
|
||||
{
|
||||
if (TRACK_CONSOLE_TIME) {
|
||||
if (TRACK_CONSOLE_TIME && boot_cpu()) {
|
||||
timer_monotonic_get(&mt_stop);
|
||||
console_usecs += mono_time_diff_microseconds(&mt_start, &mt_stop);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue