Skip to content

std.uefi

the firmware’s services, for a program built with –target uefi println works as everywhere; the console is the firmware’s

pub system_table :: fn() -> *EfiSystemTable

the system table the firmware started the program with

pub image :: fn() -> usize

the program’s image handle

pub stall :: fn(us: usize)

waits us microseconds

pub clear :: fn()

clears the console

pub shutdown :: fn()

turns the machine off; ends QEMU

pub reboot :: fn()
pub Key :: struct {
char: u16,
scan: u16,
}

char is the character typed, 0 for a special key; scan the key’s scan code then

pub read_key :: fn() -> Key

waits for a key

pub Framebuffer :: struct {
base: usize,
width: u32,
height: u32,
stride: u32,
bgr: bool,
}

32-bit pixels, stride pixels per line; bgr when blue is the low byte

pub put :: fn(self: *const Self, x: u32, y: u32, rgb: u32)

rgb as 0xRRGGBB; nothing outside the screen

pub fill :: fn(self: *const Self, x: u32, y: u32, w: u32, h: u32, rgb: u32)

a filled rectangle

pub framebuffer :: fn() -> ?Framebuffer

the screen of the graphics output protocol; null without one