decompressor.h 1.0 KB
Newer Older
V
Vasily Gorbik 已提交
1 2 3 4
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef BOOT_COMPRESSED_DECOMPRESSOR_H
#define BOOT_COMPRESSED_DECOMPRESSOR_H

5 6
#include <linux/stddef.h>

V
Vasily Gorbik 已提交
7
#ifdef CONFIG_KERNEL_UNCOMPRESSED
8
static inline void *decompress_kernel(void) { return NULL; }
V
Vasily Gorbik 已提交
9
#else
10
void *decompress_kernel(void);
V
Vasily Gorbik 已提交
11
#endif
12
unsigned long mem_safe_offset(void);
13
void error(char *m);
V
Vasily Gorbik 已提交
14

15 16 17 18
struct vmlinux_info {
	unsigned long default_lma;
	void (*entry)(void);
	unsigned long image_size;	/* does not include .bss */
19
	unsigned long bss_size;		/* uncompressed image .bss size */
V
Vasily Gorbik 已提交
20 21
	unsigned long bootdata_off;
	unsigned long bootdata_size;
22 23
	unsigned long bootdata_preserved_off;
	unsigned long bootdata_preserved_size;
24 25 26
	unsigned long dynsym_start;
	unsigned long rela_dyn_start;
	unsigned long rela_dyn_end;
27
	unsigned long amode31_size;
28 29
};

30 31 32 33
/* Symbols defined by linker scripts */
extern char _end[];
extern unsigned char _compressed_start[];
extern unsigned char _compressed_end[];
34
extern char _vmlinux_info[];
35

36 37
#define vmlinux (*(struct vmlinux_info *)_vmlinux_info)

V
Vasily Gorbik 已提交
38
#endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */