aboutsummaryrefslogtreecommitdiff
path: root/boot.S
blob: 4318a40cea803997b8f1f4613f946c764bbda81f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "pcr.h"

	.text
	.global __start
	.ent    __start
__start:

	# set up SR
	li		$t0, SR_S | SR_PS | SR_ET | SR_UX | SR_KX
	mtpcr	$t0, $0

	# set up trap table
	la		$t0, trap_table
	mtpcr	$t0, $3

	# set up stack
	la		$sp,stack_top-64

	# call into kernel
	la		$t0, boot
	jr		$t0

	.end    __start