aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-19 12:04:51 -0700
committerChristian Cunningham <cc@localhost>2022-01-19 12:04:51 -0700
commit466ef472e5d0e2a83600b07da0229d41e78f9d9c (patch)
treefd62076b789b2ebf53ded4bcac4f8e38d7e00df6 /src
parentcdccd0ad6e540a616b719594d2cef3bafb3e7f97 (diff)
Testing handlers
Testing user mode switch Removed unused words
Diffstat (limited to 'src')
-rw-r--r--src/sys/kernel.S19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/sys/kernel.S b/src/sys/kernel.S
index cee385d..4a3c096 100644
--- a/src/sys/kernel.S
+++ b/src/sys/kernel.S
@@ -3,15 +3,26 @@
.globl kernel_main
kernel_main:
bl sysinit
-kernel_main.loop:
+ cps #0x10
+ // Intentional undefined instruction
+ .word 0xf7f0a000
+ // Supervisor Call #1 - Does nothing special
+ svc #1
+ mrs r0, cpsr
+ bl uart_hexn
+ // Supervisor Call #1 - Returns in supervisor mode
+ svc #0
+ mrs r0, cpsr
+ bl uart_hexn
+1:
//bl schedule
wfe
- b kernel_main.loop
+ b 1b
.section ".data"
.globl cntfrq
-cntfrq:
- .word 0,0,0,0
+cntfrq: // 32 bits
+ .word 0
.globl cmdidx
cmdidx:
.word 0