From 4e1880672f38ceb600c7dc7d3179dbb9f11f792d Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Tue, 22 Mar 2022 19:11:58 -0700 Subject: Working on time --- src/exceptions/svc.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/exceptions') diff --git a/src/exceptions/svc.S b/src/exceptions/svc.S index fdfe391..f833b5b 100644 --- a/src/exceptions/svc.S +++ b/src/exceptions/svc.S @@ -6,7 +6,7 @@ svc: // Get the SVC Exception # ldr r0, [lr, #-4] bic r0, #0xFF000000 - cmp r0, #7 + cmp r0, #9 // Check it is within our defined SVC bgt svc_exit //// Jump to the appropriate Call @@ -120,6 +120,10 @@ svc_000008: // Semaphore add # ldmfd sp!, {r0-r12,lr} b schedule b svc_exit +svc_000009: // SYS_TIME_2 + mrc p15, 0, r0, c14, c3, 0 + str r0, [sp, #0] + b svc_exit svc_exit: ldmfd sp!, {r0-r12,pc}^ @@ -133,3 +137,4 @@ svc_table: .word svc_000006 .word svc_000007 .word svc_000008 + .word svc_000009 -- cgit v1.2.1