Remove address from GPLv2 headers
[coreboot.git] / src / arch / mips / bootblock.S
blobe24848dbe98694fe9deaecb6304811b0f57718d7
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2014 Imagination Technologies
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc.
18  */
20 .set    noreorder       /* Prevent assembler from "optimizing" this code. */
22 .section ".text._start", "ax", %progbits
23 .globl _start
24 _start:
25         /* Set the stack pointer */
26         la      $sp, _estack
28         /*
29          * Initialise the stack to a known value, used later to check for
30          * overflow.
31          */
32         la      $t0, _stack
33         addi    $t1, $sp, -4
34         li      $t2, 0xdeadbeef
35 1:      sw      $t2, 0($t0)
36         bne     $t0, $t1, 1b
37         addi    $t0, $t0, 4
39         /* Run main */
40         b       main
42         /*
43          * Should never return from main. Make sure there is no branch in the
44          * branch delay slot.
45          */
46 2:      nop
47         b       2b
48         nop     /* Make sure there is no branch after this either. */