[coreboot] SeaBIOS and boot of SATA raid card

Kevin O'Connor kevin at koconnor.net
Wed Dec 17 06:30:17 CET 2008


Hi Ruik!

On Wed, Dec 17, 2008 at 12:55:54AM +0100, Rudolf Marek wrote:
> Hello,
> 
> I had some time today. I have PCI SATA RAID (fake raid) with Silicon Image chip
> on it. The option rom runs fine but SeaBIOS complains that EBDA was relocated. I
> fixed that in the patch. Also I fixed the stuff so now I get:

Yeah, SeaBIOS needs to handle a relocatable ebda.

The simple way to do this (reload the ebda_seg from the bda) on every
access is going to lead to terrible code generation.  It may be
simpler to implement the Post Memory Manager (PMM) interface - in
theory, an option rom shouldn't relocate the ebda if it can allocate
memory via PMM.  Another possibility would be to assign a segment to
the current ebda location (eg, fs/gs) at every entry to the C code.

[...]

Hrmm.  I'm not sure what the following part of your patch does:

> @@ -341,13 +343,29 @@
>              callrom(rom, OPTION_ROM_INITVECTOR, 0);
>              continue;
>          }
> -        // PnP rom.
> -        if (pnp->bev)
> -            // Can boot system - add to IPL list.
> -            add_ipl(rom, pnp);
> -        else if (pnp->bcv)
> -            // Has BCV - run it now.
> -            callrom(rom, pnp->bcv, 0);
> +	/* rebuild the PNP block, init migh have change that */
> +	pnp = get_pnp_rom(rom);
> +
> +	/* for further details check BIOS Boot Specification */
> +	while (pnp) {
> +			dprintf(1, "$PnP at %p\n",pnp);
> +
> +		if ((pnp->bev) && (!pnp->bcv))
> +		        add_ipl(rom, pnp, IPL_TYPE_BEV);
> +
> +		if ((!pnp->bev) && (pnp->bcv)) {
> +			dprintf(1, "Running BCV %x\n",pnp->bcv);
> +        	    callrom(rom, pnp->bcv, 0);
> +		        add_ipl(rom, pnp, pnp->type_lo);
> +		}
> +
> +		if (pnp->nextoffset)
> +			pnp = (struct pnp_data *) (((u8 *) pnp) + pnp->nextoffset);
> +		else
> +			pnp = NULL;
> +	}
> +
> +
>      }
>  }
>  

-Kevin




More information about the coreboot mailing list