1
1
//! Exports item [`Multiboot2InformationBuilder`].
2
2
use crate :: builder:: traits:: StructAsBytes ;
3
3
use crate :: {
4
- BasicMemoryInfoTag , BootInformationInner , BootLoaderNameTag , CommandLineTag , EFIMemoryMapTag ,
5
- EFISdt32 , EFISdt64 , ElfSectionsTag , EndTag , FramebufferTag , MemoryMapTag , ModuleTag , RsdpV1Tag ,
6
- RsdpV2Tag , SmbiosTag ,
4
+ BasicMemoryInfoTag , BootInformationInner , BootLoaderNameTag , CommandLineTag ,
5
+ EFIBootServicesNotExited , EFIMemoryMapTag , EFISdt32 , EFISdt64 , ElfSectionsTag , EndTag ,
6
+ FramebufferTag , MemoryMapTag , ModuleTag , RsdpV1Tag , RsdpV2Tag , SmbiosTag ,
7
7
} ;
8
8
9
9
use alloc:: boxed:: Box ;
@@ -18,6 +18,7 @@ pub struct Multiboot2InformationBuilder {
18
18
basic_memory_info_tag : Option < BasicMemoryInfoTag > ,
19
19
boot_loader_name_tag : Option < Box < BootLoaderNameTag > > ,
20
20
command_line_tag : Option < Box < CommandLineTag > > ,
21
+ efi_boot_services_not_exited : Option < EFIBootServicesNotExited > ,
21
22
efi_memory_map_tag : Option < Box < EFIMemoryMapTag > > ,
22
23
elf_sections_tag : Option < Box < ElfSectionsTag > > ,
23
24
framebuffer_tag : Option < Box < FramebufferTag > > ,
@@ -38,6 +39,7 @@ impl Multiboot2InformationBuilder {
38
39
command_line_tag : None ,
39
40
efisdt32 : None ,
40
41
efisdt64 : None ,
42
+ efi_boot_services_not_exited : None ,
41
43
efi_memory_map_tag : None ,
42
44
elf_sections_tag : None ,
43
45
framebuffer_tag : None ,
@@ -85,6 +87,9 @@ impl Multiboot2InformationBuilder {
85
87
if let Some ( tag) = & self . efisdt64 {
86
88
len += Self :: size_or_up_aligned ( tag. byte_size ( ) )
87
89
}
90
+ if let Some ( tag) = & self . efi_boot_services_not_exited {
91
+ len += Self :: size_or_up_aligned ( tag. byte_size ( ) )
92
+ }
88
93
if let Some ( tag) = & self . efi_memory_map_tag {
89
94
len += Self :: size_or_up_aligned ( tag. byte_size ( ) )
90
95
}
@@ -154,6 +159,9 @@ impl Multiboot2InformationBuilder {
154
159
if let Some ( tag) = self . efisdt64 . as_ref ( ) {
155
160
Self :: build_add_bytes ( & mut data, & tag. struct_as_bytes ( ) , false )
156
161
}
162
+ if let Some ( tag) = self . efi_boot_services_not_exited . as_ref ( ) {
163
+ Self :: build_add_bytes ( & mut data, & tag. struct_as_bytes ( ) , false )
164
+ }
157
165
if let Some ( tag) = self . efi_memory_map_tag . as_ref ( ) {
158
166
Self :: build_add_bytes ( & mut data, & tag. struct_as_bytes ( ) , false )
159
167
}
@@ -204,6 +212,10 @@ impl Multiboot2InformationBuilder {
204
212
self . efisdt64 = Some ( efisdt64) ;
205
213
}
206
214
215
+ pub fn efi_boot_services_not_exited ( & mut self ) {
216
+ self . efi_boot_services_not_exited = Some ( EFIBootServicesNotExited :: new ( ) ) ;
217
+ }
218
+
207
219
pub fn efi_memory_map_tag ( & mut self , efi_memory_map_tag : Box < EFIMemoryMapTag > ) {
208
220
self . efi_memory_map_tag = Some ( efi_memory_map_tag) ;
209
221
}
0 commit comments