Commit 7a9762bf authored by Eugene (jno) Dvurechenski's avatar Eugene (jno) Dvurechenski Committed by Cornelia Huck
Browse files

pc-bios/s390-ccw: add boot entry selection to El Torito routine



If there is no LOADPARM given or '0' specified, then IPL the first
matched entry. Otherwise IPL the matching entry of that number.

Signed-off-by: default avatarEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Signed-off-by: default avatarFarhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
parent 82ca3941
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -655,6 +655,7 @@ static IsoBcSection *find_iso_bc_entry(void)
    IsoBcEntry *e = (IsoBcEntry *)sec;
    uint32_t offset = find_iso_bc();
    int i;
    unsigned int loadparm = get_loadparm_index();

    if (!offset) {
        return NULL;
@@ -675,8 +676,12 @@ static IsoBcSection *find_iso_bc_entry(void)
    for (i = 1; i < ISO_BC_ENTRY_PER_SECTOR; i++) {
        if (e[i].id == ISO_BC_BOOTABLE_SECTION) {
            if (is_iso_bc_entry_compatible(&e[i].body.sect)) {
                if (loadparm <= 1) {
                    /* found, default, or unspecified */
                    return &e[i].body.sect;
                }
                loadparm--;
            }
        }
    }