1 /* 2 * Initialisation for the stage 1 payload with support for boot parameters. 3 * 4 * Copyright (C) 2009 Qi Hardware Inc. 5 * Author: Wolfgang Spraul <wolfgang@sharism.cc> 6 * 7 * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk> 8 * 9 * This program is free software: you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation, either version 3 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 .text 24 .extern c_main 25 .globl _start 26 .set noreorder 27 28 _start: 29 b real_start 30 nop 31 // 8 words for firmware parameters (0x80002008), struct fw_args 32 .word 0x0 33 .word 0x0 34 .word 0x0 35 .word 0x0 36 .word 0x0 37 .word 0x0 38 .word 0x0 39 .word 0x0 40 real_start: 41 /* Setup stack, jump to C code. */ 42 43 la $sp, 0x80004000 44 j c_main 45 nop 46 47 .set reorder