Programmable Interval Timer (PIT)

This is implemented in pit.

See OsDev docs OsDev: Programmable Interval Timer (PIT) for more details.

The PIT is a hardware timer chip that is commonly used in x86-based systems to generate periodic interrupts and measure time intervals.

Its kinda a lesser version of HPET, but it has wider support. We are using it as an alternative to HPET if its not present or the user doesn't want to use it by using the allow_hpet=false cmdline (see Command Line)

We are using PIT as a timer to keep track of system ticks and also to calibrate TSC when HPET isn't used, so we are not using the interrupts generated by PIT for anything else.