diff options
Diffstat (limited to 'kernel/sys/kernel.S')
-rw-r--r-- | kernel/sys/kernel.S | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/kernel/sys/kernel.S b/kernel/sys/kernel.S new file mode 100644 index 0000000..71b22a1 --- /dev/null +++ b/kernel/sys/kernel.S @@ -0,0 +1,32 @@ +.section ".text.kernel" + +.include "macros.inc" + +.globl kernel_main +kernel_main: + bl sysinit + bl status + ldr r2, =ttbr_msg + mov r0, #23 + mov r1, #0 + mov r3, #0xFF00 + bl draw_cstring + // Initialize System Cycle Counter + mov r0, #1 + mcr p15, 0, r0, c9, c14, 0 + mov r0, #1 + mcr p15, 0, r0, c9, c12, 0 + mov r0, #0x80000000 + mcr p15, 0, r0, c9, c12, 1 + + // Intentional undefined instruction + // .word 0xf7f0a000 + cpsie ai, #0x10 + svc #2 // Start scheduling! +2: + wfe + b 2b + +.section .data +ttbr_msg: + .asciz "MMU Initialized!" |