You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
715 B
Rust

// SPDX-License-Identifier: MIT OR Apache-2.0
//
// Copyright (c) 2018-2021 Andre Richter <andre.o.richter@gmail.com>
//! Architectural processor code.
// Assembly counterpart to this file.
global_asm!(include_str!("cpu.S"));
//--------------------------------------------------------------------------------------------------
// Public Code
//--------------------------------------------------------------------------------------------------
/// Pause execution on the core.
#[inline(always)]
pub fn wait_forever() -> ! {
unsafe {
loop {
#[rustfmt::skip]
asm!(
"wfe",
options(nomem, nostack, preserves_flags)
);
}
}
}