]>
git.proxmox.com Git - qemu.git/blob - pc-bios/s390-ccw/main.c
2 * S390 virtio-ccw loading program
4 * Copyright (c) 2013 Alexander Graf <agraf@suse.de>
6 * This work is licensed under the terms of the GNU GPL, version 2 or (at
7 * your option) any later version. See the COPYING file in the top-level
13 struct subchannel_id blk_schid
;
14 char stack
[PAGE_SIZE
* 8] __attribute__((__aligned__(PAGE_SIZE
)));
17 void virtio_panic(const char *string
)
24 static void virtio_setup(uint64_t dev_info
)
30 bool check_devno
= false;
36 dev_no
= dev_info
& 0xffff;
37 debug_print_int("device no. ", dev_no
);
38 blk_schid
.ssid
= (dev_info
>> 16) & 0x3;
39 if (blk_schid
.ssid
!= 0) {
40 debug_print_int("ssid ", blk_schid
.ssid
);
41 if (enable_mss_facility() != 0) {
42 virtio_panic("Failed to enable mss facility\n");
47 for (i
= 0; i
< 0x10000; i
++) {
49 r
= stsch_err(blk_schid
, &schib
);
54 if (!check_devno
|| (schib
.pmcw
.dev
== dev_no
)) {
55 if (virtio_is_blk(blk_schid
)) {
64 virtio_panic("No virtio-blk device found!\n");
67 virtio_setup_block(blk_schid
);
73 debug_print_int("boot reg[7] ", boot_value
);
74 virtio_setup(boot_value
);
77 sclp_print("Failed to load OS from hard disk\n");