Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hal-x86_64): add PIT driver (#355)
This commit adds a driver for configuring the Intel 8253/8254 Programmable Interval Timer (PIT). We are currently using the PIT in periodic mode as the system timer interrupt, but we aren't doing any actual configuration of the PIT. In order to use the local APIC timer instead, however, we need to be able to use the PIT to calibrate the APIC timer, since the PIT has a known frequency, while the local APIC frequency depends on the system's bus frequency. Therefore, this branch adds the ability to set the PIT in oneshot mode, and a method that spins until that interrupt fires. In addition, it adds a method to set the PIT in periodic mode with a configurable duration. This commit was factored out of PR #351 so that it can merge as a separate commit.
- Loading branch information