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