[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Page Physical Address and pte
Thanks for the reply.
I think I found the answer. 'pte_t' is a 20 bytes base physical address
of a page with the Least 12 bytes LSB as flags for the hardware control.
So to get the address, I just have to mask the 'pte_t' value that I have
in the kernel with PAGE_MASK (FFFFF000).
If you want to access the page content of a page, do it with the virtual
adress. Th adress will be automaticely translated in a physical adress.
This job is done by the MMU.
But I am in a kernel mode. How do I use MMU? And I want to scan the
whole pages not just accessing a particular address.
How do I know the size of the page that's filled though? I can't see
that information from the page struct.
A page on Linux i386 is always 4ko long.
I don't think they are always filled 4 kb right? Are the rest of the
page zeroed out before they are filled? So a partial filled page would
have the rest of the page filled with zero. So I can still look to it
wihtout any error just 0x00.
Kuas.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/