1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/head1.S Fri Jun 05 19:34:16 2015 +0200
1.3 @@ -0,0 +1,53 @@
1.4 +/*
1.5 + * head.S
1.6 + *
1.7 + * Entry point of the firmware.
1.8 + * The firmware code are executed in the ICache.
1.9 + *
1.10 + * Copyright 2009 (C) Qi Hardware Inc.,
1.11 + * Author: Xiangfu Liu <xiangfu@sharism.cc>
1.12 + *
1.13 + * This program is free software; you can redistribute it and/or
1.14 + * modify it under the terms of the GNU General Public License
1.15 + * version 3 as published by the Free Software Foundation.
1.16 + *
1.17 + * This program is distributed in the hope that it will be useful,
1.18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.20 + * GNU General Public License for more details.
1.21 + *
1.22 + * You should have received a copy of the GNU General Public License
1.23 + * along with this program; if not, write to the Free Software
1.24 + * Foundation, Inc., 51 Franklin Street, Fifth Floor,
1.25 + * Boston, MA 02110-1301, USA
1.26 + */
1.27 +
1.28 + .text
1.29 +
1.30 + .extern c_main
1.31 +
1.32 + .globl _start
1.33 + .set noreorder
1.34 +_start:
1.35 + b real_start
1.36 + nop
1.37 + .word 0x0 /* address: 0x80002008 */
1.38 + .word 0x0
1.39 + .word 0x0
1.40 + .word 0x0
1.41 + .word 0x0
1.42 + .word 0x0
1.43 + .word 0x0
1.44 + .word 0x0
1.45 + /* reserve 8 words for args
1.46 + * this is must big then sizeof(sturct fw_args)
1.47 + */
1.48 +real_start:
1.49 + /*
1.50 + * setup stack, jump to C code
1.51 + */
1.52 + la $29, 0x80004000 /* sp */
1.53 + j c_main
1.54 + nop
1.55 +
1.56 + .set reorder