On Fri, Jan 20, 2012 at 01:50:15PM +0200, Gleb Natapov wrote:
On Thu, Jan 19, 2012 at 08:40:45PM -0500, Kevin O'Connor wrote:
Further, no spec I've seen says an option rom must handle being executed a second time. The option rom can self modify - re-running a modified rom may crash it. Thinking about this further, the vgabios in the seabios repo wont handle being executed twice properly (which, of course, should be fixed).
Not sure how thing works on real HW, but on QEMU S3 actually invokes HW reset. The same reset that is done on reboot, so option rom should be reset to its pristine state. I expect that on real HW things should be similar if device powered down on S3.
I'm 99% sure that wont work. Option roms have to be copied from PCI bars to low memory. If seabios copies the option rom again (to reset its state) then all option roms would need to be copied (the initial option rom size could be larger than the final option rom size). Running all option roms again is surely going to break something.
To be clear, I really don't know the exact interactions between an off the shelf BIOS and a "real world" vga bios on resume. If someone can find a spec or document clarifying that - I'd be happy to conform to it.
I am not asking to change how Seabios works on real HW. What it does currently on real HW has a lot of sense and models behaviour of real BIOSes as far as I can tell.
I understand your point about requesting QEMU specific code. I really prefer to keep things general where ever possible, however. I think both projects are better off if the most code possible can be shared. If QEMU *always* needed this setting, I could see adding it to the init phase of seabios. However, Windows doesn't seem to need it, and it's unclear what VGA pass-through would require (though granted, that has many other hurdles).
-Kevin