PIT tickrate using APIC

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
8infy
Member
Member
Posts: 185
Joined: Sun Apr 05, 2020 1:01 pm

PIT tickrate using APIC

Post by 8infy »

Hi, I just finished setting up IOAPIC and LAPIC and I'm seeing some weird behavior with the PIT timer.

On QEMU the PIT seems to be ticking twice the expected tickrate (I'm 100% sure that PIC is fully masked off, the mask is 255 I've checked).
But when I checked on VMWare it was the normal tickrate again. Why am I seeing this behavior? Is it supposed to be like that on QEMU?
When I go back to PIC the tickrate goes back to normal. (And on bochs I can't really check because its real time is off by a lot.)

just for the record here are the settings that im using in the IOAPIC:

Code: Select all

RedirectionEntry re {};
re.index            = to_index;
re.delivery_mode    = DeliveryMode::FIXED;
re.destination_mode = DestinationMode::PHYSICAL;
re.pin_polarity     = PinPolarity::ACTIVE_HIGH;
re.trigger_mode     = TriggerMode::EDGE;
re.is_disabled      = false;
re.local_apic_id    = local_apic_id;
Thanks.

UPD: after setting the real time flag in bochs, it seems like the tickrate is normal there as well. QEMU is the only one acting weird.
Post Reply