On Thu, May 05, 2011 at 12:44:04PM +0000, Mark Marshall wrote:
Not having access to the very beginning of the boot really limited sgabios' capabilities, so the "vgaroms/" trick was added to SeaBIOS. (In particular, one couldn't change the boot order on a real machine.) It's ~3 lines of code though.
I'm a bit confused here. If we run sgabios with the other non-VGA option ROMS do we lose the boot menu? I would image that the boot menu would come after all option ROMs have been run? Does sgabios work with legacy BIOS's (I assume as a non-VGA ROM)?
The main execution of option ROMs is after the boot menu. The boot menu determines the order in which option ROMs are executed so that one can control the boot order.
I always assumed that the boot sequence was this:
- do some HW initialisation
- load first VGA option ROM
+ execute VGA option ROM
- do some more HW initialisation
- load all non-VGA option ROMS
- show boot menu
+ execute non-VGA option ROMS
A PNP option ROM is invoked twice - once during the "load" stage, and once during the "execute" stage (for BCVs; BEVs would be executed a second time during boot phase). A PNP option ROM isn't supposed to hook any interrupts during the "load" stage. A non-PNP ROM is only executed once (in the "execute" stage).
SeaBIOS' boot order can be seen in post.c:maininit().
-Kevin