From 256d78d08177d72ae27621378699c9b35231d524 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Wed, 30 Jun 2021 17:17:53 +0200 Subject: s390/boot: make stacks part of the decompressor's image Instead of using constant addresses for the normal and dump-info stacks, allocate both stacks in the decompressor's image and load the stack register in a position-independent manner. This will allow loading and entering the decompressor at an arbitrary memory address without corrupting the content at the fixed addresses used until now for both stacks. This is one of the prerequisites for being able to kexec the decompressor from its load address without relocating it first. Signed-off-by: Alexander Egorenkov Acked-by: Heiko Carstens Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens --- arch/s390/boot/boot.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'arch/s390/boot/boot.h') diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h index 937dbdd0ef43..3d7d5ef4d169 100644 --- a/arch/s390/boot/boot.h +++ b/arch/s390/boot/boot.h @@ -2,13 +2,8 @@ #ifndef BOOT_BOOT_H #define BOOT_BOOT_H -#include - -#define BOOT_STACK_OFFSET 0x8000 - -#ifndef __ASSEMBLY__ - #include +#include void startup_kernel(void); unsigned long detect_memory(void); @@ -35,8 +30,8 @@ extern char _stext_dma[], _etext_dma[]; extern struct exception_table_entry _start_dma_ex_table[]; extern struct exception_table_entry _stop_dma_ex_table[]; extern char _decompressor_syms_start[], _decompressor_syms_end[]; +extern char _stack_start[], _stack_end[]; unsigned long read_ipl_report(unsigned long safe_offset); -#endif /* __ASSEMBLY__ */ #endif /* BOOT_BOOT_H */ -- cgit v1.2.3