mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 10:56:11 +07:00
724dc336b7
Try to print out startup pgm check info including exact linux kernel version, pgm interruption code and ilc, psw and general registers. Like the following: Linux version 5.3.0-rc7-07282-ge7b4d41d61bd-dirty (gor@tuxmaker) #3 SMP PREEMPT Thu Sep 5 16:07:34 CEST 2019 Kernel fault: interruption code 0005 ilc:2 PSW : 0000000180000000 0000000000012e52 R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 RI:0 EA:3 GPRS: 0000000000000000 00ffffffffffffff 0000000000000000 0000000000019a58 000000000000bf68 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 000000000001a041 0000000000000000 0000000004c9c000 0000000000010070 0000000000012e42 000000000000beb0 This info makes it apparent that kernel startup failed and might help to understand what went wrong without actual standalone dump. Printing code runs on its own stack of 1 page (at unused 0x5000), which should be sufficient for sclp_early_printk usage (typical stack usage observed has been around 512 bytes). The code has pgm check recursion prevention, despite pgm check info printing failure (follow on pgm check) or success it restores original faulty psw and gprs and does disabled wait. 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>
80 lines
2.5 KiB
Makefile
80 lines
2.5 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the linux s390-specific parts of the memory manager.
|
|
#
|
|
|
|
KCOV_INSTRUMENT := n
|
|
GCOV_PROFILE := n
|
|
UBSAN_SANITIZE := n
|
|
KASAN_SANITIZE := n
|
|
|
|
KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR)
|
|
KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR)
|
|
|
|
#
|
|
# Use minimum architecture for als.c to be able to print an error
|
|
# message if the kernel is started on a machine which is too old
|
|
#
|
|
ifndef CONFIG_CC_IS_CLANG
|
|
CC_FLAGS_MARCH_MINIMUM := -march=z900
|
|
else
|
|
CC_FLAGS_MARCH_MINIMUM := -march=z10
|
|
endif
|
|
|
|
ifneq ($(CC_FLAGS_MARCH),$(CC_FLAGS_MARCH_MINIMUM))
|
|
AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH)
|
|
AFLAGS_head.o += $(CC_FLAGS_MARCH_MINIMUM)
|
|
AFLAGS_REMOVE_mem.o += $(CC_FLAGS_MARCH)
|
|
AFLAGS_mem.o += $(CC_FLAGS_MARCH_MINIMUM)
|
|
CFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH)
|
|
CFLAGS_als.o += $(CC_FLAGS_MARCH_MINIMUM)
|
|
CFLAGS_REMOVE_sclp_early_core.o += $(CC_FLAGS_MARCH)
|
|
CFLAGS_sclp_early_core.o += $(CC_FLAGS_MARCH_MINIMUM)
|
|
endif
|
|
|
|
CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char
|
|
|
|
obj-y := head.o als.o startup.o mem_detect.o ipl_parm.o ipl_report.o
|
|
obj-y += string.o ebcdic.o sclp_early_core.o mem.o ipl_vmparm.o cmdline.o
|
|
obj-y += version.o pgm_check_info.o ctype.o text_dma.o
|
|
obj-$(CONFIG_PROTECTED_VIRTUALIZATION_GUEST) += uv.o
|
|
obj-$(CONFIG_RELOCATABLE) += machine_kexec_reloc.o
|
|
obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
|
|
targets := bzImage startup.a section_cmp.boot.data section_cmp.boot.preserved.data $(obj-y)
|
|
subdir- := compressed
|
|
|
|
OBJECTS := $(addprefix $(obj)/,$(obj-y))
|
|
|
|
quiet_cmd_section_cmp = SECTCMP $*
|
|
define cmd_section_cmp
|
|
s1=`$(OBJDUMP) -t -j "$*" "$<" | sort | \
|
|
sed -n "/0000000000000000/! s/.*\s$*\s\+//p" | sha256sum`; \
|
|
s2=`$(OBJDUMP) -t -j "$*" "$(word 2,$^)" | sort | \
|
|
sed -n "/0000000000000000/! s/.*\s$*\s\+//p" | sha256sum`; \
|
|
if [ "$$s1" != "$$s2" ]; then \
|
|
echo "error: section $* differs between $< and $(word 2,$^)" >&2; \
|
|
exit 1; \
|
|
fi; \
|
|
touch $@
|
|
endef
|
|
|
|
$(obj)/bzImage: $(obj)/compressed/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.boot.preserved.data FORCE
|
|
$(call if_changed,objcopy)
|
|
|
|
$(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE
|
|
$(call if_changed,section_cmp)
|
|
|
|
$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE
|
|
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
|
|
|
|
$(obj)/startup.a: $(OBJECTS) FORCE
|
|
$(call if_changed,ar)
|
|
|
|
install: $(CONFIGURE) $(obj)/bzImage
|
|
sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
|
|
System.map "$(INSTALL_PATH)"
|
|
|
|
chkbss := $(obj-y)
|
|
chkbss-target := startup.a
|
|
include $(srctree)/arch/s390/scripts/Makefile.chkbss
|