__syscalls__

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.
Post Reply
intel_breaker

__syscalls__

Post 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...
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

Re:__syscalls__

Post 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
intel_breaker

Re:__syscalls__

Post by intel_breaker »

Ok, thx.
I wrong write IDT
(today i have syscalls at normal system task).
I will send part of code soon.
Post Reply