Page fault after IRQ, yet no paging enabled yet?
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Page fault after IRQ, yet no paging enabled yet?
Hi Again!
This is actually kinda weird behavior for my kernel.
See, everything is going along fine, the GDT, IDT, and then the PIT are setup. Then the kernel starts interrupts. Oh look it gets one! Yay, can't wait for the next... wait. Is that... a page fault!? How could this happen, I haven't even setup paging yet! Ok, the overly dramatic explanation aside, that is what happens. It's actually quite peculiar that a page fault happens, and returns a error code, when paging hasn't been setup yet. I do suspect that the pit isn't getting remapped correctly. Is that assumption correct?
Here's a screenshot:
Thanks,
Lionel
This is actually kinda weird behavior for my kernel.
See, everything is going along fine, the GDT, IDT, and then the PIT are setup. Then the kernel starts interrupts. Oh look it gets one! Yay, can't wait for the next... wait. Is that... a page fault!? How could this happen, I haven't even setup paging yet! Ok, the overly dramatic explanation aside, that is what happens. It's actually quite peculiar that a page fault happens, and returns a error code, when paging hasn't been setup yet. I do suspect that the pit isn't getting remapped correctly. Is that assumption correct?
Here's a screenshot:
Thanks,
Lionel
- darkinsanity
- Member
- Posts: 45
- Joined: Wed Sep 17, 2008 3:59 am
- Location: Germany
Re: Page fault after IRQ, yet no paging enabled yet?
Interrupt 13 is not fired on a page fault. What you got is a General Protection Fault.
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Re: Page fault after IRQ, yet no paging enabled yet?
Oh, must have got the names of the interrupts mixed up...
Well, now that I did a quick search, I now know what to do, thanks!
Well, now that I did a quick search, I now know what to do, thanks!
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Re: Page fault after IRQ, yet no paging enabled yet?
Wait, actually everything I looked at didn't make sense in my case. Oh how I hate being stuck...
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Page fault after IRQ, yet no paging enabled yet?
Do you have any more information to work from than what you've shown on your QEMU screenshot (eg, extra data on the serial line)?
If not, you may want to start dumping registers (including EIP and the CRn registers, and EFLAGS) so you can at least nail down what code is causing the GPF.
Otherwise, carry on
If not, you may want to start dumping registers (including EIP and the CRn registers, and EFLAGS) so you can at least nail down what code is causing the GPF.
Otherwise, carry on
Re: Page fault after IRQ, yet no paging enabled yet?
Perhaps there is something wrong with your IDT entries. Fire a software interrupt to make sure your IDT works.
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Re: Page fault after IRQ, yet no paging enabled yet?
serviper:Yes, software interrupts work correctly.
pcmattman: Working on it.
pcmattman: Working on it.
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Re: Page fault after IRQ, yet no paging enabled yet?
Update:
Here's a screen of the registers:
And no, I don't have anything other than that dump to go off of.
Here's a screen of the registers:
And no, I don't have anything other than that dump to go off of.
Re: Page fault after IRQ, yet no paging enabled yet?
SS is NULL.Lionel wrote:Update:
Here's a screen of the registers:
And no, I don't have anything other than that dump to go off of.
If a trainstation is where trains stop, what is a workstation ?
-
- Member
- Posts: 63
- Joined: Sat Apr 28, 2012 9:41 am
- Location: Earth -> Asia
Re: Page fault after IRQ, yet no paging enabled yet?
I had made the same silly error, I mapped Exceptions from 1 to 32 not 0 to 31.
I used to get strange exceptions.After 5days,I came to know that in my IDT it starts from 0!!
I used to get strange exceptions.After 5days,I came to know that in my IDT it starts from 0!!
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.