blob: e5758bca0dd59a25bd93b9e4366cd7a2fb594c9f [file] [log] [blame]
Furquan Shaikh2af76f42014-04-28 16:39:40 -07001/*
2 * Early initialization code for aarch64 (a.k.a. armv8)
3 *
Julius Werner66a476a2015-10-12 16:45:21 -07004 * Copyright 2015 Google Inc.
Furquan Shaikh2af76f42014-04-28 16:39:40 -07005 *
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 Shaikh2af76f42014-04-28 16:39:40 -070015 */
16
Julius Werner66a476a2015-10-12 16:45:21 -070017#include <arch/asm.h>
Furquan Shaikh2af76f42014-04-28 16:39:40 -070018
Julius Werner7dcf9d52015-10-16 13:10:02 -070019/* 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 Werner66a476a2015-10-12 16:45:21 -070024ENTRY(_start)
Julius Werner7dcf9d52015-10-16 13:10:02 -070025 /* Initialize PSTATE, SCTLR and caches to clean state, set up stack. */
Julius Werner66a476a2015-10-12 16:45:21 -070026 bl arm64_init_cpu
Furquan Shaikh2af76f42014-04-28 16:39:40 -070027
Julius Werner66a476a2015-10-12 16:45:21 -070028 bl main
29ENDPROC(_start)