xref: /openbmc/linux/arch/s390/boot/decompressor.h (revision 65844828)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef BOOT_COMPRESSED_DECOMPRESSOR_H
3 #define BOOT_COMPRESSED_DECOMPRESSOR_H
4 
5 #include <linux/stddef.h>
6 
7 #ifdef CONFIG_KERNEL_UNCOMPRESSED
8 static inline void *decompress_kernel(void) { return NULL; }
9 #else
10 void *decompress_kernel(void);
11 #endif
12 unsigned long mem_safe_offset(void);
13 void error(char *m);
14 
15 struct vmlinux_info {
16 	unsigned long default_lma;
17 	void (*entry)(void);
18 	unsigned long image_size;	/* does not include .bss */
19 	unsigned long bss_size;		/* uncompressed image .bss size */
20 	unsigned long bootdata_off;
21 	unsigned long bootdata_size;
22 	unsigned long bootdata_preserved_off;
23 	unsigned long bootdata_preserved_size;
24 	unsigned long dynsym_start;
25 	unsigned long rela_dyn_start;
26 	unsigned long rela_dyn_end;
27 	unsigned long amode31_size;
28 };
29 
30 /* Symbols defined by linker scripts */
31 extern char _end[];
32 extern unsigned char _compressed_start[];
33 extern unsigned char _compressed_end[];
34 extern char _vmlinux_info[];
35 
36 #define vmlinux (*(struct vmlinux_info *)_vmlinux_info)
37 
38 #endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */
39