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.
mov cr0, eax <<<---- After that I get the page table
leave <<<---- Here the triple fault happens
If I try to issue another command before the leave, it also crashes right after mov cr0, eax.
I am not really firm with pagetables, does mine look convenient?
Thanks in advance
dukedevon
Last edited by dukedevon on Sat Jul 24, 2010 6:39 am, edited 1 time in total.
Is that pagingdump the same at the crashing instruction? What's the pagefault address?
"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 get 0x1feff80 as the faulting address. What do I do with that information?
This is the virtual address that causes the page fault, i.e. some instruction tried to access memory at virtual address 0x1feff80. Obviously this must fail, because you did not map anything to that address. It's far beyond your 4 MB.
XenOS wrote:
This is the virtual address that causes the page fault, i.e. some instruction tried to access memory at virtual address 0x1feff80. Obviously this must fail, because you did not map anything to that address. It's far beyond your 4 MB.
I can figure that out, but I don't know how to fix this.
The command that causes the crash is the last of the following
Modify your code so that the instruction after mov to cr0 doesn't touch the stack. Then you will know.
Thanks, that helped me a lot. Figured out I didn't even declare a sys_stack in my loader.s
I wonder how I got this far...
Thanks a lot, I would be totally lost without this forum!!!
Thank you for being so tolerant towards my stupid newbie questions.
Are you passing -i or -r to the linker? They stop it from emitting errors for missing symbols (as well as generating a wrong binary), yet some braindead tutorials (and occasionally other members) advocate its use.
"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 ]