1
2
3 #ifndef __ASM_IMAGE_H
4 #define __ASM_IMAGE_H
5
6 #define ARM64_IMAGE_MAGIC "ARM\x64"
7
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
15
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
22
23 #ifndef __ASSEMBLY__
24
25 #define arm64_image_flag_field(flags, field) \
26 (((flags) >> field##_SHIFT) & field##_MASK)
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 struct arm64_image_header {
45 __le32 code0;
46 __le32 code1;
47 __le64 text_offset;
48 __le64 image_size;
49 __le64 flags;
50 __le64 res2;
51 __le64 res3;
52 __le64 res4;
53 __le32 magic;
54 __le32 res5;
55 };
56
57 #endif
58
59 #endif