This commit is contained in:
pointer-to-bios 2024-09-28 15:06:10 +08:00
parent 2c99270910
commit 06c2882574
2 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,11 @@ use core::panic::PanicInfo;
pub mod plugin;
pub mod rust_mm;
#[no_mangle]
extern "C" fn nonx_main() -> ! {
loop {}
}
#[panic_handler]
fn panic_handler(_panic: &PanicInfo) -> ! {
loop {}

View File

@ -43,8 +43,10 @@ impl PreInitializeAllocator {
}
}
if start == 0 {
panic!("PreInitializeAllocator runs out. Bit map:\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}",
self.base[0], self.base[1], self.base[2], self.base[3], self.base[4], self.base[5], self.base[6], self.base[7]);
panic!(
"PreInitializeAllocator runs out. Bit map:\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}\n{:#x}",
self.base[0], self.base[1], self.base[2], self.base[3], self.base[4], self.base[5], self.base[6], self.base[7],
);
} else {
addr_of_mut!(self.base[start]) as *mut u8
}