diff options
author | Jared Rossi <jrossi@linux.ibm.com> | 2024-10-19 21:29:36 -0400 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-10-23 06:53:44 +0200 |
commit | 9f4278837dc770266c8a026696dd91a525dd2682 (patch) | |
tree | a41896d5728f41a7b64f926831908466ac82a111 /pc-bios/s390-ccw/main.c | |
parent | abaabb2e601adfe296a64471746a997eabcc607f (diff) | |
download | qemu-9f4278837dc770266c8a026696dd91a525dd2682.zip qemu-9f4278837dc770266c8a026696dd91a525dd2682.tar.gz qemu-9f4278837dc770266c8a026696dd91a525dd2682.tar.bz2 |
pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints
We are already using the libc from SLOF for the s390-netboot.img, and
this libc implementation is way more complete and accurate than the
simple implementation that we currently use for the s390-ccw.img binary.
Since we are now always assuming that the SLOF submodule is available
when building the s390-ccw bios (see commit bf6903f6944f), we can drop
the simple implementation and use the SLOF libc for the s390-ccw.img
binary, too.
Additionally replace sclp_print calls with puts/printf now that it is
available.
Co-authored by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jared Rossi <jrossi@linux.ibm.com>
Message-ID: <20241020012953.1380075-3-jrossi@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/main.c')
-rw-r--r-- | pc-bios/s390-ccw/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c index 5506798..203df20 100644 --- a/pc-bios/s390-ccw/main.c +++ b/pc-bios/s390-ccw/main.c @@ -8,7 +8,9 @@ * directory. */ -#include "libc.h" +#include <stdlib.h> +#include <string.h> +#include <stdio.h> #include "helper.h" #include "s390-arch.h" #include "s390-ccw.h" @@ -50,7 +52,7 @@ void write_iplb_location(void) unsigned int get_loadparm_index(void) { - return atoui(loadparm_str); + return atoi(loadparm_str); } static int is_dev_possibly_bootable(int dev_no, int sch_no) @@ -176,7 +178,7 @@ static void boot_setup(void) sclp_get_loadparm_ascii(loadparm_str); memcpy(lpmsg + 10, loadparm_str, 8); - sclp_print(lpmsg); + puts(lpmsg); /* * Clear out any potential S390EP magic (see jump_to_low_kernel()), @@ -228,7 +230,7 @@ static int virtio_setup(void) switch (vdev->senseid.cu_model) { case VIRTIO_ID_NET: - sclp_print("Network boot device detected\n"); + puts("Network boot device detected"); vdev->netboot_start_addr = qipl.netboot_start_addr; return 0; case VIRTIO_ID_BLOCK: @@ -261,7 +263,7 @@ static void ipl_boot_device(void) } break; default: - print_int("Attempting to boot from unexpected device type", cutype); + printf("Attempting to boot from unexpected device type 0x%X\n", cutype); panic("\nBoot failed.\n"); } } @@ -287,7 +289,7 @@ static void probe_boot_device(void) } } - sclp_print("Could not find a suitable boot device (none specified)\n"); + puts("Could not find a suitable boot device (none specified)"); } void main(void) |