[memory] Rework memory_initialize for new loader

Created a new `memory_initialize()` function that uses the new-style
kernel args structure from the new bootloader.

Additionally:
* Fixed a hard-coded interrupt EOI address that didn't work with new
  memory locations
* Make the `page_manager::fault_handler()` automatically grant pages
  in the kernel heap

Tags: boot page fault
This commit is contained in:
Justin C. Miller
2020-05-24 16:27:48 -07:00
parent fc3d919f25
commit 35b1d37df0
6 changed files with 95 additions and 222 deletions

View File

@@ -36,6 +36,10 @@ struct page_table
(entries[i] & 0x80) == 0x80;
}
inline bool is_page(level l, int i) const {
return (l == level::pt) || is_large_page(l, i);
}
void dump(
level lvl = level::pml4,
bool recurse = true);