[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/12] pc-bios/s390-ccw: provide entry selection on L
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 08/12] pc-bios/s390-ccw: provide entry selection on LOADPARM for SCSI disk |
Date: |
Tue, 2 May 2017 15:36:00 +0200 |
From: Farhan Ali <address@hidden>
Fix SCSI bootmap interpreter to make use of any specified entry of the
Program Table using the leftmost numeric value from the LOADPARM, if specified.
Initial patch from Eugene (jno) Dvurechenski.
Signed-off-by: Eugene (jno) Dvurechenski <address@hidden>
Signed-off-by: Farhan Ali <address@hidden>
Reviewed-by: Christian Borntraeger <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
pc-bios/s390-ccw/bootmap.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index b21c877b53..e39e67e07b 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -444,7 +444,8 @@ static void ipl_scsi(void)
uint8_t *ns, *ns_end;
int program_table_entries = 0;
const int pte_len = sizeof(ScsiBlockPtr);
- ScsiBlockPtr *prog_table_entry;
+ ScsiBlockPtr *prog_table_entry = NULL;
+ unsigned int loadparm = get_loadparm_index();
/* Grab the MBR */
memset(sec, FREE_SPACE_FILLER, sizeof(sec));
@@ -467,6 +468,7 @@ static void ipl_scsi(void)
IPL_assert(magic_match(sec, ZIPL_MAGIC), "No zIPL magic in PT");
+ debug_print_int("loadparm index", loadparm);
ns_end = sec + virtio_get_block_size();
for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns += pte_len) {
prog_table_entry = (ScsiBlockPtr *)ns;
@@ -475,16 +477,15 @@ static void ipl_scsi(void)
}
program_table_entries++;
+ if (program_table_entries == loadparm + 1) {
+ break; /* selected entry found */
+ }
}
debug_print_int("program table entries", program_table_entries);
IPL_assert(program_table_entries != 0, "Empty Program Table");
- /* Run the default entry */
-
- prog_table_entry = (ScsiBlockPtr *)(sec + pte_len);
-
zipl_run(prog_table_entry); /* no return */
}
--
2.11.0
- [Qemu-devel] [PULL 00/12] next batch of s390x patches, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 02/12] hw/s390x/ipl: enable LOADPARM in IPIB for a boot device, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 04/12] util/qemu-config: Add loadparm to qemu machine_opts, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 03/12] hw/s390x/sclp: update LOADPARM in SCP Info, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 06/12] pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 07/12] pc-bios/s390-ccw: provide a function to interpret LOADPARM value, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 05/12] pc-bios/s390-ccw: Make ebcdic/ascii conversion public, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 01/12] hw/s390x: provide loadparm property for the machine, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 08/12] pc-bios/s390-ccw: provide entry selection on LOADPARM for SCSI disk,
Cornelia Huck <=
- [Qemu-devel] [PULL 10/12] pc-bios/s390-ccw: add boot entry selection to El Torito routine, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 09/12] pc-bios/s390-ccw: add boot entry selection for ECKD DASD, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 11/12] pc-bios/s390-ccw.img: update image, Cornelia Huck, 2017/05/02
- [Qemu-devel] [PULL 12/12] hw/s390x/ipl: Fix crash with virtio-scsi-pci device, Cornelia Huck, 2017/05/02
- Re: [Qemu-devel] [PULL 00/12] next batch of s390x patches, Stefan Hajnoczi, 2017/05/05