16 lines
383 B
Rust
16 lines
383 B
Rust
use crate::bootboot::{BOOTBOOT, BOOTBOOT_MAGIC};
|
|
use crate::util::get_bootboot;
|
|
|
|
use crate::arch::cpu;
|
|
|
|
pub fn halt_other_cores() -> () {
|
|
let boot: BOOTBOOT = get_bootboot();
|
|
if cpu::get_processor_id() != boot.bspid as u32 {
|
|
cpu::halt();
|
|
}
|
|
}
|
|
|
|
pub fn check_magic() -> () {
|
|
let boot: BOOTBOOT = get_bootboot();
|
|
assert_eq!(boot.magic, BOOTBOOT_MAGIC[..4]);
|
|
} |