std.uefi
the firmware’s services, for a program built with –target uefi println works as everywhere; the console is the firmware’s
system_table
Section titled “system_table”pub system_table :: fn() -> *EfiSystemTablethe system table the firmware started the program with
pub image :: fn() -> usizethe program’s image handle
pub stall :: fn(us: usize)waits us microseconds
pub clear :: fn()clears the console
shutdown
Section titled “shutdown”pub shutdown :: fn()turns the machine off; ends QEMU
reboot
Section titled “reboot”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
read_key
Section titled “read_key”pub read_key :: fn() -> Keywaits for a key
Framebuffer
Section titled “Framebuffer”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
Framebuffer.put
Section titled “Framebuffer.put”pub put :: fn(self: *const Self, x: u32, y: u32, rgb: u32)rgb as 0xRRGGBB; nothing outside the screen
Framebuffer.fill
Section titled “Framebuffer.fill”pub fill :: fn(self: *const Self, x: u32, y: u32, w: u32, h: u32, rgb: u32)a filled rectangle
framebuffer
Section titled “framebuffer”pub framebuffer :: fn() -> ?Framebufferthe screen of the graphics output protocol; null without one