1 /* 2 * head.S 3 * 4 * Entry point of the firmware. 5 * The firmware code are executed in the ICache. 6 * 7 * Copyright 2009 (C) Qi Hardware Inc., 8 * Author: Xiangfu Liu <xiangfu@sharism.cc> 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 43 * this is must big then sizeof(sturct fw_args) 44 */ 45 real_start: 46 /* 47 * setup stack, jump to C code 48 */ 49 la $29, 0x80004000 /* sp */ 50 j c_main 51 nop 52 53 .set reorder