Function start_core

Source
pub unsafe fn start_core<C: Call, const N: usize>(
    mpidr: u64,
    stack: *mut Stack<N>,
    rust_entry: extern "C" fn(arg: u64) -> !,
    arg: u64,
) -> Result<(), Error>
Expand description

Issues a PSCI CPU_ON call to start the CPU core with the given MPIDR.

This starts the core with an assembly entry point which will enable the MMU, disable trapping of floating point instructions, initialise the stack pointer to the given value, and then jump to the given Rust entry point function, passing it the given argument value.

§Safety

stack must point to a region of memory which is reserved for this core’s stack. It must remain valid as long as the core is running, and there must not be any other access to it during that time. It must be mapped both for the current core to write to it (to pass initial parameters) and in the initial page table which the core being started will used, with the same memory attributes for both.