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.
I trying to implement paging, I have set up one pde and one 1024 pte, then enabled paging, qemu showed me that everything works (identity mapping + higher half). However, whenever I want to jump to the higher half, by calling a function which is at a 0xC....... address qemu terminates and shows me that a triple fault occured. The content of the cr2 doesn't make any sense to me .
kiwipresse wrote:The content of the cr2 doesn't make any sense to me .
Maybe it does to us - care to show us the dump?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
I suppose the reason why there is a strange value in cr2 is because I didn't set up any exception handlers yet. The content from EIP is exactly the address from the function which I try to call. qemu mem showed me that the first 4mb is mapped correctly to the higher half. I don't know where I made the mistake
Your CR2 is what CR0 is supposed to /needs to be. Are you sure you didn't accidentally write to CR2 instead of writing to CR0 as that is what it looks like. Or do you load CR0 with the memory location of 0xe0000011 instead of the dword 0xe0000011?
why is your main function (1023e0) located inside your page directory (102000-102fff)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]