On Thu, Jan 19, 2012 at 08:40:45PM -0500, Kevin O'Connor wrote:
On Thu, Jan 19, 2012 at 12:16:25PM +0200, Gleb Natapov wrote:
There is absolutely nothing that vgabios may attempt to do that is illegal on resume and may cause this kind of hang. The only thing that is illegal on resume is to use non reserved RAM, but this will cause OS to fail after resume, not vgabios to hang.
On an S3 resume, the bios isn't required to init hardware - in
Yes, because it is assumed that OSMP has a driver.
particular, the current seabios resume code doesn't initialize PCI or initialize the standard timer. It's not clear to me that the VGA BIOS will run properly if these services aren't setup.
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.
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 am also not asking to change SeaBIOS default. Just get us back compile time option to always enable it.
I think using etc/s3-resume-vga-init to control this is just fine ...
If and only if QEMU will enable it conditionally it is appropriate to introduce it. Otherwise compile time option, that served us well, should be reintroduced.
QEMU upstream uses SeaBIOS defaults afaik. So, I don't really understand your statement.
Checking QEMU upstream is not the only (or even best) thing to do! Distributions package their own SeaBIOS and distribution I care about has this option set.