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