Skip to main content

Crate rustubs

Crate rustubs 

Source

Modules§

arch
architecture dependent code … we only have x86_64 atm though…
black_magic
collection of hacks
defs
system level definitions
fs
simple in memory fs that is statically linked into the kernel image
io
I/O with keyboard, cga screen and serial
kthread
kernel threads
machine
machine level abstractions for architecture independent devices. FIXME: still having some x86 coupling.
mm
memory management unit
proc
process and synchronization model
syscalls
syscall interface: x86 convention via int80. syscall nr in rax, up to 3 parameters in rdi, rsi, rdx. Return value in rax

Macros§

EXTERN_SYM_PTR
macro to declare a external symbol: cast its address into e.g. u64. useful for getting the address of a tag in asm.
print
default print and println send output to both CGA and serial, CGA screen synchronized and should NEVER be used in prologue. use sprint! and sprintln! instead.
println
CGA screen println, synchronized. NEVER use in prologue
sprint
serial (0x3f8 for qemu) print, not synchronized. can use in prologue
sprintln
serial (0x3f8 for qemu) println, not synchronized. can use in prologue

Functions§

_entry
create_tasks 🔒