pub struct BootInfo {
pub memory_map: Vec<MemoryRegion>,
pub hhdm_offset: u64,
pub acpi_rsdp: u64,
pub modules: Vec<BootModule>,
pub cmdline: String,
}Expand description
Boot information provided by the bootloader
Fields§
§memory_map: Vec<MemoryRegion>Memory map from bootloader
hhdm_offset: u64Higher Half Direct Map offset (if applicable)
acpi_rsdp: u64ACPI RSDP physical address
modules: Vec<BootModule>Bootloader modules
cmdline: StringKernel command line
Implementations§
Source§impl BootInfo
impl BootInfo
Sourcepub fn new(
memory_map: Vec<MemoryRegion>,
hhdm_offset: u64,
acpi_rsdp: u64,
modules: Vec<BootModule>,
cmdline: String,
) -> Self
pub fn new( memory_map: Vec<MemoryRegion>, hhdm_offset: u64, acpi_rsdp: u64, modules: Vec<BootModule>, cmdline: String, ) -> Self
Creates a new BootInfo
Sourcepub fn usable_regions(&self) -> impl Iterator<Item = &MemoryRegion>
pub fn usable_regions(&self) -> impl Iterator<Item = &MemoryRegion>
Returns an iterator over usable memory regions
Sourcepub fn total_usable_ram(&self) -> u64
pub fn total_usable_ram(&self) -> u64
Returns the total amount of usable RAM in bytes
Sourcepub fn total_physical_memory(&self) -> u64
pub fn total_physical_memory(&self) -> u64
Returns the total amount of physical memory (including reserved)
Sourcepub fn find_module(&self, name: &str) -> Option<&BootModule>
pub fn find_module(&self, name: &str) -> Option<&BootModule>
Finds a module by name
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BootInfo
impl RefUnwindSafe for BootInfo
impl Send for BootInfo
impl Sync for BootInfo
impl Unpin for BootInfo
impl UnsafeUnpin for BootInfo
impl UnwindSafe for BootInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more