summaryrefslogtreecommitdiff
path: root/boards/qemu-virt/qemu-virt.s
blob: 46285643b6c6783da2b7b083ad9c1fbedd51aef8 (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
.section .text.start

.extern main

.global _start
_start:
	# Have harts other than 0 spin until hart0 wakes them up.
	csrr a0, mhartid
	c.bnez a0, wait_for_hart0

	# Set up hart0's stack.
	la sp, hart0_initial_stack_top

	# Call hart0_boot with the address of the DeviceTree.
	c.mv a1, a0
	call hart0_boot

	# Fall through to a spin loop.
halt:
	j halt

.section .text

wait_for_hart0:
	# TODO
	j halt