License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[sfrench/cifs-2.6.git] / arch / m32r / boot / compressed / boot.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * 1. load vmlinuz
4  *
5  * CONFIG_MEMORY_START          +-----------------------+
6  *                              |        vmlinuz        |
7  *                              +-----------------------+
8  * 2. decompressed
9  *
10  * CONFIG_MEMORY_START          +-----------------------+
11  *                              |        vmlinuz        |
12  *                              +-----------------------+
13  *                              |                       |
14  * BOOT_RELOC_ADDR              +-----------------------+
15  *                              |                       |
16  * KERNEL_DECOMPRESS_ADDR       +-----------------------+
17  *                              |       vmlinux         |
18  *                              +-----------------------+
19  *
20  * 3. relocate copy & jump code
21  *
22  * CONFIG_MEMORY_START          +-----------------------+
23  *                              |        vmlinuz        |
24  *                              +-----------------------+
25  *                              |                       |
26  * BOOT_RELOC_ADDR              +-----------------------+
27  *                              |    boot(copy&jump)    |
28  * KERNEL_DECOMPRESS_ADDR       +-----------------------+
29  *                              |       vmlinux         |
30  *                              +-----------------------+
31  *
32  * 4. relocate decompressed kernel
33  *
34  * CONFIG_MEMORY_START          +-----------------------+
35  *                              |        vmlinux        |
36  *                              +-----------------------+
37  *                              |                       |
38  * BOOT_RELOC_ADDR              +-----------------------+
39  *                              |     boot(copy&jump)   |
40  * KERNEL_DECOMPRESS_ADDR       +-----------------------+
41  *                              |                       |
42  *                              +-----------------------+
43  *
44  */
45 #ifdef __ASSEMBLY__
46 #define __val(x)        x
47 #else
48 #define __val(x)        (x)
49 #endif
50
51 #define DECOMPRESS_OFFSET_BASE  __val(0x00900000)
52 #define BOOT_RELOC_SIZE         __val(0x00001000)
53
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)
58
59 #define BOOT_EXEC_ADDR          __val(CONFIG_MEMORY_START)
60 #define BOOT_RELOC_ADDR         __val(CONFIG_MEMORY_START + DECOMPRESS_OFFSET_BASE)