morpheus_bootloader::boot::kernel_loader

Struct KernelImage

Source
pub struct KernelImage {
    setup_header: *const SetupHeader,
    kernel_base: *const u8,
    kernel_size: usize,
    protocol_version: u16,
}

Fields§

§setup_header: *const SetupHeader§kernel_base: *const u8§kernel_size: usize§protocol_version: u16

Implementations§

Source§

impl KernelImage

Source

pub fn parse(data: &[u8]) -> Result<Self, KernelError>

Source

pub fn protocol_version(&self) -> u16

Source

pub fn kernel_base(&self) -> *const u8

Source

pub fn kernel_size(&self) -> usize

Source

pub fn is_relocatable(&self) -> bool

Source

pub fn pref_address(&self) -> u64

Source

pub fn kernel_alignment(&self) -> u32

Source

pub fn init_size(&self) -> u32

Source

pub fn code32_start(&self) -> u32

Source

pub fn handover_offset(&self) -> u32

Source

pub fn xloadflags(&self) -> u16

Source

pub fn can_load_above_4g(&self) -> bool

Source

pub fn supports_efi_handover_64(&self) -> bool

Source

pub fn initrd_addr_max(&self) -> u32

Source

pub fn cmdline_limit(&self) -> u32

Source

pub fn setup_header_ptr(&self) -> *const SetupHeader

Get pointer to setup header for copying to boot params

Source

pub fn setup_header_bytes(&self) -> &[u8]

Get raw setup header bytes for detailed inspection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.