Mapping last PDE to itself. Confusion.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
kfreezen
Member
Member
Posts: 46
Joined: Tue Jul 21, 2009 11:36 am

Mapping last PDE to itself. Confusion.

Post 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.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Mapping last PDE to itself. Confusion.

Post 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.
kfreezen
Member
Member
Posts: 46
Joined: Tue Jul 21, 2009 11:36 am

Re: Mapping last PDE to itself. Confusion.

Post 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
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: Mapping last PDE to itself. Confusion.

Post 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
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Mapping last PDE to itself. Confusion.

Post 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.
If you have seen bad English in my words, tell me what's wrong, please.
Post Reply