aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boot.S20
-rw-r--r--src/cpu/irq.S10
-rw-r--r--src/sys/kernel.S5
3 files changed, 7 insertions, 28 deletions
diff --git a/src/boot.S b/src/boot.S
index a93dac2..2a9b459 100644
--- a/src/boot.S
+++ b/src/boot.S
@@ -70,26 +70,6 @@ io_halt:
wfi
b io_halt
-.globl enable_irq
-enable_irq:
- cpsie i
- bx lr
-
-.globl disable_irq
-disable_irq:
- cpsid i
- bx lr
-
-.globl enable_fiq
-enable_fiq:
- cpsie f
- bx lr
-
-.globl disable_fiq
-disable_fiq:
- cpsid f
- bx lr
-
.align 5
vector:
ldr pc, reset_handler
diff --git a/src/cpu/irq.S b/src/cpu/irq.S
index 8050a99..c434deb 100644
--- a/src/cpu/irq.S
+++ b/src/cpu/irq.S
@@ -1,6 +1,6 @@
a_irq_handler:
push {lr}
- bl disable_irq
+ cpsid i // Disable IRQ
// r2 = CORE0_INTERRUPT_SOURCE
// if r2 & 0b100000000
mov r2, #0x40000000
@@ -45,7 +45,7 @@ a_irq_handler.ttimer:
bl uart_char
ldr r0, =imsg
bl uart_string
- bl enable_irq
+ cpsie i // Enable IRQ
pop {pc}
a_irq_handler.timer:
@@ -59,18 +59,18 @@ a_irq_handler.timer:
//ldr r0, =imsg
//bl uart_string
a_irq_handler.exit:
- bl enable_irq
+ cpsie i // Enable IRQ
pop {pc}
.globl a_fiq_handler
a_fiq_handler:
push {lr}
- bl disable_fiq
+ cpsie f // Disable FIQ
bl c_timer
ldr r0, =fmsg
bl uart_string
a_fiq_handler.exit:
- bl enable_fiq
+ cpsie f // Enable FIQ
pop {pc}
.section ".data"
diff --git a/src/sys/kernel.S b/src/sys/kernel.S
index 7c004de..f919213 100644
--- a/src/sys/kernel.S
+++ b/src/sys/kernel.S
@@ -4,9 +4,8 @@
kernel_main:
push {lr}
bl sysinit
- bl enable_irq
- bl enable_fiq
- bl chk_irq_stat
+ cpsie i // Enable IRQ
+ cpsie f // Enable FIQ
bl postinit
kernel_main.loop:
bl io_halt