Multiboot Build Status Crates.io

This is a multiboot (v1) library written entirely in rust. The code depends only on libcore.

How-to use

```rust /// Translate a physical memory address and size into a slice pub unsafe fn paddrtoslice<'a>(p: PAddr, sz: usize) -> Option<&'a [u8]> { let ptr = mem::transmute(p + KERNELBASE); Some(slice::fromraw_parts(ptr, sz) }

/// mbootptr is the initial pointer to the multiboot structure /// provided in %ebx on start-up. pub fn usemultiboot(mbootptr: PAddr) { Multiboot::new(mbootptr, paddrtoslice).map(|mb| { mb.memory_regions().map(|regions| { for region in regions { println!("Found {:?}", region); } });

    mb.modules().map(|modules| {
        for module in modules {
            println!("Found {:?}", module);
        }
    });
});

} ```

Functionality is still not complete and patches are welcome!

Documentation