I have been trying to work through recursive mapping of my paging tables in my mind off and on for a couple of weeks now. Some days I feel I have better success, than others. In reality, I haven't got a clue. At this point, I am so confused I probably will not be able to articulate my questions well and I'm likely to have many follow-up questions. I might even ramble.

I'm setting up recursive mapping (in a 64-bit system) and let's say that I am going to use entry/index 511 for my recursive map. My first thought is that I want to map PML4[511] point to the physical address of my PML4 table. This way, when I want to access a PML4 entry, I can refer to the proper offset from 0xfffffffffffff000 and get to the proper PLML4 entry. However, on closer inspection, that logic does not seem sound. What if I need to add a new PD to a PDPT, how would I get to that structure? Besides, it would make a mess of accessing the other pages above 0xffffff8000000000. So, my current thinking is that I need to drive the actual mapping down to the page level, so that if I set up PML4[511][511][511][511] (meaning PML4[511] to get a PDPT; PDPT[511] to get a PD; PD[511] to get a PT; PT[511] to get the physical address [or page] of the PML4 table), I'm in much better shape. Is this current thinking correct?
Now, I am calculating that I have 1 page for the PML4 table. I am calculating that I have 511 pages for each of the possible PDPTables.


Now, if I nave to add a new Page Table (or Page Directory or PDP Table) to my paging structures, I need to allocate a frame for this new structure. (I think I just answered this question as I'm trying to write it, but I'm going to continue anyway in case I'm wrong -- very like at this point

Thanks in advance for the assistance!!