blob: c15eb7114d8363594b6673fba58aa4dbec3c468e [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef BOOT_COMPRESSED_DECOMPRESSOR_H
3#define BOOT_COMPRESSED_DECOMPRESSOR_H
4
5#ifdef CONFIG_KERNEL_UNCOMPRESSED
6static inline void *decompress_kernel(void) {}
7#else
8void *decompress_kernel(void);
9#endif
10unsigned long mem_safe_offset(void);
11void error(char *m);
12
13struct vmlinux_info {
14 unsigned long default_lma;
15 void (*entry)(void);
16 unsigned long image_size; /* does not include .bss */
17 unsigned long bss_size; /* uncompressed image .bss size */
18 unsigned long bootdata_off;
19 unsigned long bootdata_size;
20 unsigned long bootdata_preserved_off;
21 unsigned long bootdata_preserved_size;
22 unsigned long dynsym_start;
23 unsigned long rela_dyn_start;
24 unsigned long rela_dyn_end;
25};
26
27extern char _vmlinux_info[];
28#define vmlinux (*(struct vmlinux_info *)_vmlinux_info)
29
30#endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */