From 1e15725c92858a0cb1dd5c76bd44af1fec09fee3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 14 Jan 2012 11:55:35 -0500 Subject: [PATCH] Permit multiple BEV and BEV/BCV combinations in a single option rom. 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 --- src/optionroms.c | 21 ++++++++++----------- 1 file 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); } } } -- 2.25.1