From 45f83cfebe49b4cc073848511c3ee5a12a30a049 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sat, 13 Nov 2021 00:51:10 -0700 Subject: FIQ Stuff --- src/kernel.S | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src') diff --git a/src/kernel.S b/src/kernel.S index 0eb1389..4aa5c2d 100644 --- a/src/kernel.S +++ b/src/kernel.S @@ -5,6 +5,8 @@ kernel_main: push {lr} bl uart_init bl enable_irq + bl enable_fiq + bl check_fiq_status ldr r0, =os_info bl uart_string kernel_main.loop: @@ -12,6 +14,33 @@ kernel_main.loop: b kernel_main.loop pop {lr} +check_fiq_status: + push {lr} + mov r2, #0xB208 + movt r2, #0x3F00 + //mov r3, #57 + //movt r3, #0 + //str r3, [r2] + ldr r3, [r2] + push {r3} + mov r0, r3 + bl uart_hex + pop {r3} + tst r3, #0x80 + beq check_fiq_status.off + ldr r0, =fiq_on + bl uart_string + b check_fiq_status.exit +check_fiq_status.off: + ldr r0, =fiq_off + bl uart_string +check_fiq_status.exit: + pop {pc} + .section ".data" os_info: .asciz "Sergey Bilovytskyy's Real Time Operating System\n Version 0.0a\n Interrupt 01: uart rx interrupt\n Exit : Ctrl-A x\n Monitor : Ctrl-A c\n\n" +fiq_on: + .asciz "\nFIQ - Enabled\n" +fiq_off: + .asciz "\nFIQ - Disabled\n" -- cgit v1.2.1