Hi Kevin,<br>    The Seabios try to booting usbrom with IPL_TYPE_BEV, which i think should use IPL_TYPE_HARDDISK, right? Followed by BIOS BOOT Specification<br>I think it can add<br>#define IPL_TYPE_USBROM 0x05 to support BCV, how do you think about that?<br>
<br><div class="gmail_quote">On Wed, Aug 12, 2009 at 10:59 AM, Jason Wang <span dir="ltr"><<a href="mailto:wangqingpei@gmail.com">wangqingpei@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Kevin,<br>    <br><br><div class="gmail_quote"><div class="im">On Wed, Aug 12, 2009 at 8:18 AM, Kevin O'Connor <span dir="ltr"><<a href="mailto:kevin@koconnor.net" target="_blank">kevin@koconnor.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Wed, Aug 12, 2009 at 03:59:02AM +0800, Jason Wang wrote:<br>
> Hi all<br>
>     Since USB ROM has already added into the booting menu list(IPL table),<br>
> and the UHCI stack can be run well in usbrom now, i have some issues to<br>
> confirm, any advices are welcome.<br>
> 1) <<Plug and Play BIOS Specification>>Page21, There is an r Return Status<br>
> from Initialization Call of OPTION ROM. Which used to let the bios know the<br>
> status. But it seems Seabios does not<br>
>    check the return code. Is that OK?<br>
<br>
</div>SeaBIOS assumes the rom runs successfully - I think that is okay.  If<br>
you wish to unload the optionrom, set its size to 0.<br>
<div><br>
> 2) After Seabios make an far call into the BEV, the OPTION ROM should begin<br>
> to load OS.if it failed, it can return back to BIOS. But it can not return<br>
> back with my USB OPTION ROM, Is there any configuration<br>
>    I should set?<br>
<br>
</div>You should not use BEV; you should use a BCV.<br>
</blockquote></div><div>I use a BCV now, sorry for messing this two types. Which i use is BCV.<br>I  tried to put only an "lretw" in BCV. but still failed. <br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
I don't know why you can't return - it should work.  Maybe the stack<br>
or gdt/idt was changed?<br>
<div><br>
> 3) In my eyes, OPTION ROM hook int13 after jump into BEV, not in the<br>
> initialization.But after that how does it jump into the booting code which<br>
> located in the USB disk?<br>
<br>
</div>As above, define a BCV and hook int13 from the BCV handler.<br>
</blockquote></div><div>So, BCV handler is used to hook int13, anything else that BCV should do? <br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
SeaBIOS will make int13 calls to load the OS and boot it.  As long as<br>
your rom can handle the int13 calls, SeaBIOS will be able to boot an<br>
OS from usb.<br>
<div><br>
> BTW:<br>
>  Kevin: I looked the code of Seabios ata.c to learn how seabios booting OS<br>
> from ata disk. some question i have:<br>
> 1) ATA used add_bcv_hd to add ata disk into IPL table. it's type is<br>
> IPL_TYPE_HARDDISK(0x02). It's vector is the driver id. how does seabios know<br>
> the bootstrap vector based the driver ID?<br>
<br>
</div>add_bcv_hd() adds the drive to the BCV table, not the IPL table. <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>


<br>
SeaBIOS populates the BCV table with built-in harddrives and<br>
optionroms with a BCV.<br>
<div><br>
>    what does ata fill FDPT area for? Should my usbrom do the same?<br>
<br>
</div>It's some weird legacy thing.  Nothing modern will require it.  I<br>
don't know what legacy things will break without it.<br>
<div><br>
> For my usbrom, i should not use add_bcv to add option rom into IPL ? or just<br>
> take the ata as example?<br>
<br>
</div>As above, you should use a BCV.<br>
<br>
><br>
> --<br>
> Jason Wang<br>
> Peking University<br>
<font color="#888888"><br>
-Kevin<br>
</font></blockquote></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Jason Wang <br>Peking University<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Jason Wang <br>Peking University<br>