#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.

28 releases

new 0.15.1 Mar 18, 2023
0.14.2 Mar 17, 2023
0.14.0 Jun 30, 2022
0.13.1 Jan 9, 2022
0.3.1 Oct 31, 2016

#50 in Operating systems

Download history 225/week @ 2022-12-01 464/week @ 2022-12-08 216/week @ 2022-12-15 364/week @ 2022-12-22 285/week @ 2022-12-29 246/week @ 2023-01-05 286/week @ 2023-01-12 237/week @ 2023-01-19 253/week @ 2023-01-26 303/week @ 2023-02-02 196/week @ 2023-02-09 387/week @ 2023-02-16 179/week @ 2023-02-23 456/week @ 2023-03-02 380/week @ 2023-03-09 643/week @ 2023-03-16

1,711 downloads per month
Used in 2 crates

MIT/Apache

135KB
2.5K 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.

MSRV

The MSRV is 1.56.1 stable.

License & Contribution

See main README file.

Dependencies

~0.7–1.2MB
~29K SLoC