aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-22 22:21:24 -0700
committerChristian Cunningham <cc@localhost>2022-01-22 22:21:24 -0700
commit9c0cb4e1f7df02f24751833b384963917bbf2360 (patch)
tree5b4c6949a2b33717cd1264b582c5f61f2e0e644d
parent523e704b4fead2a0b286480d27510e3912d54b79 (diff)
Fixed some stuff
-rw-r--r--README.md2
-rw-r--r--src/boot.S4
-rw-r--r--src/cpu/irq.c2
-rw-r--r--src/sys/schedule.S8
4 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index 9d7f1bc..e10b6ca 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/src/boot.S b/src/boot.S
index 2106031..94de57f 100644
--- a/src/boot.S
+++ b/src/boot.S
@@ -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