linux/arch/s390/boot
Vasily Gorbik 6abe281970 s390: enable detection of kernel version from bzImage
Extend "parmarea" to include an offset of the version string, which is
stored as 8-byte big endian value.

To retrieve version string from bzImage reliably, one should check the
presence of "S390EP" ascii string at 0x10008 (available since v3.2),
then read the version string offset from 0x10428 (which has been 0
since v3.2 up to now). The string is null terminated.

Could be retrieved with the following "file" command magic (requires
file v5.34):
8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
>0x10008       string          S390EP
>>0x10428      bequad          >0
>>>(0x10428.Q) string          >\0             \b, version %s

Reported-by: Petr Tesarik <ptesarik@suse.com>
Suggested-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2019-07-23 10:43:50 +02:00
..
compressed s390/boot: fix compiler error due to missing awk strtonum 2019-05-07 14:37:14 +02:00
.gitignore s390: introduce .boot.data section compile time validation 2018-10-09 11:21:08 +02:00
als.c s390: simplify disabled_wait 2019-05-02 13:54:11 +02:00
boot.h s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00
cmdline.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
ctype.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
ebcdic.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
head_kdump.S s390/boot: make head.S and als.c be part of the decompressor only 2018-06-25 10:14:38 +02:00
head.S s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00
install.sh s390: Remove redundant license text 2017-11-24 15:37:24 +01:00
ipl_parm.c s390: fix clang -Wpointer-sign warnigns in boot code 2019-05-03 17:17:58 +02:00
ipl_report.c s390/ipl: read IPL report at early boot 2019-04-26 12:34:05 +02:00
ipl_vmparm.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
kaslr.c s390/kernel: add support for kernel address space layout randomization (KASLR) 2019-04-29 10:47:10 +02:00
machine_kexec_reloc.c s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
Makefile s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00
mem_detect.c s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) 2019-03-29 07:23:44 +01:00
mem.S s390/decompressor: reuse lib/mem.S for mem functions 2018-06-25 10:14:39 +02:00
sclp_early_core.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
startup.c s390: simplify disabled_wait 2019-05-02 13:54:11 +02:00
string.c s390/kasan: improve string/memory functions checks 2019-01-18 09:34:18 +01:00
text_dma.S s390: use proper expoline sections for .dma code 2019-05-02 13:54:11 +02:00
uv.c s390/uv: introduce guest side ultravisor code 2019-04-10 17:47:21 +02:00
version.c s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00