#kernel #boot #multiboot2

no-std multiboot2

Library that helps you to parse the multiboot information structure (mbi) from Multiboot2-compliant bootloaders, like GRUB. It supports all tags from the specification including full support for the sections of ELF-64. This library is no_std and can be used in a Multiboot2-kernel.

20 releases (10 breaking)

0.12.2 Oct 2, 2021
0.11.0 Jul 7, 2021
0.10.1 Nov 2, 2020
0.9.0 Jul 6, 2020
0.3.1 Oct 31, 2016

#27 in Operating systems

Download history 168/week @ 2021-07-02 140/week @ 2021-07-09 96/week @ 2021-07-16 164/week @ 2021-07-23 274/week @ 2021-07-30 246/week @ 2021-08-06 158/week @ 2021-08-13 246/week @ 2021-08-20 91/week @ 2021-08-27 114/week @ 2021-09-03 289/week @ 2021-09-10 171/week @ 2021-09-17 111/week @ 2021-09-24 143/week @ 2021-10-01 190/week @ 2021-10-08 118/week @ 2021-10-15

762 downloads per month
Used in 2 crates

MIT/Apache

115KB
2K SLoC

multiboot2

Build crates.io docs

Rust library that helps you to parse the multiboot information structure (mbi) from Multiboot2-compliant bootloaders, like GRUB. It supports all tags from the specification including full support for the sections of ELF-64 files. This library is no_std and can be used in a Multiboot2-kernel.

It follows the Multiboot 2.0 specification at https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html and the ELF 64 specification at http://www.uclibc.org/docs/elf-64-gen.pdf.

Background: The Multiboot 2 Information Structure

The Multiboot information structure looks like this:

Field Type
total size u32
reserved u32
tags variable
end tag = (0, 8) (u32, u32)

There are many different types of tags, but they all have the same beginning:

Field Type
type u32
size u32
other fields variable

All tags and the mbi itself are 8-byte aligned. The last tag must be the end tag, which is a tag of type 0 and size 8.

License & Contribution

See main README file.

Dependencies