paging with multitasking
Posted: Tue May 29, 2007 11:20 am
Hi...
One more time I'm working on my hardware multitasking,It consists of
two tasks:main() which is PL0 and task() which is PL3,I can
switch from PL0 to PL3 successfully also I can go back to PL0
without any exceptions or errors,All this done without
enabling paging,but when I enable paging I get page fault exception.
I know that each task need different page directory,and in my case
I need two page directories with different PL,so I made one pde
with PL supervisor and another pde with PL user,Also I loaded
the CR3 in each TSS with suitable page directory address like this:
tss[0].cr3=pd //supervisor page directory
tss[1].cr3=pd_u //user page directory
I don't know what's wrong with my code so here's a minimized version
of my kernel ,Also an IMG I think it might help...
Thanx.
One more time I'm working on my hardware multitasking,It consists of
two tasks:main() which is PL0 and task() which is PL3,I can
switch from PL0 to PL3 successfully also I can go back to PL0
without any exceptions or errors,All this done without
enabling paging,but when I enable paging I get page fault exception.
I know that each task need different page directory,and in my case
I need two page directories with different PL,so I made one pde
with PL supervisor and another pde with PL user,Also I loaded
the CR3 in each TSS with suitable page directory address like this:
tss[0].cr3=pd //supervisor page directory
tss[1].cr3=pd_u //user page directory
I don't know what's wrong with my code so here's a minimized version
of my kernel ,Also an IMG I think it might help...
Thanx.