cleaner printfs
This commit is contained in:
parent
74b603eb6c
commit
3c3cd08ebb
|
@ -28,7 +28,7 @@ pub fn init_heap(
|
|||
mapper: &mut impl Mapper<Size4KiB>,
|
||||
frame_allocator: &mut impl FrameAllocator<Size4KiB>,
|
||||
) -> Result<(), MapToError> {
|
||||
println!("creating heap");
|
||||
println!("[ ] creating heap");
|
||||
let page_range = {
|
||||
let heap_start = VirtAddr::new(HEAP_START as u64);
|
||||
let heap_end = heap_start + HEAP_SIZE - 1u64;
|
||||
|
@ -49,7 +49,7 @@ pub fn init_heap(
|
|||
super::ALLOCATOR.lock().init(HEAP_START, HEAP_SIZE);
|
||||
}
|
||||
|
||||
println!("heap created");
|
||||
println!("[ ] heap created");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -30,13 +30,12 @@ use core::panic::PanicInfo;
|
|||
use bootloader::BootInfo;
|
||||
|
||||
pub fn init(boot_info: &'static BootInfo) {
|
||||
println!("XeOS booting");
|
||||
println!("XeOS booting:");
|
||||
gdt::init();
|
||||
interrupts::init_idt();
|
||||
unsafe { interrupts::PICS.lock().initialize() };
|
||||
x86_64::instructions::interrupts::enable();
|
||||
allocator::init(&boot_info);
|
||||
println!("XeOS booted");
|
||||
}
|
||||
|
||||
pub fn hlt_loop() -> ! {
|
||||
|
|
|
@ -13,17 +13,16 @@ use xe_os::println;
|
|||
entry_point!(kernel_main);
|
||||
|
||||
fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
||||
println!("booted");
|
||||
xe_os::init(&boot_info);
|
||||
|
||||
#[cfg(test)]
|
||||
test_main();
|
||||
|
||||
println!("It did not crash!");
|
||||
println!("Running WASM:");
|
||||
|
||||
xe_os::wasm::run();
|
||||
|
||||
println!("THE WASM RAN :DDDD");
|
||||
println!("[ ] success");
|
||||
|
||||
xe_os::hlt_loop();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ pub fn run() {
|
|||
|
||||
let bytes = include_bytes!("../../data/h.wasm");
|
||||
let b: Vec<u8> = bytes.iter().cloned().collect();
|
||||
println!("loaded wasm into a Vec");
|
||||
println!("[ ] loaded wasm into a Vec");
|
||||
|
||||
let module = wasmi::Module::from_buffer(&b).unwrap();
|
||||
let mut imports = ImportsBuilder::new();
|
||||
|
@ -25,7 +25,7 @@ pub fn run() {
|
|||
.expect("failed to load wasm module")
|
||||
.assert_no_start();
|
||||
|
||||
println!("invoking export");
|
||||
println!("[ ] invoking export");
|
||||
let _ = instance.invoke_export("h", &[], &mut H);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue