summaryrefslogtreecommitdiff
path: root/entry.S
blob: 8b3316cd856545ab3eaf2dcc8e55334f0493b759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
	# qemu -kernel starts at 0x1000. the instructions
        # there seem to be provided by qemu, as if it
        # were a ROM. the code at 0x1000 jumps to
        # 0x8000000, the _start function here,
        # in machine mode.
.section .data
.globl stack0
.section .text
.globl mstart
.section .text
.globl _entry
_entry:
	# set up a stack for C; stack0 is declared in start.
        la sp, stack0
        addi sp, sp, 1024
        addi sp, sp, 1024
        addi sp, sp, 1024
        addi sp, sp, 1024
	# jump to mstart() in start.c
        call mstart
junk:
        j junk