Skip to main content

boot_params

Struct boot_params 

Source
#[repr(C, packed(1))]
pub struct boot_params {
Show 35 fields pub screen_info: screen_info, pub apm_bios_info: apm_bios_info, pub _pad2: [u8; 4], pub tboot_addr: u64, pub ist_info: ist_info, pub acpi_rsdp_addr: u64, pub _pad3: [u8; 8], pub hd0_info: [u8; 16], pub hd1_info: [u8; 16], pub sys_desc_table: sys_desc_table, pub olpc_ofw_header: olpc_ofw_header, pub ext_ramdisk_image: u32, pub ext_ramdisk_size: u32, pub ext_cmd_line_ptr: u32, pub _pad4: [u8; 112], pub cc_blob_address: u32, pub edid_info: edid_info, pub efi_info: efi_info, pub alt_mem_k: u32, pub scratch: u32, pub e820_entries: u8, pub eddbuf_entries: u8, pub edd_mbr_sig_buf_entries: u8, pub kbd_status: u8, pub secure_boot: u8, pub _pad5: [u8; 2], pub sentinel: u8, pub _pad6: [u8; 1], pub hdr: setup_header, pub _pad7: [u8; 36], pub edd_mbr_sig_buffer: [u32; 16], pub e820_table: [boot_e820_entry; 128], pub _pad8: [u8; 48], pub eddbuf: [edd_info; 6], pub _pad9: [u8; 276],
}
Available on x86 or x86-64 only.
Expand description

The x86 “zeropage” — exactly 4096 bytes.

_pad7 size is 0x290 - 0x1f1 - sizeof(setup_header) = 36 bytes.

Fields§

§screen_info: screen_info§apm_bios_info: apm_bios_info§_pad2: [u8; 4]§tboot_addr: u64§ist_info: ist_info§acpi_rsdp_addr: u64§_pad3: [u8; 8]§hd0_info: [u8; 16]§hd1_info: [u8; 16]§sys_desc_table: sys_desc_table§olpc_ofw_header: olpc_ofw_header§ext_ramdisk_image: u32§ext_ramdisk_size: u32§ext_cmd_line_ptr: u32§_pad4: [u8; 112]§cc_blob_address: u32§edid_info: edid_info§efi_info: efi_info§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: setup_header§_pad7: [u8; 36]§edd_mbr_sig_buffer: [u32; 16]§e820_table: [boot_e820_entry; 128]§_pad8: [u8; 48]§eddbuf: [edd_info; 6]§_pad9: [u8; 276]

Trait Implementations§

Source§

impl ByteValued for boot_params

Source§

fn from_slice(data: &[u8]) -> Option<&Self>

Converts a slice of raw data into a reference of Self. Read more
Source§

fn from_mut_slice(data: &mut [u8]) -> Option<&mut Self>

Converts a mutable slice of raw data into a mutable reference of Self. Read more
Source§

fn as_slice(&self) -> &[u8]

Converts a reference to self into a slice of bytes. Read more
Source§

fn as_mut_slice(&mut self) -> &mut [u8]

Converts a mutable reference to self into a mutable slice of bytes. Read more
Source§

fn as_bytes(&mut self) -> VolatileSlice<'_>

Converts a mutable reference to self into a VolatileSlice. This is useful because VolatileSlice provides a Bytes<usize> implementation.
Source§

fn zeroed() -> Self

Constructs a Self ewhose binary representation is set to all zeroes.
Source§

fn write_all_to<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Writes this ByteValued’s byte representation to the given Write impl.
Source§

fn read_exact_from<R>(reader: R) -> Result<Self, Error>
where R: Read,

Constructs an instance of this ByteValued by reading from the given Read impl.
Source§

impl Clone for boot_params

Source§

fn clone(&self) -> boot_params

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for boot_params

Source§

impl Debug for boot_params

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for boot_params

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for boot_params

Source§

fn eq(&self, other: &boot_params) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for boot_params

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.