1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Library with type definitions and parsing functions for Multiboot2 headers.
//! This library is `no_std` and can be used in bootloaders.
//!
//! # Example
//! ```rust
//! use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, Multiboot2HeaderBuilder};
//! use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header};
//!
//! // Small example that creates a Multiboot2 header and parses it afterwards.
//!
//! // We create a Multiboot2 header during runtime here. A practical example is that your
//! // program gets the header from a file and parses it afterwards.
//! let mb2_hdr_bytes = Multiboot2HeaderBuilder::new(HeaderTagISA::I386)
//! .relocatable_tag(RelocatableHeaderTag::new(
//! HeaderTagFlag::Required,
//! 0x1337,
//! 0xdeadbeef,
//! 4096,
//! RelocatableHeaderTagPreference::None,
//! ))
//! .information_request_tag(
//! InformationRequestHeaderTagBuilder::new(HeaderTagFlag::Required)
//! .add_irs(&[MbiTagType::Cmdline, MbiTagType::BootLoaderName]),
//! )
//! .build();
//!
//! // Cast bytes in vector to Multiboot2 information structure
//! let mb2_hdr = unsafe { Multiboot2Header::from_addr(mb2_hdr_bytes.as_ptr() as usize) };
//! println!("{:#?}", mb2_hdr);
//!
//! ```
//!
//! ## MSRV
//! The MSRV is 1.52.1 stable.
extern crate alloc;
extern crate std;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Re-export of [`multiboot2::TagType`] from `multiboot2`-crate as `MbiTagType`, i.e. tags that
/// describe the entries in the Multiboot2 Information Structure (MBI).
pub use TagType as MbiTagType;