How to Enable the Clock or the PIT on Qemu i386 Emulator

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
aswinmohanme
Posts: 7
Joined: Tue Dec 01, 2015 7:01 am

How to Enable the Clock or the PIT on Qemu i386 Emulator

Post by aswinmohanme »

I have recently been following James M Kernel Dev. I use Qemu instead of Boschs for emulating the i386 architecture.

But Iam Stuck how do I enable the clock or the Programmable Interval Timer in qemu ?
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: How to Enable the Clock or the PIT on Qemu i386 Emulator

Post by SpyderTL »

I'm not sure what you are asking. Can you explain what you are trying to do?

The PIT should be set up and running by the time your OS code starts executing, so you shouldn't need to do anything with it. You can change the frequency and make it interrupt the CPU faster or slower, if you want, but I would just leave it at its default value, for now.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to Enable the Clock or the PIT on Qemu i386 Emulator

Post by iansjack »

The same way that you would on real hardware.
aswinmohanme
Posts: 7
Joined: Tue Dec 01, 2015 7:01 am

Re: How to Enable the Clock or the PIT on Qemu i386 Emulator

Post by aswinmohanme »

The Problem is with my code I think . Trying to Fix it , the Output is not displayed on the screen
kenod
Posts: 22
Joined: Fri Sep 25, 2015 5:30 am
Libera.chat IRC: kenod

Re: How to Enable the Clock or the PIT on Qemu i386 Emulator

Post by kenod »

Do you have working code for the keyboard? I had a problem with PIT code as well, but it turned out I had some trouble with my interrupts. Also, can you post your PIT code? That would help us with finding the problem.
Post Reply