allocate ring3 pages
Posted: Wed May 20, 2009 6:39 am
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.
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.