From: "Collin L. Walling" <walling@linux.vnet.ibm.com>
To: borntraeger@de.ibm.com, frankja@linux.vnet.ibm.com,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v1 5/5] s390-ccw: interactive boot menu for scsi
Date: Mon, 27 Nov 2017 15:55:36 -0500 [thread overview]
Message-ID: <1511816136-30068-6-git-send-email-walling@linux.vnet.ibm.com> (raw)
In-Reply-To: <1511816136-30068-1-git-send-email-walling@linux.vnet.ibm.com>
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 ++++++---
| 14 ++++++++++++++
pc-bios/s390-ccw/s390-ccw.h | 1 +
3 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index 3aea6e0..a917e9d 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -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 */
}
--git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
index 0bd0be6..cb82d61 100644
--- a/pc-bios/s390-ccw/menu.c
+++ b/pc-bios/s390-ccw/menu.c
@@ -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;
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index 3a9c873..1a410a6 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -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)
{
--
2.7.4
next prev parent reply other threads:[~2017-11-27 20:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 20:55 [Qemu-devel] [PATCH v1 0/5] (FIXED) Interactive Boot Menu for DASD and SCSI Guests on s390x Collin L. Walling
2017-11-27 20:55 ` [Qemu-devel] [PATCH v1 1/5] s390-ccw: update libc.h Collin L. Walling
2017-11-28 10:45 ` Cornelia Huck
2017-11-28 15:36 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2017-11-28 11:32 ` Thomas Huth
2017-11-27 20:55 ` [Qemu-devel] [PATCH v1 2/5] s390-ccw: ipl structs for eckd cdl/ldl Collin L. Walling
2017-11-28 10:48 ` Cornelia Huck
2017-11-28 15:42 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2017-11-28 16:41 ` Cornelia Huck
2017-11-27 20:55 ` [Qemu-devel] [PATCH v1 3/5] s390-ccw: parse and set boot menu options Collin L. Walling
2017-11-28 11:04 ` Cornelia Huck
2017-11-28 16:00 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2017-11-28 11:45 ` Thomas Huth
2017-11-28 16:02 ` Collin L. Walling
2017-11-29 22:28 ` David Hildenbrand
2017-11-29 22:33 ` Collin L. Walling
2017-11-30 15:52 ` David Hildenbrand
2017-11-30 16:05 ` Cornelia Huck
2017-11-27 20:55 ` [Qemu-devel] [PATCH v1 4/5] s390-ccw: interactive boot menu for eckd dasd Collin L. Walling
2017-11-28 12:36 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2017-11-28 12:45 ` Cornelia Huck
2017-11-28 16:31 ` Collin L. Walling
2017-11-27 20:55 ` Collin L. Walling [this message]
2017-11-28 10:35 ` [Qemu-devel] [PATCH v1 0/5] (FIXED) Interactive Boot Menu for DASD and SCSI Guests on s390x Cornelia Huck
2017-11-28 16:35 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2017-11-28 16:42 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1511816136-30068-6-git-send-email-walling@linux.vnet.ibm.com \
--to=walling@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).