forked from Broadcom/aeolus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.S
53 lines (44 loc) · 1022 Bytes
/
init.S
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Aeolus - a program to boot the Zephyr MIPS
* Copyright (C) 2014 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "regdef.h"
.section .init,"ax"
.global _start
.ent _start
_start:
/* CONFIG.K0 = 0x02 (uncached kseg0) */
li t0, 0x02
mtc0 t0, $16
BARRIER
la t0, 1f
jr t0
1:
bal mips_init
la t0, _fbss
move sp, t0
la t1, _ebss
beq t0, t1, 2f
1:
sw zero, 0(t0)
addiu t0, 4
bne t0, t1, 1b
2:
la a0, _linux
la a1, _cmdline
la a2, _dtb_start
la a3, _dtb_end
subu a3, a2
la t0, main
jr t0
.end _start