2018-07-19 11:11:28 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef BOOT_COMPRESSED_DECOMPRESSOR_H
|
|
|
|
#define BOOT_COMPRESSED_DECOMPRESSOR_H
|
|
|
|
|
2020-10-17 13:55:10 +00:00
|
|
|
#include <linux/stddef.h>
|
|
|
|
|
2018-07-19 11:11:28 +00:00
|
|
|
#ifdef CONFIG_KERNEL_UNCOMPRESSED
|
2020-10-17 13:55:10 +00:00
|
|
|
static inline void *decompress_kernel(void) { return NULL; }
|
2018-07-19 11:11:28 +00:00
|
|
|
#else
|
2018-07-19 14:51:25 +00:00
|
|
|
void *decompress_kernel(void);
|
2018-07-19 11:11:28 +00:00
|
|
|
#endif
|
2018-04-11 09:56:55 +00:00
|
|
|
unsigned long mem_safe_offset(void);
|
2018-07-25 13:01:11 +00:00
|
|
|
void error(char *m);
|
2018-07-19 11:11:28 +00:00
|
|
|
|
2018-07-19 14:51:25 +00:00
|
|
|
struct vmlinux_info {
|
|
|
|
unsigned long default_lma;
|
|
|
|
void (*entry)(void);
|
|
|
|
unsigned long image_size; /* does not include .bss */
|
2018-04-11 09:56:55 +00:00
|
|
|
unsigned long bss_size; /* uncompressed image .bss size */
|
2018-04-10 12:14:02 +00:00
|
|
|
unsigned long bootdata_off;
|
|
|
|
unsigned long bootdata_size;
|
2019-04-01 17:10:45 +00:00
|
|
|
unsigned long bootdata_preserved_off;
|
|
|
|
unsigned long bootdata_preserved_size;
|
2019-02-03 20:35:45 +00:00
|
|
|
unsigned long dynsym_start;
|
|
|
|
unsigned long rela_dyn_start;
|
|
|
|
unsigned long rela_dyn_end;
|
2021-09-27 12:18:26 +00:00
|
|
|
unsigned long amode31_size;
|
2018-07-19 14:51:25 +00:00
|
|
|
};
|
|
|
|
|
2021-06-30 15:12:25 +00:00
|
|
|
/* Symbols defined by linker scripts */
|
|
|
|
extern char _end[];
|
|
|
|
extern unsigned char _compressed_start[];
|
|
|
|
extern unsigned char _compressed_end[];
|
2018-07-19 14:51:25 +00:00
|
|
|
extern char _vmlinux_info[];
|
2021-06-30 15:12:25 +00:00
|
|
|
|
2018-07-19 14:51:25 +00:00
|
|
|
#define vmlinux (*(struct vmlinux_info *)_vmlinux_info)
|
|
|
|
|
2018-07-19 11:11:28 +00:00
|
|
|
#endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */
|