pub trait PowerIf {
// Required methods
fn cpu_boot(cpu_id: usize, stack_top_paddr: usize);
fn system_off() -> !;
fn cpu_num() -> usize;
}Expand description
Power management interface.
Required Methods§
Sourcefn cpu_boot(cpu_id: usize, stack_top_paddr: usize)
Available on crate feature smp only.
fn cpu_boot(cpu_id: usize, stack_top_paddr: usize)
smp only.Bootstraps the given CPU core with the given initial stack (in physical address).
Where cpu_id is the logical CPU ID (0, 1, …, N-1, N is the number of
CPU cores on the platform).
Sourcefn system_off() -> !
fn system_off() -> !
Shutdown the whole system.
Sourcefn cpu_num() -> usize
fn cpu_num() -> usize
Get the number of CPU cores available on this platform.
The platform should either get this value statically from its configuration or dynamically by platform-specific methods.
For statically configured platforms, by convention, this value should be
the same as MAX_CPU_NUM defined in the platform configuration.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.