[kernel] Begin replacing page_manager with vm_space
This is the first commit of several reworking the VM system. The main focus is replacing page_manager's global functionality with objects representing individual VM spaces. The main changes in this commit were: - Adding the (as yet unused) vm_area object, which will be the main point of control for programs to allocate or share memory. - Replace the old vm_space with a new one based on state in its page tables. They will also be containers for vm_areas. - vm_space takes over from page_manager as the page fault handler - Commented out the page walking in memory_bootstrap; I'll probably need to recreate this functionality, but it was broken as it was. - Split out the page_table.h implementations from page_manager.cpp into the new page_table.cpp, updated it, and added page_table::iterator as well.
This commit is contained in:
@@ -118,11 +118,6 @@ public:
|
||||
/// Get a pointer to the kernel's PML4
|
||||
inline page_table * get_kernel_pml4() { return m_kernel_pml4; }
|
||||
|
||||
/// Attempt to handle a page fault.
|
||||
/// \arg addr Address that triggered the fault
|
||||
/// \returns True if the fault was handled
|
||||
bool fault_handler(uintptr_t addr);
|
||||
|
||||
private:
|
||||
/// Copy a physical page
|
||||
/// \arg orig Physical address of the page to copy
|
||||
@@ -182,6 +177,7 @@ private:
|
||||
frame_allocator &m_frames;
|
||||
|
||||
friend class memory_bootstrap;
|
||||
friend class vm_space;
|
||||
page_manager(const page_manager &) = delete;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user