page directory mappings

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
Mcd

page directory mappings

Post by Mcd »

hi there,

How does the cpu switch from userspace page directory to the main kernel page directory on a syscall in x86? (assuming that there is a Ngb/Ngb memory split, i mean when you don't want a seperate 4gb address space for both kernel and userspace, which in that case one would have to flush the tlb's on syscall) . In case it doesn't switch the pgd, how would the kernel space be accessed then?
I know some OSes copy the relevent part of the kpgd when it creates the a process' pgd on process creation to ease the kernel->user space transactions, which means all kernel page tables are shared by all userspace processes and all userspace page tables are valid in kernel mode.
Can anyone shed a light on this.. thanks.. :)
Post Reply