morpheus_bootloader::boot::boot_params

Struct LinuxBootParams

Source
#[repr(C, packed(1))]
pub struct LinuxBootParams {
Show 35 fields screen_info: ScreenInfo, apm_bios_info: ApmBiosInfo, _pad2: [u8; 4], tboot_addr: u64, ist_info: IstInfo, acpi_rsdp_addr: u64, _pad3: [u8; 8], hd0_info: [u8; 16], hd1_info: [u8; 16], sys_desc_table: SysDescTable, olpc_ofw_header: OlpcOfwHeader, ext_ramdisk_image: u32, ext_ramdisk_size: u32, ext_cmd_line_ptr: u32, _pad4: [u8; 112], cc_blob_address: u32, edid_info: EdidInfo, efi_info: EfiInfo, alt_mem_k: u32, scratch: u32, e820_entries: u8, eddbuf_entries: u8, edd_mbr_sig_buf_entries: u8, kbd_status: u8, secure_boot: u8, _pad5: [u8; 2], sentinel: u8, _pad6: [u8; 1], hdr: SetupHeader, _pad7: [u8; 36], edd_mbr_sig_buffer: [u32; 16], e820_table: [E820Entry; 128], _pad8: [u8; 48], eddbuf: [EddInfo; 6], _pad9: [u8; 276],
}

Fields§

§screen_info: ScreenInfo§apm_bios_info: ApmBiosInfo§_pad2: [u8; 4]§tboot_addr: u64§ist_info: IstInfo§acpi_rsdp_addr: u64§_pad3: [u8; 8]§hd0_info: [u8; 16]§hd1_info: [u8; 16]§sys_desc_table: SysDescTable§olpc_ofw_header: OlpcOfwHeader§ext_ramdisk_image: u32§ext_ramdisk_size: u32§ext_cmd_line_ptr: u32§_pad4: [u8; 112]§cc_blob_address: u32§edid_info: EdidInfo§efi_info: EfiInfo§alt_mem_k: u32§scratch: u32§e820_entries: u8§eddbuf_entries: u8§edd_mbr_sig_buf_entries: u8§kbd_status: u8§secure_boot: u8§_pad5: [u8; 2]§sentinel: u8§_pad6: [u8; 1]§hdr: SetupHeader§_pad7: [u8; 36]§edd_mbr_sig_buffer: [u32; 16]§e820_table: [E820Entry; 128]§_pad8: [u8; 48]§eddbuf: [EddInfo; 6]§_pad9: [u8; 276]

Implementations§

Source§

impl LinuxBootParams

Source

pub fn new() -> Self

Source

pub fn set_cmdline(&mut self, cmdline_addr: u64, cmdline_len: u32)

Source

pub fn set_ramdisk(&mut self, initrd_addr: u64, initrd_size: u64)

Source

pub fn ramdisk_info(&self) -> (u64, u64)

Source

pub fn set_loader_type(&mut self, loader_type: u8)

Source

pub fn header(&self) -> &SetupHeader

Source

pub unsafe fn copy_setup_header( &mut self, kernel_setup_header: *const SetupHeader, )

Copy setup header from kernel image to boot params CRITICAL: The kernel expects its own setup header back

Source

pub fn set_video_mode(&mut self)

Set basic video mode (text mode fallback)

Source

pub fn add_e820_entry(&mut self, addr: u64, size: u64, entry_type: u32) -> bool

Add E820 memory map entry CRITICAL: Kernel needs memory map to initialize

Source

pub fn set_acpi_rsdp(&mut self, rsdp_addr: u64)

Source

pub fn set_alt_mem_k(&mut self, kilobytes: u32)

Source

pub fn set_secure_boot_flag(&mut self, value: u8)

Source

pub fn set_efi_info( &mut self, loader_signature: u32, systab: u64, memmap_addr: u64, memmap_size: u32, descriptor_size: u32, descriptor_version: u32, )

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.