afe5b3cc20606b9e930d19b57053d4c8bcc3ef02
[rpi-open-firmware.git] / arm_chainloader / start.s
1 /*=============================================================================
2 Copyright (C) 2016 Kristina Brooks
3 All rights reserved.
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
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 FILE DESCRIPTION
16 ARM entry point.
17
18 This is where all cores start. For RPi1, only one core starts so we can jump
19 straight to the main bootloader. For later models, the first core jumps to the
20 bootloader. The other cores wait until SMP is enabled by the kernel later in
21 the boot process.
22
23 =============================================================================*/
24
25 .text
26 .globl _start
27 _start:
28 /* vectors */
29 b L_all_cores_start
30 nop
31 nop
32 nop
33 nop
34 nop
35 nop
36 nop
37
38 /* comm chan */
39 nop
40 nop
41 nop
42 nop
43
44 L_all_cores_start:
45 /* check CPU id */
46 mrc p15, 0, r0, c0, c0, 5
47 ands r0, r0, #0x03
48 bne L_deadloop
49
50 L_core0:
51 mov sp, #0x2000000
52 b _firmware_rendezvous
53
54 L_deadloop:
55 b L_deadloop
This page took 0.061117 seconds and 3 git commands to generate.