aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-10-14 14:24:43 -0700
committerChristian Cunningham <cc@localhost>2021-10-14 14:24:43 -0700
commit3e8104ab13d257389a695e1db56ddc77c10a1bc8 (patch)
tree00aea8eb56ab3adfcfde44f75606e4b4fb721c9d /src
parent4024657bc4b6983e23540716be9ef3ce484aba2b (diff)
Added FIQ
Diffstat (limited to 'src')
-rw-r--r--src/boot.S14
-rw-r--r--src/kernel.S5
2 files changed, 17 insertions, 2 deletions
diff --git a/src/boot.S b/src/boot.S
index f0caebc..17cc794 100644
--- a/src/boot.S
+++ b/src/boot.S
@@ -14,7 +14,7 @@ reset:
// set vector address.
ldr r0, =vector
- mcR P15, 0, r0, c12, c0, 0
+ mcr p15, 0, r0, c12, c0, 0
// save cpsr.
mrs r0, cpsr
@@ -74,6 +74,16 @@ disable_irq:
cpsid i
bx lr
+.globl enable_fiq
+enable_fiq:
+ cpsie i
+ bx lr
+
+.globl disable_fiq
+disable_fiq:
+ cpsid f
+ bx lr
+
.align 5
vector:
ldr pc, reset_handler
@@ -93,6 +103,8 @@ data_handler: .word io_halt
unused_handler: .word io_halt
irq_handler: .word irq
fiq_handler: .word io_halt
+//irq_handler: .word io_halt
+//fiq_handler: .word irq
.global a_irq_handler
a_irq_handler:
diff --git a/src/kernel.S b/src/kernel.S
index 02894a6..f82d624 100644
--- a/src/kernel.S
+++ b/src/kernel.S
@@ -10,10 +10,13 @@ kernel_main:
mov r0, #0x00
kernel_main.a:
cmp r0, #0x100
- beq kernel_main.loop
+ beq kernel_main.b
bl uart_char
add r0, #1
b kernel_main.a
+kernel_main.b:
+ mov r0, #0x0A
+ bl uart_char
kernel_main.loop:
bl io_halt
b kernel_main.loop