diff options
author | Helge Deller <deller@gmx.de> | 2022-05-14 22:09:22 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-05-14 22:19:36 +0200 |
commit | 1314c8b0bfb8d3b3be145936073ed2fec8adf8f9 (patch) | |
tree | 67d6fbdca847f2ba78f784b12f49bece6a822f45 /src/boot.c | |
parent | f5c0ce4a292a41aeee7cca238ceffc66ed4b0de6 (diff) | |
download | seabios-hppa-1314c8b0bfb8d3b3be145936073ed2fec8adf8f9.zip seabios-hppa-1314c8b0bfb8d3b3be145936073ed2fec8adf8f9.tar.gz seabios-hppa-1314c8b0bfb8d3b3be145936073ed2fec8adf8f9.tar.bz2 |
parisc: Add full PDC firmware boot menu
Finally add the real boot menu.
If qemu is started with the "-boot menu=on" option, the PDC boot menu is
shown and the user can then boot any of the available SCSI disc/CDs.
Just type "BOOT" (to boot the default device), or "BOOT FWSCSI.4" (to boot
SCSI device #4).
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src/boot.c')
-rw-r--r-- | src/boot.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -795,6 +795,17 @@ interactive_bootmenu(void) } #if CONFIG_PARISC +int parisc_get_scsi_target(struct drive_s **boot_drive, int target) +{ + struct bootentry_s *pos; + hlist_for_each_entry(pos, &BootList, node) { + if (pos->drive->target != target) + continue; + *boot_drive = pos->drive; + return 1; + } + return 0; +} void find_initial_parisc_boot_drives(struct drive_s **harddisc, struct drive_s **cdrom) { @@ -809,15 +820,13 @@ void find_initial_parisc_boot_drives(struct drive_s **harddisc, struct drive_s *select_parisc_boot_drive(char bootdrive) { - printf("Available boot devices:\n"); + printf(" Available boot devices:\n"); // Show menu items - int maxmenu = 0; struct bootentry_s *pos; hlist_for_each_entry(pos, &BootList, node) { char desc[77]; - maxmenu++; - printf("%d. %s\n", maxmenu + printf(" FWSCSI.%d.0 : %s\n", pos->drive->target , strtcpy(desc, pos->description, ARRAY_SIZE(desc))); } @@ -825,15 +834,14 @@ struct drive_s *select_parisc_boot_drive(char bootdrive) hlist_for_each_entry(pos, &BootList, node) { if (((bootdrive == 'd') && (pos->type == IPL_TYPE_CDROM)) || ((bootdrive == 'c') && (pos->type == IPL_TYPE_HARDDISK))) { - printf("\nBooting from %s\n",pos->description); + // printf("\nBooting from %s\n",pos->description); return pos->drive; } /* -boot order=g-m: machine implementation dependent drives */ if ((bootdrive >= 'g') && (bootdrive <= 'm')) { int scsi_index = (int)bootdrive - 'g'; if (pos->drive->target == scsi_index) { - printf("\nBooting from SCSI target %d: %s\n", - scsi_index, pos->description); + // printf("\nBooting from SCSI target %d: %s\n", scsi_index, pos->description); return pos->drive; } } @@ -842,7 +850,7 @@ struct drive_s *select_parisc_boot_drive(char bootdrive) hlist_for_each_entry(pos, &BootList, node) { if ((pos->type == IPL_TYPE_CDROM) || (pos->type == IPL_TYPE_HARDDISK)) { - printf("\nAuto-Booting from %s\n",pos->description); + // printf("\nAuto-Booting from %s\n",pos->description); return pos->drive; } } |