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@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); } } }
Kevin O'Connor wrote:
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.
Which LSI scsi rom is this?
Sebastian
On Sat, Jan 14, 2012 at 11:27:37PM +0100, Sebastian Herbszt wrote:
Kevin O'Connor wrote:
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.
Which LSI scsi rom is this?
The 8xx_64.rom file - see the discussion at:
http://lists.nongnu.org/archive/html/qemu-devel/2012-01/msg00774.html
It will register both a BEV and BCV should it find both a CDROM and a hard drive.
-Kevin