Page 1 of 1

qemu triple faults on enabling paging

Posted: Mon Jan 25, 2010 3:59 am
by anomit
I was following James M's tutorial on kernel development till I decided to implement paging on my own after Section 5.

I took some ideas from here but now at the end of setting up page directory and page table when I try to enable paging with CR0.PG = 1, qemu triple faults. The specific code in question is here: http://github.com/anomit/mykernel/blob/ ... c/paging.c

If anyone around here has got some time on their hands, they can check out the whole tree of the code for things to make more sense at http://github.com/anomit/mykernel/tree/unstable/src/

Thanks in advance :)

Re: qemu triple faults on enabling paging

Posted: Mon Jan 25, 2010 4:23 am
by Gigasoft
Looks like all the pages in the page table are marked as non-present.

Re: qemu triple faults on enabling paging

Posted: Mon Jan 25, 2010 4:33 am
by anomit
Dang! This is really embarassing :oops:
I don't know why I did unset_present() on the PTEs when I was actually assigning the frames.