summaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-17 22:32:52 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-17 22:32:52 +0000
commit017505eba5393e0cf7aa167414a417d5e5cff52e (patch)
treeb8505fae1f7716deba35e7b024d9a376b98afd85 /hw/pc.c
parent1d3b99a029764075dd06112855cb384c06197a4d (diff)
downloadqemu-017505eba5393e0cf7aa167414a417d5e5cff52e.tar.gz
qemu-017505eba5393e0cf7aa167414a417d5e5cff52e.tar.bz2
qemu-017505eba5393e0cf7aa167414a417d5e5cff52e.zip
Handle suspend in qemu (Gleb Natapov)
Reset a PC and tell BIOS that resume from ram is required on the next boot. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6080 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 73dd8bcc4a..fe03704288 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1135,6 +1135,14 @@ static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size,
initrd_filename, 0, cpu_model);
}
+/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE)
+ BIOS will read it and start S3 resume at POST Entry */
+void cmos_set_s3_resume(void)
+{
+ if (rtc_state)
+ rtc_set_memory(rtc_state, 0xF, 0xFE);
+}
+
QEMUMachine pc_machine = {
.name = "pc",
.desc = "Standard PC",