Page not present after TLB invalidation
Page 1 of 1

Author:  snijj [ Sat Jan 12, 2019 11:46 pm ]
Post subject:  Page not present after TLB invalidation


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.

I have tested this behaviour in both BOCHS and QEMU and they both exhibit the same issue.

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!

Author:  snijj [ Sun Jan 13, 2019 2:18 am ]
Post subject:  Re: Page not present after TLB invalidation

I've managed to solve the issue myself. I had managed to accidentally create a duplicate of the page directory that had almost identical contents, but ever so slightly different. Enough to make the whole thing not work correctly.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group