Page 1 of 1

__syscalls__

Posted: Thu Dec 30, 2004 9:01 am
by intel_breaker
Hi!, I'm from poland.
I want asks yours:
What i can change page directory from user to kernel.
I calls syscalls:) from user task (user_page_dir & ring 3)
and i get message "Page fault". My devices i/o functions usings memory on non user page directory by in kernel page directory.Syscals work on ring3 and must use kernel page dir, but i dont know what i can do >:(
Please...

Re:__syscalls__

Posted: Thu Dec 30, 2004 3:33 pm
by gaf
Hi,
does this mean that you have 2 seperate page directories - one for the kernel and one for the user ? In that case I'm wondering how you even managed to get to user mode.

Normally user tasks and kernel share one page directory:
o---------------------------------------------------------o
| user task (3GB, ring3) | kernel (1GB, ring0) |
o---------------------------------------------------------o

With this design there's no need to change the paging directory which makes syscalls simpler and improves performance drastically.

How do you switch to user-mode ?
How do you want to trap back to the kernel ?
(Maybe you could post some code)

cheers,
gaf

Re:__syscalls__

Posted: Fri Dec 31, 2004 6:20 am
by intel_breaker
Ok, thx.
I wrong write IDT
(today i have syscalls at normal system task).
I will send part of code soon.