From 5ec0518b0bc06e6f675b0709d50d8ca640660e5b Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Thu, 12 Apr 2018 11:13:17 +0200 Subject: Add SEV assembly instruction --- src/asm.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/asm.rs b/src/asm.rs index aab772e..9a2d481 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -47,6 +47,17 @@ pub fn wfi() { } } +/// Send Event +#[inline] +pub fn sev() { + match () { + #[cfg(target_arch = "arm")] + () => unsafe { asm!("sev" :::: "volatile") }, + #[cfg(not(target_arch = "arm"))] + () => unimplemented!(), + } +} + /// Instruction Synchronization Barrier /// /// Flushes the pipeline in the processor, so that all instructions following the `ISB` are fetched -- cgit v1.2.3