1/*
2 * ARM64 header for proper chain-loading with Little Kernel.
3 *
4 * Little Kernel shipped with Dragonboard820C boots standard Linux images for
5 * ARM64. This file adds header that is required to boot U-Boot properly.
6 *
7 * For details see:
8 * https://www.kernel.org/doc/Documentation/arm64/booting.txt
9 *
10 * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
11 *
12 * SPDX-License-Identifier:	GPL-2.0+
13 */
14
15#include <config.h>
16
17/*
18 *   per document in linux/Doc/arm64/booting.text
19 */
20.global _arm64_header
21_arm64_header:
22	b _start
23	.word 0
24	.quad   CONFIG_SYS_TEXT_BASE-PHYS_SDRAM_1 /* Image load offset, LE */
25	.quad   0    /* Effective size of kernel image, little-endian */
26	.quad   0    /* kernel flags, little-endian */
27	.quad   0    /* reserved */
28	.quad   0    /* reserved */
29	.quad   0    /* reserved */
30	.byte   0x41 /* Magic number, "ARM\x64" */
31	.byte   0x52
32	.byte   0x4d
33	.byte   0x64
34	.word   0    /* reserved (used for PE COFF offset) */
35