Skip to main content

rust_main

Function rust_main 

Source
#[unsafe(export_name = "__axplat_main")]
pub fn rust_main(cpu_id: usize, arg: usize) -> !
Expand description

The main entry point of the ArceOS runtime.

It is called from the bootstrapping code in the specific platform crate (see axplat::main).

cpu_id is the logic ID of the current CPU, and arg is passed from the bootloader (typically the device tree blob address).

In multi-core environment, this function is called on the primary core, and secondary cores call [rust_main_secondary].