I've been working on a new paging implementation for my kernel for a few days now but have been running into some problems when creating a new page table. I'll list out the scenario that is causing the issue.
- The VMM is asked to acquire the page at 0x01000000. It asks for a physical frame and then talks to the paging implementation to get the frame mapped.
- The paging implementation checks for the presence of a page table, doesn't find one...
- A new page table is created and a full flush of the TLB occurs to ensure the page table is seen. (Debugging in BOCHs reveals that the page table that is created is correctly mapped in the linear address space).
- The page entry is added into the new page table (debugging this shows the entry is correctly written into the table/memory). A invlpg instruction is then issued for the page.
- Attempting to access the page results in a Page not present exception.
The paging implementation that I've got so far can be found at https://github.com/tjhancocks/vkernel/b ... 6/paging.c.
I'm not entirely sure why the linear address remains invalid after invalidating the page and/or updating CR3. But its probably something small that I'm missing and just not noticing.
Any help would be greatly appreciated, thanks!