Page 1 of 1
page directories for tasks
Posted: Thu Aug 07, 2003 11:00 pm
by Adek336
Hello, I´ve got a simple scheduler, which can run some kernel level funcs. the kernel is mapped in pages 0 and above. So when a new process has it´s own cr3, how will it be able to run the scheduler or a syscall? One option is to put at page0 a func which loads the kernel cr3. Then all programs would need to be linked -Ttext 0x1000, would this work?
Cheers,
Adrian.
RE:page directories for tasks
Posted: Thu Aug 07, 2003 11:00 pm
by Jamethiel
Why not just map the user tasks to use a code segment descriptor with a different base and handle syscalls through an entry in the IDT?
RE:page directories for tasks
Posted: Thu Aug 07, 2003 11:00 pm
by Adek336
I will try to use it. Just one more thing: the user task will start let´s say at 2Mb, so malloc would have to allocate above 2Mb and then substract 2Mb from the pointer value to make user_DS:ptr point at the place?
Cheers,
Adrian.