aboutsummaryrefslogtreecommitdiff
path: root/src/sys/kernel.S
blob: 4a3c09660f93b350403f57e6127277a7d4cd104e (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
32
33
34
35
.section ".text.kernel"

.globl kernel_main
kernel_main:
	bl sysinit
	cps #0x10
	// Intentional undefined instruction
	.word 0xf7f0a000
	// Supervisor Call #1 - Does nothing special
	svc #1
	mrs r0, cpsr
	bl uart_hexn
	// Supervisor Call #1 - Returns in supervisor mode
	svc #0
	mrs r0, cpsr
	bl uart_hexn
1:
	//bl schedule
	wfe
	b 1b

.section ".data"
.globl cntfrq
cntfrq: // 32 bits
	.word 0
.globl cmdidx
cmdidx:
	.word 0
.globl cmd
cmd:
	.space 2049

.section ".bss.heap"
mheap:
	.space 0x100000