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: Xiangfu Liu <xiangfu@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 * version 3 as published by the Free Software Foundation. 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, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 * Boston, MA 02110-1301, USA 23 */ 24 25 .text 26 27 .extern c_main 28 29 .globl _start 30 .set noreorder 31 _start: 32 b real_start 33 nop 34 .word 0x0 /* address: 0x80002008 */ 35 .word 0x0 36 .word 0x0 37 .word 0x0 38 .word 0x0 39 .word 0x0 40 .word 0x0 41 .word 0x0 42 /* reserve 8 words for args sizeof(struct fw_args) 43 */ 44 real_start: 45 /* 46 * setup stack, jump to C code 47 */ 48 la $29, 0x80004000 /* sp */ 49 j c_main 50 nop 51 52 .set reorder