aboutsummaryrefslogtreecommitdiff
path: root/src/sys/kernel.S
blob: 4432ccd6c4fb72e55b4f764a7ad7659df01c8015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.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

	// Intentional undefined instruction
	// .word 0xf7f0a000
	cpsie aif, #0x10
	svc #2 // Start scheduling!
2:
	wfe
	b 2b

testf:
	push {lr}
	mrs r0, cpsr
	bl uart_hexn
	pop {pc}

.section .data
ttbr_msg:
	.asciz "MMU Initialized!"