Commit e54742a0 authored by Stefan Lankes's avatar Stefan Lankes
Browse files

standardization of the output format

parent e952096e
......@@ -52,7 +52,7 @@ pub fn output_message_byte(byte: u8) {
pub unsafe fn find_kernel() -> usize {
// Identity-map the Multiboot information.
assert!(mb_info > 0, "Could not find Multiboot information");
loaderlog!("Found Multiboot information at {:#X}", mb_info);
loaderlog!("Found Multiboot information at 0x{:x}", mb_info);
let page_address = align_down!(mb_info, BasePageSize::SIZE);
paging::map::<BasePageSize>(page_address, page_address, 1, PageTableEntryFlags::empty());
......@@ -104,7 +104,7 @@ pub unsafe fn find_kernel() -> usize {
"Could not find a single module in the Multiboot information"
);
assert!(start_address > 0);
loaderlog!("Found an ELF module at {:#X}", start_address);
loaderlog!("Found an ELF module at 0x{:x}", start_address);
let page_address = align_down!(start_address, BasePageSize::SIZE);
paging::map::<BasePageSize>(page_address, page_address, 1, PageTableEntryFlags::empty());
......@@ -196,8 +196,8 @@ pub unsafe fn boot_kernel(
// Jump to the kernel entry point and provide the Multiboot information to it.
loaderlog!(
"Jumping to HermitCore Application Entry Point at {:#X}",
"Jumping to HermitCore Application Entry Point at 0x{:x}",
entry_point
);
llvm_asm!("jmp *$0" :: "r"(entry_point), "{rdi}"(&BOOT_INFO as *const _ as usize) : "memory" : "volatile");
llvm_asm!("jmp *$0" :: "r"(entry_point), "{rdi}"(&BOOT_INFO as *const _ as u64) : "memory" : "volatile");
}
......@@ -90,14 +90,14 @@ impl PageTableEntry {
// We don't know this here, so we can only verify that at least the offset bits for a 2 MiB page are zero.
assert!(
physical_address % LargePageSize::SIZE == 0,
"Physical address is not on a 2 MiB page boundary (physical_address = {:#X})",
"Physical address is not on a 2 MiB page boundary (physical_address = 0x{:x})",
physical_address
);
} else {
// Verify that the offset bits for a 4 KiB page are zero.
assert!(
physical_address % BasePageSize::SIZE == 0,
"Physical address is not on a 4 KiB page boundary (physical_address = {:#X})",
"Physical address is not on a 4 KiB page boundary (physical_address = 0x{:x})",
physical_address
);
}
......
......@@ -19,7 +19,7 @@ pub fn allocate(size: usize) -> usize {
assert!(size > 0);
assert!(
size % BasePageSize::SIZE == 0,
"Size {:#X} is a multiple of {:#X}",
"Size 0x{:x} is a multiple of 0x{:x}",
size,
BasePageSize::SIZE
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment