charlotte-os / charlotte-core

The Kernel of CharlotteOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a virtual memory manager for the x86_64 ISA

mdpatelcsecon opened this issue · comments

Create a virtual memory manager for the x86_64 ISA that can do the following:

  • Enable the use of PCIDs*
  • Create a page map
  • Implement Clone and Drop for page map*
  • Load a page map
  • Map normal 4 KiB pages
  • Unmap normal pages
  • Map large pages
  • Unmap large pages
  • Detect CPU support for huge pages
  • Map huge pages
  • Unmap huge pages
  • Handle page fault exceptions**
  • Make use of the page attribute table (PAT) to to set memory attributes for different regions***

*Postponed until there are multiple PageMaps
**Postponed until there is a userspace
***Moved to a separate issue due to the possibility of breaking the bootloader provided PageMap

This has been unblocked with the completion of the initial version of the PMM.

Blocked on #76

#76 has been declared invalid so this is no longer blocked.

Most of the hard parts of the VMM have been implemented. Once the unmap page function is complete then mapping and unmapping large and huge pages should be simple given that the same code used for normal pages can easily be modified to perform those operations as well. Things already build without errors however only testing will determine if the desired behavior has been implemented correctly.

The VMM is complete and should work for just the kernel PageMap for now. The PAT has not been modified however doing so will be a separate issue.