page directory mappings
Posted: Wed May 12, 2004 11:00 pm
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..
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..