aboutsummaryrefslogtreecommitdiff
path: root/pc-bios
diff options
context:
space:
mode:
authorEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>2016-04-18 13:45:36 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-05-02 15:08:54 +0200
commit7a9762bf89a490d82cd8de3dc7a973f8df3f1efe (patch)
tree5710769efe531c9f95a0845911d6ea3a6faab6fb /pc-bios
parent82ca394194342dd050034e25c5a61a854d82911a (diff)
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: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/s390-ccw/bootmap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index e974350b6f..523fa78c5f 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -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,7 +676,11 @@ 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)) {
- return &e[i].body.sect;
+ if (loadparm <= 1) {
+ /* found, default, or unspecified */
+ return &e[i].body.sect;
+ }
+ loadparm--;
}
}
}