From: Kevin O'Connor Date: Sat, 14 Jan 2012 16:55:35 +0000 (-0500) Subject: Permit multiple BEV and BEV/BCV combinations in a single option rom. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=seabios.git;a=commitdiff_plain;h=1e15725c92858a0cb1dd5c76bd44af1fec09fee3 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 --- 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); } } }