Page 1 of 1

Mapping last PDE to itself. Confusion.

Posted: Fri Oct 28, 2011 4:40 pm
by kfreezen
Hello,

I am currently writing the paging code for my little OS. I am confused about the term "mapping the last PDE to itself." It would be greatly appreciated if you could help clear up my confusion regarding the term.

Does it mean that to map the last PDE to itself would be to map all of the page tables to page table entries in the page table entry pointed to by the last page directory entry?

Thanks in advance.

Re: Mapping last PDE to itself. Confusion.

Posted: Fri Oct 28, 2011 5:52 pm
by NickJohnson
Effectively, yes. However, the beauty of the trick is that the page directory is the page table pointed to by the last page directory entry. The page directory and page table entry formats are compatible, so you don't have to make a page table that mirrors the page directory; simply use the page directory itself.

Re: Mapping last PDE to itself. Confusion.

Posted: Fri Oct 28, 2011 6:00 pm
by kfreezen
Thanks. Soon I'll be on greater things like making my OS
OSDEV wiki wrote:run programs from Windows, Mac OS, Linux, and even PDP-11 programs

Re: Mapping last PDE to itself. Confusion.

Posted: Fri Oct 28, 2011 7:42 pm
by piranha
kfreezen wrote:Thanks. Soon I'll be on greater things like making my OS
OSDEV wiki wrote:run programs from Windows, Mac OS, Linux, and even PDP-11 programs
That very much depends on your definition of the word 'soon'.

-JL

Re: Mapping last PDE to itself. Confusion.

Posted: Sat Oct 29, 2011 2:22 am
by egos
kfreezen wrote:I am currently writing the paging code for my little OS. I am confused about the term "mapping the last PDE to itself." It would be greatly appreciated if you could help clear up my confusion regarding the term.
Look at my posts here.