Hi all Since USB ROM has already added into the booting menu list(IPL table), and the UHCI stack can be run well in usbrom now, i have some issues to confirm, any advices are welcome. 1) <<Plug and Play BIOS Specification>>Page21, There is an r Return Status from Initialization Call of OPTION ROM. Which used to let the bios know the status. But it seems Seabios does not check the return code. Is that OK? 2) After Seabios make an far call into the BEV, the OPTION ROM should begin to load OS.if it failed, it can return back to BIOS. But it can not return back with my USB OPTION ROM, Is there any configuration I should set? 3) In my eyes, OPTION ROM hook int13 after jump into BEV, not in the initialization.But after that how does it jump into the booting code which located in the USB disk?
BTW: Kevin: I looked the code of Seabios ata.c to learn how seabios booting OS from ata disk. some question i have: 1) ATA used add_bcv_hd to add ata disk into IPL table. it's type is IPL_TYPE_HARDDISK(0x02). It's vector is the driver id. how does seabios know the bootstrap vector based the driver ID? what does ata fill FDPT area for? Should my usbrom do the same? For my usbrom, i should not use add_bcv to add option rom into IPL ? or just take the ata as example?
On Wed, Aug 12, 2009 at 03:59:02AM +0800, Jason Wang wrote:
Hi all Since USB ROM has already added into the booting menu list(IPL table), and the UHCI stack can be run well in usbrom now, i have some issues to confirm, any advices are welcome.
- <<Plug and Play BIOS Specification>>Page21, There is an r Return Status
from Initialization Call of OPTION ROM. Which used to let the bios know the status. But it seems Seabios does not check the return code. Is that OK?
SeaBIOS assumes the rom runs successfully - I think that is okay. If you wish to unload the optionrom, set its size to 0.
- After Seabios make an far call into the BEV, the OPTION ROM should begin
to load OS.if it failed, it can return back to BIOS. But it can not return back with my USB OPTION ROM, Is there any configuration I should set?
You should not use BEV; you should use a BCV.
I don't know why you can't return - it should work. Maybe the stack or gdt/idt was changed?
- In my eyes, OPTION ROM hook int13 after jump into BEV, not in the
initialization.But after that how does it jump into the booting code which located in the USB disk?
As above, define a BCV and hook int13 from the BCV handler.
SeaBIOS will make int13 calls to load the OS and boot it. As long as your rom can handle the int13 calls, SeaBIOS will be able to boot an OS from usb.
BTW: Kevin: I looked the code of Seabios ata.c to learn how seabios booting OS from ata disk. some question i have:
- ATA used add_bcv_hd to add ata disk into IPL table. it's type is
IPL_TYPE_HARDDISK(0x02). It's vector is the driver id. how does seabios know the bootstrap vector based the driver ID?
add_bcv_hd() adds the drive to the BCV table, not the IPL table.
SeaBIOS populates the BCV table with built-in harddrives and optionroms with a BCV.
what does ata fill FDPT area for? Should my usbrom do the same?
It's some weird legacy thing. Nothing modern will require it. I don't know what legacy things will break without it.
For my usbrom, i should not use add_bcv to add option rom into IPL ? or just take the ata as example?
As above, you should use a BCV.
-- Jason Wang Peking University
-Kevin
Hi Kevin,
On Wed, Aug 12, 2009 at 8:18 AM, Kevin O'Connor kevin@koconnor.net wrote:
On Wed, Aug 12, 2009 at 03:59:02AM +0800, Jason Wang wrote:
Hi all Since USB ROM has already added into the booting menu list(IPL
table),
and the UHCI stack can be run well in usbrom now, i have some issues to confirm, any advices are welcome.
- <<Plug and Play BIOS Specification>>Page21, There is an r Return
Status
from Initialization Call of OPTION ROM. Which used to let the bios know
the
status. But it seems Seabios does not check the return code. Is that OK?
SeaBIOS assumes the rom runs successfully - I think that is okay. If you wish to unload the optionrom, set its size to 0.
- After Seabios make an far call into the BEV, the OPTION ROM should
begin
to load OS.if it failed, it can return back to BIOS. But it can not
return
back with my USB OPTION ROM, Is there any configuration I should set?
You should not use BEV; you should use a BCV.
I use a BCV now, sorry for messing this two types. Which i use is BCV. I tried to put only an "lretw" in BCV. but still failed.
I don't know why you can't return - it should work. Maybe the stack or gdt/idt was changed?
- In my eyes, OPTION ROM hook int13 after jump into BEV, not in the
initialization.But after that how does it jump into the booting code
which
located in the USB disk?
As above, define a BCV and hook int13 from the BCV handler.
So, BCV handler is used to hook int13, anything else that BCV should do?
SeaBIOS will make int13 calls to load the OS and boot it. As long as your rom can handle the int13 calls, SeaBIOS will be able to boot an OS from usb.
BTW: Kevin: I looked the code of Seabios ata.c to learn how seabios booting
OS
from ata disk. some question i have:
- ATA used add_bcv_hd to add ata disk into IPL table. it's type is
IPL_TYPE_HARDDISK(0x02). It's vector is the driver id. how does seabios
know
the bootstrap vector based the driver ID?
add_bcv_hd() adds the drive to the BCV table, not the IPL table.
SeaBIOS populates the BCV table with built-in harddrives and optionroms with a BCV.
what does ata fill FDPT area for? Should my usbrom do the same?
It's some weird legacy thing. Nothing modern will require it. I don't know what legacy things will break without it.
For my usbrom, i should not use add_bcv to add option rom into IPL ? or
just
take the ata as example?
As above, you should use a BCV.
-- Jason Wang Peking University
-Kevin
Hi Kevin, The Seabios try to booting usbrom with IPL_TYPE_BEV, which i think should use IPL_TYPE_HARDDISK, right? Followed by BIOS BOOT Specification I think it can add #define IPL_TYPE_USBROM 0x05 to support BCV, how do you think about that?
On Wed, Aug 12, 2009 at 10:59 AM, Jason Wang wangqingpei@gmail.com wrote:
Hi Kevin,
On Wed, Aug 12, 2009 at 8:18 AM, Kevin O'Connor kevin@koconnor.netwrote:
On Wed, Aug 12, 2009 at 03:59:02AM +0800, Jason Wang wrote:
Hi all Since USB ROM has already added into the booting menu list(IPL
table),
and the UHCI stack can be run well in usbrom now, i have some issues to confirm, any advices are welcome.
- <<Plug and Play BIOS Specification>>Page21, There is an r Return
Status
from Initialization Call of OPTION ROM. Which used to let the bios know
the
status. But it seems Seabios does not check the return code. Is that OK?
SeaBIOS assumes the rom runs successfully - I think that is okay. If you wish to unload the optionrom, set its size to 0.
- After Seabios make an far call into the BEV, the OPTION ROM should
begin
to load OS.if it failed, it can return back to BIOS. But it can not
return
back with my USB OPTION ROM, Is there any configuration I should set?
You should not use BEV; you should use a BCV.
I use a BCV now, sorry for messing this two types. Which i use is BCV. I tried to put only an "lretw" in BCV. but still failed.
I don't know why you can't return - it should work. Maybe the stack or gdt/idt was changed?
- In my eyes, OPTION ROM hook int13 after jump into BEV, not in the
initialization.But after that how does it jump into the booting code
which
located in the USB disk?
As above, define a BCV and hook int13 from the BCV handler.
So, BCV handler is used to hook int13, anything else that BCV should do?
SeaBIOS will make int13 calls to load the OS and boot it. As long as your rom can handle the int13 calls, SeaBIOS will be able to boot an OS from usb.
BTW: Kevin: I looked the code of Seabios ata.c to learn how seabios booting
OS
from ata disk. some question i have:
- ATA used add_bcv_hd to add ata disk into IPL table. it's type is
IPL_TYPE_HARDDISK(0x02). It's vector is the driver id. how does seabios
know
the bootstrap vector based the driver ID?
add_bcv_hd() adds the drive to the BCV table, not the IPL table.
SeaBIOS populates the BCV table with built-in harddrives and optionroms with a BCV.
what does ata fill FDPT area for? Should my usbrom do the same?
It's some weird legacy thing. Nothing modern will require it. I don't know what legacy things will break without it.
For my usbrom, i should not use add_bcv to add option rom into IPL ? or
just
take the ata as example?
As above, you should use a BCV.
-- Jason Wang Peking University
-Kevin
-- Jason Wang Peking University
On Wed, Aug 12, 2009 at 03:29:06PM +0800, Jason Wang wrote:
Hi Kevin, The Seabios try to booting usbrom with IPL_TYPE_BEV, which i think should use IPL_TYPE_HARDDISK, right? Followed by BIOS BOOT Specification I think it can add #define IPL_TYPE_USBROM 0x05 to support BCV, how do you think about that?
SeaBIOS is overloading those flags, and I agree it's confusing. The flags for BCV tables are only used in run_bcv(), add_bcv(), and add_bcv_hd(). It's not necessary to add a new flag.
On Wed, Aug 12, 2009 at 10:59:51AM +0800, Jason Wang wrote:
I use a BCV now, sorry for messing this two types. Which i use is BCV. I tried to put only an "lretw" in BCV. but still failed.
I don't know why you can't return - it should work. Maybe the stack or gdt/idt was changed?
As before, I'd double check that you've restored the stack, segments, cr0, and gdt/idt.
As above, define a BCV and hook int13 from the BCV handler.
So, BCV handler is used to hook int13, anything else that BCV should do?
That should be it.
-Kevin
On Wed, Aug 12, 2009 at 9:17 PM, Kevin O'Connor kevin@koconnor.net wrote:
On Wed, Aug 12, 2009 at 03:29:06PM +0800, Jason Wang wrote:
Hi Kevin, The Seabios try to booting usbrom with IPL_TYPE_BEV, which i think should use IPL_TYPE_HARDDISK, right? Followed by BIOS BOOT Specification I think it can add #define IPL_TYPE_USBROM 0x05 to support BCV, how do you think about that?
SeaBIOS is overloading those flags, and I agree it's confusing. The flags for BCV tables are only used in run_bcv(), add_bcv(), and add_bcv_hd(). It's not necessary to add a new flag.
I find that handle_19, do_boot only seek the BEV devices
1. if (bootdev >= IPL.bevcount) { 2. printf("No bootable device.\n"); 3. // Loop with irqs enabled - this allows ctrl+alt+delete to work. 4. for (;;) 5. usleep(1000000); 6. } 7. /* Do the loading, and set up vector as a far pointer to the boot 8. * address, and bootdrv as the boot drive */ 9. struct ipl_entry_s *ie = &IPL.bev[bootdev];
why did not seek IPL.bcv?
On Wed, Aug 12, 2009 at 10:59:51AM +0800, Jason Wang wrote:
I use a BCV now, sorry for messing this two types. Which i use is BCV. I tried to put only an "lretw" in BCV. but still failed.
I don't know why you can't return - it should work. Maybe the stack or gdt/idt was changed?
As before, I'd double check that you've restored the stack, segments, cr0, and gdt/idt.
As above, define a BCV and hook int13 from the BCV handler.
So, BCV handler is used to hook int13, anything else that BCV should do?
That should be it.
-Kevin
On Thu, Aug 13, 2009 at 02:22:05AM +0800, Jason Wang wrote:
On Wed, Aug 12, 2009 at 9:17 PM, Kevin O'Connor kevin@koconnor.net wrote:
On Wed, Aug 12, 2009 at 03:29:06PM +0800, Jason Wang wrote:
Hi Kevin, The Seabios try to booting usbrom with IPL_TYPE_BEV, which i think should use IPL_TYPE_HARDDISK, right? Followed by BIOS BOOT Specification I think it can add #define IPL_TYPE_USBROM 0x05 to support BCV, how do you think about that?
SeaBIOS is overloading those flags, and I agree it's confusing. The flags for BCV tables are only used in run_bcv(), add_bcv(), and add_bcv_hd(). It's not necessary to add a new flag.
I find that handle_19, do_boot only seek the BEV devices
That is correct.
The BEVs are the ways one can boot the machine and the BCVs are the drives in the machine.
SeaBIOS has a BEV for booting off of a drive (see boot_disk()). You should not add a new way to boot from a drive - instead you want to add a new drive.
The BCV list is executed during post (see boot_prep()). SeaBIOS will call all the optionroms that have BCVs and they can then hook int13. Once int13 has been properly hooked, the existing SeaBIOS drive booting code will work.
-Kevin
On Thu, Aug 13, 2009 at 7:24 AM, Kevin O'Connor kevin@koconnor.net wrote:
On Thu, Aug 13, 2009 at 02:22:05AM +0800, Jason Wang wrote:
On Wed, Aug 12, 2009 at 9:17 PM, Kevin O'Connor kevin@koconnor.net
wrote:
On Wed, Aug 12, 2009 at 03:29:06PM +0800, Jason Wang wrote:
Hi Kevin, The Seabios try to booting usbrom with IPL_TYPE_BEV, which i
think
should use IPL_TYPE_HARDDISK, right? Followed by BIOS BOOT
Specification
I think it can add #define IPL_TYPE_USBROM 0x05 to support BCV, how do you think about
that?
SeaBIOS is overloading those flags, and I agree it's confusing. The flags for BCV tables are only used in run_bcv(), add_bcv(), and add_bcv_hd(). It's not necessary to add a new flag.
I find that handle_19, do_boot only seek the BEV devices
That is correct.
The BEVs are the ways one can boot the machine and the BCVs are the drives in the machine.
SeaBIOS has a BEV for booting off of a drive (see boot_disk()). You should not add a new way to boot from a drive - instead you want to add a new drive.
The BCV list is executed during post (see boot_prep()). SeaBIOS will call all the optionroms that have BCVs and they can then hook int13. Once int13 has been properly hooked, the existing SeaBIOS drive booting code will work.
I still have questions about the BCVs. 1) The BCVs is used to hook int13 while being called by optionrom.What if the usbrom failed,and system should restore int13. Or the BCVs should do that? 2)As you mentioned the BCVs are the drivers in the machine. How does the BCV save the drives in the memroy which can be used by Seabios? Since after BCVs turning back to Seabios, it can leave some data to Seabios? 3) i want to know if the int13 should initialize the USB stack each time it is called?
-Kevin