@@ -10,7 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)
.PHONY : all clean build-all libc.a libnet.a
OBJECTS = start.o main.o bootmap.o sclp.o virtio.o virtio-scsi.o virtio-net.o
-OBJECTS += libc.a sbrk.o
+OBJECTS += libnet.a libc.a sbrk.o
QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
@@ -11,6 +11,7 @@
#include "s390-ccw.h"
#include "bootmap.h"
#include "virtio.h"
+#include "libnet/netapps.h"
#ifdef DEBUG
/* #define DEBUG_FALLBACK */
@@ -744,7 +745,14 @@ void zipl_load(void)
}
if (virtio_get_device_type() == VIRTIO_ID_NET) {
- jump_to_IPL_code(vdev->netboot_start_addr);
+ long len;
+
+ len = netload();
+ if (len < 0) {
+ panic("Network loading failed");
+ }
+ sclp_print("Netload done, starting kernel...\n");
+ asm volatile (" lpsw 0(%0) " : : "r"(0) : "memory");
}
ipl_scsi();
@@ -150,12 +150,11 @@ static void virtio_setup(void)
IPL_assert(found, "No virtio device found");
+ virtio_setup_device(blk_schid);
if (virtio_get_device_type() == VIRTIO_ID_NET) {
sclp_print("Network boot device detected\n");
vdev->netboot_start_addr = iplb.ccw.netboot_start_addr;
} else {
- virtio_setup_device(blk_schid);
-
IPL_assert(virtio_ipl_disk_is_valid(), "No valid IPL device detected");
}
}
Link the libnet.a to the s390-ccw.elf file, call netload() instead of the external network boot image, and jump to loaded kernel at address 0, so that we can finally do a full network boot with the s390-ccw firmware now. Signed-off-by: Thomas Huth <thuth@redhat.com> --- pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/bootmap.c | 10 +++++++++- pc-bios/s390-ccw/main.c | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-)