1
1
//! Exports item [`Multiboot2InformationBuilder`].
2
2
use crate :: builder:: traits:: StructAsBytes ;
3
- use crate :: { BootLoaderNameTag , CommandLineTag , ElfSectionsTag , FramebufferTag , ModuleTag } ;
3
+ use crate :: {
4
+ BasicMemoryInfoTag , BootLoaderNameTag , CommandLineTag , ElfSectionsTag , FramebufferTag ,
5
+ ModuleTag ,
6
+ } ;
4
7
5
8
use alloc:: boxed:: Box ;
6
9
use alloc:: vec:: Vec ;
@@ -10,6 +13,7 @@ use alloc::vec::Vec;
10
13
/// except for the END tag.
11
14
#[ derive( Debug ) ]
12
15
pub struct Multiboot2InformationBuilder {
16
+ basic_memory_info_tag : Option < BasicMemoryInfoTag > ,
13
17
boot_loader_name_tag : Option < Box < BootLoaderNameTag > > ,
14
18
command_line_tag : Option < Box < CommandLineTag > > ,
15
19
elf_sections_tag : Option < Box < ElfSectionsTag > > ,
@@ -20,6 +24,7 @@ pub struct Multiboot2InformationBuilder {
20
24
impl Multiboot2InformationBuilder {
21
25
pub const fn new ( ) -> Self {
22
26
Self {
27
+ basic_memory_info_tag : None ,
23
28
boot_loader_name_tag : None ,
24
29
command_line_tag : None ,
25
30
elf_sections_tag : None ,
@@ -28,6 +33,10 @@ impl Multiboot2InformationBuilder {
28
33
}
29
34
}
30
35
36
+ pub fn basic_memory_info_tag ( & mut self , basic_memory_info_tag : BasicMemoryInfoTag ) {
37
+ self . basic_memory_info_tag = Some ( basic_memory_info_tag)
38
+ }
39
+
31
40
pub fn bootloader_name_tag ( & mut self , boot_loader_name_tag : Box < BootLoaderNameTag > ) {
32
41
self . boot_loader_name_tag = Some ( boot_loader_name_tag) ;
33
42
}
0 commit comments