changed page allocation to happen on page fault for performance reasons

This commit is contained in:
2025-02-27 23:57:23 +00:00
parent 2915d0c879
commit 192100be7a
9 changed files with 144 additions and 61 deletions
+2 -4
View File
@@ -1,5 +1,6 @@
use core::arch::x86_64::__cpuid;
use libk::drivers::memory::FoundryOSFrameAllocator;
use spin::Lazy;
use x86_64::{
PhysAddr, VirtAddr,
@@ -12,10 +13,7 @@ use x86_64::{
use crate::serial_print;
use super::{
cpu::model_specific_registers::*, memmap::PHYSICAL_MEMORY_OFFSET,
memory::FoundryOSFrameAllocator,
};
use super::{cpu::model_specific_registers::*, memmap::PHYSICAL_MEMORY_OFFSET};
const IA32_APIC_BASE_MSR: u32 = 0x1b;
const IA32_APIC_BASE_MSR_BSP: u64 = 0x100;