1 /* SPDX-License-Identifier: GPL-2.0 */
6 #define ARM64_IMAGE_MAGIC "ARM\x64"
8 #define ARM64_IMAGE_FLAG_BE_SHIFT 0
9 #define ARM64_IMAGE_FLAG_PAGE_SIZE_SHIFT (ARM64_IMAGE_FLAG_BE_SHIFT + 1)
10 #define ARM64_IMAGE_FLAG_PHYS_BASE_SHIFT \
11 (ARM64_IMAGE_FLAG_PAGE_SIZE_SHIFT + 2)
12 #define ARM64_IMAGE_FLAG_BE_MASK 0x1
13 #define ARM64_IMAGE_FLAG_PAGE_SIZE_MASK 0x3
14 #define ARM64_IMAGE_FLAG_PHYS_BASE_MASK 0x1
16 #define ARM64_IMAGE_FLAG_LE 0
17 #define ARM64_IMAGE_FLAG_BE 1
18 #define ARM64_IMAGE_FLAG_PAGE_SIZE_4K 1
19 #define ARM64_IMAGE_FLAG_PAGE_SIZE_16K 2
20 #define ARM64_IMAGE_FLAG_PAGE_SIZE_64K 3
21 #define ARM64_IMAGE_FLAG_PHYS_BASE 1
25 #define arm64_image_flag_field(flags, field) \
26 (((flags) >> field##_SHIFT) & field##_MASK)
29 * struct arm64_image_header - arm64 kernel image header
30 * See Documentation/arm64/booting.rst for details
32 * @code0: Executable code, or
33 * @mz_header alternatively used for part of MZ header
34 * @code1: Executable code
35 * @text_offset: Image load offset
36 * @image_size: Effective Image size
37 * @flags: kernel flags
39 * @magic: Magic number
40 * @reserved5: reserved, or
41 * @pe_header: alternatively used for PE COFF offset
44 struct arm64_image_header
{
57 #endif /* __ASSEMBLY__ */
59 #endif /* __ASM_IMAGE_H */