qemu/pc-bios/s390-ccw
Thomas Huth 9a848adf45 pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS
The netboot firmware so far simply jumped directly into the OS kernel
after the download has been completed. This, however, bears the risk
that the virtio-net device still might be active in the background and
incoming packets are still placed into the buffers - which could destroy
memory of the now-running Linux kernel in case it did not take over the
device fast enough. Also the SCLP console is not put into a well-defined
state here. We should hand over the system in a clean state when jumping
into the kernel, so let's use the same mechanism as it's done in the
main s390-ccw firmware and reset the machine with diag308 into a clean
state before jumping into the OS kernel code. To be able to share the
code with the main s390-ccw firmware, the related functions are now
extracted from bootmap.c into a new file called jump2ipl.c.

Since we now also set the boot device schid at address 184 for the network
boot device, this patch also slightly changes the way how we detect the
entry points for non-ELF binary images: The code now looks for the "S390EP"
magic first and then jumps to 0x10000 in case it has been found. This is
necessary for booting from network devices, since the normal kernel code
(where the PSW at ddress 0 points to) tries to do a block load from the
boot device. This of course fails for a virtio-net device and causes the
kernel to abort with a panic-PSW silently.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-05-02 11:27:14 +02:00
..
bootmap.c pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
bootmap.h pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
bswap.h pc-bios/s390-ccw: Move byteswap functions to a separate header 2017-07-14 12:29:48 +02:00
cio.h s390-ccw: Fix alignment for CCW1 2017-08-30 18:23:26 +02:00
iplb.h s390: Do not pass inofficial IPL type to the guest 2018-04-09 13:50:31 +02:00
jump2ipl.c pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
libc.c pc-bios/s390-ccw: size_t should be unsigned 2018-05-02 11:27:14 +02:00
libc.h pc-bios/s390-ccw: size_t should be unsigned 2018-05-02 11:27:14 +02:00
main.c pc-bios/s390-ccw: fix loadparm initialization and int conversion 2018-05-02 11:27:14 +02:00
Makefile pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
menu.c pc-bios/s390-ccw: fix non-sequential boot entries (enum) 2018-05-02 11:27:14 +02:00
netboot.mak pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
netmain.c pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
s390-ccw.h pc-bios/s390-ccw/net: Use diag308 to reset machine before jumping to the OS 2018-05-02 11:27:14 +02:00
sclp.c s390-ccw: set cp_receive mask only when needed and consume pending service irqs 2018-02-26 07:56:55 +01:00
sclp.h pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info 2017-05-02 15:08:54 +02:00
scsi.h pc-bios/s390-ccw: Get Block Limits VPD device data 2017-05-19 12:29:01 +02:00
start.S pc-bios/s390-ccw: zero out bss section 2017-12-14 17:56:54 +01:00
virtio-blkdev.c pc-bios/s390-ccw: Move virtio-block related functions into a separate file 2017-07-14 12:29:48 +02:00
virtio-net.c pc-bios/s390-ccw: Add virtio-net driver code 2017-07-14 12:29:48 +02:00
virtio-scsi.c pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when rebooting 2017-11-20 10:35:12 +01:00
virtio-scsi.h pc-bios/s390-ccw: Build a reasonable max_sectors limit 2017-05-19 12:29:01 +02:00
virtio.c pc-bios/s390-ccw: Increase virtio timeout to 30 seconds 2018-04-03 10:03:38 +02:00
virtio.h pc-bios/s390-ccw: Add virtio-net driver code 2017-07-14 12:29:48 +02:00