1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2024-11-20 00:33:10 +02:00
iris/boot-programs/init.S

53 lines
1.3 KiB
ArmAsm
Raw Normal View History

2009-06-01 15:26:42 +03:00
// Iris: micro-kernel for a capability-based operating system.
// init.S: Startup code for initial Threads.
// 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
2009-06-08 14:46:13 +03:00
.globl __my_receiver
.globl __my_thread
.globl __my_memory
.globl __my_call
2009-06-01 15:26:42 +03:00
.set noreorder
__start:
bal 1f
2009-06-08 14:46:13 +03:00
nop
2009-06-01 15:26:42 +03:00
.word _gp
1:
lw $gp, 0($ra)
la $v0, __my_receiver
sw $a0, ($v0)
la $v0, __my_thread
sw $a1, ($v0)
la $v0, __my_memory
sw $a2, ($v0)
la $v0, __my_call
sw $a3, ($v0)
la $t9, main
la $ra, 1f
jr $t9
nop
1:
// This should not be reached: generate an address fault.
b 1b
lw $a0, -4($zero)
.comm __my_receiver, 4
.comm __my_thread, 4
.comm __my_memory, 4
.comm __my_call, 4