- made improvements to memory code (refactored)
- started on improvements to the page frame allocator. it should be able to provide a usable page for any given virtual memory address requested.
This commit is contained in:
+5
-5
@@ -17,11 +17,11 @@ use crate::{
|
||||
prelude::*,
|
||||
};
|
||||
use arch::x86_64::memory::allocation::heap_alloc::init_heap;
|
||||
use arch::x86_64::memory::memory_map;
|
||||
use arch::x86_64::memory::mapping;
|
||||
use core::arch::asm;
|
||||
use limine::BaseRevision;
|
||||
use x86_64::VirtAddr;
|
||||
use crate::arch::x86_64::memory::FoundryOSFrameAllocator;
|
||||
use arch::x86_64::memory::allocation::page_alloc::FoundryOSFrameAllocator;
|
||||
|
||||
pub mod arch;
|
||||
pub mod resources;
|
||||
@@ -67,7 +67,7 @@ pub fn boot() -> Result<(), &'static str> {
|
||||
|
||||
use arch::x86_64::{gdt, interrupts};
|
||||
|
||||
let memory_map = memory_map::get_memory_map();
|
||||
let memory_map = mapping::get_memory_map();
|
||||
|
||||
print_log!(" Initialising Serial... ");
|
||||
if arch::x86_64::drivers::serial::init().is_err() {
|
||||
@@ -85,12 +85,12 @@ pub fn boot() -> Result<(), &'static str> {
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Initialising Memory Subsystem... ");
|
||||
let physical_memory_offset = VirtAddr::new(*memory_map::PHYSICAL_MEMORY_OFFSET);
|
||||
let physical_memory_offset = VirtAddr::new(*mapping::PHYSICAL_MEMORY_OFFSET);
|
||||
init_page_table(physical_memory_offset);
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Setting Up Page Table... ");
|
||||
unsafe { FoundryOSFrameAllocator::init(memory_map) };
|
||||
FoundryOSFrameAllocator::init(memory_map);
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Initialising Heap... ");
|
||||
|
||||
Reference in New Issue
Block a user