|
@@ -4,6 +4,7 @@ pub use boot_loader_name::BootLoaderNameTag;
|
|
|
pub use elf_sections::{ElfSectionsTag, ElfSection, ElfSectionIter, ElfSectionType, ElfSectionFlags};
|
|
|
pub use elf_sections::{ELF_SECTION_WRITABLE, ELF_SECTION_ALLOCATED, ELF_SECTION_EXECUTABLE};
|
|
|
pub use memory_map::{MemoryMapTag, MemoryArea, MemoryAreaIter};
|
|
|
+pub use module::{ModuleTag};
|
|
|
|
|
|
#[macro_use]
|
|
|
extern crate bitflags;
|
|
@@ -11,6 +12,7 @@ extern crate bitflags;
|
|
|
mod boot_loader_name;
|
|
|
mod elf_sections;
|
|
|
mod memory_map;
|
|
|
+mod module;
|
|
|
|
|
|
pub unsafe fn load(address: usize) -> &'static BootInformation {
|
|
|
let multiboot = &*(address as *const BootInformation);
|
|
@@ -42,6 +44,10 @@ impl BootInformation {
|
|
|
self.get_tag(6).map(|tag| unsafe{&*(tag as *const Tag as *const MemoryMapTag)})
|
|
|
}
|
|
|
|
|
|
+ pub fn module_tag(&self) -> Option<&'static ModuleTag> {
|
|
|
+ self.get_tag(3).map(|tag| unsafe{&*(tag as *const Tag as *const ModuleTag)})
|
|
|
+ }
|
|
|
+
|
|
|
pub fn boot_loader_name_tag(&self) -> Option<&'static BootLoaderNameTag> {
|
|
|
self.get_tag(2).map(|tag| unsafe{&*(tag as *const Tag as *const BootLoaderNameTag)})
|
|
|
}
|