// Iris: micro-kernel for a capability-based operating system. // init.S: Startup code for initial Threads. // Copyright 2009 Bas Wijnen // // 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 . .globl __start .globl __my_receiver .globl __my_thread .globl __my_memory .globl __my_call .set noreorder __start: bal 1f nop .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