1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2024-10-01 13:00:42 +03:00
iris/mips/start.S
2010-08-05 22:19:58 +02:00

47 lines
1.2 KiB
ArmAsm

// Iris: micro-kernel for a capability-based operating system.
// mips/start.S: kernel starter at high address.
// Copyright 2009 Bas Wijnen <wijnen@debian.org>
//
// 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 3 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.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
.globl __start
.set noreorder
__start:
bal 1f
// For some reason the disassembler considers everything
// after __start non-code until the next label. So I add a label.
start_hack_for_disassembler:
nop
.word _gp
1: lw $gp, 0($ra)
li $a0, 0xa0000000
la $a1, image
la $a2, image_end
1: lw $a3, 0($a1)
sw $a3, 0($a0)
addiu $a1, 4
bne $a1, $a2, 1b
addiu $a0, 4
li $t9, START
jr $t9
nop
image:
.incbin "iris.raw"
image_end: