@@ -3,8 +3,8 @@ use crate::builder::traits::StructAsBytes;
33use crate :: {
44 BasicMemoryInfoTag , BootInformationInner , BootLoaderNameTag , CommandLineTag ,
55 EFIBootServicesNotExited , EFIImageHandle32 , EFIImageHandle64 , EFIMemoryMapTag , EFISdt32 ,
6- EFISdt64 , ElfSectionsTag , EndTag , FramebufferTag , MemoryMapTag , ModuleTag , RsdpV1Tag ,
7- RsdpV2Tag , SmbiosTag ,
6+ EFISdt64 , ElfSectionsTag , EndTag , FramebufferTag , ImageLoadPhysAddr , MemoryMapTag , ModuleTag ,
7+ RsdpV1Tag , RsdpV2Tag , SmbiosTag ,
88} ;
99
1010use alloc:: boxed:: Box ;
@@ -25,6 +25,7 @@ pub struct Multiboot2InformationBuilder {
2525 efi_memory_map_tag : Option < Box < EFIMemoryMapTag > > ,
2626 elf_sections_tag : Option < Box < ElfSectionsTag > > ,
2727 framebuffer_tag : Option < Box < FramebufferTag > > ,
28+ image_load_addr : Option < ImageLoadPhysAddr > ,
2829 memory_map_tag : Option < Box < MemoryMapTag > > ,
2930 module_tags : Vec < Box < ModuleTag > > ,
3031 efisdt32 : Option < EFISdt32 > ,
@@ -48,6 +49,7 @@ impl Multiboot2InformationBuilder {
4849 efi_memory_map_tag : None ,
4950 elf_sections_tag : None ,
5051 framebuffer_tag : None ,
52+ image_load_addr : None ,
5153 memory_map_tag : None ,
5254 module_tags : Vec :: new ( ) ,
5355 rsdp_v1_tag : None ,
@@ -110,6 +112,9 @@ impl Multiboot2InformationBuilder {
110112 if let Some ( tag) = & self . framebuffer_tag {
111113 len += Self :: size_or_up_aligned ( tag. byte_size ( ) )
112114 }
115+ if let Some ( tag) = & self . image_load_addr {
116+ len += Self :: size_or_up_aligned ( tag. byte_size ( ) )
117+ }
113118 if let Some ( tag) = & self . memory_map_tag {
114119 len += Self :: size_or_up_aligned ( tag. byte_size ( ) )
115120 }
@@ -188,6 +193,9 @@ impl Multiboot2InformationBuilder {
188193 if let Some ( tag) = self . framebuffer_tag . as_ref ( ) {
189194 Self :: build_add_bytes ( & mut data, & tag. struct_as_bytes ( ) , false )
190195 }
196+ if let Some ( tag) = self . image_load_addr . as_ref ( ) {
197+ Self :: build_add_bytes ( & mut data, & tag. struct_as_bytes ( ) , false )
198+ }
191199 if let Some ( tag) = self . memory_map_tag . as_ref ( ) {
192200 Self :: build_add_bytes ( & mut data, & tag. struct_as_bytes ( ) , false )
193201 }
@@ -253,6 +261,10 @@ impl Multiboot2InformationBuilder {
253261 self . framebuffer_tag = Some ( framebuffer_tag) ;
254262 }
255263
264+ pub fn image_load_addr ( & mut self , image_load_addr : ImageLoadPhysAddr ) {
265+ self . image_load_addr = Some ( image_load_addr) ;
266+ }
267+
256268 pub fn memory_map_tag ( & mut self , memory_map_tag : Box < MemoryMapTag > ) {
257269 self . memory_map_tag = Some ( memory_map_tag) ;
258270 }
0 commit comments