Expand description
A runtime for root tasks.
This crate defines an entrypoint at _start that performs the following Rust language runtime
and libsel4 initialization:
- Set up the stack
- Initialize thread-local storage (using stack memory)
- Set up exception handling
- Set the seL4 IPC buffer for
libsel4(usingsel4::set_ipc_buffer) - Run C-style constructors (from
__init_array_start/__init_array_end)
After initialization, the entrypoint calls the root task main function, which must be declared
with #[root_task]. For example:
#[root_task]
fn main(bootinfo: &sel4::BootInfo) -> ! {
todo!()
}Building root tasks using this crate does not require a custom linker script when using LLD.
In particular, this crate is tested with the LLD binary that ships with rustc (rust-lld).
Using a GNU linker will likely require a custom linker script.
Modules§
Macros§
- abort
- Aborts execution with a message.
- debug_
print - Like
std::print!, except backed bydebug_put_char. - debug_
println - Like
std::println!, except backed bydebug_put_char.
Enums§
- Never
- Stable alternative to
!.
Constants§
- DEFAULT_
STACK_ SIZE - The default stack size used by
#[root_task].
Traits§
- Termination
- Trait for the return type of
#[root_task]main functions.
Functions§
- set_
global_ allocator_ mutex_ notification - Provides the global allocator with a
sel4::cap::Notificationto use as a mutex..
Attribute Macros§
- root_
task - Declares a function to be the root task’s main function.