Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Early initialization code for aarch64 (a.k.a. armv8) |
| 3 | * |
Julius Werner | 66a476a | 2015-10-12 16:45:21 -0700 | [diff] [blame] | 4 | * Copyright 2015 Google Inc. |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; version 2 of |
| 9 | * the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
Julius Werner | 66a476a | 2015-10-12 16:45:21 -0700 | [diff] [blame] | 17 | #include <arch/asm.h> |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 18 | |
Julius Werner | 7dcf9d5 | 2015-10-16 13:10:02 -0700 | [diff] [blame] | 19 | /* NOTE: When making changes to general ARM64 initialization, keep in mind that |
| 20 | * there are other CPU entry points, using BOOTBLOCK_CUSTOM or entering the CPU |
| 21 | * in a later stage (like Tegra). Changes should generally be put into |
| 22 | * arm64_cpu_init so they can be shared between those instances. */ |
| 23 | |
Julius Werner | 66a476a | 2015-10-12 16:45:21 -0700 | [diff] [blame] | 24 | ENTRY(_start) |
Julius Werner | 7dcf9d5 | 2015-10-16 13:10:02 -0700 | [diff] [blame] | 25 | /* Initialize PSTATE, SCTLR and caches to clean state, set up stack. */ |
Julius Werner | 66a476a | 2015-10-12 16:45:21 -0700 | [diff] [blame] | 26 | bl arm64_init_cpu |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 27 | |
Julius Werner | 66a476a | 2015-10-12 16:45:21 -0700 | [diff] [blame] | 28 | bl main |
| 29 | ENDPROC(_start) |