Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / m32r / boot / compressed / boot.h
blob7fce713e8aac67cf158d9f23a28b24b6ec95521b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * 1. load vmlinuz
5 * CONFIG_MEMORY_START +-----------------------+
6 * | vmlinuz |
7 * +-----------------------+
8 * 2. decompressed
10 * CONFIG_MEMORY_START +-----------------------+
11 * | vmlinuz |
12 * +-----------------------+
13 * | |
14 * BOOT_RELOC_ADDR +-----------------------+
15 * | |
16 * KERNEL_DECOMPRESS_ADDR +-----------------------+
17 * | vmlinux |
18 * +-----------------------+
20 * 3. relocate copy & jump code
22 * CONFIG_MEMORY_START +-----------------------+
23 * | vmlinuz |
24 * +-----------------------+
25 * | |
26 * BOOT_RELOC_ADDR +-----------------------+
27 * | boot(copy&jump) |
28 * KERNEL_DECOMPRESS_ADDR +-----------------------+
29 * | vmlinux |
30 * +-----------------------+
32 * 4. relocate decompressed kernel
34 * CONFIG_MEMORY_START +-----------------------+
35 * | vmlinux |
36 * +-----------------------+
37 * | |
38 * BOOT_RELOC_ADDR +-----------------------+
39 * | boot(copy&jump) |
40 * KERNEL_DECOMPRESS_ADDR +-----------------------+
41 * | |
42 * +-----------------------+
45 #ifdef __ASSEMBLY__
46 #define __val(x) x
47 #else
48 #define __val(x) (x)
49 #endif
51 #define DECOMPRESS_OFFSET_BASE __val(0x00900000)
52 #define BOOT_RELOC_SIZE __val(0x00001000)
54 #define KERNEL_EXEC_ADDR __val(CONFIG_MEMORY_START)
55 #define KERNEL_DECOMPRESS_ADDR __val(CONFIG_MEMORY_START + \
56 DECOMPRESS_OFFSET_BASE + BOOT_RELOC_SIZE)
57 #define KERNEL_ENTRY __val(CONFIG_MEMORY_START + 0x1000)
59 #define BOOT_EXEC_ADDR __val(CONFIG_MEMORY_START)
60 #define BOOT_RELOC_ADDR __val(CONFIG_MEMORY_START + DECOMPRESS_OFFSET_BASE)