alistair23-linux/arch/s390/include/asm/vmlinux.lds.h
Gerald Schaefer bf9921a9c1 s390: introduce .boot.preserved.data section
Introduce .boot.preserve.data section which is similar to .boot.data and
"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.

Unlike .boot.data section .boot.preserved.data is NOT a part of init data,
and hence will be preserved for the kernel life time.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2019-04-10 17:47:09 +02:00

34 lines
1.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
#include <asm/page.h>
/*
* .boot.data section 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.
*
* .boot.data variables are kept in separate .boot.data.<var name> sections,
* which are sorted by alignment first, then by name before being merged
* into single .boot.data section. This way big holes cased by page aligned
* structs are avoided and linker produces consistent result.
*/
#define BOOT_DATA \
. = ALIGN(PAGE_SIZE); \
.boot.data : { \
__boot_data_start = .; \
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.boot.data*))) \
__boot_data_end = .; \
}
/*
* .boot.preserved.data is similar to .boot.data, but it is not part of the
* .init section and thus will be preserved for later use in the decompressed
* kernel.
*/
#define BOOT_DATA_PRESERVED \
. = ALIGN(PAGE_SIZE); \
.boot.preserved.data : { \
__boot_data_preserved_start = .; \
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.boot.preserved.data*))) \
__boot_data_preserved_end = .; \
}