I'm trying to implement multitasking by following James Molloys tutorial, but every time I do a task switch, it gives me a page fault. The problem seems to be in the original code to, because if I compile the downloadable source and compile it, I get the same result. I think its the instruction pointer, because it points to the address which gives me the page fault.
Currently it starts the processes sequentially, so there shouldn't be any race conditions or other freaky synchronization issues.
I was wondering about the page table. The one in the first process looks like this:
Code: Select all
0x00000000 - 0x00110FFF => 0x0000000000000000 - 0x0000000000110FFF //Kernel code - ID-Mapped
0xC0000000 - 0xC00FFFFF => 0x0000000000111000 - 0x0000000000210FFF //Kernel Heap
0xC0100000 - 0xC0101FFF => 0x0000000000216000 - 0x0000000000217FFF
0xDFFFE000 - 0xDFFFEFFF => 0x0000000000213000 - 0x0000000000213FFF
0XDFFFF000 - 0xDFFFFFFF => 0x0000000000212000 - 0x0000000000212FFF
0xE0000000 - 0xE0000FFF => 0x0000000000211000 - 0x0000000000211FFF //Stack
Code: Select all
0x00000000 - 0x00110FFF => 0x0000000000000000 - 0x0000000000110FFF //Kernel code - ID-Mapped
0xC0000000 - 0xC00FFFFF => 0x0000000000111000 - 0x0000000000210FFF //Kernel Heap
0xC0100000 - 0xC0101FFF => 0x0000000000216000 - 0x0000000000217FFF
0xDFFFE000 - 0xDFFFFFFF => 0x0000000000214000 - 0x0000000000215FFF
0xE0000000 - 0xE0000FFF => 0x0000000000218000 - 0x0000000000218FFF //Stack
The Tutorial, as well as the sourcecode is available here: http://www.jamesmolloy.co.uk/tutorial_h ... sking.html
Is it possible to say what is wrong here or do you need any more information?
[edit] The only thing i changed was the initial ramdisk, basically my textfiles have different content. It should harm my pagetable though :-/
greetz
dukedevon