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§
- Aborts execution with a message.
- Like
std::print!
, except backed bydebug_put_char
. - Like
std::println!
, except backed bydebug_put_char
.
Enums§
- Stable alternative to
!
.
Constants§
- The default stack size used by
#[root_task]
.
Traits§
- Trait for the return type of
#[root_task]
main functions.
Functions§
- Provides the global allocator with a
sel4::cap::Notification
to use as a mutex..
Attribute Macros§
- Declares a function to be the root task’s main function.