aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/main.c
diff options
context:
space:
mode:
authorEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>2014-05-19 20:11:07 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2014-06-27 12:10:28 +0200
commit60612d5cbbf0e02123214f4a2d7d20f7dd87925e (patch)
tree08c316558f3869517dc3f17b8e4bc59eb79cd1ab /pc-bios/s390-ccw/main.c
parenta94b485e17dab77d96a8b958305e485c3b9a7a91 (diff)
pc-bios/s390-ccw: Unify error handling
Convert to IPL_assert and friends Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'pc-bios/s390-ccw/main.c')
-rw-r--r--pc-bios/s390-ccw/main.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index 5c33766533..dbfb40e685 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -9,6 +9,7 @@
*/
#include "s390-ccw.h"
+#include "virtio.h"
char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
uint64_t boot_value;
@@ -64,6 +65,10 @@ static void virtio_setup(uint64_t dev_info)
}
virtio_setup_block(blk_schid);
+
+ if (!virtio_ipl_disk_is_valid()) {
+ virtio_panic("No valid hard disk detected.\n");
+ }
}
int main(void)
@@ -72,8 +77,8 @@ int main(void)
debug_print_int("boot reg[7] ", boot_value);
virtio_setup(boot_value);
- if (zipl_load() < 0)
- sclp_print("Failed to load OS from hard disk\n");
- disabled_wait();
- while (1) { }
+ zipl_load(); /* no return */
+
+ virtio_panic("Failed to load OS from hard disk\n");
+ return 0; /* make compiler happy */
}