diff options
author | Christian Cunningham <cc@localhost> | 2022-01-22 22:21:24 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-01-22 22:21:24 -0700 |
commit | 9c0cb4e1f7df02f24751833b384963917bbf2360 (patch) | |
tree | 5b4c6949a2b33717cd1264b582c5f61f2e0e644d | |
parent | 523e704b4fead2a0b286480d27510e3912d54b79 (diff) |
Fixed some stuff
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/boot.S | 4 | ||||
-rw-r--r-- | src/cpu/irq.c | 2 | ||||
-rw-r--r-- | src/sys/schedule.S | 8 |
4 files changed, 8 insertions, 8 deletions
@@ -23,7 +23,7 @@ - FIX IRQ Stack LEAK - FIX IRQ Stack LEAK - FIX IRQ Stack LEAK -- Implement Scheduler for IRQ +- Implement Lock for accessing thread information - Fix mutex with scheduler - Implement handlers - Put threads in user mode @@ -174,10 +174,10 @@ fiq: bne 1f ldmfd sp!, {r0-r12,lr} sub lr, #4 - stmfd sp!, {r0-r12,lr} + push {r3} ldr r3, =irqlr str lr, [r3, #0] - ldmfd sp!, {r0-r12,lr} + pop {r3} cps #0x13 b schedule 1: diff --git a/src/cpu/irq.c b/src/cpu/irq.c index 10f8583..0ddba2b 100644 --- a/src/cpu/irq.c +++ b/src/cpu/irq.c @@ -233,7 +233,7 @@ void localtest(void) { //struct Thread* t = scheduler.rthread_ll->data; uart_string("Running IRQ Task...\n"); - uart_scheduler(); + //uart_scheduler(); //uart_10(t->data.pid); //uart_char('\n'); uart_string("Finished!\n"); diff --git a/src/sys/schedule.S b/src/sys/schedule.S index 6b6ef1c..a4c07c4 100644 --- a/src/sys/schedule.S +++ b/src/sys/schedule.S @@ -6,8 +6,8 @@ .macro preserve_ctx cps #0x1f // Sys mode // Store Usr regs - stmfd sp!, {r0-r12} - stmfd sp!, {lr} + push {r0-r12} + push {lr} ldr r3, =scheduler // struct Scheduler ldr r2, [r3, #0] // struct Thread* rthread str lr, [r2, #0] // svc_lr -> void* pc @@ -23,8 +23,8 @@ cps #0x1f // Sys mode mov sp, r0 // Set stack pointer // Restore Usr regs - ldmfd sp!, {lr} - ldmfd sp!, {r0-r12} + pop {lr} + pop {r0-r12} cps #0x13 // Svc mode .endm |