[SeaBIOS] [PATCH] resume: Don't attempt to use generic reboot mechanisms on QEMU

Kevin O'Connor kevin at koconnor.net
Mon Mar 13 16:49:39 CET 2017


On Mon, Mar 06, 2017 at 01:49:26PM +0000, Dr. David Alan Gilbert wrote:
> * Kevin O'Connor (kevin at koconnor.net) wrote:
> > On QEMU it's necessary to manually reset the BIOS memory region
> > between 0xc0000-0x100000 on a reboot.  After this manual memory reset
> > is completed, it's not valid to use the generic reset mechanisms.
> > Rename qemu_prep_reset() to qemu_reboot() and change the function to
> > immediately reboot after the code memcpy.
> > 
> > This fixes a bug that could cause code corruption on reboots - calling
> > the udelay() function (as invoked by i8042_reboot and/or pci_reboot)
> > was not valid after the BIOS was memcpy'd.
> > 
> > Reported-by: "Dr. David Alan Gilbert" <dgilbert at redhat.com>
> > Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
> > ---
> > 
> > This patch is based on Paolo's recommendation of first attempting a
> > PCI style reboot on QEMU.  However, instead of next attempting a
> > keyboard reset, this patch attempts to signal an "INIT" via a triple
> > fault (as I think that's a bit simpler and less likely to fail).
> 
> Thanks, I've given this a few hours of testing and it seems to work
> (this is testing on head rather than on our downstream).

Thanks.  I committed this patch.

-Kevin



More information about the SeaBIOS mailing list