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