Trait boot_info::BootInformation
source · pub trait BootInformation: 'static {
type MemoryRegion<'a>: MemoryRegion;
type MemoryRegions<'a>: Iterator<Item = Self::MemoryRegion<'a>>;
type ElfSection<'a>: ElfSection;
type ElfSections<'a>: Iterator<Item = Self::ElfSection<'a>>;
type Module<'a>: Module;
type Modules<'a>: Iterator<Item = Self::Module<'a>>;
type AdditionalReservedMemoryRegions: Iterator<Item = ReservedMemoryRegion>;
// Required methods
fn start(&self) -> Option<VirtualAddress>;
fn len(&self) -> usize;
fn memory_regions(&self) -> Result<Self::MemoryRegions<'_>, &'static str>;
fn elf_sections(&self) -> Result<Self::ElfSections<'_>, &'static str>;
fn modules(&self) -> Self::Modules<'_>;
fn additional_reserved_memory_regions(
&self
) -> Result<Self::AdditionalReservedMemoryRegions, &'static str>;
fn kernel_end(&self) -> Result<VirtualAddress, &'static str>;
fn rsdp(&self) -> Option<PhysicalAddress>;
fn stack_size(&self) -> Result<usize, &'static str>;
fn framebuffer_info(&self) -> Option<FramebufferInfo>;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Required Associated Types§
type MemoryRegion<'a>: MemoryRegion
type MemoryRegions<'a>: Iterator<Item = Self::MemoryRegion<'a>>
type ElfSection<'a>: ElfSection
type ElfSections<'a>: Iterator<Item = Self::ElfSection<'a>>
type Module<'a>: Module
type Modules<'a>: Iterator<Item = Self::Module<'a>>
type AdditionalReservedMemoryRegions: Iterator<Item = ReservedMemoryRegion>
Required Methods§
sourcefn start(&self) -> Option<VirtualAddress>
fn start(&self) -> Option<VirtualAddress>
Returns the boot information’s starting virtual address.
sourcefn memory_regions(&self) -> Result<Self::MemoryRegions<'_>, &'static str>
fn memory_regions(&self) -> Result<Self::MemoryRegions<'_>, &'static str>
Returns memory regions describing the physical memory.
sourcefn elf_sections(&self) -> Result<Self::ElfSections<'_>, &'static str>
fn elf_sections(&self) -> Result<Self::ElfSections<'_>, &'static str>
Returns the kernel’s ELF sections.
sourcefn additional_reserved_memory_regions(
&self
) -> Result<Self::AdditionalReservedMemoryRegions, &'static str>
fn additional_reserved_memory_regions( &self ) -> Result<Self::AdditionalReservedMemoryRegions, &'static str>
Returns additional reserved memory regions that aren’t included in
the list of regions returned by [memory_regions
].
sourcefn kernel_end(&self) -> Result<VirtualAddress, &'static str>
fn kernel_end(&self) -> Result<VirtualAddress, &'static str>
Returns the end of the kernel’s image in memory.
sourcefn rsdp(&self) -> Option<PhysicalAddress>
fn rsdp(&self) -> Option<PhysicalAddress>
Returns the RSDP if it was provided by the bootloader.
sourcefn stack_size(&self) -> Result<usize, &'static str>
fn stack_size(&self) -> Result<usize, &'static str>
Returns the stack size in bytes.
sourcefn framebuffer_info(&self) -> Option<FramebufferInfo>
fn framebuffer_info(&self) -> Option<FramebufferInfo>
Returns information about the graphical framebuffer, if available.