Hi,
I use the following method to allocate ring3 pages. Does anyone has better solution for this?
PD resides in the first 4k physical memory. kernel & app shares it.
the first 4MB physical memory was pre-paged for kernel.
when page enabled, 0x80000000-0x80001000 is PD area.
when allocate pages for ring3 app, I need to fill its PTEs with pages' physical address.
Assume a ring3 app is 4096 bytes, as PD is unique, only one PT & only one PTE are needed.
In order to access app's PT, I have to map it into kernel space.
allocate ring3 pages
Re: allocate ring3 pages
I think it's better good to use one page directory for one application...
The sharing PD between the kernel and application isn't good idea....
The sharing PD between the kernel and application isn't good idea....
Re: allocate ring3 pages
yes, separated PD is good for multi-task, I am experimenting single task now.
Re: allocate ring3 pages
How, then, do you access the kernel on a ring switch?kop99 wrote:I think it's better good to use one page directory for one application...
The sharing PD between the kernel and application isn't good idea....
Re: allocate ring3 pages
JamesM,
you can learn about the accessing kernel on a ring switch from book "Understanding The Linux Kernel"....
you can learn about the accessing kernel on a ring switch from book "Understanding The Linux Kernel"....
Re: allocate ring3 pages
Erm - last time I looked, the IA32 linux kernel mapped itself in to the higher gig of memory in each page directory. By your definition, this is "Sharing the PD between the application and kernel". It's also how Windows (IIRC) and most other sensible monolithic kernels do it.kop99 wrote:I think it's better good to use one page directory for one application...
The sharing PD between the kernel and application isn't good idea....
you can learn about the accessing kernel on a ring switch from book "Understanding The Linux Kernel"....
Cheers,
Adam