The current code is limited to having a single hard drive in the list
of devices that are probed for boot. Allow adding multiple hard drives
by adding each of them in the list of boot devices and passing along
their ID.

Signed-off-by: Julian Stecklina <[email protected]>
---
 src/boot.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/boot.c b/src/boot.c
index ff705fd..5392457 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -537,13 +537,11 @@ struct bev_s {
 };
 static struct bev_s BEV[20];
 static int BEVCount;
-static int HaveHDBoot, HaveFDBoot;
+static int HaveFDBoot;
 
 static void
 add_bev(int type, u32 vector)
 {
-    if (type == IPL_TYPE_HARDDISK && HaveHDBoot++)
-        return;
     if (type == IPL_TYPE_FLOPPY && HaveFDBoot++)
         return;
     if (BEVCount >= ARRAY_SIZE(BEV))
@@ -578,7 +576,7 @@ bcv_prepboot(void)
             break;
         case IPL_TYPE_HARDDISK:
             map_hd_drive(pos->drive);
-            add_bev(IPL_TYPE_HARDDISK, 0);
+            add_bev(IPL_TYPE_HARDDISK, getDriveId(EXTTYPE_HD, pos->drive));
             break;
         case IPL_TYPE_CDROM:
             map_cd_drive(pos->drive);
@@ -737,8 +735,8 @@ do_boot(int seq_nr)
         boot_disk(0x00, CheckFloppySig);
         break;
     case IPL_TYPE_HARDDISK:
-        printf("Booting from Hard Disk...\n");
-        boot_disk(0x80, 1);
+        printf("Booting from Hard Disk %u...\n", ie->vector);
+        boot_disk(EXTSTART_HD + ie->vector, 1);
         break;
     case IPL_TYPE_CDROM:
         boot_cdrom((void*)ie->vector);
-- 
2.7.4


_______________________________________________
SeaBIOS mailing list
[email protected]
https://mail.coreboot.org/mailman/listinfo/seabios

Reply via email to