Patch set 2:Code-Review -1
3 comments:
Patch Set #2, Line 17: * SeaBios
this is not true anymore for years. seabios can use 8254 (pit), pm timer and even tsc.
Patch Set #2, Line 20: * Linux <5.3
hmm, as I read that patch, that problem only occurs, when both hpet and pit is not available.
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index 0e14f6c0d35e0..07c0e960b3f3b 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -82,8 +82,11 @@ static void __init setup_default_timer_irq(void)
/* Default timer init function */
void __init hpet_time_init(void)
{
- if (!hpet_enable())
- setup_pit_timer();
+ if (!hpet_enable()) {
+ if (!pit_timer_init())
+ return;
+ }
+
setup_default_timer_irq();
}
Patch Set #2, Line 26: GRUB2
GRUB2 supports other timers, too, but obviously not when booting from SeaBIOS. That seems to be a problem that IMO should be solved upstream in GRUB2 by trying other timers (pm, tsc) in legacy mode, too, instead of adding a workaround in coreboot.
grub-core/kern/i386/tsc.c
```
#if defined (GRUB_MACHINE_XEN) || defined (GRUB_MACHINE_XEN_PVH)
(void) (grub_tsc_calibrate_from_xen () || calibrate_tsc_hardcode());
#elif defined (GRUB_MACHINE_EFI)
(void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode());
#elif defined (GRUB_MACHINE_COREBOOT)
(void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode());
#else
(void) (grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode());
```
To view, visit change 34709. To unsubscribe, or for help writing mail filters, visit settings.