@@ -558,15 +558,18 @@ 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");
+ if (menu_is_enabled()) {
+ loadparm = menu_get_enum_boot_index(program_table_entries);
+ }
+
+ prog_table_entry = (ScsiBlockPtr *)(sec + pte_len * (loadparm + 1));
+
zipl_run(prog_table_entry); /* no return */
}
@@ -96,6 +96,20 @@ int menu_get_zipl_boot_index(const char *data)
return menu_get_boot_index(i - 1);
}
+int menu_get_enum_boot_index(int entries)
+{
+ char tmp[4];
+
+ sclp_print("s390x Enumerated Boot Menu.\n\n");
+
+ sclp_print(itostr(entries, tmp));
+ sclp_print(" entries detected. Select from boot index 0 to ");
+ sclp_print(itostr(entries - 1, tmp));
+ sclp_print(".\n\n");
+
+ return menu_get_boot_index(entries);
+}
+
void menu_enable(uint16_t boot_menu_timeout)
{
timeout = boot_menu_timeout;
@@ -89,6 +89,7 @@ void zipl_load(void);
void menu_enable(uint16_t boot_menu_timeout);
int menu_is_enabled(void);
int menu_get_zipl_boot_index(const char *data);
+int menu_get_enum_boot_index(int entries);
static inline void fill_hex(char *out, unsigned char val)
{
Interactive boot menu for scsi. This follows the same procedure as the interactive menu for eckd dasd. An example follows: s390x Enumerated Boot Menu. 3 entries detected. Select from index 0 to 2. Please choose: Signed-off-by: Collin L. Walling <walling@linux.vnet.ibm.com> --- pc-bios/s390-ccw/bootmap.c | 9 ++++++--- pc-bios/s390-ccw/menu.c | 14 ++++++++++++++ pc-bios/s390-ccw/s390-ccw.h | 1 + 3 files changed, 21 insertions(+), 3 deletions(-)