aboutsummaryrefslogtreecommitdiff
path: root/kernel/exceptions
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-24 18:52:56 -0700
committerChristian Cunningham <cc@localhost>2022-03-24 18:52:56 -0700
commit7753da66d7d72f441dadd76f357fd5ceb50e7c8f (patch)
treec79cee644108ecb65952eff2104127a19e72d0c4 /kernel/exceptions
parent78493b1d441ef888910cf958a16f260bc3c1a7bd (diff)
Modularize Userspace
Diffstat (limited to 'kernel/exceptions')
-rw-r--r--kernel/exceptions/svc.S15
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/exceptions/svc.S b/kernel/exceptions/svc.S
index a24bac9..75a0cf1 100644
--- a/kernel/exceptions/svc.S
+++ b/kernel/exceptions/svc.S
@@ -11,7 +11,7 @@ svc:
adrle r3, svc_table_1
ldrle pc, [r3, r0, LSL #2]
sub r0, #8
- cmp r0, #7
+ cmp r0, #3
bgt svc_exit
//// Jump to the appropriate Call
adr r3, svc_table_2
@@ -128,6 +128,17 @@ svc_000009: // SYS_TIME_2
mrc p15, 0, r0, c9, c13, 0
str r0, [sp, #0]
b svc_exit
+svc_00000A: // SYS_CNTV_ENABLE
+ ldr r0, =cntfrq
+ ldr r0, [r0]
+ mcr p15, 0, r0, c14, c3, 0
+ mov r0, #1
+ mcr p15, 0, r0, c14, c3, 1
+ b svc_exit
+svc_00000B: // SYS_CNTV_DISABLE
+ mov r0, #0
+ mcr p15, 0, r0, c14, c3, 1
+ b svc_exit
svc_exit:
ldmfd sp!, {r0-r12,pc}^
@@ -143,3 +154,5 @@ svc_table_1:
svc_table_2:
.word svc_000008
.word svc_000009
+ .word svc_00000A
+ .word svc_00000B