This is a multiboot (v1) library written entirely in rust. The code depends only on libcore.
```rust /// Translate a physical memory address into a kernel addressable location. pub fn paddrtokernelvaddr(p: PAddr) -> VAddr { (p + KERNELBASE) as VAddr }
/// mbootptr is the initial pointer to the multiboot structure /// provided in %ebx on start-up. pub fn usemultiboot(mbootptr: PAddr) { let mb = Multiboot::new(mbootptr, memory::paddrtokernelvaddr); mb.memoryregions().map(|regions| { for region in regions { println!("Found {:?}", region); } });
mb.modules().map(|modules| {
for module in modules {
log!("Found {:?}", module);
}
}
} ```
Functionality is still not complete and patches are welcome!