Root/xbboot/target-stage1/head.S

1//
2// Authors: Wolfgang Spraul <wolfgang@sharism.cc>
3//
4// This program is free software; you can redistribute it and/or
5// modify it under the terms of the GNU General Public License
6// as published by the Free Software Foundation; either version
7// 3 of the License, or (at your option) any later version.
8//
9
10    .text
11    .extern c_main
12    .globl _start
13    .set noreorder
14
15_start:
16    b real_start
17    nop
18    // 8 words for firmware parameters (0x80002008)
19    .word 0x0
20    .word 0x0
21    .word 0x0
22    .word 0x0
23    .word 0x0
24    .word 0x0
25    .word 0x0
26    .word 0x0
27
28real_start:
29    li $8, 0x0040FC04
30    mtc0 $8, $12 // CP0_STATUS
31
32    li $9, 0x00800000
33    mtc0 $9, $13 // CP0_CAUSE
34
35    la $29, 0x80004000 // setup stack (sp)
36    j c_main
37    nop
38
39    .set reorder
40

Archive Download this file



interactive