diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2021-12-16 12:43:52 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2022-01-14 15:58:06 +0100 |
commit | defb80a20bf1e4d778596ce2447e19d44f31ae5a (patch) | |
tree | db2e94f805fc02f89cb874fb02eb457af4cb4b26 /kexec/arch/s390/kexec-s390.h | |
parent | b5a34a20984c4ad27cc5054d9957af8130b42a50 (diff) |
s390: add variable command line size
Newer s390 kernels support a command line size longer than 896
bytes. Such kernels contain a new member in the parameter area,
which might be utilized by tools like kexec. Older kernels have
the location initialized to zero, so we check whether there's a
non-zero number present and use that. If there isn't, we fallback
to the legacy command line size of 896 bytes.
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/s390/kexec-s390.h')
-rw-r--r-- | kexec/arch/s390/kexec-s390.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/kexec/arch/s390/kexec-s390.h b/kexec/arch/s390/kexec-s390.h index ef53b11..6a99518 100644 --- a/kexec/arch/s390/kexec-s390.h +++ b/kexec/arch/s390/kexec-s390.h @@ -10,16 +10,17 @@ #ifndef KEXEC_S390_H #define KEXEC_S390_H -#define IMAGE_READ_OFFSET 0x10000 +#define IMAGE_READ_OFFSET 0x10000 -#define RAMDISK_ORIGIN_ADDR 0x800000 -#define INITRD_START_OFFS 0x408 -#define INITRD_SIZE_OFFS 0x410 -#define OLDMEM_BASE_OFFS 0x418 -#define OLDMEM_SIZE_OFFS 0x420 -#define COMMAND_LINE_OFFS 0x480 -#define COMMAND_LINESIZE 896 -#define MAX_MEMORY_RANGES 1024 +#define RAMDISK_ORIGIN_ADDR 0x800000 +#define INITRD_START_OFFS 0x408 +#define INITRD_SIZE_OFFS 0x410 +#define OLDMEM_BASE_OFFS 0x418 +#define OLDMEM_SIZE_OFFS 0x420 +#define MAX_COMMAND_LINESIZE_OFFS 0x430 +#define COMMAND_LINE_OFFS 0x480 +#define LEGACY_COMMAND_LINESIZE 896 +#define MAX_MEMORY_RANGES 1024 #define MAX(x, y) ((x) > (y) ? (x) : (y)) #define MIN(x, y) ((x) < (y) ? (x) : (y)) @@ -32,6 +33,6 @@ extern int load_crashdump_segments(struct kexec_info *info, unsigned long crash_end); extern int get_memory_ranges_s390(struct memory_range range[], int *ranges, int with_crashk); -extern int command_line_add(const char *str); +extern int command_line_add(struct kexec_info *info, const char *str); #endif /* KEXEC_S390_H */ |