diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-03-03 10:48:45 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-03-13 11:47:36 -0400 |
commit | c68aff57ce317d9f2d69d20eba893a10d964f316 (patch) | |
tree | 6f1cdb6c241ea0d65363e7bf9352555121cd60e8 /src/resume.c | |
parent | 1415d46dc87fd8bf1d6acd97c1ad60e893f62523 (diff) | |
download | seabios-hppa-c68aff57ce317d9f2d69d20eba893a10d964f316.zip seabios-hppa-c68aff57ce317d9f2d69d20eba893a10d964f316.tar.gz seabios-hppa-c68aff57ce317d9f2d69d20eba893a10d964f316.tar.bz2 |
resume: Don't attempt to use generic reboot mechanisms on QEMU
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@redhat.com>
Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/resume.c')
-rw-r--r-- | src/resume.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resume.c b/src/resume.c index 99fa34f..fb0b8a8 100644 --- a/src/resume.c +++ b/src/resume.c @@ -125,8 +125,8 @@ tryReboot(void) { dprintf(1, "Attempting a hard reboot\n"); - // Setup for reset on qemu. - qemu_prep_reset(); + // Use a QEMU specific reboot on QEMU + qemu_reboot(); // Reboot using ACPI RESET_REG acpi_reboot(); |