mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Add section about start and end of kernel/multiboot
This commit is contained in:
@@ -44,6 +44,15 @@ pub extern fn rust_main(multiboot_information_address: usize) {
|
||||
section.addr, section.size, section.flags);
|
||||
}
|
||||
|
||||
let kernel_start = elf_sections_tag.sections().map(|s| s.addr).min().unwrap();
|
||||
let kernel_end = elf_sections_tag.sections().map(|s| s.addr + s.size).max().unwrap();
|
||||
|
||||
let multiboot_start = multiboot_information_address;
|
||||
let multiboot_end = multiboot_start + (boot_info.total_size as usize);
|
||||
|
||||
println!("kernel start: 0x{:x}, kernel end: 0x{:x}", kernel_start, kernel_end);
|
||||
println!("multiboot start: 0x{:x}, multiboot end: 0x{:x}", multiboot_start, multiboot_end);
|
||||
|
||||
loop{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user