- heap allocator now makes sure virtual memory pages are mapped before using them. this means we no longer have to use page faults to allocate frames, it is done automatically.

- fixed the apic code that caused a page fault. it now writes the correct values at the correct physical address
- improved startup logging including displaying how much RAM is installed.
This commit is contained in:
2025-03-05 20:49:21 +00:00
parent 8704b5d249
commit ef70bcf51e
9 changed files with 176 additions and 79 deletions
+22
View File
@@ -0,0 +1,22 @@
use core::fmt;
use x86_64::instructions::interrupts;
use crate::prelude::{_print_log, _serial_write};
#[macro_export]
macro_rules! debugln {
() => ($crate::print_log!("\n"));
($($arg:tt)*) => ($crate::debug!("{}\n", format_args!($($arg)*)));
}
#[macro_export]
macro_rules! debug {
($($arg:tt)*) => ($crate::prelude::_debug(format_args!($($arg)*)));
}
pub fn _debug(args: fmt::Arguments) {
interrupts::without_interrupts(|| {
_print_log(args);
_serial_write(args);
});
}