Skip to main content

kernel_entry

Macro kernel_entry 

Source
macro_rules! kernel_entry {
    () => { ... };
}
Expand description

Generate the kernel entry point (_start).

Expands to the naked _start every ET-SoC-1 kernel needs: placed in .text.init (which the linker script lays down first at the fixed U-mode entry address), it sets the global pointer, calls the kernel’s entry_point, and returns to firmware via ecall. The launch-args pointer arrives in a0 and passes straight through to entry_point’s first argument.

The kernel binary must define #[unsafe(no_mangle)] pub extern "C" fn entry_point(args_ptr: usize) -> i64. Invoke this once at the crate root:

et_kernel::kernel_entry!();