Commit 87f910c1 authored by Jason J. Herne's avatar Jason J. Herne Committed by Thomas Huth
Browse files

s390-bios: decouple cio setup from virtio



Move channel i/o setup code out to a separate function. This decouples cio
setup from the virtio code path and allows us to make use of it for booting
dasd devices.

Signed-off-by: default avatarJason J. Herne <jjherne@linux.ibm.com>
Acked-by: default avatarHalil Pasic <pasic@linux.vnet.ibm.com>
Reviewed-by: default avatarCollin Walling <walling@linux.ibm.com>
Reviewed-by: default avatarFarhan Ali <alifm@linux.ibm.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Message-Id: <1554388475-18329-3-git-send-email-jjherne@linux.ibm.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 44445d86
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -99,6 +99,18 @@ static void menu_setup(void)
    }
}

/*
 * Initialize the channel I/O subsystem so we can talk to our ipl/boot device.
 */
static void css_setup(void)
{
    /*
     * Unconditionally enable mss support. In every sane configuration this
     * will succeed; and even if it doesn't, stsch_err() can handle it.
     */
    enable_mss_facility();
}

static void virtio_setup(void)
{
    Schib schib;
@@ -109,13 +121,6 @@ static void virtio_setup(void)
    VDev *vdev = virtio_get_device();
    QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS;

    /*
     * We unconditionally enable mss support. In every sane configuration,
     * this will succeed; and even if it doesn't, stsch_err() can deal
     * with the consequences.
     */
    enable_mss_facility();

    sclp_get_loadparm_ascii(loadparm_str);
    memcpy(ldp + 10, loadparm_str, LOADPARM_LEN);
    sclp_print(ldp);
@@ -168,6 +173,7 @@ static void virtio_setup(void)
int main(void)
{
    sclp_setup();
    css_setup();
    virtio_setup();

    zipl_load(); /* no return */