Page 1 of 1
PIT Question under Bochs
Posted: Wed Oct 04, 2006 9:44 pm
by elaverick
I've been using the following code to implement the PIT in my Kernel
http://www.osdever.net/bkerndev/Docs/pit.htm the thing is the comments in the code suggest that 18 ticks should be equal to one second with the default phase. Now I've tried both with the default phase and with a phase of 100Hz using the phase changing code also included in that tutorial but both seem to be off by a magnitude of 10 when run under Bochs (E.G. It's actually 180 ticks or 1000 ticks per second). So is Bochs simulating too fast or are the code comments incorrect?
Re:PIT Question under Bochs
Posted: Wed Oct 04, 2006 11:32 pm
by Candy
elaverick wrote:
So is Bochs simulating too fast or are the code comments incorrect?
I'm going to go for "you didn't configure bochs". Did you tell bochs how fast to simulate? Do you happen to make about 10 million IPS? That pretty much explains it. You can recompile bochs to use your real computers timing for those events, which make them more predictable but they do make your output non-repeatable.
Re:PIT Question under Bochs
Posted: Wed Oct 04, 2006 11:43 pm
by elaverick
Perfect, thanks. I'd missed it the first time I'd configured Bochs, I'd assumed it would run in real time by default. Another case of RTFM I'm afraid.