[SeaBIOS] [PATCH 1/2] Permit multiple BEV and BEV/BCV combinations in a single option rom.

Kevin O'Connor kevin at koconnor.net
Sat Jan 14 18:18:10 CET 2012


The BBS spec is unclear on multiple BEV entry points for a rom.
However, the LSI scsi rom has been seen to register a BEV followed by
multiple BCV entry points.  Add support for it, as there's no harm in
it.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/optionroms.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/optionroms.c b/src/optionroms.c
index 725767b..27cfffd 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -388,19 +388,18 @@ optionrom_setup(void)
                          , getRomPriority(sources, rom, 0));
             continue;
         }
-        // PnP rom.
-        if (pnp->bev) {
-            // Can boot system - add to IPL list.
-            boot_add_bev(FLATPTR_TO_SEG(rom), pnp->bev, pnp->productname
-                         , getRomPriority(sources, rom, 0));
-        } else {
-            // Check for BCV (there may be multiple).
-            int instance = 0;
-            while (pnp && pnp->bcv) {
+        // PnP rom - check for BEV and BCV boot capabilities.
+        int instance = 0;
+        while (pnp) {
+            if (pnp->bev)
+                boot_add_bev(FLATPTR_TO_SEG(rom), pnp->bev, pnp->productname
+                             , getRomPriority(sources, rom, instance++));
+            else if (pnp->bcv)
                 boot_add_bcv(FLATPTR_TO_SEG(rom), pnp->bcv, pnp->productname
                              , getRomPriority(sources, rom, instance++));
-                pnp = get_pnp_next(rom, pnp);
-            }
+            else
+                break;
+            pnp = get_pnp_next(rom, pnp);
         }
     }
 }
-- 
1.7.6.4




More information about the SeaBIOS mailing list