pub struct FirmwareConfig {
pub cmos_floppy_type: u8,
pub extended_memory_kib: u16,
pub install_vga_rom: bool,
}Expand description
Tunables a firmware image needs from the machine description.
Fields§
§cmos_floppy_type: u8CMOS 0x10 value: high nibble = drive A type, low nibble = drive B.
extended_memory_kib: u16Extended memory above 1 MiB, in KiB. SeaBIOS derives RamSize from
CMOS 0x30/0x31 when no fw_cfg channel is present.
install_vga_rom: boolInstall the bundled SeaVGABIOS option ROM at OPTION_ROM_BASE.
Implementations§
Source§impl FirmwareConfig
impl FirmwareConfig
Sourcepub const fn freedos() -> Self
pub const fn freedos() -> Self
Configuration used by the FreeDOS test world: one 1.44 MiB floppy and 3 MiB of extended memory (a 4 MiB machine).
Sourcepub const fn extmem_cmos(self) -> (u8, u8)
pub const fn extmem_cmos(self) -> (u8, u8)
CMOS 0x30/0x31 bytes encoding Self::extended_memory_kib.
SeaBIOS computes (low << 10) | (high << 18) + 1 MiB; the encoding is
therefore a 16-bit count in KiB split as low (1 KiB units) and
high (256 KiB units).
Trait Implementations§
Source§impl Clone for FirmwareConfig
impl Clone for FirmwareConfig
impl Copy for FirmwareConfig
Source§impl Debug for FirmwareConfig
impl Debug for FirmwareConfig
Source§impl Default for FirmwareConfig
impl Default for FirmwareConfig
impl Eq for FirmwareConfig
Source§impl PartialEq for FirmwareConfig
impl PartialEq for FirmwareConfig
impl StructuralPartialEq for FirmwareConfig
Auto Trait Implementations§
impl Forget for FirmwareConfig
impl Freeze for FirmwareConfig
impl Move for FirmwareConfig
impl RefUnwindSafe for FirmwareConfig
impl Send for FirmwareConfig
impl Sync for FirmwareConfig
impl Unpin for FirmwareConfig
impl UnsafeUnpin for FirmwareConfig
impl UnwindSafe for FirmwareConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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