From 8853ead2521e496137f7d8732f90f06e64690e07 Mon Sep 17 00:00:00 2001 From: schulz Date: Sun, 19 Apr 2015 19:41:24 +0000 Subject: [PATCH] Exec's idle task promotes itself to supervisor (actually system mode, which can be safely rescheduled by exec library), enables interrupts again and does put CPU to sleep in endless loop. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50430 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/arm-native/exec/exec_idle.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm-native/exec/exec_idle.c b/arch/arm-native/exec/exec_idle.c index 7a70d2cfe2..4d882713c6 100644 --- a/arch/arm-native/exec/exec_idle.c +++ b/arch/arm-native/exec/exec_idle.c @@ -5,13 +5,20 @@ #include #include "exec_intern.h" +#include "kernel_intern.h" +#include "kernel_cpu.h" +#include "kernel_syscall.h" void IdleTask(struct ExecBase *SysBase) { - D(bug("[Kernel] Idle task started up")); + D(bug("[Kernel] Idle task started up\n")); + + asm volatile ("swi %[swi_no]" : : [swi_no] "I" (SC_SUPERSTATE) : "lr"); + asm volatile ("swi %[swi_no]" : : [swi_no] "I" (SC_STI) : "lr"); do { /* forever */ D(bug("[IDLE] Nothing to do ..\n")); + asm volatile("mov r0, #0\n\t mcr p15, 0, r0, c7, c0, 4":::"r0"); } while(1); } -- 2.11.4.GIT