[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

@@ -84,13 +84,9 @@ kernel_main(args::header *header)
cpu_id cpu;
cpu.validate();
/*
memory_initialize(
header->scratch_pages,
header->memory_map,
header->memory_map_length,
header->memory_map_desc_size);
memory_initialize(header);
/*
kutil::allocator &heap = g_kernel_heap;
if (header->frame_buffer && header->frame_buffer_length) {