Write hpet timer twice
Created by: wartman4404
The HPET specification says you must set TN_VAL_SET_CNF in order to set a periodic timer's accumulator, but doesn't say what happens to the timer's interval in that case. This has led to a few different interpretations:
- In Qemu, Bochs, and probably most real hardware, the written value falls through and sets both the acccumulator and the interval.
- In VirtualBox both are set regardless of whether TN_VAL_SET_CNF is set.
- In Xen and on some real hardware each one must be set using two separate writes.
This writes to the timer twice, once with TN_VAL_SET_CNF and once without, in order for the last group to work. It also checks for the availability of legacy-replacement mode and periodic timers, in order to be extra thorough.