Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / arch / m32r / boot / compressed / boot.h
blob9272e38d1104e734ffee7749fa468bf6eecd2876
1 /*
2 * 1. load vmlinuz
4 * CONFIG_MEMORY_START +-----------------------+
5 * | vmlinuz |
6 * +-----------------------+
7 * 2. decompressed
9 * CONFIG_MEMORY_START +-----------------------+
10 * | vmlinuz |
11 * +-----------------------+
12 * | |
13 * BOOT_RELOC_ADDR +-----------------------+
14 * | |
15 * KERNEL_DECOMPRESS_ADDR +-----------------------+
16 * | vmlinux |
17 * +-----------------------+
19 * 3. relocate copy & jump code
21 * CONFIG_MEMORY_START +-----------------------+
22 * | vmlinuz |
23 * +-----------------------+
24 * | |
25 * BOOT_RELOC_ADDR +-----------------------+
26 * | boot(copy&jump) |
27 * KERNEL_DECOMPRESS_ADDR +-----------------------+
28 * | vmlinux |
29 * +-----------------------+
31 * 4. relocate decompressed kernel
33 * CONFIG_MEMORY_START +-----------------------+
34 * | vmlinux |
35 * +-----------------------+
36 * | |
37 * BOOT_RELOC_ADDR +-----------------------+
38 * | boot(copy&jump) |
39 * KERNEL_DECOMPRESS_ADDR +-----------------------+
40 * | |
41 * +-----------------------+
44 #ifdef __ASSEMBLY__
45 #define __val(x) x
46 #else
47 #define __val(x) (x)
48 #endif
50 #define DECOMPRESS_OFFSET_BASE __val(0x00900000)
51 #define BOOT_RELOC_SIZE __val(0x00001000)
53 #define KERNEL_EXEC_ADDR __val(CONFIG_MEMORY_START)
54 #define KERNEL_DECOMPRESS_ADDR __val(CONFIG_MEMORY_START + \
55 DECOMPRESS_OFFSET_BASE + BOOT_RELOC_SIZE)
56 #define KERNEL_ENTRY __val(CONFIG_MEMORY_START + 0x1000)
58 #define BOOT_EXEC_ADDR __val(CONFIG_MEMORY_START)
59 #define BOOT_RELOC_ADDR __val(CONFIG_MEMORY_START + DECOMPRESS_OFFSET_BASE)