[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/15] s390-bios: Use control unit type to determine
From: |
Jason J. Herne |
Subject: |
[Qemu-devel] [PATCH 13/15] s390-bios: Use control unit type to determine boot method |
Date: |
Tue, 29 Jan 2019 08:29:20 -0500 |
The boot method is different depending on which device type we are
booting from. Let's examine the control unit type to determine if we're
a virtio device. We'll eventually add a case to check for a real dasd device
here as well.
Signed-off-by: Jason J. Herne <address@hidden>
---
pc-bios/s390-ccw/main.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index fa90aa3..5ee02c3 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -200,13 +200,24 @@ static void virtio_setup(void)
int main(void)
{
+ uint16_t cutype;
+
sclp_setup();
css_setup();
boot_setup();
find_boot_device();
+ enable_subchannel(blk_schid);
- virtio_setup();
- zipl_load(); /* no return */
+ cutype = cu_type(blk_schid) ;
+ switch (cutype) {
+ case CU_TYPE_VIRTIO:
+ virtio_setup();
+ zipl_load(); /* no return */
+ break;
+ default:
+ print_int("Attempting to boot from unexpected device type", cutype);
+ panic("");
+ }
panic("Failed to load OS from hard disk\n");
return 0; /* make compiler happy */
--
2.7.4
- Re: [Qemu-devel] [PATCH 03/15] s390-bios: decouple common boot logic from virtio, (continued)
- [Qemu-devel] [PATCH 08/15] s390-bios: Map low core memory, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 06/15] s390-bios: Clean up cio.h, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 10/15] s390-bios: Support for running format-0/1 channel programs, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 02/15] s390-bios: decouple cio setup from virtio, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 11/15] s390-bios: cio error handling, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 04/15] s390-bios: Extend find_dev() for non-virtio devices, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 13/15] s390-bios: Use control unit type to determine boot method,
Jason J. Herne <=
- [Qemu-devel] [PATCH 15/15] s390-bios: Support booting from real dasd device, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 09/15] s390-bios: ptr2u32 and u32toptr, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 12/15] s390-bios: Refactor virtio to run channel programs via cio, Jason J. Herne, 2019/01/29
- [Qemu-devel] [PATCH 14/15] s390-bios: Add channel command codes/structs needed for dasd-ipl, Jason J. Herne, 2019/01/29
- Re: [Qemu-devel] [qemu-s390x] [PATCH 00/15] s390: vfio-ccw dasd ipl support, Jason J. Herne, 2019/01/29
- Re: [Qemu-devel] [PATCH 00/15] s390: vfio-ccw dasd ipl support, no-reply, 2019/01/31