If I don't the timer runs one time only and will not continue to fire every time interval.
Also JamesM's tutorial (Protected Mode) that I am following and trying to make it work in 64-bit does the same thing.
What I don't understand is why is it working on Bochs and not Qemu.
Also, why those instructions create access to a memory location post that mapped size with exactly 0xf01 bytes consistently even when I change the size mapped as I stated before.
I will have access to a machine with virtual box and I am going to try it out on it as well.
Thanks
Karim.
Page Fault after enabling interrupt using sti
Re: Page Fault after enabling interrupt using sti
Surprisingly, Virtual Box worked fine with no problems.
I think that the problem is very much related to qemu.
I will try to avail a VMWare environment and try on it as well.
If anyone passed through this before, please let me know.
Thanks
Karim.
I think that the problem is very much related to qemu.
I will try to avail a VMWare environment and try on it as well.
If anyone passed through this before, please let me know.
Thanks
Karim.
Re: Page Fault after enabling interrupt using sti
Okay, Finally,
When I added -enable-kvm to the Qemu command line, everything worked as expected on Qemu.
BUT I DO NOT UNDERSTAND WHY THIS IS HAPPENING.
Please if any one has any explanation for that, please let me know.
I want to know if this means that my code is okay?? Or there is still a problem that is masked by the different emulators and was unmasked by qemu without kvm support ??
Thanks
Karim.
When I added -enable-kvm to the Qemu command line, everything worked as expected on Qemu.
BUT I DO NOT UNDERSTAND WHY THIS IS HAPPENING.
Please if any one has any explanation for that, please let me know.
I want to know if this means that my code is okay?? Or there is still a problem that is masked by the different emulators and was unmasked by qemu without kvm support ??
Thanks
Karim.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Page Fault after enabling interrupt using sti
Depending on the remainder of the design, yes. At least if you follow a future-proofed design the most appropriate routine is roughly as follows:bwat wrote:Do you really want to execute a "sti" before you initialise the timer?
- configure IDT
- configure PIC and mask all IRQs
- enable interrupts
- configure device X (point in case: the PIT)
- unmask the IRQ line in question.
If hardware virtualisation - or running directly on the processor - fixes things then it could mean your qemu software core doesn't provide features that are present on your actual processor. For instance, is your qemu actually called qemu-system-x86_64?BUT I DO NOT UNDERSTAND WHY THIS IS HAPPENING.
-
- Member
- Posts: 45
- Joined: Sat Sep 07, 2013 8:26 am
- Contact:
Re: Page Fault after enabling interrupt using sti
i have a recommendation:
don't initialize keyboard handler IRQ in the Timer Handler!
after the timer has been initialized, initialize the keyboard
this make's your code standard
don't initialize keyboard handler IRQ in the Timer Handler!
after the timer has been initialized, initialize the keyboard
this make's your code standard
testing the operating system is very hard when your eyes can't see well
like me and many others
like me and many others