aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/main.c
diff options
context:
space:
mode:
authorEric Farman <farman@linux.ibm.com>2020-11-20 17:01:17 +0100
committerThomas Huth <thuth@redhat.com>2020-11-23 09:48:45 +0100
commit3d6519968bb10260fc724c491fb4275f7c0b78ac (patch)
treec767bea95bd19206d5eda847d298cef0d5277b34 /pc-bios/s390-ccw/main.c
parentd8e5bbdd0d6fa8d9b5ac15de62c87105d92ff558 (diff)
downloadqemu-3d6519968bb10260fc724c491fb4275f7c0b78ac.zip
qemu-3d6519968bb10260fc724c491fb4275f7c0b78ac.tar.gz
qemu-3d6519968bb10260fc724c491fb4275f7c0b78ac.tar.bz2
pc-bios: s390x: Clear out leftover S390EP string
A Linux binary will have the string "S390EP" at address 0x10008, which is important in getting the guest up off the ground. In the case of a reboot (specifically chreipl going to a new device), we should defer to the PSW at address zero for the new config, which will re-write "S390EP" from the new image. Let's clear it out at this point so that a reipl to, say, a DASD passthrough device drives the IPL path from scratch without disrupting disrupting the order of operations for other boots. Rather than hardcoding the address of this magic (again), let's define it somewhere so that the two users are visibly related. Signed-off-by: Eric Farman <farman@linux.ibm.com> Message-Id: <20201120160117.59366-3-farman@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/main.c')
-rw-r--r--pc-bios/s390-ccw/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index fc4bfaa..5d2b7ba 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -178,6 +178,12 @@ static void boot_setup(void)
memcpy(lpmsg + 10, loadparm_str, 8);
sclp_print(lpmsg);
+ /*
+ * Clear out any potential S390EP magic (see jump_to_low_kernel()),
+ * so we don't taint our decision-making process during a reboot.
+ */
+ memset((char *)S390EP, 0, 6);
+
have_iplb = store_iplb(&iplb);
}