[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 12/15] s390-bios: Use control unit type to determine b
From: |
Jason J. Herne |
Subject: |
[Qemu-devel] [RFC 12/15] s390-bios: Use control unit type to determine boot method |
Date: |
Thu, 5 Jul 2018 13:25:40 -0400 |
From: "Jason J. Herne" <address@hidden>
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>
Signed-off-by: Jason J. Herne <address@hidden>
---
pc-bios/s390-ccw/main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index 20c30c6..e4236c0 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -204,9 +204,16 @@ int main(void)
cio_setup();
boot_setup();
find_boot_device();
+ enable_subchannel(blk_schid);
- virtio_setup();
- zipl_load(); /* no return */
+ switch (cu_type(blk_schid)) {
+ case 0x3832: /* Virtio device */
+ virtio_setup();
+ zipl_load(); /* no return */
+ break;
+ default:
+ panic("Attempting to boot from unexpected device type\n");
+ }
panic("Failed to load OS from hard disk\n");
return 0; /* make compiler happy */
--
2.7.4
- Re: [Qemu-devel] [RFC 10/15] s390-bios: Support for running format-0/1 channel programs, (continued)
- [Qemu-devel] [RFC 04/15] s390-bios: Extend find_dev() for non-virtio devices, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 13/15] s390-bios: Add channel command codes/structs needed for dasd-ipl, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 09/15] s390-bios: ptr2u32 and u32toptr, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 15/15] s390-bios: Use sense ccw to ensure consistent device state at boot time, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 05/15] s390-bios: Factor finding boot device out of virtio code path, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 12/15] s390-bios: Use control unit type to determine boot method,
Jason J. Herne <=
- [Qemu-devel] [RFC 02/15] s390-bios: decouple cio setup from virtio, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 11/15] s390-bios: Refactor virtio to run channel programs via cio, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 03/15] s390-bios: decouple common boot logic from virtio, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 07/15] s390-bios: Decouple channel i/o logic from virtio, Jason J. Herne, 2018/07/05
- [Qemu-devel] [RFC 14/15] s390-bios: Support booting from real dasd device, Jason J. Herne, 2018/07/05