mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-15 02:05:16 +08:00
d1b52a4388
Introduce .boot.data section which is "shared" between the decompressor code and the decompressed kernel. The decompressor will store values in it, and copy over to the decompressed image before starting it. This method allows to avoid using pre-defined addresses and other hacks to pass values between those boot phases. .boot.data section is a part of init data, and will be freed after kernel initialization is complete. For uncompressed kernel image, .boot.data section is basically the same as .init.data Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
26 lines
683 B
C
26 lines
683 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef BOOT_COMPRESSED_DECOMPRESSOR_H
|
|
#define BOOT_COMPRESSED_DECOMPRESSOR_H
|
|
|
|
#ifdef CONFIG_KERNEL_UNCOMPRESSED
|
|
static inline void *decompress_kernel(void) {}
|
|
#else
|
|
void *decompress_kernel(void);
|
|
#endif
|
|
unsigned long mem_safe_offset(void);
|
|
void error(char *m);
|
|
|
|
struct vmlinux_info {
|
|
unsigned long default_lma;
|
|
void (*entry)(void);
|
|
unsigned long image_size; /* does not include .bss */
|
|
unsigned long bss_size; /* uncompressed image .bss size */
|
|
unsigned long bootdata_off;
|
|
unsigned long bootdata_size;
|
|
};
|
|
|
|
extern char _vmlinux_info[];
|
|
#define vmlinux (*(struct vmlinux_info *)_vmlinux_info)
|
|
|
|
#endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */
|