rpi-open-firmware/vc4_include/cpu.h
2016-05-30 14:11:53 +01:00

16 lines
285 B
C
Executable File

#pragma once
#include <hardware.h>
static inline void __attribute__((noreturn)) hang_cpu() {
/* disable interrupts and enter WFI state */
__asm__ __volatile__ (
"di\n"
"sleep\n"
);
/* in case the above fails */
for (;;) {
__asm__ __volatile__ ("nop");
}
}