-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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:
Inspecting possible rom at f1200000 (vd=31141095 bdf=00000530) Copying option rom from f1200000 to 000ca000 Running option rom at 0000ca00:00000003 Changing serial settings was 00000003/00000002 now 00000003/00000000 Option rom at 0000ca00:00000003 attempted to move ebda from 00009fc0 to 00009f80 $PnP at 000cb220 Running BCV 000031c7 Running option rom at 0000ca00:000031c7 Option rom at 0000ca00:000031c7 attempted to move ebda from 00009fc0 to 00009f80 Adding IPL Press F12 for boot menu.
Select boot device:
1. Floppy 2. Hard Disk 3. CD-Rom 4. Floppy [05:30-0 ST3250310AS ]
Jump to int19 enter handle_19: NULL Booting from Floppy [05:30-0 ST3250310AS ]... fail check_drive:384(00000080): a=00000201 b=00000000 c=00000001 d=00000000 si=00000000 di=00000000 ds=00000000 es=000007c0 ip=0000e7e9 cs=0000f000 f=00000002 r=00007b5e Boot failed: could not read the boot disk
enter handle_18: NULL
The WIP patch is attached. I had no time to investigate why it does not actually boot. Maybe next time.
Rudolf
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
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.
yes perhaps, because when PPM manager fails to provide memory, the option rom will do the EBDA stuff anyway.
Hrmm. I'm not sure what the following part of your patch does:
The option rom has either BEV OR BCV not both. BEV is for network card, just a entrypoint. BCV will patch the int13 and add new device there.
@@ -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);
the type_lo is not the boot type, Its a PCI type it seems so it then should be HDD (this can fix the floppy item which is wrong)
}
if (pnp->nextoffset)
there can be more BEV/BCVs in the chain.
pnp = (struct pnp_data *) (((u8 *) pnp) + pnp->nextoffset);
else
pnp = NULL;
- }
- }
}
Rudolf