- 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:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user