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