start_core

Function start_core 

Source
pub unsafe fn start_core<C: Call, F: FnOnce() + Send + 'static, const N: usize>(
    mpidr: u64,
    stack: *mut Stack<N>,
    rust_entry: F,
) -> 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.

The closure passed as rust_entry should never return. Because the never type has not been stabilized), this cannot be enforced by the type system yet.

§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.