Irqs are working. Scheduler modified to come back from no tasks.

- Userspace irq handling for timer.
- If no runnable task is left. scheduler busy loops in user context
  of last runnable task until a new task becomes runnable.
This commit is contained in:
Bahadir Balban
2009-12-14 11:48:40 +02:00
parent d85ccdb3fe
commit 27c0c34e3d
7 changed files with 63 additions and 26 deletions

View File

@@ -15,6 +15,14 @@ BEGIN_PROC(irq_local_disable_save)
mov pc, lr
END_PROC(irq_local_disable_save)
/*
* r0 = last cpsr state
*/
BEGIN_PROC(irq_local_restore)
msr cpsr_fc, r0 @ Write r0 to cpsr
mov pc, lr
END_PROC(irq_local_restore)
/*
* r0 = byte address to read from.
*/
@@ -25,3 +33,11 @@ BEGIN_PROC(l4_atomic_dest_readb)
mov pc, lr @ Return byte location value
END_PROC(l4_atomic_dest_readb)
BEGIN_PROC(irqs_enabled)
mrs r1, cpsr_fc
tst r1, #0x80
moveq r0, #1
movne r0, #0
mov pc, lr
END_PROC(irqs_enabled)