diff --git a/headers/private/kernel/arch/m68k/arch_cpu.h b/headers/private/kernel/arch/m68k/arch_cpu.h index 8e576a6f89..9d41e35863 100644 --- a/headers/private/kernel/arch/m68k/arch_cpu.h +++ b/headers/private/kernel/arch/m68k/arch_cpu.h @@ -445,6 +445,26 @@ extern bool m68k_is_hw_register_readable(addr_t address); extern bool m68k_is_hw_register_writable(addr_t address, uint16 value); // defined in kernel: arch/m68k/cpu_asm.S + +static inline void +arch_cpu_idle(void) +{ + // TODO: M68K CPU idle call + // there isn't really any insn for this. Maybe NOP/FNOP? + // TODO: make a 060 module using LPSTOP + //asm volatile ("lpstop"); +} + + +static inline void +arch_cpu_pause(void) +{ + // TODO: M68K STOP call + // the problem is STOP wants an immediate to put into SR + // but we don't want to overwrite it. + //asm volatile("stop #0" : : : "memory"); +} + #ifdef __cplusplus } #endif diff --git a/src/system/kernel/arch/m68k/arch_cpu.cpp b/src/system/kernel/arch/m68k/arch_cpu.cpp index 488e905c19..0eaeb49b41 100644 --- a/src/system/kernel/arch/m68k/arch_cpu.cpp +++ b/src/system/kernel/arch/m68k/arch_cpu.cpp @@ -268,16 +268,6 @@ arch_cpu_shutdown(bool reboot) } -void -arch_cpu_idle(void) -{ - if (cpu_ops.idle) - cpu_ops.idle(); -#warning M68K: use LPSTOP ? - //asm volatile ("lpstop"); -} - - // The purpose of this function is to trick the compiler. When setting the // page_handler to a label that is obviously (to the compiler) never used, // it may reorganize the control flow, so that the labeled part is optimized