#[repr(C)]
pub struct StivaleTerminalTag { pub header: StivaleTagHeader, pub flags: u32, pub cols: u16, pub rows: u16, pub term_write_addr: u64, }
Expand description

If the terminal tag was requested through the terminal tag header and its supported by the stivale bootloader, this tag is returned to the kernel. This tag provides an interface to the stivale terminal.

Fields

header: StivaleTagHeaderflags: u32cols: u16

The amount of columns in the stivale terminal setup by the bootloader.

rows: u16

The amount of rows in the stivale terminal setup by the bootloader.

term_write_addr: u64

The virtual address of the term_write function, which is used to write to the stivale terminal. For a more safer way use the StivaleTerminalTag::term_write

Implementations

Returns the terminal write function provided by the terminal stivale tag. This function returns the transmuted function for you to simplify the process of passing the string as a raw pointer and passing the string length.

Example
use stivale_boot::v2::StivaleStruct;

fn kmain(stivale_struct: &'static StivaleStruct) {
    let terminal_tag = stivale_struct.terminal().expect("skill issue :^)");
    let term_write = terminal_tag.term_write();

    term_write("Hello, Stivale!");
    term_write("Hello, Rust!")
}
Safety

This function is not thread safe.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.