To fix the PIT problem I used
Code: Select all
clock: sync=realtime, time0=utc, rtc_sync=1
What's the setting to fix it?
EDIT:
Code: Select all
void InitialiseTimer()
{
Kernel::HardwareAbstraction::Interrupts::SetGate(32 + 8, (uint64_t)Time::RTCHandler, 0x08, 0xEE);
IOPort::WriteByte(0x70, 0x8B); // select register B, and disable NMI
uint8_t prev = IOPort::ReadByte(0x71); // read the current value of register B
IOPort::WriteByte(0x70, 0x8B); // set the index again (a read will reset the index to register D)
IOPort::WriteByte(0x71, prev | 0x40); // write the previous value ORed with 0x40. This turns on bit 6 of register B
uint8_t rate = RTCTImerShiftAmt; // rate must be above 2 and not over 15
IOPort::WriteByte(0x70, 0x8A); // set index to register A, disable NMI
prev = IOPort::ReadByte(0x71); // get initial value of register A
IOPort::WriteByte(0x70, 0x8A); // reset index to A
IOPort::WriteByte(0x71, (prev & 0xF0) | rate); //write only our rate to A. Note, rate is the bottom 4 bits.
IOPort::WriteByte(0x70, 0x0C);
IOPort::ReadByte(0x71);
}