aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-06 00:28:22 -0800
committerChristian Cunningham <cc@localhost>2022-01-06 00:28:22 -0800
commita826a645a67c2be3c7acb097c436c810da728ed7 (patch)
treeb47d65d3058feb3daba778558526e2f7ed27a37d /src
parent866a6ca0e749f4446b7fdc7579a6d553df85ec10 (diff)
Move irq enable/disable to handler
Diffstat (limited to 'src')
-rw-r--r--src/boot.S2
-rw-r--r--src/cpu/irq.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/boot.S b/src/boot.S
index f21c4fe..badb655 100644
--- a/src/boot.S
+++ b/src/boot.S
@@ -55,7 +55,9 @@ reset:
irq:
push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+ cpsid i
bl c_irq_handler
+ cpsie i
pop {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
subs pc, lr, #4
diff --git a/src/cpu/irq.c b/src/cpu/irq.c
index 28ad886..0d6e9de 100644
--- a/src/cpu/irq.c
+++ b/src/cpu/irq.c
@@ -13,7 +13,6 @@ void localtest(void);
void c_irq_handler(void)
{
- disableirq();
unsigned long source = load32(CORE0_IRQ_SOURCE);
if (source & (1 << 8)) {
if(load32(IRQ_PENDING2) & (1 << 25)) {
@@ -94,13 +93,11 @@ void c_irq_handler(void)
g_Drawer.y = 7;
write_string(&g_Drawer, "> ");
write_string(&g_Drawer, cmd);
- enableirq();
return;
}
}
} else if (source & (1 << 3)) {
c_timer();
- enableirq();
return;
}
return;